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

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