index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <view class="content pdx-48">
  3. <view class="top_bg pdx-48">
  4. <view class="w h-88 flex ai_center jc_center mgt-88 p-rel">
  5. <image
  6. @click="$navBack()"
  7. class="w-48 h-48 abs_left"
  8. src="/static/image/common/left_arrow_icon.png"
  9. mode="scaleToFill"
  10. />
  11. <view class="text-36 text-500 text-070202">开通会员</view>
  12. </view>
  13. <view class="head" @click="$navTo('/pages/personalProfile/index')">
  14. <view class="flex fd_c">
  15. <view class="text-36 text-070202 text-500">用户名称用户名称</view>
  16. <!-- <view class="vip_year_bg"> lv.1年 </view> -->
  17. <view class="vip_bg">普通会员</view>
  18. </view>
  19. <!--
  20. 未登录时头像
  21. /static/image/my/no_login_avatar.png
  22. -->
  23. <image
  24. class="image"
  25. src="/static/image/my/my_default_avatar.png"
  26. ></image>
  27. </view>
  28. <view class="w h-96 flex ai_center mgt-42">
  29. <view
  30. v-for="(item, index) in menuList"
  31. :key="item"
  32. class="menu"
  33. :class="menuIndex === index ? 'check_menu' : 'default_menu'"
  34. @click="handleMenu(index)"
  35. >
  36. <view>{{ item }}</view>
  37. <view
  38. class="menu_line"
  39. :style="{
  40. backgroundColor:
  41. menuIndex === index ? ' #fe6505' : ' transparent',
  42. }"
  43. ></view>
  44. </view>
  45. </view>
  46. </view>
  47. <view style="width: 100vw; padding: 0 32rpx; margin-top: -62rpx">
  48. <view class="rights">
  49. <view class="title text-28 text-500 text-white">开通权益</view>
  50. <view class="rights_box w flex jc_between">
  51. <view
  52. class="rights_item flex fd_c w-128"
  53. v-for="item in rightsList"
  54. :key="item.icon"
  55. >
  56. <image class="w-72 h-72" :src="item.icon" mode="scaleToFill" />
  57. <view
  58. class="text text-20 text-400 text-7E7E7E"
  59. v-html="item.content"
  60. >
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <button class="btn">立即开通</button>
  67. </view>
  68. </template>
  69. <script>
  70. export default {
  71. data() {
  72. return {
  73. menuList: ["月度会员", "季度会员", "年度会员"],
  74. menuIndex: 0,
  75. rightsList: [
  76. {
  77. icon: "/static/image/vip/publish_tasks_icon.png",
  78. content: `
  79. 发布任务<br>
  80. 服务费<text class="text-500 text-FF9F38">13%</text>`,
  81. },
  82. {
  83. icon: "/static/image/vip/tools_use_icon.png",
  84. content: `
  85. 工具使用优惠<br>
  86. 折扣<text class="text-500 text-FF9F38">9折</text>`,
  87. },
  88. {
  89. icon: "/static/image/vip/give_icon.png",
  90. content: `
  91. 赠送<text class="text-500 text-FF9F38">2小时</text>
  92. <br>置顶`,
  93. },
  94. {
  95. icon: "/static/image/vip/edit_tasks_icon.png",
  96. content: `
  97. 发布/修改任务<br>
  98. 数量限制<text class="text-500 text-FF9F38">10次</text>`,
  99. },
  100. {
  101. icon: "/static/image/vip/give_icon.png",
  102. content: `
  103. 可发布类型:<br>
  104. <text class="text-500 text-FF9F38">高价悬赏</text>`,
  105. },
  106. ],
  107. };
  108. },
  109. computed: {},
  110. onLoad() {},
  111. methods: {
  112. handleMenu(index) {
  113. this.menuIndex = index;
  114. },
  115. },
  116. };
  117. </script>
  118. <style lang="scss" scope>
  119. .content {
  120. display: flex;
  121. flex-direction: column;
  122. align-items: center;
  123. justify-content: center;
  124. }
  125. .top_bg {
  126. width: 100vw;
  127. height: 568rpx;
  128. flex-shrink: 0;
  129. // background: linear-gradient(to bottom, #ffd8bf, #ffffff);
  130. background: linear-gradient(180deg, #ffd8bf 10%, #fff 65%);
  131. .head {
  132. margin-top: 32rpx;
  133. height: 144rpx;
  134. display: flex;
  135. justify-content: space-between;
  136. align-items: center;
  137. .vip_icon {
  138. margin-top: 16rpx;
  139. width: 112rpx;
  140. height: 44rpx;
  141. }
  142. .image {
  143. width: 144rpx;
  144. height: 144rpx;
  145. border-radius: 50%;
  146. }
  147. }
  148. }
  149. .vip_year_bg {
  150. margin-top: 16rpx;
  151. width: 112rpx;
  152. height: 44rpx;
  153. background: url("/static//image/my/vip_year_bg.png");
  154. background-size: cover;
  155. display: flex;
  156. align-items: center;
  157. color: #ffffff;
  158. font-family: "MiSans VF";
  159. font-size: 22rpx;
  160. font-weight: 500;
  161. letter-spacing: 0.66rpx;
  162. padding-left: 42rpx;
  163. }
  164. .vip_bg {
  165. margin-top: 16rpx;
  166. width: 144rpx;
  167. height: 48rpx;
  168. line-height: 40rpx;
  169. background: url("/static//image/my/vip_bg.png");
  170. background-size: cover;
  171. padding-left: 42rpx;
  172. color: #ffffff;
  173. font-family: "MiSans VF";
  174. font-size: 22rpx;
  175. font-weight: 500;
  176. letter-spacing: -0.66rpx;
  177. }
  178. .check_menu {
  179. color: #070202;
  180. font-size: 36rpx;
  181. font-weight: 600;
  182. }
  183. .default_menu {
  184. color: #7e7e7e;
  185. font-size: 32rpx;
  186. font-weight: 500;
  187. }
  188. .menu_line {
  189. margin-top: 8rpx;
  190. width: 32rpx;
  191. height: 10rpx;
  192. }
  193. .menu {
  194. margin-right: 48rpx;
  195. text-align: center;
  196. font-family: "MiSans VF";
  197. display: flex;
  198. flex-direction: column;
  199. align-items: center;
  200. justify-content: center;
  201. }
  202. .rights {
  203. width: 100%;
  204. height: 322rpx;
  205. border-radius: 24rpx 24rpx 0 0;
  206. background: linear-gradient(180deg, #ff6606 0%, #ff9a5c 100%);
  207. // background: url("/static//image/vip/rights_bg.png");
  208. // background-size: cover;
  209. // padding: 20rpx 24rpx 40rpx 24rpx;
  210. position: relative;
  211. .title {
  212. position: absolute;
  213. top: 20rpx;
  214. left: 24rpx;
  215. }
  216. .rights_box {
  217. position: absolute;
  218. left: 0;
  219. bottom: 0;
  220. width: 100%;
  221. height: 244rpx;
  222. border-radius: 24rpx 24rpx 0 0;
  223. background: linear-gradient(180deg, #fff 0%, #ffffffe6 100%);
  224. display: flex;
  225. align-items: center;
  226. justify-content: space-between;
  227. padding: 0 7rpx;
  228. .rights_item {
  229. display: flex;
  230. flex-direction: column;
  231. align-items: center;
  232. justify-content: center;
  233. .text {
  234. margin-top: 28rpx;
  235. text-align: center;
  236. letter-spacing: -0.66rpx;
  237. line-height: 1.4;
  238. }
  239. }
  240. }
  241. }
  242. .btn {
  243. position: absolute;
  244. left: 50%;
  245. bottom: 262rpx;
  246. transform: translateX(-50%);
  247. width: 88%;
  248. height: 96rpx;
  249. line-height: 96rpx;
  250. flex-shrink: 0;
  251. border-radius: 64rpx;
  252. background: #fe6505;
  253. color: #ffffff;
  254. text-align: center;
  255. font-family: "MiSans VF";
  256. font-size: 36rpx;
  257. font-weight: 500;
  258. }
  259. </style>