珠宝小程序前端代码
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.

446 lines
10 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 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. getSwiperList
  129. } from '@/components/sn-swiper/esc-swiper/helper.js';
  130. import {
  131. mapState
  132. } from 'vuex'
  133. export default {
  134. name: "MemberCenter",
  135. mixins: [mixinsList],
  136. data() {
  137. return {
  138. cardList: [{
  139. id: 1,
  140. title: "金卡",
  141. money: "39"
  142. },
  143. {
  144. id: 2,
  145. title: "银卡",
  146. money: "29"
  147. },
  148. {
  149. id: 3,
  150. title: "钻石卡",
  151. money: "99"
  152. }
  153. ],
  154. equityList: [{
  155. id: 1,
  156. title: "权益1·专属推广码",
  157. icon: "/pages_order/static/memberCenter/descript1.png",
  158. list: [
  159. "购买会员卡或者购物金额满500元!有专属推广码。",
  160. "显示直推,间推人员信息及下单佣金明细。"
  161. ]
  162. },
  163. {
  164. id: 2,
  165. title: "权益2·直推奖励",
  166. icon: "/pages_order/static/memberCenter/descript2.png",
  167. list: [
  168. "通过扫专属推广码进来的用户下单,享受30%的直推奖励!(比例可调)",
  169. "显示直推,间推人员信息及下单佣金明细。"
  170. ]
  171. },
  172. {
  173. id: 3,
  174. title: "权益3·间推奖励",
  175. icon: "/pages_order/static/memberCenter/descript1.png",
  176. list: [
  177. "下级发展的用户下单,享受20%的间推奖励!(比例可调)",
  178. ]
  179. },
  180. {
  181. id: 4,
  182. title: "权益4·会员等级奖励",
  183. icon: "/pages_order/static/memberCenter/descript2.png",
  184. list: [
  185. "银,金,钻不同会员等级,同一个商品分佣比例不一样,等级越高,佣金比例越高!"
  186. ]
  187. }
  188. ],
  189. mixinsListApi: "getRiceVipList",
  190. current: 0
  191. }
  192. },
  193. methods: {
  194. },
  195. computed: {
  196. ...mapState(['userInfo'])
  197. }
  198. }
  199. </script>
  200. <style lang="scss" scoped>
  201. .member-center {
  202. //会员卡片
  203. .member-image {
  204. width: 100%;
  205. height: auto;
  206. }
  207. .member-info {
  208. position: absolute;
  209. bottom: 40rpx;
  210. left: 0rpx;
  211. display: flex;
  212. justify-content: space-between;
  213. padding: 0rpx 40rpx;
  214. box-sizing: border-box;
  215. width: 100%;
  216. .profile-photo {
  217. display: flex;
  218. justify-content: center;
  219. align-items: center;
  220. .pro-img {
  221. width: 60rpx;
  222. height: 60rpx;
  223. border-radius: 50%;
  224. }
  225. .open-status {
  226. color: #F8A95F;
  227. border: 1px solid #F8A95F;
  228. border-radius: 30rpx;
  229. padding: 7rpx 20rpx;
  230. margin-left: 10rpx;
  231. }
  232. }
  233. .open {
  234. display: flex;
  235. align-items: center;
  236. justify-content: center;
  237. background: #F8A95F;
  238. color: white;
  239. border-radius: 30rpx;
  240. padding: 7rpx 20rpx;
  241. }
  242. }
  243. // 充值套餐
  244. .top-up-package {
  245. padding: 0rpx 20rpx;
  246. box-sizing: border-box;
  247. .title {
  248. font-size: 36rpx;
  249. font-weight: bold;
  250. margin-top: 30rpx;
  251. }
  252. .set-meal-list {
  253. display: flex;
  254. flex-wrap: wrap;
  255. margin-top: 20rpx;
  256. .set-meal-item {
  257. position: relative;
  258. width: 30%;
  259. margin-right: calc(9% / 2);
  260. border-radius: 10rpx;
  261. overflow: hidden;
  262. box-sizing: border-box;
  263. background: white;
  264. margin-bottom: 20rpx;
  265. padding: 40rpx;
  266. &:nth-child(3n) {
  267. margin-right: 0rpx;
  268. }
  269. .card-tag {
  270. position: absolute;
  271. left: 0;
  272. top: 0;
  273. background: #FF9633;
  274. border-bottom-right-radius: 10rpx;
  275. color: white;
  276. padding: 5rpx 10rpx;
  277. font-size: 20rpx;
  278. }
  279. .card-title {
  280. text-align: center;
  281. font-size: 38rpx;
  282. font-weight: bold;
  283. }
  284. .money {
  285. color: #FF9633;
  286. font-size: 30rpx;
  287. text-align: center;
  288. .unit {}
  289. }
  290. }
  291. .active-set-meal-item {
  292. border: 2rpx solid #FF9633;
  293. background: #FFF5EB;
  294. }
  295. }
  296. .member-descript {
  297. font-size: 24rpx;
  298. color: #333333;
  299. text-align: center;
  300. }
  301. }
  302. // 会员权益
  303. .member-equity-title {
  304. margin: 30rpx 0rpx;
  305. padding: 0rpx 20rpx;
  306. box-sizing: border-box;
  307. .eqyity-img {
  308. width: 240rpx;
  309. }
  310. }
  311. .equity-card-list {
  312. padding: 0rpx 20rpx;
  313. box-sizing: border-box;
  314. .equity-card {
  315. background: white;
  316. border-radius: 10rpx;
  317. margin-bottom: 40rpx;
  318. padding: 20rpx;
  319. box-sizing: border-box;
  320. .equity-title {
  321. color: #F18F09;
  322. font-size: 28rpx;
  323. font-weight: bold;
  324. }
  325. .equity-descript-list {
  326. position: relative;
  327. .equity-descript-icon {
  328. .equity-descript-img {
  329. width: 150rpx;
  330. }
  331. }
  332. .equity-descript-item {
  333. position: relative;
  334. background: #FDF9EF;
  335. border-radius: 10rpx;
  336. border: 1px solid #F7C47B;
  337. margin: 20rpx 0rpx;
  338. padding: 20rpx;
  339. box-sizing: border-box;
  340. color: #BA7E2B;
  341. font-size: 24rpx;
  342. .num {
  343. display: flex;
  344. justify-content: center;
  345. align-items: center;
  346. position: absolute;
  347. top: -15rpx;
  348. left: -15rpx;
  349. width: 30rpx;
  350. height: 30rpx;
  351. border-radius: 50%;
  352. background: #F18F09;
  353. border: 2px solid #F8CB8E;
  354. box-sizing: border-box;
  355. color: white;
  356. font-size: 24rpx;
  357. }
  358. }
  359. }
  360. // &:nth-child(1) {
  361. // .equity-descript-list {
  362. // display: flex;
  363. // justify-content: space-between;
  364. // flex-wrap: wrap;
  365. // .equity-descript-icon {
  366. // position: absolute;
  367. // bottom: 100%;
  368. // right: 0rpx;
  369. // z-index: 200;
  370. // }
  371. // .equity-descript-item {
  372. // width: 49%;
  373. // }
  374. // }
  375. // }
  376. // &:nth-child(2) {
  377. // .equity-descript-icon {
  378. // position: absolute;
  379. // bottom: -10%;
  380. // right: 0rpx;
  381. // z-index: 200;
  382. // }
  383. // .equity-descript-item {
  384. // &:nth-child(3) {
  385. // width: calc(100% - 160rpx);
  386. // margin-right: 10rpx;
  387. // }
  388. // }
  389. // }
  390. // &:nth-child(3),
  391. // &:nth-child(4) {
  392. // .equity-descript-icon {
  393. // position: absolute;
  394. // bottom: 100%;
  395. // right: 0rpx;
  396. // z-index: 200;
  397. // }
  398. // }
  399. }
  400. }
  401. }
  402. </style>