敢为人鲜小程序前端代码仓库
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.

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