vipCard.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. <template>
  2. <view class="content">
  3. <view class="zdyNavBox">
  4. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  5. <view class="zdyNav">
  6. <view class="zdyNavLeft">
  7. <image src="../../static/timg/navbackbs.png" mode="aspectFit" class="backImg" @click="goback"></image>
  8. </view>
  9. <view class="zdyNavTitle">会员卡</view>
  10. <view style="width: 250rpx;"></view>
  11. </view>
  12. </view>
  13. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  14. <view style="height: 44px;">黄金会员</view>
  15. <view class="topBox">
  16. <view class="topLeft1"></view>
  17. <view class="topRight1"></view>
  18. <swiper class="swiper" @change="spScroll">
  19. <swiper-item class="spItem" v-for="(item,index) in levelList" autoplay>
  20. <view class="topCont">
  21. <view class="vipBsbox">
  22. <img src="http://dmsphoto.66km.com.cn/thFiles/FAE86FA4-795A-4FAF-81A9-E5D35E7B9AB9.png" alt="" class="vipBsImg">
  23. <view class="vipbs">{{item.levelName}}</view>
  24. </view>
  25. <view class="vipTime" v-if="viopId==item.id"> <span v-if="item.endTime">{{item.endTime.slice(0,10)}} 到期</span>
  26. <span v-else>永久</span>
  27. </view>
  28. <img class="vipBsIcon" v-if="index==0" src="http://dmsphoto.66km.com.cn/thFiles/91FCABC6-775C-47CA-B7D4-3579A4DE8497.png" alt="">
  29. </view>
  30. </swiper-item>
  31. <!-- <swiper-item class="spItem">
  32. <view class="topCont">
  33. <view class="vipBsbox">
  34. <img src="http://dmsphoto.66km.com.cn/thFiles/FAE86FA4-795A-4FAF-81A9-E5D35E7B9AB9.png" alt="" class="vipBsImg">
  35. <view class="vipbs">黄金会员</view>
  36. </view>
  37. <view class="vipTime">2023.12.31 到期</view>
  38. </view>
  39. </swiper-item>
  40. <swiper-item class="spItem">
  41. <view class="topCont">
  42. <view class="vipBsbox">
  43. <img src="http://dmsphoto.66km.com.cn/thFiles/FAE86FA4-795A-4FAF-81A9-E5D35E7B9AB9.png" alt="" class="vipBsImg">
  44. <view class="vipbs">黄金会员</view>
  45. </view>
  46. <view class="vipTime">2023.12.31 到期</view>
  47. </view>
  48. </swiper-item> -->
  49. </swiper>
  50. </view>
  51. <view class="contBox">
  52. <view class="vipzkBox" v-if="discountList.length>0">
  53. <view class="vipzkTop">
  54. <img src="http://dmsphoto.66km.com.cn/thFiles/19E20D8F-F478-4BC2-8B02-C565A542BA2A.png" alt="" class="vipzkTopimg">
  55. <view class="vipzkTitle">会员折扣</view>
  56. <img src="http://dmsphoto.66km.com.cn/thFiles/E350EFE9-7397-4426-87F8-05B054C6ADAA.png" alt="" class="vipzkTopimg">
  57. </view>
  58. <view class="vipzkLineBox" v-if="all">
  59. <view class="vipzkLine" v-for="(item,index) in discountList" v-if="index<8">
  60. <img v-if="item.type==2" src="http://dmsphoto.66km.com.cn/thFiles/FBF7C5A9-4436-4233-99B1-1AD3E36ABAAF.png" alt="" class="vipzkLineimg">
  61. <img v-if="item.type==1" src="http://dmsphoto.66km.com.cn/thFiles/C417E31C-4A9E-4CCD-A401-537031E4EEA6.png" alt="" class="vipzkLineimg">
  62. <view class="vipzkNum">
  63. <span class="vipzkNumSpan1">{{item.discount/10}}</span>折
  64. </view>
  65. <view class="vipzklineMs">{{item.name}}</view>
  66. </view>
  67. </view>
  68. <view class="vipzkLineBox" v-if="!all">
  69. <view class="vipzkLine" v-for="(item,index) in discountList" >
  70. <img v-if="item.type==2" src="http://dmsphoto.66km.com.cn/thFiles/FBF7C5A9-4436-4233-99B1-1AD3E36ABAAF.png" alt="" class="vipzkLineimg">
  71. <img v-if="item.type==1" src="http://dmsphoto.66km.com.cn/thFiles/C417E31C-4A9E-4CCD-A401-537031E4EEA6.png" alt="" class="vipzkLineimg">
  72. <view class="vipzkNum">
  73. <span class="vipzkNumSpan1">{{item.discount/10}}</span>折
  74. </view>
  75. <view class="vipzklineMs">{{item.name}}</view>
  76. </view>
  77. </view>
  78. <view class="vipzkBottom" v-if="discountList.length>8&&all" @click="allBtn">
  79. <view class="zkBtxt">查看全部</view>
  80. <img src="../../static/img/icon_arrow_down.png" alt="" class="zkbImg">
  81. </view>
  82. <view class="vipzkBottom" v-if="discountList.length>8&&!all" @click="allBtn">
  83. <view class="zkBtxt">收起</view>
  84. <img src="../../static/img/icon_arrow_up.png" alt="" class="zkbImg">
  85. </view>
  86. </view>
  87. <!--赠送礼包 -->
  88. <view class="giveBox" v-if="data.packageArr.length>0">
  89. <view class="vipzkTop">
  90. <img src="http://dmsphoto.66km.com.cn/thFiles/19E20D8F-F478-4BC2-8B02-C565A542BA2A.png" alt="" class="vipzkTopimg">
  91. <view class="vipzkTitle">赠送礼包</view>
  92. <img src="http://dmsphoto.66km.com.cn/thFiles/E350EFE9-7397-4426-87F8-05B054C6ADAA.png" alt="" class="vipzkTopimg">
  93. </view>
  94. <view class="itemLineBox">
  95. <view v-for="(item,index) in data.packageArr">
  96. <view class="itemCard">
  97. <view class="itemCardName">{{item.packName}}</view>
  98. <view class="itemShop">可用门店:全部门店
  99. <image src="../../static/timg/icon_arrow_right.png" mode="" class="shopit"></image>
  100. </view>
  101. </view>
  102. <view class="itemrowBox">
  103. <view class="itemNameBox">
  104. <view class="itemNameTitle">名称</view>
  105. <view class="itemNumTitle">数量</view>
  106. <view class="itemTimeTitle">有效期</view>
  107. </view>
  108. <view class="itemRowBorder" >
  109. <view class="itemrow" v-for="(v,i) in item.details">
  110. <view class="itemNameTitle">{{v.flowName}}</view>
  111. <view class="itemNumTitle">{{v.flowQty?v.flowQty:''}}</view>
  112. <view class="itemTimeTitle">{{v.expireNumber?v.expireNumber:'永久'}}</view>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <!-- 优惠券-->
  120. <view class="giveBox" v-if="data.packageArr.length>0">
  121. <view class="vipzkTop">
  122. <img src="http://dmsphoto.66km.com.cn/thFiles/19E20D8F-F478-4BC2-8B02-C565A542BA2A.png" alt="" class="vipzkTopimg">
  123. <view class="vipzkTitle">优惠券</view>
  124. <img src="http://dmsphoto.66km.com.cn/thFiles/E350EFE9-7397-4426-87F8-05B054C6ADAA.png" alt="" class="vipzkTopimg">
  125. </view>
  126. <view class="couponBox">
  127. <view class="couponLine" v-for="(item,index) in data.couponArr">
  128. <view style="display: flex;justify-content: center;">
  129. <view class="couponName">{{item.actName}}</view>
  130. <view class="couponNum">*{{item.number}}</view>
  131. </view>
  132. <view class="couponMs" v-if="item.WhereMoney==0">无门槛</view>
  133. <view class="couponMs" v-else>满{{item.WhereMoney}}可用</view>
  134. </view>
  135. </view>
  136. </view>
  137. <!-- 附加权益-->
  138. <view class="giveBox" v-if="data.equityArr.length>0">
  139. <view class="vipzkTop">
  140. <img src="http://dmsphoto.66km.com.cn/thFiles/19E20D8F-F478-4BC2-8B02-C565A542BA2A.png" alt="" class="vipzkTopimg">
  141. <view class="vipzkTitle">附加权益</view>
  142. <img src="http://dmsphoto.66km.com.cn/thFiles/E350EFE9-7397-4426-87F8-05B054C6ADAA.png" alt="" class="vipzkTopimg">
  143. </view>
  144. <view class="equityBox">
  145. <view class="equityLine" v-for="(item,index) in data.equityArr">
  146. <img src="http://dmsphoto.66km.com.cn/thFiles/FB8E30CD-8771-432E-9486-3B7880DEE018.png" alt="" class="equityLineImg">
  147. <view class="equityMs">{{item.Contents}}</view>
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. <view class="support"></view>
  153. <view class="bottom" v-if="viopId!=data.currentLevel.id">
  154. <view class="bottomLeft">
  155. <view class="price">¥ <span class="priceSpan">{{data.currentLevel.money}}</span> </view>
  156. <view class="bottomTitme" v-if="data.cLExpireDate">有效期:{{data.cLExpireDate}}</view>
  157. <view class="bottomTitme" v-else>永久</view>
  158. </view>
  159. <view class="btn" @click="vipKt">立即开通</view>
  160. </view>
  161. </view>
  162. </template>
  163. <script>
  164. export default {
  165. data() {
  166. return {
  167. list:'',
  168. allck:false,
  169. iStatusBarHeight:'',
  170. userInfo:'',
  171. data:'',
  172. levelList:'',
  173. currentIndex:'',
  174. discountList:[],
  175. all:true,
  176. viopId:'',
  177. }
  178. },
  179. onLoad() {
  180. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  181. //this.userInfo = this.$store.state.userInfo;
  182. this.getdetail()
  183. },
  184. methods: {
  185. allBtn(){
  186. this.all=!this.all
  187. },
  188. vipKt(){
  189. uni.showToast({
  190. title: '暂不支持,请联系门店购买',
  191. icon: 'none',
  192. duration: 3000
  193. });
  194. },
  195. spScroll(e){
  196. console.log(e);
  197. this.currentIndex=e.detail.current;
  198. this.getlist()
  199. },
  200. goback() {
  201. uni.navigateBack({
  202. delta: 1
  203. })
  204. },
  205. getlist(){
  206. uni.showLoading({
  207. title: '加载中'
  208. })
  209. this.$http('customerLevel/detail', {
  210. levelId:this.levelList[this.currentIndex].id
  211. },'GET').then(res => {
  212. uni.hideLoading();
  213. res.data.discountGoods.forEach(item=>{
  214. item.type=1
  215. })
  216. res.data.discountProject.forEach(item=>{
  217. item.type=2
  218. })
  219. this.data=res.data;
  220. this.discountList=this.data.discountProject.concat(this.data.discountGoods)
  221. })
  222. },
  223. getdetail(){
  224. uni.showLoading({
  225. title: '加载中'
  226. })
  227. this.$http('customerLevel/detail', {
  228. },'GET').then(res => {
  229. uni.hideLoading();
  230. var arr=[]
  231. arr.push(res.data.currentLevel)
  232. res.data.levelList.forEach(item=>{
  233. if(item.id!=res.data.currentLevel.id){
  234. arr.push(item)
  235. }
  236. })
  237. this.levelList=arr;
  238. res.data.discountGoods.forEach(item=>{
  239. item.type=1
  240. })
  241. res.data.discountProject.forEach(item=>{
  242. item.type=2
  243. })
  244. this.data=res.data;
  245. this.viopId=res.data.currentLevel.id;
  246. this.discountList=this.data.discountProject.concat(this.data.discountGoods)
  247. //console.log(this.list)
  248. })
  249. }
  250. }
  251. }
  252. </script>
  253. <style scoped>
  254. .topLeft1{
  255. background: #A9B7C6;
  256. width: 35rpx;
  257. height: 288rpx;
  258. border-top-right-radius: 21rpx;
  259. border-bottom-right-radius: 21rpx;
  260. position: absolute;
  261. left: 0;top: 40rpx;
  262. }
  263. .topRight1{
  264. background: #7487BB;
  265. width: 35rpx;
  266. height: 288rpx;
  267. border-top-left-radius: 21rpx;
  268. border-bottom-left-radius: 21rpx;
  269. position: absolute;
  270. right: 0;top: 40rpx;
  271. }
  272. .bottom{
  273. height: 120rpx;width: 100vw;
  274. background: #fff;
  275. padding-bottom: constant(safe-area-inset-bottom);
  276. padding-bottom: env(safe-area-inset-bottom);
  277. position: fixed;left: 0;bottom: 0;
  278. display: flex;justify-content: space-between;
  279. }
  280. .price{
  281. color: #FF4F00;font-size: 24rpx;
  282. }
  283. .bottomTitme{
  284. color: #3C3C3C;font-size: 24rpx;padding-top: 5rpx;
  285. }
  286. .bottomLeft{
  287. padding-left: 24rpx;padding-top: 24rpx;
  288. }
  289. .priceSpan{
  290. font-size: 34rpx;
  291. }
  292. .btn{
  293. width: 236rpx;text-align: center;
  294. height: 80rpx;line-height: 80rpx;
  295. background: linear-gradient(135deg, #282A44 0%, #1A2027 100%);
  296. border-radius: 44rpx;font-weight: 500;
  297. color: #FCCEA5;font-size: 28rpx;margin-top: 24rpx;margin-right: 24rpx;
  298. }
  299. .support{
  300. height: 150rpx;
  301. padding-bottom: constant(safe-area-inset-bottom);
  302. padding-bottom: env(safe-area-inset-bottom);
  303. }
  304. .contBox{
  305. padding: 0 24rpx;
  306. }
  307. .equityBox{
  308. display: flex;
  309. padding: 30rpx 0;flex-wrap: wrap;
  310. }
  311. .equityLineImg{
  312. width: 86rpx;height: 86rpx;
  313. }
  314. .equityLine{
  315. text-align: center;width: 25%;
  316. }
  317. .equityMs{
  318. color: #3C3C3C;font-size: 24rpx;
  319. }
  320. .couponBox{
  321. display: flex;
  322. justify-content: space-around;
  323. padding: 30rpx 0;
  324. padding-top: 10rpx;
  325. flex-wrap: wrap;
  326. }
  327. .couponLine{
  328. width: 211rpx;
  329. height: 118rpx;
  330. background: url('http://dmsphoto.66km.com.cn/thFiles/95A792BC-5758-4AAA-89E2-1DE6A196C7B3.png') no-repeat;
  331. background-size: 100% 100%;
  332. margin-top: 20rpx;
  333. }
  334. .couponName{
  335. font-weight: 500;font-size: 26rpx;line-height: 37rpx;
  336. color: #512108;padding-top: 22rpx;text-align: center;
  337. overflow: hidden;max-width:180rpx ;
  338. white-space: nowrap;
  339. text-overflow: ellipsis;
  340. }
  341. .couponNum{
  342. font-weight: 500;font-size: 26rpx;line-height: 37rpx;
  343. color: #512108;padding-top: 22rpx;
  344. }
  345. .couponMs{
  346. text-align: center;font-weight: 400;font-size: 22rpx;
  347. color: #907B6E;padding-top: 10rpx;
  348. }
  349. .itemrowBox{
  350. padding-top: 16rpx;font-size: 26rpx;
  351. }
  352. .itemRowBorder{
  353. padding-bottom: 20rpx;
  354. border-radius: 0rpx 0rpx 10rpx 10rpx;
  355. border: 2rpx solid #EEEEEE;
  356. }
  357. .itemrow{
  358. display: flex;padding-top: 20rpx;
  359. }
  360. .itemNameBox{
  361. display: flex;
  362. background: #FFF5ED;
  363. border-radius: 10rpx 10rpx 0rpx 0rpx;
  364. line-height: 72rpx;font-weight: 400;
  365. }
  366. .itemNameTitle{
  367. width: 430rpx;padding-left: 20rpx;
  368. overflow: hidden;
  369. white-space: nowrap;
  370. text-overflow: ellipsis;
  371. }
  372. .itemNumTitle{
  373. width: 80rpx;text-align: center;
  374. }
  375. .itemTimeTitle{
  376. width: 120rpx;text-align: center;
  377. }
  378. .itemCard{
  379. display: flex;justify-content: space-between;
  380. color: #333333;font-size: 26rpx;
  381. }
  382. .itemCardName{
  383. font-weight: 500;font-size: 26rpx;
  384. color: #3C3C3C;line-height: 38rpx;
  385. overflow: hidden;
  386. white-space: nowrap;
  387. text-overflow: ellipsis;
  388. width: 400rpx;
  389. }
  390. .itemShop{
  391. display: flex;line-height: 38rpx;color: #999999;font-size: 26rpx;
  392. }
  393. .shopit{
  394. width: 12rpx;height: 20rpx;margin-top: 10rpx;margin-left: 5rpx;
  395. }
  396. .giveBox{
  397. background: #FFFFFF;padding: 25rpx 20rpx;
  398. border-radius: 10rpx;margin-top: 20rpx;
  399. }
  400. .vipzkLineBox{
  401. display: flex;flex-wrap: wrap;
  402. }
  403. .vipzkLine{
  404. margin:30rpx 30rpx 0 30rpx; width: 112rpx;text-align: center;
  405. }
  406. .vipzkLineimg{
  407. width: 82rpx;height: 82rpx;
  408. }
  409. .vipzkNum{
  410. width: 82rpx;line-height: 32rpx;text-align: center;
  411. height: 32rpx;font-size: 20rpx;margin: 0 auto;
  412. background: linear-gradient(132deg, #FFF0DF 0%, #FED28F 100%);
  413. border-radius: 20rpx;font-weight: 400;
  414. color: #1F2026;margin-top: -15rpx;position: relative;
  415. }
  416. .vipzkNumSpan1{
  417. font-weight: bold;font-size: 26rpx;
  418. color: #1F2026;
  419. }
  420. .vipzklineMs{
  421. font-weight: 400;
  422. color: #3C3C3C;font-size: 24rpx;
  423. line-height: 33rpx;padding-top: 10rpx;
  424. text-align: center;
  425. }
  426. .vipzkBox{
  427. background: linear-gradient(180deg, #FFFDFA 0%, #FFFAF3 100%) #FFF7EA;
  428. border-radius: 17rpx;
  429. padding: 27rpx 6rpx;
  430. margin-top: 20rpx;
  431. }
  432. .vipzkTop{
  433. display: flex;justify-content: center;
  434. }
  435. .vipzkTopimg{
  436. height: 19rpx;width: 190rpx;margin-top: 15rpx;
  437. }
  438. .vipzkTitle{
  439. font-weight: 500;font-size: 34rpx;
  440. color: #8B4F30;padding: 0 15rpx;
  441. line-height: 48rpx;
  442. }
  443. .topCont{
  444. width: 632rpx;height: 320rpx;
  445. margin-left: 59rpx;
  446. background: url('http://dmsphoto.66km.com.cn/thFiles/1EA0546F-7C73-43D7-AE07-CE1C8A3DA375.png');
  447. background-size: 100% 100%;
  448. position: relative;
  449. }
  450. .vipBsIcon{
  451. position: absolute;width: 112rpx;height: 33rpx;top: 0;right: 0;
  452. }
  453. .topCont1{
  454. width: 632rpx;height: 320rpx;
  455. margin-left: 59rpx;
  456. background: url('http://dmsphoto.66km.com.cn/thFiles/ED1AD76C-9EBF-4C75-923F-565BD56491E1.png');
  457. background-size: 100% 100%;
  458. }
  459. .spItem{
  460. height: 320rpx;
  461. }
  462. .swiper{
  463. height: 320rpx;
  464. }
  465. .vipBsImg{
  466. width: 48rpx;height: 48rpx;font-size: 41px;font-weight: normal;padding-left: 11rpx;
  467. font-family: FZRUIZHK_ZHONG--GBK1-0, FZRUIZHK_ZHONG--GBK1;
  468. }
  469. .vipbs{
  470. color: #8B4F30;line-height: 48rpx;font-size: 41rpx;padding-left: 10rpx;font-weight: 600;
  471. }
  472. .vipTime{
  473. color: #8B4F30;font-size: 24rpx;padding-left: 36rpx;padding-top: 136rpx;font-weight: 600;
  474. }
  475. .vipBsbox{
  476. display: flex;padding-top: 53rpx;padding-left: 36rpx;
  477. }
  478. .topBox{
  479. padding-top: 22rpx;position: relative;
  480. }
  481. .content{
  482. min-height: 100vh;
  483. background: #D8D8D8 linear-gradient(315deg, #141337 0%, #101137 100%);
  484. }
  485. .zdyNavBox{
  486. width: 100vw;
  487. position: fixed;
  488. top: 0;
  489. left: 0;
  490. z-index: 9999999;
  491. background: #141337;
  492. }
  493. .zdyNav{
  494. height: 44px;
  495. display: flex;
  496. justify-content: space-between;
  497. align-items: center;
  498. }
  499. .backImg{
  500. width: 44rpx;
  501. height: 44rpx;
  502. /* margin-left: 10rpx; */
  503. margin-top: 10rpx;
  504. }
  505. .navsx{
  506. width: 2rpx;
  507. height: 44rpx;
  508. background: #e1e1e1;
  509. margin: 0 26rpx 0rpx 18rpx;
  510. }
  511. .homeImg{
  512. width: 44rpx;
  513. height: 44rpx;
  514. }
  515. .zdyNavLeft{
  516. width: 235rpx;
  517. margin-left: 15rpx;
  518. }
  519. .zdyNavTitle{
  520. width: 100vw;
  521. height: 44px;
  522. text-align: center;
  523. font-size: 34rpx;
  524. line-height: 44px;
  525. color: #fff;
  526. }
  527. .vipzkBottom{
  528. display: flex;justify-content: center;color: #999999;font-size: 24rpx;line-height: 30rpx;
  529. padding-top: 20rpx;
  530. }
  531. .zkbImg{
  532. width: 22rpx;height: 14rpx;margin-top: 8rpx;margin-left: 10rpx;
  533. }
  534. </style>
  535. <!--
  536. -->