user-center.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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">未设置昵称</view>
  9. <view>
  10. <text v-show="user_type===1" 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. <view class="icon">
  49. <image class="image" src="../../static/images/menu/b7.png" mode=""></image>
  50. </view>
  51. <view class="name">订单管理</view>
  52. </view>
  53. <view>
  54. <view class="icon">
  55. <image class="image" src="../../static/images/menu/b2.png" mode=""></image>
  56. </view>
  57. <view class="name">我的商品</view>
  58. </view>
  59. <view>
  60. <view class="icon">
  61. <image class="image" src="../../static/images/menu/b1.png" mode=""></image>
  62. </view>
  63. <view class="name">新手攻略</view>
  64. </view>
  65. </view>
  66. <view class="menu">
  67. <view>
  68. <view class="icon">
  69. <image class="image" src="../../static/images/menu/b3.png" mode=""></image>
  70. </view>
  71. <view class="name">常见问题</view>
  72. </view>
  73. <view>
  74. <view class="icon">
  75. <image class="image" src="../../static/images/menu/b4.png" mode=""></image>
  76. </view>
  77. <view class="name">联系客服</view>
  78. </view>
  79. <view>
  80. <view class="icon">
  81. <image class="image" src="../../static/images/menu/b5.png" mode=""></image>
  82. </view>
  83. <view class="name">官方公告</view>
  84. </view>
  85. <view>
  86. <view class="icon">
  87. <image class="image" src="../../static/images/menu/b6.png" mode=""></image>
  88. </view>
  89. <view class="name">意见反馈</view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </template>
  95. <script>
  96. export default {
  97. data() {
  98. return {
  99. nickname: '',
  100. balance: '',
  101. deposit: '',
  102. user_type: 1,
  103. };
  104. },
  105. onNavigationBarButtonTap(e) {
  106. // console.log(e)
  107. switch (e.index) {
  108. case 0:
  109. uni.navigateTo({
  110. url: '/pages/user/setting'
  111. });
  112. break;
  113. case 1:
  114. break;
  115. default:
  116. break;
  117. }
  118. }
  119. }
  120. </script>
  121. <style lang="scss" scoped>
  122. .head {
  123. background: $primary-color;
  124. display: flex;
  125. align-items: center;
  126. padding-bottom: 140upx;
  127. padding-top: 20upx;
  128. }
  129. .portrait {
  130. margin: 0 20upx;
  131. .image {
  132. width: 128upx;
  133. height: 128upx;
  134. background: white;
  135. border-radius: 128upx;
  136. border: 10upx solid rgba(255, 255, 255, 0.2);
  137. }
  138. }
  139. .nickname {
  140. font-size: 30upx;
  141. color: white;
  142. margin-bottom: 10upx;
  143. }
  144. .wddz,
  145. .zgcj {
  146. font-size: 24upx;
  147. color: white;
  148. border: 2upx solid white;
  149. border-radius: 20upx;
  150. width: 140upx;
  151. height: 36upx;
  152. line-height: 36upx;
  153. text-align: center;
  154. text-indent: 20upx;
  155. display: inline-block;
  156. padding: 0;
  157. background: url(../../static/images/do.png) no-repeat;
  158. background-size: 21upx 21upx;
  159. background-position: 10upx;
  160. }
  161. .invite {
  162. text-align: right;
  163. flex-grow: 1;
  164. margin-right: 20upx;
  165. color: white;
  166. .invite-code {
  167. font-size: 30upx;
  168. }
  169. .invite-notes {
  170. font-size: 24upx;
  171. }
  172. .invite-progress {
  173. .item {
  174. border: 2upx solid white;
  175. display: inline-block;
  176. width: 36upx;
  177. transform: scaleX(0.9);
  178. font-size: 0;
  179. border-radius: 2upx;
  180. &.active {
  181. border-color: yellow;
  182. }
  183. }
  184. &::after {
  185. content: "";
  186. background: url(../../static/images/vip.png) no-repeat;
  187. background-size: 42upx 42upx;
  188. width: 42upx;
  189. height: 42upx;
  190. display: inline-block;
  191. position: relative;
  192. top: 16upx;
  193. }
  194. margin-bottom: 20upx;
  195. }
  196. }
  197. .body {
  198. padding: 20upx;
  199. position: relative;
  200. top: -120upx;
  201. .money {
  202. background: white;
  203. border-radius: 20upx;
  204. padding: 20upx;
  205. .row {
  206. color: #333;
  207. display: flex;
  208. align-items: center;
  209. margin-bottom: 20upx;
  210. .warning {
  211. color: $primary-color;
  212. font-weight: bold;
  213. }
  214. .tips {
  215. color: #CCC;
  216. font-size: 24upx;
  217. }
  218. &:last-child {
  219. margin-bottom: 0;
  220. }
  221. & .col:first-child {
  222. flex-grow: 1;
  223. font-size: 28upx;
  224. }
  225. & .col:last-child {
  226. text-align: right;
  227. font-size: 28upx;
  228. }
  229. }
  230. .btn {
  231. background-color: $primary-color;
  232. color: white;
  233. font-size: 26upx;
  234. padding: 5upx 20upx;
  235. border-radius: 40upx;
  236. line-height: normal;
  237. }
  238. }
  239. }
  240. .vip-center {
  241. background: url(../../static/images/center5.png) no-repeat;
  242. background-size: 710upx 78upx;
  243. color: #EEEEEE;
  244. padding: 0 20upx;
  245. margin-top: 20upx;
  246. .text {
  247. margin-left: 50upx;
  248. background-color: #ff5454;
  249. font-weight: bold;
  250. line-height: 76upx;
  251. .sub {
  252. font-size: 24upx;
  253. }
  254. }
  255. }
  256. .menu {
  257. display: flex;
  258. background: white;
  259. border-radius: 20upx;
  260. padding: 30upx 20upx;
  261. margin-top: 20upx;
  262. justify-content: space-between;
  263. .name {
  264. font-size: 28upx;
  265. margin-top: 10upx;
  266. }
  267. .icon {
  268. text-align: center;
  269. }
  270. .icon .image {
  271. width: 50upx;
  272. height: 50upx;
  273. }
  274. }
  275. </style>