珠宝小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

443 lines
9.9 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <!-- 会员中心页面 -->
  2. <template>
  3. <view class="member-center">
  4. <!-- 导航栏 -->
  5. <navbar title="会员中心" leftClick @leftClick="$utils.navigateBack"
  6. bgColor="#000" color="#fff" />
  7. <!-- 会员卡片 -->
  8. <!-- <swiper class="swiper"
  9. circular
  10. :indicator-dots="indicatorDots"
  11. :autoplay="autoplay"
  12. :interval="interval"
  13. :duration="duration" :current="current" style="height: 380rpx;">
  14. <swiper-item v-for="(item,index) in list" :key="item.id">
  15. <view class="member-item">
  16. <image :src="item.headImage" mode="widthFix" class="member-image"></image>
  17. <view class="member-info">
  18. <view class="profile-photo">
  19. <image :src="userInfo.headImage" mode="aspectFill" class="pro-img">
  20. </image>
  21. <view class="open-status">
  22. {{ index + 1 == userInfo.role ? '已开通' : '暂未开通'}}
  23. </view>
  24. </view>
  25. <view class="open">
  26. 累计消费满{{ item.money }}元自动开通
  27. </view>
  28. </view>
  29. </view>
  30. </swiper-item>
  31. </swiper> -->
  32. <view class=""
  33. style="width: 100%;height: 150rpx;position: absolute;z-index: -1;background-color: #000;">
  34. </view>
  35. <uv-swiper
  36. :list="list"
  37. previousMargin="60rpx"
  38. nextMargin="60rpx"
  39. circular
  40. :autoplay="false"
  41. radius="20rpx"
  42. indicator
  43. height="290rpx"
  44. bgColor="transparent"
  45. keyName="headImage"></uv-swiper>
  46. <!-- <esc-swiper ref="swiper" :autoplay="true" :circular="true" :current.sync="current" :size="list.length"
  47. :plus="2" :width="750" :height="290" :itemWidth="600" :space="30">
  48. <esc-swiper-item class="member-item" v-for="(item, idx) in list" :index="idx" :key="item.id">
  49. <view class="item" style="width: 100%;height: 100%;">
  50. <image :src="item.headImage" mode="widthFix" class="member-image"></image>
  51. <view class="member-info">
  52. <view class="profile-photo">
  53. <image :src="userInfo.headImage" mode="aspectFill" class="pro-img">
  54. </image>
  55. <view class="open-status">
  56. 暂未开通
  57. </view>
  58. </view>
  59. <view class="open">
  60. 累计消费满{{ item.money }}元自动开通
  61. </view>
  62. </view>
  63. </view>
  64. </esc-swiper-item>
  65. </esc-swiper> -->
  66. <!-- 充值套餐 -->
  67. <!-- <view class="top-up-package">
  68. <view class="title">
  69. 充值套餐
  70. </view>
  71. <view class="set-meal-list">
  72. <view v-for="item in cardList" :key="item.id"
  73. :class="{'active-set-meal-item' : item.id == userInfo.role }"
  74. class="set-meal-item">
  75. <view class="card-tag">
  76. 限时折扣
  77. </view>
  78. <view class="card-title">{{ item.title }}</view>
  79. <view class="money">
  80. <text class="unit"></text>{{ item.money }}
  81. </view>
  82. </view>
  83. </view>
  84. <view class="member-descript">
  85. 不同会员等级商品价格不一样可以设置给与推荐人佣金
  86. </view>
  87. </view> -->
  88. <!-- 会员权益 -->
  89. <view class="member-equity-title">
  90. <image :src="configList.vip_qy_image" mode="widthFix" class="eqyity-img"></image>
  91. </view>
  92. <view class="equity-card-list">
  93. <view v-for="(item, index) in list" :key="item.id" class="equity-card">
  94. <view class="equity-title">累计消费满{{ item.money }}将获得{{ item.title }}</view>
  95. <view class="equity-descript-list">
  96. <!-- <view class="equity-descript-icon">
  97. <image :src="item.icon" mode="widthFix" class="equity-descript-img"></image>
  98. </view> -->
  99. <view class="equity-descript-item">
  100. <uv-parse :content="item.details"></uv-parse>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- <view class="equity-card-list">
  106. <view v-for="(item,index) in equityList" :key="item.id" class="equity-card">
  107. <view class="equity-title">{{ item.title }}</view>
  108. <view class="equity-descript-list">
  109. <view class="equity-descript-icon">
  110. <image :src="item.icon" mode="widthFix" class="equity-descript-img"></image>
  111. </view>
  112. <view v-for="(litem,lindex) in item.list" :key="lindex" class="equity-descript-item">
  113. <view class="num">
  114. {{ lindex + 1 }}
  115. </view>
  116. <view class="content">
  117. {{ litem }}
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. </view> -->
  123. </view>
  124. </template>
  125. <script>
  126. import mixinsList from '@/mixins/list.js'
  127. import {
  128. mapState
  129. } from 'vuex'
  130. export default {
  131. name: "MemberCenter",
  132. mixins: [mixinsList],
  133. data() {
  134. return {
  135. cardList: [{
  136. id: 1,
  137. title: "金卡",
  138. money: "39"
  139. },
  140. {
  141. id: 2,
  142. title: "银卡",
  143. money: "29"
  144. },
  145. {
  146. id: 3,
  147. title: "钻石卡",
  148. money: "99"
  149. }
  150. ],
  151. equityList: [{
  152. id: 1,
  153. title: "权益1·专属推广码",
  154. icon: "/pages_order/static/memberCenter/descript1.png",
  155. list: [
  156. "购买会员卡或者购物金额满500元!有专属推广码。",
  157. "显示直推,间推人员信息及下单佣金明细。"
  158. ]
  159. },
  160. {
  161. id: 2,
  162. title: "权益2·直推奖励",
  163. icon: "/pages_order/static/memberCenter/descript2.png",
  164. list: [
  165. "通过扫专属推广码进来的用户下单,享受30%的直推奖励!(比例可调)",
  166. "显示直推,间推人员信息及下单佣金明细。"
  167. ]
  168. },
  169. {
  170. id: 3,
  171. title: "权益3·间推奖励",
  172. icon: "/pages_order/static/memberCenter/descript1.png",
  173. list: [
  174. "下级发展的用户下单,享受20%的间推奖励!(比例可调)",
  175. ]
  176. },
  177. {
  178. id: 4,
  179. title: "权益4·会员等级奖励",
  180. icon: "/pages_order/static/memberCenter/descript2.png",
  181. list: [
  182. "银,金,钻不同会员等级,同一个商品分佣比例不一样,等级越高,佣金比例越高!"
  183. ]
  184. }
  185. ],
  186. mixinsListApi: "getRiceVipList",
  187. current: 0
  188. }
  189. },
  190. methods: {
  191. },
  192. computed: {
  193. ...mapState(['userInfo'])
  194. }
  195. }
  196. </script>
  197. <style lang="scss" scoped>
  198. .member-center {
  199. //会员卡片
  200. .member-image {
  201. width: 100%;
  202. height: auto;
  203. }
  204. .member-info {
  205. position: absolute;
  206. bottom: 40rpx;
  207. left: 0rpx;
  208. display: flex;
  209. justify-content: space-between;
  210. padding: 0rpx 40rpx;
  211. box-sizing: border-box;
  212. width: 100%;
  213. .profile-photo {
  214. display: flex;
  215. justify-content: center;
  216. align-items: center;
  217. .pro-img {
  218. width: 60rpx;
  219. height: 60rpx;
  220. border-radius: 50%;
  221. }
  222. .open-status {
  223. color: #F8A95F;
  224. border: 1px solid #F8A95F;
  225. border-radius: 30rpx;
  226. padding: 7rpx 20rpx;
  227. margin-left: 10rpx;
  228. }
  229. }
  230. .open {
  231. display: flex;
  232. align-items: center;
  233. justify-content: center;
  234. background: #F8A95F;
  235. color: white;
  236. border-radius: 30rpx;
  237. padding: 7rpx 20rpx;
  238. }
  239. }
  240. // 充值套餐
  241. .top-up-package {
  242. padding: 0rpx 20rpx;
  243. box-sizing: border-box;
  244. .title {
  245. font-size: 36rpx;
  246. font-weight: bold;
  247. margin-top: 30rpx;
  248. }
  249. .set-meal-list {
  250. display: flex;
  251. flex-wrap: wrap;
  252. margin-top: 20rpx;
  253. .set-meal-item {
  254. position: relative;
  255. width: 30%;
  256. margin-right: calc(9% / 2);
  257. border-radius: 10rpx;
  258. overflow: hidden;
  259. box-sizing: border-box;
  260. background: white;
  261. margin-bottom: 20rpx;
  262. padding: 40rpx;
  263. &:nth-child(3n) {
  264. margin-right: 0rpx;
  265. }
  266. .card-tag {
  267. position: absolute;
  268. left: 0;
  269. top: 0;
  270. background: #FF9633;
  271. border-bottom-right-radius: 10rpx;
  272. color: white;
  273. padding: 5rpx 10rpx;
  274. font-size: 20rpx;
  275. }
  276. .card-title {
  277. text-align: center;
  278. font-size: 38rpx;
  279. font-weight: bold;
  280. }
  281. .money {
  282. color: #FF9633;
  283. font-size: 30rpx;
  284. text-align: center;
  285. .unit {}
  286. }
  287. }
  288. .active-set-meal-item {
  289. border: 2rpx solid #FF9633;
  290. background: #FFF5EB;
  291. }
  292. }
  293. .member-descript {
  294. font-size: 24rpx;
  295. color: #333333;
  296. text-align: center;
  297. }
  298. }
  299. // 会员权益
  300. .member-equity-title {
  301. margin: 30rpx 0rpx;
  302. padding: 0rpx 20rpx;
  303. box-sizing: border-box;
  304. .eqyity-img {
  305. width: 240rpx;
  306. }
  307. }
  308. .equity-card-list {
  309. padding: 0rpx 20rpx;
  310. box-sizing: border-box;
  311. .equity-card {
  312. background: white;
  313. border-radius: 10rpx;
  314. margin-bottom: 40rpx;
  315. padding: 20rpx;
  316. box-sizing: border-box;
  317. .equity-title {
  318. color: #F18F09;
  319. font-size: 28rpx;
  320. font-weight: bold;
  321. }
  322. .equity-descript-list {
  323. position: relative;
  324. .equity-descript-icon {
  325. .equity-descript-img {
  326. width: 150rpx;
  327. }
  328. }
  329. .equity-descript-item {
  330. position: relative;
  331. background: #FDF9EF;
  332. border-radius: 10rpx;
  333. border: 1px solid #F7C47B;
  334. margin: 20rpx 0rpx;
  335. padding: 20rpx;
  336. box-sizing: border-box;
  337. color: #BA7E2B;
  338. font-size: 24rpx;
  339. .num {
  340. display: flex;
  341. justify-content: center;
  342. align-items: center;
  343. position: absolute;
  344. top: -15rpx;
  345. left: -15rpx;
  346. width: 30rpx;
  347. height: 30rpx;
  348. border-radius: 50%;
  349. background: #F18F09;
  350. border: 2px solid #F8CB8E;
  351. box-sizing: border-box;
  352. color: white;
  353. font-size: 24rpx;
  354. }
  355. }
  356. }
  357. // &:nth-child(1) {
  358. // .equity-descript-list {
  359. // display: flex;
  360. // justify-content: space-between;
  361. // flex-wrap: wrap;
  362. // .equity-descript-icon {
  363. // position: absolute;
  364. // bottom: 100%;
  365. // right: 0rpx;
  366. // z-index: 200;
  367. // }
  368. // .equity-descript-item {
  369. // width: 49%;
  370. // }
  371. // }
  372. // }
  373. // &:nth-child(2) {
  374. // .equity-descript-icon {
  375. // position: absolute;
  376. // bottom: -10%;
  377. // right: 0rpx;
  378. // z-index: 200;
  379. // }
  380. // .equity-descript-item {
  381. // &:nth-child(3) {
  382. // width: calc(100% - 160rpx);
  383. // margin-right: 10rpx;
  384. // }
  385. // }
  386. // }
  387. // &:nth-child(3),
  388. // &:nth-child(4) {
  389. // .equity-descript-icon {
  390. // position: absolute;
  391. // bottom: 100%;
  392. // right: 0rpx;
  393. // z-index: 200;
  394. // }
  395. // }
  396. }
  397. }
  398. }
  399. </style>