water.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. uni.navigateToMiniProgram({
  40. appId:'wx63342614cf0af2f7',
  41. path:'pages/webview/webview?url=https%3A%2F%2Fwechat.gzqspring.ltd%2F%23%2Fcoupon_receive_index%3FID%3D17'
  42. })
  43. }else{
  44. return uni.showModal({
  45. title:'请登录',
  46. confirmText:'去登录',
  47. success(res){
  48. if(res.confirm){
  49. uni.navigateTo({
  50. url:'/login/login/login?redirect=/special/water'
  51. })
  52. }
  53. }
  54. })
  55. }
  56. // this.showWeb = true
  57. // uni.showLoading({
  58. // title:'加载中'
  59. // })
  60. // uni.setClipboardData({
  61. // data: 'bf3452e12c4146025894ce8c1a707c31',
  62. // showToast:false,
  63. // success: function () {
  64. // uni.showModal({
  65. // title:'领取成功',
  66. // content:'兑换码已复制到剪切板,到贵州泉小程序粘贴兑换码兑换',
  67. // showCancel:false,
  68. // success(){
  69. // uni.navigateToMiniProgram({
  70. // appId:'wx63342614cf0af2f7',
  71. // path:'pages/webview/webview?url=https%3A%2F%2Fwechat.gzqspring.ltd%2F%23%2Fcoupon_receive_index%3FID%3D17'
  72. // })
  73. // }
  74. // })
  75. // }
  76. // });
  77. },
  78. loadedPage(){
  79. uni.hideLoading()
  80. },
  81. onmessage(val){
  82. console.log(val);
  83. }
  84. },
  85. created() {
  86. },
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. .water {
  91. .bg-box {
  92. position: relative;
  93. .bg {
  94. width: 100%;
  95. height: 716rpx;
  96. }
  97. .btn {
  98. width: 360rpx;
  99. line-height: 80rpx;
  100. text-align: center;
  101. background: linear-gradient(180deg, #0F615C 0%, #0E6F51 100%);
  102. border-radius: 40rpx 40rpx 40rpx 40rpx;
  103. font-weight: bold;
  104. color: #FFFFFF;
  105. font-size: 32rpx;
  106. position: absolute;
  107. left: 50%;
  108. bottom: 20rpx;
  109. transform: translate(-50%, 50%);
  110. }
  111. }
  112. .content {
  113. .title {
  114. margin: 72rpx auto 0;
  115. width: 350rpx;
  116. height: 48rpx;
  117. display: block;
  118. }
  119. .rule {
  120. margin-top: 24rpx;
  121. font-size: 24rpx;
  122. color: #222222;
  123. line-height: 40rpx;
  124. padding: 0 24rpx;
  125. }
  126. }
  127. .img {
  128. width: 300rpx;
  129. height: 300rpx;
  130. }
  131. }
  132. </style>