user-center.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <template>
  2. <view>
  3. <view class="head">
  4. <view class="portrait">
  5. <image class="image" src="../../static/images/login/logo.png" mode="scaleToFill"></image>
  6. </view>
  7. <view>
  8. <view class="nickname">{{nickname}}</view>
  9. <view>
  10. <text v-show="user_type===3" class="wddz">网店店主</text>
  11. <text v-show="user_type===2" class="zgcj">直供厂家</text>
  12. </view>
  13. </view>
  14. <view class="invite">
  15. <view class="invite-code">邀请码:H00000164</view>
  16. <view class="invite-progress">
  17. <view class="item active"></view>
  18. <view class="item active"></view>
  19. <view class="item active"></view>
  20. <view class="item"></view>
  21. <view class="item"></view>
  22. </view>
  23. <view class="invite-notes">再邀请3人获得代理会员</view>
  24. </view>
  25. </view>
  26. <view class="body">
  27. <view class="money">
  28. <view class="row">
  29. <view class="col">可提现金额(元):<text class="warning">8.86</text></view>
  30. <view class="col"><button class="btn tixian-btn">立即提现</button></view>
  31. </view>
  32. <view class="row">
  33. <view class="col">保证金(元):<text>0.00</text><text class="tips">(保证金2000元)</text></view>
  34. <view class="col"><button class="btn jiaona-btn">立即缴纳</button></view>
  35. </view>
  36. </view>
  37. <view class="vip-center">
  38. <view class="text">代理会员中心<text class="sub">(特权独享)</text></view>
  39. </view>
  40. <view class="menu">
  41. <view class="menu-item">
  42. <view class="icon">
  43. <image class="image" src="../../static/images/menu/b8.png" mode="scaleToFill"></image>
  44. </view>
  45. <view class="name">账单明细</view>
  46. </view>
  47. <view class="menu-item">
  48. <navigator url="/pages/order/order" open-type="navigate">
  49. <view class="icon">
  50. <image class="image" src="../../static/images/menu/b7.png" mode=""></image>
  51. </view>
  52. <view class="name">订单管理</view>
  53. </navigator>
  54. </view>
  55. <view>
  56. <navigator url="/pages/product/my-product" open-type="navigate">
  57. <view class="icon">
  58. <image class="image" src="../../static/images/menu/b2.png" mode=""></image>
  59. </view>
  60. <view class="name">我的商品</view>
  61. </navigator>
  62. </view>
  63. <view>
  64. <navigator url="/pages/user/strategy" open-type="navigate">
  65. <view class="icon">
  66. <image class="image" src="../../static/images/menu/b1.png" mode=""></image>
  67. </view>
  68. <view class="name">新手攻略</view>
  69. </navigator>
  70. </view>
  71. </view>
  72. <view class="menu">
  73. <view>
  74. <navigator url="/pages/user/problem" open-type="navigate">
  75. <view class="icon">
  76. <image class="image" src="../../static/images/menu/b3.png" mode=""></image>
  77. </view>
  78. <view class="name">常见问题</view>
  79. </navigator>
  80. </view>
  81. <view>
  82. <navigator url="/pages/user/kefu" open-type="navigate">
  83. <view class="icon">
  84. <image class="image" src="../../static/images/menu/b4.png" mode=""></image>
  85. </view>
  86. <view class="name">联系客服</view>
  87. </navigator>
  88. </view>
  89. <view>
  90. <navigator url="/pages/user/notice" open-type="navigate">
  91. <view class="icon">
  92. <image class="image" src="../../static/images/menu/b5.png" mode=""></image>
  93. </view>
  94. <view class="name">官方公告</view>
  95. </navigator>
  96. </view>
  97. <view>
  98. <view class="icon">
  99. <image class="image" src="../../static/images/menu/b6.png" mode=""></image>
  100. </view>
  101. <view class="name">意见反馈</view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </template>
  107. <script>
  108. import {
  109. mapState
  110. } from 'vuex'
  111. export default {
  112. data() {
  113. return {
  114. balance: '',
  115. deposit: ''
  116. };
  117. },
  118. computed: mapState({
  119. nickname: state => state.user.nickname,
  120. user_type: state => state.user.group_id
  121. }),
  122. onNavigationBarButtonTap(e) {
  123. // console.log(e)
  124. switch (e.index) {
  125. case 0:
  126. uni.navigateTo({
  127. url: '/pages/user/setting'
  128. });
  129. break;
  130. case 1:
  131. uni.navigateTo({
  132. url: '/pages/message/message'
  133. });
  134. break;
  135. default:
  136. break;
  137. }
  138. }
  139. }
  140. </script>
  141. <style lang="scss" scoped>
  142. .head {
  143. background: $primary-color;
  144. display: flex;
  145. align-items: center;
  146. padding-bottom: 140upx;
  147. padding-top: 20upx;
  148. }
  149. .portrait {
  150. margin: 0 20upx;
  151. .image {
  152. width: 128upx;
  153. height: 128upx;
  154. background: white;
  155. border-radius: 128upx;
  156. border: 10upx solid rgba(255, 255, 255, 0.2);
  157. }
  158. }
  159. .nickname {
  160. font-size: 30upx;
  161. color: white;
  162. margin-bottom: 10upx;
  163. }
  164. .wddz,
  165. .zgcj {
  166. font-size: 24upx;
  167. color: white;
  168. border: 2upx solid white;
  169. border-radius: 20upx;
  170. width: 140upx;
  171. height: 36upx;
  172. line-height: 36upx;
  173. text-align: center;
  174. text-indent: 20upx;
  175. display: inline-block;
  176. padding: 0;
  177. background: url(../../static/images/do.png) no-repeat;
  178. background-size: 21upx 21upx;
  179. background-position: 10upx;
  180. }
  181. .invite {
  182. text-align: right;
  183. flex-grow: 1;
  184. margin-right: 20upx;
  185. color: white;
  186. .invite-code {
  187. font-size: 30upx;
  188. }
  189. .invite-notes {
  190. font-size: 24upx;
  191. }
  192. .invite-progress {
  193. .item {
  194. border: 2upx solid white;
  195. display: inline-block;
  196. width: 36upx;
  197. transform: scaleX(0.9);
  198. font-size: 0;
  199. border-radius: 2upx;
  200. &.active {
  201. border-color: yellow;
  202. }
  203. }
  204. &::after {
  205. content: "";
  206. background: url(../../static/images/vip.png) no-repeat;
  207. background-size: 42upx 42upx;
  208. width: 42upx;
  209. height: 42upx;
  210. display: inline-block;
  211. position: relative;
  212. top: 16upx;
  213. }
  214. margin-bottom: 20upx;
  215. }
  216. }
  217. .body {
  218. padding: 20upx;
  219. position: relative;
  220. top: -120upx;
  221. .money {
  222. background: white;
  223. border-radius: 20upx;
  224. padding: 20upx;
  225. .row {
  226. color: #333;
  227. display: flex;
  228. align-items: center;
  229. margin-bottom: 20upx;
  230. .warning {
  231. color: $primary-color;
  232. font-weight: bold;
  233. }
  234. .tips {
  235. color: #CCC;
  236. font-size: 24upx;
  237. }
  238. &:last-child {
  239. margin-bottom: 0;
  240. }
  241. & .col:first-child {
  242. flex-grow: 1;
  243. font-size: 28upx;
  244. }
  245. & .col:last-child {
  246. text-align: right;
  247. font-size: 28upx;
  248. }
  249. }
  250. .btn {
  251. background-color: $primary-color;
  252. color: white;
  253. font-size: 26upx;
  254. padding: 5upx 20upx;
  255. border-radius: 40upx;
  256. line-height: normal;
  257. }
  258. }
  259. }
  260. .vip-center {
  261. background: url(../../static/images/center5.png) no-repeat;
  262. background-size: 710upx 78upx;
  263. color: #EEEEEE;
  264. padding: 0 20upx;
  265. margin-top: 20upx;
  266. .text {
  267. margin-left: 50upx;
  268. background-color: #ff5454;
  269. font-weight: bold;
  270. line-height: 76upx;
  271. .sub {
  272. font-size: 24upx;
  273. }
  274. }
  275. }
  276. .menu {
  277. display: flex;
  278. background: white;
  279. border-radius: 20upx;
  280. padding: 30upx 20upx;
  281. margin-top: 20upx;
  282. justify-content: space-between;
  283. .name {
  284. font-size: 28upx;
  285. margin-top: 10upx;
  286. }
  287. .icon {
  288. text-align: center;
  289. }
  290. .icon .image {
  291. width: 50upx;
  292. height: 50upx;
  293. }
  294. }
  295. </style>