water.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <view class="water">
  3. <view class="bg-box">
  4. <image class="bg" src="https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/P2up4p3ELZAH766942076ec3d579665764a3355f5ec7.png/1.png" mode=""></image>
  5. <view class="btn" @click="handleBtn">
  6. 立即领取
  7. </view>
  8. </view>
  9. <view class="content">
  10. <image class="title" src="../static/water-title.png" mode=""></image>
  11. <view class="rule">
  12. 1.该活动仅限本平台会员中国移动用户专享。
  13. </view>
  14. <view class="rule">
  15. 2.本活动每位会员(手机号所绑定会员)仅限领取一桶原价18元的贵州泉品质桶桶装饮用水。
  16. </view>
  17. <view class="rule">
  18. 3.本活动桶装水免费领取,但空桶需缴纳押金,待桶回收后押金可退,若继续订购则无需再次缴纳空桶押金。
  19. </view>
  20. </view>
  21. <!-- <web-view v-if="showWeb" @load="loadedPage" src="https://wechat.gzqspring.ltd/#/coupon_receive_index?ID=17"></web-view> -->
  22. </view>
  23. </template>
  24. <script>
  25. import {
  26. qrcode
  27. } from '@/api/common.js';
  28. export default {
  29. data() {
  30. return {
  31. showWeb: false,
  32. src: '',
  33. test: ''
  34. }
  35. },
  36. methods: {
  37. handleBtn() {
  38. if(uni.getStorageSync('token')){
  39. if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
  40. uni.navigateToMiniProgram({
  41. appId:'wx63342614cf0af2f7',
  42. path:'pages/webview/webview?url=https%3A%2F%2Fwechat.gzqspring.ltd%2F%23%2Fcoupon_receive_index%3FID%3D17'
  43. })
  44. }else{
  45. uni.showModal({
  46. title:'此商品需要开通会员才能购买',
  47. cancelText:'下次再说',
  48. confirmText:'立即开通',
  49. success(res) {
  50. if(res.confirm){
  51. uni.navigateTo({
  52. url:'/my/memberCenter/index'
  53. })
  54. }
  55. }
  56. })
  57. }
  58. }else{
  59. return uni.showModal({
  60. title:'请登录',
  61. confirmText:'去登录',
  62. success(res){
  63. if(res.confirm){
  64. uni.navigateTo({
  65. url:'/login/login/login?redirect=/special/water'
  66. })
  67. }
  68. }
  69. })
  70. }
  71. // this.showWeb = true
  72. // uni.showLoading({
  73. // title:'加载中'
  74. // })
  75. // uni.setClipboardData({
  76. // data: 'bf3452e12c4146025894ce8c1a707c31',
  77. // showToast:false,
  78. // success: function () {
  79. // uni.showModal({
  80. // title:'领取成功',
  81. // content:'兑换码已复制到剪切板,到贵州泉小程序粘贴兑换码兑换',
  82. // showCancel:false,
  83. // success(){
  84. // uni.navigateToMiniProgram({
  85. // appId:'wx63342614cf0af2f7',
  86. // path:'pages/webview/webview?url=https%3A%2F%2Fwechat.gzqspring.ltd%2F%23%2Fcoupon_receive_index%3FID%3D17'
  87. // })
  88. // }
  89. // })
  90. // }
  91. // });
  92. },
  93. loadedPage(){
  94. uni.hideLoading()
  95. },
  96. onmessage(val){
  97. console.log(val);
  98. }
  99. },
  100. created() {
  101. },
  102. }
  103. </script>
  104. <style lang="scss" scoped>
  105. .water {
  106. .bg-box {
  107. position: relative;
  108. .bg {
  109. width: 100%;
  110. height: 716rpx;
  111. }
  112. .btn {
  113. width: 360rpx;
  114. line-height: 80rpx;
  115. text-align: center;
  116. background: linear-gradient(180deg, #0F615C 0%, #0E6F51 100%);
  117. border-radius: 40rpx 40rpx 40rpx 40rpx;
  118. font-weight: bold;
  119. color: #FFFFFF;
  120. font-size: 32rpx;
  121. position: absolute;
  122. left: 50%;
  123. bottom: 20rpx;
  124. transform: translate(-50%, 50%);
  125. }
  126. }
  127. .content {
  128. .title {
  129. margin: 72rpx auto 0;
  130. width: 350rpx;
  131. height: 48rpx;
  132. display: block;
  133. }
  134. .rule {
  135. margin-top: 24rpx;
  136. font-size: 24rpx;
  137. color: #222222;
  138. line-height: 40rpx;
  139. padding: 0 24rpx;
  140. }
  141. }
  142. .img {
  143. width: 300rpx;
  144. height: 300rpx;
  145. }
  146. }
  147. </style>