level.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <view class="layout-page" :style="themeStyle">
  3. <v-header title=""></v-header>
  4. <main class="layout-main">
  5. <view class="top bgb5">
  6. <view class="user d-flex align-center">
  7. <view class="head-box flex-shrink m-r-lg">
  8. <!-- <van-icon
  9. class="head w-63 h-63 rounded-max overflow-hidden color-theme-1"
  10. name="user-circle-o"
  11. /> -->
  12. <img :src="logoMap.login_logo" class="h-80 rounded-max" />
  13. </view>
  14. <view class="info color-plain">
  15. <view class="name">
  16. {{$t('invite.c0')}}:
  17. <span>{{user.username}}</span>
  18. </view>
  19. <view class="id">ID:{{user.user_id}}</view>
  20. </view>
  21. </view>
  22. <view class="d-flex level-text justify-between align-center">
  23. <view class="color-plain fn-lg">{{$t('invite.b6')}}:{{user.user_grade_name}}</view>
  24. <view
  25. class="fn-sm border-buy border-r-0 border color-success rounded-tl-lg rounded-bl-lg"
  26. style="padding:4px 6px"
  27. >{{$t('invite.c9')}}</view>
  28. </view>
  29. </view>
  30. <view @click="_router.push('/pages/invite/index')" class="nav-two d-flex justify-between color-light">
  31. <view class="item fn-center fn-10 flex-fill flex-shrink">
  32. <img src="static/img/13@2x.png" class="icon h-40" />
  33. <p>{{$t('invite.c3')}}</p>
  34. </view>
  35. <view class="item fn-center fn-10 flex-fill flex-shrink">
  36. <img src="static/img/8@2x.png" class="icon h-40" />
  37. <p>
  38. {{$t('invite.c2')}}
  39. <span class="fn-8">(USDT)</span>
  40. </p>
  41. </view>
  42. <view class="item fn-center fn-10 flex-fill flex-shrink">
  43. <img src="static/img/4@2x.png" class="icon h-40" />
  44. <p>{{$t('invite.c1')}}</p>
  45. </view>
  46. <view class="item fn-center fn-10 flex-fill flex-shrink">
  47. <img src="static/img/4@2x(1).png" class="icon h-40" />
  48. <p>{{$t('invite.c4')}}</p>
  49. </view>
  50. </view>
  51. <view class="bg-panel-3 table-box color-light level-box box-shadow">
  52. <view class="title fn-center">{{$t('invite.c5')}}</view>
  53. <table class="table">
  54. <thead class="fn-13 fn-center bg-form-panel-4">
  55. <tr>
  56. <th>{{$t('invite.c6')}}</th>
  57. <th class="fn-wrap">{{$t('invite.b8')}} / {{$t('invite.b9')}}</th>
  58. </tr>
  59. </thead>
  60. <tbody>
  61. <template v-for="item in grade">
  62. <tr :key="item.grade_id">
  63. <td rowspan="2" class="fn-center fn-nowrap p-x-lg">
  64. <img
  65. v-if="levelListIcon[item.grade_id]"
  66. class="icon h-16"
  67. :src="levelListIcon[item.grade_id]"
  68. alt
  69. />
  70. <p>{{item.grade_name}}</p>
  71. </td>
  72. <td class="fn-sm">
  73. <view
  74. class="m-b-xs"
  75. v-for="(minItem,idx) in item.upgrade_condition_text"
  76. :key="idx"
  77. >({{idx+1}}){{minItem}}</view>
  78. <view class="fn-center" v-if="!item.upgrade_condition_text.length">-</view>
  79. </td>
  80. </tr>
  81. <tr :key="item.grade_id+'a'">
  82. <td class="fn-sm">{{item.bonus_text}}</td>
  83. </tr>
  84. </template>
  85. </tbody>
  86. </table>
  87. </view>
  88. <view class="bg-panel-3 invate-info color-light box-shadow">
  89. <view class="title m-b-xs">{{remark.title}}</view>
  90. <view v-html="remark.body"></view>
  91. </view>
  92. </main>
  93. </view>
  94. </template>
  95. <script>
  96. import Profile from "@/api/profile";
  97. import { mapGetters,mapState } from "vuex";
  98. export default {
  99. name: "level",
  100. data() {
  101. return {
  102. levelListIcon: {
  103. // 普通账户
  104. 1: "",
  105. // 期权矿工
  106. 2: "static/img/invite-2.png",
  107. // 节点矿工
  108. 3: "static/img/invite-3.png",
  109. // 高级矿工
  110. 4: "static/img/invite-4.png",
  111. // 超级矿工
  112. 5: "static/img/invite-5.png",
  113. // 矿池
  114. 6: "static/img/invite-6.png",
  115. },
  116. user: {},
  117. grade: [],
  118. remark: {},
  119. };
  120. },
  121. computed:{
  122. ...mapGetters(['themeStyle']),
  123. ...mapState({
  124. logoMap: "logoMap",
  125. }),
  126. },
  127. methods: {
  128. getGradeInfo() {
  129. Profile.getGradeInfo().then((res) => {
  130. this.user = res.data.user;
  131. this.grade = res.data.grade;
  132. this.remark = res.data.remark;
  133. });
  134. },
  135. },
  136. created() {
  137. this.getGradeInfo();
  138. },
  139. };
  140. </script>
  141. <style lang="scss" scoped>
  142. $rounded: 16px;
  143. $pad: 23px;
  144. $border: $border-color;
  145. .top {
  146. margin: 27px 18px 0;
  147. border-radius: $rounded;
  148. padding: 19px 0;
  149. background: url("../../static/img/invite-bg.png") $panel-4
  150. no-repeat;
  151. background-size: 100% 100%;
  152. .user {
  153. padding: 0 $pad;
  154. .head-box {
  155. position: relative;
  156. .head {
  157. font-size: 63px;
  158. }
  159. .level-icon {
  160. position: absolute;
  161. right: 0;
  162. bottom: 0;
  163. }
  164. }
  165. }
  166. .level-text {
  167. margin-top: 40px;
  168. padding-left: $pad;
  169. }
  170. }
  171. .fn-8 {
  172. font-size: 8px;
  173. }
  174. .nav-two {
  175. margin: 21px 15px;
  176. }
  177. .table-box {
  178. border-radius: $rounded;
  179. margin: 0 18px;
  180. // padding: 0 13px;
  181. th,
  182. td {
  183. padding: 14px 10px;
  184. &:not(:last-of-type) {
  185. border-right: 1px solid $border-color;
  186. }
  187. }
  188. td {
  189. border-top: 1px solid $border-color;
  190. }
  191. .title {
  192. padding: 15px 0;
  193. }
  194. }
  195. .invate-info {
  196. margin: 13px 18px;
  197. border-radius: $rounded;
  198. padding: 16px $pad;
  199. }
  200. .bgb5{
  201. background: url(../../static/img/bgb5.png)no-repeat;
  202. background-size: 100% 100%;
  203. }
  204. </style>