123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <template>
- <view class="water">
- <view class="bg-box">
- <image class="bg" src="https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/P2up4p3ELZAH766942076ec3d579665764a3355f5ec7.png/1.png" mode=""></image>
- <view class="btn" @click="handleBtn">
- 立即领取
- </view>
- </view>
- <view class="content">
- <image class="title" src="../static/water-title.png" mode=""></image>
- <view class="rule">
- 1.该活动仅限本平台会员中国移动用户专享。
- </view>
- <view class="rule">
- 2.本活动每位会员(手机号所绑定会员)仅限领取一桶原价18元的贵州泉品质桶桶装饮用水。
- </view>
- <view class="rule">
- 3.本活动桶装水免费领取,但空桶需缴纳押金,待桶回收后押金可退,若继续订购则无需再次缴纳空桶押金。
- </view>
- </view>
- <!-- <web-view v-if="showWeb" @load="loadedPage" src="https://wechat.gzqspring.ltd/#/coupon_receive_index?ID=17"></web-view> -->
- </view>
- </template>
- <script>
- import {
- qrcode
- } from '@/api/common.js';
- export default {
- data() {
- return {
- showWeb: false,
- src: '',
- test: ''
- }
- },
- methods: {
- handleBtn() {
- if(uni.getStorageSync('token')){
- if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
- uni.navigateToMiniProgram({
- appId:'wx63342614cf0af2f7',
- path:'pages/webview/webview?url=https%3A%2F%2Fwechat.gzqspring.ltd%2F%23%2Fcoupon_receive_index%3FID%3D17'
- })
- }else{
- uni.showModal({
- title:'此商品需要开通会员才能购买',
- cancelText:'下次再说',
- confirmText:'立即开通',
- success(res) {
- if(res.confirm){
- uni.navigateTo({
- url:'/my/memberCenter/index'
- })
- }
- }
- })
- }
-
- }else{
- return uni.showModal({
- title:'请登录',
- confirmText:'去登录',
- success(res){
- if(res.confirm){
- uni.navigateTo({
- url:'/login/login/login?redirect=/special/water'
- })
- }
- }
- })
- }
- // this.showWeb = true
- // uni.showLoading({
- // title:'加载中'
- // })
- // uni.setClipboardData({
- // data: 'bf3452e12c4146025894ce8c1a707c31',
- // showToast:false,
- // success: function () {
- // uni.showModal({
- // title:'领取成功',
- // content:'兑换码已复制到剪切板,到贵州泉小程序粘贴兑换码兑换',
- // showCancel:false,
- // success(){
- // uni.navigateToMiniProgram({
- // appId:'wx63342614cf0af2f7',
- // path:'pages/webview/webview?url=https%3A%2F%2Fwechat.gzqspring.ltd%2F%23%2Fcoupon_receive_index%3FID%3D17'
- // })
- // }
- // })
-
- // }
- // });
-
- },
- loadedPage(){
- uni.hideLoading()
- },
- onmessage(val){
- console.log(val);
- }
- },
- created() {
-
-
-
- },
-
-
- }
- </script>
- <style lang="scss" scoped>
- .water {
- .bg-box {
- position: relative;
- .bg {
- width: 100%;
- height: 716rpx;
- }
- .btn {
- width: 360rpx;
- line-height: 80rpx;
- text-align: center;
- background: linear-gradient(180deg, #0F615C 0%, #0E6F51 100%);
- border-radius: 40rpx 40rpx 40rpx 40rpx;
- font-weight: bold;
- color: #FFFFFF;
- font-size: 32rpx;
- position: absolute;
- left: 50%;
- bottom: 20rpx;
- transform: translate(-50%, 50%);
- }
- }
- .content {
- .title {
- margin: 72rpx auto 0;
- width: 350rpx;
- height: 48rpx;
- display: block;
- }
- .rule {
- margin-top: 24rpx;
- font-size: 24rpx;
- color: #222222;
- line-height: 40rpx;
- padding: 0 24rpx;
- }
- }
- .img {
- width: 300rpx;
- height: 300rpx;
- }
- }
- </style>
|