index.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. <template>
  2. <view class="content pdx-32">
  3. <view class="top_bg">
  4. <view class="head" @click="$navTo('/pages/personalProfile/index')">
  5. <view class="flex fd_c">
  6. <view class="text-36 text-070202 text-500">用户名称用户名称</view>
  7. <view class="vip_year_bg"> lv.1年 </view>
  8. <!-- <view class="vip_bg">普通会员</view> -->
  9. </view>
  10. <!--
  11. 未登录时头像
  12. /static/image/my/no_login_avatar.png
  13. -->
  14. <image
  15. class="image"
  16. src="/static/image/my/my_default_avatar.png"
  17. ></image>
  18. </view>
  19. <view class="info">
  20. <view class="info_item" @click="$navTo('/pages/myTakeOrder/index')">
  21. <view class="text-40 text-400 text-070202">
  22. {{ tagList.takeOrders || 0 }}
  23. </view>
  24. <view class="text-24 text-500 text-C8C9C6 mgt-8">我的接单</view>
  25. </view>
  26. <view class="line"></view>
  27. <view class="info_item" @click="$navTo('/pages/myBounty/index')">
  28. <view class="text-40 text-400 text-070202">
  29. {{ tagList.myBounty || 0 }}
  30. </view>
  31. <view class="text-24 text-500 text-C8C9C6 mgt-8">我的悬赏</view>
  32. </view>
  33. <view class="line"></view>
  34. <view class="info_item" @click="$navTo('/pages/activateVIP/index')">
  35. <view class="text-40 text-400 text-070202">
  36. {{ tagList.myVip || 0 }}
  37. </view>
  38. <view class="text-24 text-500 text-C8C9C6 mgt-8">开通会员</view>
  39. </view>
  40. <view class="line"></view>
  41. <view class="info_item" @click="$navTo('/pages/inviteFriends/index')">
  42. <view class="text-40 text-400 text-070202">
  43. {{ tagList.invite || 0 }}
  44. </view>
  45. <view class="text-24 text-500 text-C8C9C6 mgt-8">邀请好友</view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="earn">
  50. <view class="earn_item flex">
  51. <view>
  52. <view class="text-24 text-500 text-7E7E7E">累计收益</view>
  53. <view class="text-44 text-400 text-070202 mgt-18">999.99</view>
  54. </view>
  55. <view class="btn">去提现</view>
  56. </view>
  57. <view class="earn_item mgl-24">
  58. <view class="text-24 text-500 text-7E7E7E">悬赏余额</view>
  59. <view class="text-44 text-400 text-070202 mgt-18">999.99</view>
  60. </view>
  61. </view>
  62. <view class="new_hand">
  63. <view class="top">
  64. <view class="flex ai_center">
  65. <view class="lv">V1</view>
  66. <view class="mgl-12 text-white text-24 text-400">新手上路</view>
  67. </view>
  68. <view class="btn"> 查看攻略 </view>
  69. </view>
  70. <view class="bottom">
  71. <view class="progress_bg flex1">
  72. <view
  73. class="progress_bar"
  74. :style="{
  75. width: `${progressBar * 100}%`,
  76. borderRadius: progressBar === 1 ? '64rpx' : '64rpx 0 0 64rpx',
  77. }"
  78. ></view>
  79. </view>
  80. <view class="mgl-16 text-18 text-400 text-white"
  81. >等级越高赚钱越多
  82. </view>
  83. </view>
  84. </view>
  85. <image
  86. class="radio-16 h-144 w mgt-24"
  87. src="/static/image/my/post_reward.png"
  88. ></image>
  89. <view class="w mgt-24 pdb-30">
  90. <view
  91. class="w h-96 flex jc_between ai_center mgt-8 border-bottom-F2F2F7"
  92. v-for="item in menuList"
  93. :key="item.name"
  94. @click="$navTo(item.pagePath)"
  95. >
  96. <view class="flex ai_center p-rel">
  97. <image class="w-48 h-48" :src="item.icon" mode="scaleToFill" />
  98. <view class="mgl-20 text-28 text-400 text-303030">
  99. {{ item.name }}
  100. </view>
  101. <view v-if="item.badge" class="badge">{{
  102. badgeNum(item.badge)
  103. }}</view>
  104. </view>
  105. <image
  106. class="w-48 h-48"
  107. src="/static/image/common/right_arrow_icon.png"
  108. mode="scaleToFill"
  109. />
  110. </view>
  111. </view>
  112. </view>
  113. </template>
  114. <script>
  115. export default {
  116. data() {
  117. return {
  118. title: "我的",
  119. progressBar: 0.2, //新手上路 进度条%
  120. tagList: {
  121. takeOrders: 1322, //我的接单
  122. myBounty: 322, //我的悬赏
  123. myVip: 32, //开通会员
  124. invite: 22, //邀请好友
  125. },
  126. menuList: [
  127. {
  128. icon: "/static/image/my/tools_icon.png",
  129. name: "我的工具包",
  130. pagePath: "/pages/myTools/index",
  131. },
  132. {
  133. icon: "/static/image/my/message_icon.png",
  134. name: "我的消息",
  135. pagePath: "/pages/myMessage/index",
  136. badge: 100,
  137. },
  138. {
  139. icon: "/static/image/my/safeguard_rights_icon.png",
  140. name: "维权",
  141. pagePath: "/pages/safeguardRights/index",
  142. },
  143. {
  144. icon: "/static/image/my/earnings_icon.png",
  145. name: "收益统计",
  146. pagePath: "/pages/statisticsEarnings/index",
  147. },
  148. {
  149. icon: "/static/image/my/shop_icon.png",
  150. name: "我的店铺",
  151. pagePath: "/pages/myShop/index",
  152. badge: 10,
  153. },
  154. {
  155. icon: "/static/image/my/setting_icon.png",
  156. name: "系统设置",
  157. pagePath: "/pages/setting/index",
  158. },
  159. ],
  160. };
  161. },
  162. computed: {},
  163. onLoad() {},
  164. methods: {
  165. badgeNum(num) {
  166. return num > 99 ? "99+" : num;
  167. },
  168. },
  169. };
  170. </script>
  171. <style lang="scss" scope>
  172. .content {
  173. display: flex;
  174. flex-direction: column;
  175. align-items: center;
  176. justify-content: center;
  177. }
  178. .top_bg {
  179. width: 100vw;
  180. height: 568rpx;
  181. flex-shrink: 0;
  182. // background: linear-gradient(to bottom, #ffd8bf, #ffffff);
  183. background: linear-gradient(180deg, #ffd8bf 10%, #fff 65%);
  184. .head {
  185. margin-top: 134rpx;
  186. padding: 0 32rpx;
  187. height: 144rpx;
  188. display: flex;
  189. justify-content: space-between;
  190. align-items: center;
  191. .vip_icon {
  192. margin-top: 16rpx;
  193. width: 112rpx;
  194. height: 44rpx;
  195. }
  196. .image {
  197. width: 144rpx;
  198. height: 144rpx;
  199. border-radius: 50%;
  200. }
  201. }
  202. .info {
  203. margin-top: 40rpx;
  204. padding: 0 32rpx;
  205. display: flex;
  206. align-items: center;
  207. justify-content: space-between;
  208. .info_item {
  209. height: 128rpx;
  210. display: flex;
  211. flex-direction: column;
  212. justify-content: center;
  213. align-items: center;
  214. }
  215. .line {
  216. height: 40rpx;
  217. width: 2rpx;
  218. background: #efedec;
  219. }
  220. }
  221. }
  222. .earn {
  223. margin-top: -122rpx;
  224. width: 100%;
  225. display: flex;
  226. justify-content: space-between;
  227. .earn_item {
  228. padding: 16rpx 16rpx 20rpx 24rpx;
  229. flex: 1;
  230. height: 148rpx;
  231. flex-shrink: 0;
  232. border-radius: 16rpx;
  233. background: #fff;
  234. box-shadow: 0 0 56rpx 0 #0000001a;
  235. }
  236. .btn {
  237. margin-left: auto;
  238. display: flex;
  239. align-items: center;
  240. justify-content: center;
  241. width: 120rpx;
  242. height: 48rpx;
  243. flex-shrink: 0;
  244. border-radius: 24rpx;
  245. background: #fe6505;
  246. box-shadow: 0 8rpx 16rpx 0 #fe650533;
  247. color: #ffffff;
  248. text-align: center;
  249. font-family: "Source Han Sans CN";
  250. font-size: 24rpx;
  251. font-weight: 400;
  252. }
  253. }
  254. .badge {
  255. display: inline-flex;
  256. height: 40rpx;
  257. padding: 4rpx 12rpx;
  258. justify-content: center;
  259. align-items: center;
  260. border-radius: 64rpx;
  261. background: #e02e24;
  262. color: #ffffff;
  263. text-align: center;
  264. font-family: "Source Han Sans CN";
  265. font-size: 20rpx;
  266. font-weight: 500;
  267. position: absolute;
  268. left: 188rpx;
  269. top: -20rpx;
  270. }
  271. .vip_year_bg {
  272. margin-top: 16rpx;
  273. width: 112rpx;
  274. height: 44rpx;
  275. background: url("/static//image/my/vip_year_bg.png");
  276. background-size: cover;
  277. display: flex;
  278. align-items: center;
  279. color: #ffffff;
  280. font-family: "MiSans VF";
  281. font-size: 22rpx;
  282. font-weight: 500;
  283. letter-spacing: 0.66rpx;
  284. padding-left: 42rpx;
  285. }
  286. .vip_bg {
  287. margin-top: 16rpx;
  288. width: 144rpx;
  289. height: 48rpx;
  290. line-height: 40rpx;
  291. background: url("/static//image/my/vip_bg.png");
  292. background-size: cover;
  293. padding-left: 42rpx;
  294. color: #ffffff;
  295. font-family: "MiSans VF";
  296. font-size: 22rpx;
  297. font-weight: 500;
  298. letter-spacing: -0.66rpx;
  299. }
  300. .new_hand {
  301. margin-top: 24rpx;
  302. width: 100%;
  303. height: 128rpx;
  304. background: url("/static//image/my/new_hand_bg.png");
  305. background-size: cover;
  306. padding-top: 24rpx;
  307. padding-left: 22rpx;
  308. .top {
  309. height: 48rpx;
  310. display: flex;
  311. align-items: center;
  312. justify-content: space-between;
  313. .lv {
  314. width: 68rpx;
  315. height: 38rpx;
  316. background: url("/static//image/my/grade_bg.png");
  317. background-size: cover;
  318. display: flex;
  319. align-items: center;
  320. font-size: 14rpx;
  321. color: #fff;
  322. padding-left: 24rpx;
  323. }
  324. .btn {
  325. width: 132rpx;
  326. height: 48rpx;
  327. line-height: 48rpx;
  328. flex-shrink: 0;
  329. border-radius: 24rpx 0 0 24rpx;
  330. background: linear-gradient(90deg, #ffffffcc 0%, #ffffff66 100%);
  331. box-shadow: 0 8rpx 24rpx 0 #d07b1780;
  332. color: #cc730d;
  333. text-align: center;
  334. font-family: "Source Han Sans CN";
  335. font-size: 24rpx;
  336. font-weight: 400;
  337. }
  338. }
  339. .bottom {
  340. display: flex;
  341. align-items: center;
  342. margin-top: 14rpx;
  343. .progress_bg {
  344. height: 12rpx;
  345. flex-shrink: 0;
  346. border-radius: 64rpx;
  347. background: #ffcc91;
  348. }
  349. .progress_bar {
  350. // width: 62rpx;
  351. width: 0;
  352. height: 12rpx;
  353. // flex-shrink: 0;
  354. border-radius: 64rpx 0 0 64rpx;
  355. background: #cc730d;
  356. }
  357. .full_bar {
  358. border-radius: 64rpx;
  359. }
  360. }
  361. }
  362. </style>