VipPopup.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="container flex-center">
  3. <view class="popup flex-center">
  4. <image :src="`${assetsUrl}popup-close-white.png`" mode="aspectFill" class="close" @click="close"></image>
  5. <view class="top flex-start">
  6. <image :src="`${assetsUrl}popup-vip.png`" mode="aspectFill" class="top-icon"></image>
  7. <view class="top-text font40 fw600">
  8. 4项特权
  9. </view>
  10. </view>
  11. <swiper :indicator-dots="true" indicator-color="rgba(255,255,255,0.3)" indicator-active-color="#ffffff" :autoplay="true" :interval="5000" :duration="1000" class="swiper" :current="privilegeIndex">
  12. <swiper-item v-for="(item,index) in privileges" :key="index">
  13. <view class="swiper-item flex-center">
  14. <view class="si-content">
  15. <image :src="`${assetsUrl}${item.img}.png`" mode="aspectFill" class="si-img"></image>
  16. <view class="si-title font36 fw600">
  17. {{item.title}}
  18. </view>
  19. <view class="si-text font28 fw400">
  20. {{item.text}}
  21. </view>
  22. </view>
  23. </view>
  24. </swiper-item>
  25. </swiper>
  26. <view class="bottom flex-center">
  27. <view class="b-text1 font28 fw400">
  28. 开通会员请
  29. </view>
  30. <view class="b-text1" style="text-decoration: underline;margin-left: 8rpx;" @click="toService">
  31. 联系客服
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. name:"VipPopup",
  40. props:{
  41. swiperIndex:{
  42. type:Number,
  43. default:''
  44. }
  45. },
  46. data() {
  47. return {
  48. assetsUrl: this.$util.assetsUrl,
  49. privileges:[
  50. {img:'popup-talk',title:'随心畅聊',text:'10次/天主动私聊女生'},
  51. {img:'popup-recommend',title:'特别推荐',text:'尊贵标识,优先推荐'},
  52. {img:'popup-limit',title:'颜遇无限',text:'无限次数查看女士主页和相册'},
  53. {img:'popup-visitor',title:'查看访客',text:'解锁女生来访痕迹'},
  54. ],
  55. privilegeIndex:-1
  56. };
  57. },
  58. watch:{
  59. 'swiperIndex':function(val,oldval){
  60. console.log(val)
  61. this.privilegeIndex=val;
  62. }
  63. },
  64. methods:{
  65. close(){
  66. this.$emit('closePopup');
  67. },
  68. toService(){
  69. uni.openCustomerServiceChat({
  70. extInfo:{
  71. url:'https://work.weixin.qq.com/kfid/kfca1b21d2f7e8a18e9',//客服链接
  72. },
  73. corpId:'wwa8f2a0d8a6dc0950',//企业ID
  74. fail(res){
  75. console.log(res)
  76. uni.showToast({
  77. title: '客服联系失败',
  78. icon:'none'
  79. })
  80. }
  81. })
  82. this.$emit('closePopup');
  83. }
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .container{
  89. flex-direction: column;
  90. .popup{
  91. width: 630rpx;
  92. height: 716rpx;
  93. background-color: #6C52F4;
  94. position: relative;
  95. flex-direction: column;
  96. border-radius: 40rpx;
  97. .close{
  98. position: absolute;
  99. right: 20rpx;
  100. top: 20rpx;
  101. width: 32rpx;
  102. height: 32rpx;
  103. }
  104. .top{
  105. height: 132rpx;
  106. width: 630rpx;
  107. padding: 40rpx 40rpx 0rpx 40rpx;
  108. box-sizing: border-box;
  109. .top-icon{
  110. width: 160rpx;
  111. height: 60rpx;
  112. }
  113. .top-text{
  114. color: #ffffff;
  115. margin-left: 8rpx;
  116. }
  117. }
  118. .swiper{
  119. flex: 1;
  120. width: 630rpx;
  121. .swiper-item{
  122. width: 630rpx;
  123. flex-direction: column;
  124. .si-img{
  125. width: 630rpx;
  126. height: 256rpx;
  127. }
  128. .si-title{
  129. color: #ffffff;
  130. text-align: center;
  131. }
  132. .si-text{
  133. color: #ffffff;
  134. text-align: center;
  135. margin-top: 16rpx;
  136. }
  137. }
  138. }
  139. .bottom{
  140. width: 100%;
  141. height: 120rpx;
  142. padding: 0rpx 40rpx 0rpx 40rpx;
  143. box-sizing: border-box;
  144. background-color: rgba(255, 255, 255, 0.08);
  145. .b-text1{
  146. color: #ffffff;
  147. }
  148. }
  149. }
  150. }
  151. </style>