| @@ -0,0 +1 @@ | |||||
| <svg t="1679302696355" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2956" width="128" height="128"><path d="M95.914667 204.8c0-67.669333 56.746667-119.466667 122.794666-119.466667h151.381334a42.666667 42.666667 0 0 1 0 85.333334H218.709333c-22.4 0-37.461333 16.981333-37.461333 34.133333v115.2a42.666667 42.666667 0 0 1-85.333333 0V204.8zM611.242667 128a42.666667 42.666667 0 0 1 42.666666-42.666667h151.381334c66.133333 0 122.794667 51.797333 122.794666 119.466667v115.2a42.666667 42.666667 0 1 1-85.333333 0V204.8c0-17.152-15.018667-34.133333-37.461333-34.133333h-151.381334a42.666667 42.666667 0 0 1-42.666666-42.666667zM85.333333 512a42.666667 42.666667 0 0 1 42.666667-42.666667h768a42.666667 42.666667 0 0 1 0 85.333334H128a42.666667 42.666667 0 0 1-42.666667-42.666667z m53.248 149.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v115.2c0 17.152 15.061333 34.133333 37.461333 34.133333h151.381334a42.666667 42.666667 0 1 1 0 85.333334H218.709333c-66.090667 0-122.794667-51.797333-122.794666-119.466667v-115.2a42.666667 42.666667 0 0 1 42.666666-42.666667z m746.837334 0a42.666667 42.666667 0 0 1 42.666666 42.666667v115.2c0 67.669333-56.704 119.466667-122.794666 119.466667h-151.381334a42.666667 42.666667 0 1 1 0-85.333334h151.381334c22.442667 0 37.461333-16.981333 37.461333-34.133333v-115.2a42.666667 42.666667 0 0 1 42.666667-42.666667z" fill="#75C82B" p-id="2957"></path></svg> | |||||
| @@ -309,6 +309,10 @@ var config = { | |||||
| * 根据code查询接口 | * 根据code查询接口 | ||||
| */ | */ | ||||
| findByCode: "/merchant/findByCode", | findByCode: "/merchant/findByCode", | ||||
| /** | |||||
| * 设置密码 | |||||
| */ | |||||
| updatePayPassword: "/couponOrder/updatePayPassword", | |||||
| /** | /** | ||||
| * 参与砍价 | * 参与砍价 | ||||
| */ | */ | ||||
| @@ -109,6 +109,7 @@ Page({ | |||||
| }).then(res => { | }).then(res => { | ||||
| return | return | ||||
| }).catch(err => { | }).catch(err => { | ||||
| wx.setStorageSync('ifSetUserInfo', 1) //手机号未授权 | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/getphoneInfo/index?mineFlag=mine`, | url: `/pages/getphoneInfo/index?mineFlag=mine`, | ||||
| }) | }) | ||||
| @@ -167,7 +168,7 @@ Page({ | |||||
| url: '/pages3/setUserInfo/index' | url: '/pages3/setUserInfo/index' | ||||
| }) | }) | ||||
| }, | }, | ||||
| onLoad() { | |||||
| onLoad(options) { | |||||
| // this.getLocation(); | // this.getLocation(); | ||||
| this.updateScene(); | this.updateScene(); | ||||
| // this.getRoomId(); | // this.getRoomId(); | ||||
| @@ -241,7 +242,30 @@ Page({ | |||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| onShow: function () { | onShow: function () { | ||||
| const ifSetUserInfo = wx.getStorageSync('ifSetUserInfo') || 2 | |||||
| // 手机号未授权 | |||||
| if (ifSetUserInfo == 1) { | |||||
| wx.showModal({ | |||||
| title: '完善个人信息', | |||||
| content: '请继续完成个人信息哦', | |||||
| showCancel: true, | |||||
| cancelText: "以后再说", | |||||
| cancelColor: '', | |||||
| confirmText: "去完善", | |||||
| confirmColor: '#FD832D', | |||||
| complete: (res) => { | |||||
| if (res.cancel) { | |||||
| console.log('cancel'); | |||||
| } | |||||
| if (res.confirm) { | |||||
| wx.setStorageSync('ifSetUserInfo', 2) // 已完成手机号授权 | |||||
| wx.navigateTo({ | |||||
| url: '/pages3/setUserInfo/index', | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| if (businessSwitch) { | if (businessSwitch) { | ||||
| let openId = wx.getStorageSync("openId") | let openId = wx.getStorageSync("openId") | ||||
| this.setData({ | this.setData({ | ||||
| @@ -32,11 +32,11 @@ | |||||
| <text class='fl'>{{item.merchantName}}</text> | <text class='fl'>{{item.merchantName}}</text> | ||||
| <text class='fr'> | <text class='fr'> | ||||
| <text wx:if="{{item.payType == 1}}" style="color: #ff0000;">退款:+ {{item.deductionAmount/100}}元</text> | <text wx:if="{{item.payType == 1}}" style="color: #ff0000;">退款:+ {{item.deductionAmount/100}}元</text> | ||||
| <text wx:else style="color: #ff0000;">- {{item.deductionAmount/100}}元</text> | |||||
| <text wx:else style="color: #ff0000;">{{item.payType == 0 ?'-':'+'}}{{item.deductionAmount/100}}元</text> | |||||
| </text> | </text> | ||||
| </view> | </view> | ||||
| <view class='clearfix record2'> | <view class='clearfix record2'> | ||||
| <text class='fl'>更新时间:{{item.updateDate}}</text> | |||||
| <text class='fl'>交易时间:{{item.createDate}}</text> | |||||
| <text class='fr'>余 {{item.cardRemainAmount/100}}元</text> | <text class='fr'>余 {{item.cardRemainAmount/100}}元</text> | ||||
| </view> | </view> | ||||
| <view class="orderId">订单号:{{item.orderId}}</view> | <view class="orderId">订单号:{{item.orderId}}</view> | ||||
| @@ -162,6 +162,61 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| goSetSecurity() { | |||||
| wx.showModal({ | |||||
| title: '设置支付密码', | |||||
| placeholderText: '请设置密码,不设则默认为无密码', | |||||
| editable: true, | |||||
| complete: (res) => { | |||||
| if (res.cancel) { | |||||
| console.log(res); | |||||
| } | |||||
| if (res.confirm) { | |||||
| const numReg = /^\d+$/ | |||||
| const isNum = numReg.test(res.content) | |||||
| if (res.content) { | |||||
| if (!isNum || (res.content.length != 6)) { | |||||
| wx.showToast({ | |||||
| title: '密码只能为6位数字', | |||||
| icon: 'none' | |||||
| }) | |||||
| return | |||||
| } else { | |||||
| this.setPassword(1, res.content) | |||||
| } | |||||
| } else { | |||||
| this.setPassword(0, '') | |||||
| } | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| setPassword(payCheck, pwd) { | |||||
| Http.post({ | |||||
| url: config.api.updatePayPassword, | |||||
| data: { | |||||
| id: this.data.data.id, | |||||
| payCheck: payCheck, | |||||
| payPassword: pwd | |||||
| } | |||||
| }).then(res => { | |||||
| wx.showToast({ | |||||
| title: '设置成功!', | |||||
| icon: 'success' | |||||
| }) | |||||
| setTimeout(() => { | |||||
| wx.navigateBack() | |||||
| }, 1500); | |||||
| }).catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| icon: 'error' | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goCheck() { | goCheck() { | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${this.data.data.id}`, | url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${this.data.data.id}`, | ||||
| @@ -206,7 +261,7 @@ Page({ | |||||
| merChantDetail = encodeURIComponent(merChantDetail) | merChantDetail = encodeURIComponent(merChantDetail) | ||||
| console.log(that.data.data, 'data'); | console.log(that.data.data, 'data'); | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/scanPay/scanPay?merChant=${merChantDetail}&cardid=${that.data.data.id}&remainingAmount=${that.data.data.remainingAmount / 100}`, | |||||
| url: `/pages/scanPay/scanPay?merChant=${merChantDetail}&cardid=${that.data.data.id}&remainingAmount=${that.data.data.remainingAmount / 100}&payCheck=${that.data.data.payCheck}`, | |||||
| }) | }) | ||||
| } | } | ||||
| } | } | ||||
| @@ -150,6 +150,7 @@ | |||||
| </view> --> | </view> --> | ||||
| <view class="bottomBtn"> | <view class="bottomBtn"> | ||||
| <!-- wx:if="{{showImg=='0'}}" --> | <!-- wx:if="{{showImg=='0'}}" --> | ||||
| <button class="btn" bindtap='goSetSecurity'>支付安全设置</button> | |||||
| <button class="btn" bindtap='goCheck'>查看交易记录</button> | <button class="btn" bindtap='goCheck'>查看交易记录</button> | ||||
| <button wx:if="{{isShowQR && showImg=='1'}}" class="btn" bindtap='gotoPay'>扫一扫付款</button> | <button wx:if="{{isShowQR && showImg=='1'}}" class="btn" bindtap='gotoPay'>扫一扫付款</button> | ||||
| <button wx:if="{{(data.supportTransfer==1) && showImg=='1'}}" class="btn" bindtap="goGive">转送给微信好友</button> | <button wx:if="{{(data.supportTransfer==1) && showImg=='1'}}" class="btn" bindtap="goGive">转送给微信好友</button> | ||||
| @@ -372,7 +372,7 @@ page { | |||||
| .bottomBtn { | .bottomBtn { | ||||
| position: sticky; | position: sticky; | ||||
| bottom: 0; | bottom: 0; | ||||
| padding: 50rpx; | |||||
| padding: 70rpx; | |||||
| z-index: 99999; | z-index: 99999; | ||||
| } | } | ||||
| @@ -145,8 +145,8 @@ Page({ | |||||
| supportTransfer: res.data.supportTransfer || "" | supportTransfer: res.data.supportTransfer || "" | ||||
| }) | }) | ||||
| if (goGive) { | if (goGive) { | ||||
| if ((this.data.ownerUserId && this.data.eCardId) || e.detail.value.code) { | |||||
| if ((this.data.owned && this.data.owned == 1) || e.detail.value.code) { | |||||
| if ((this.data.ownerUserId && this.data.eCardId) || this.data.code) { | |||||
| if ((this.data.owned && this.data.owned == 1) || this.data.code) { | |||||
| if (this.data.supportTransfer == 1) { | if (this.data.supportTransfer == 1) { | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${this.data.eCardId}`, | url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${this.data.eCardId}`, | ||||
| @@ -172,10 +172,13 @@ Page({ | |||||
| }, | }, | ||||
| getCouponOrderByPassword(password) { | getCouponOrderByPassword(password) { | ||||
| const that = this | |||||
| Http.post({ | Http.post({ | ||||
| url: config.api.getCouponOrderByPassword, | url: config.api.getCouponOrderByPassword, | ||||
| data: { | data: { | ||||
| password, | password, | ||||
| payCheck: that.data.pdwSwitch, | |||||
| payPassword: that.data.password | |||||
| } | } | ||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| @@ -217,6 +220,26 @@ Page({ | |||||
| }, | }, | ||||
| submit() { | submit() { | ||||
| if (this.data.pdwSwitch) { | |||||
| const password = this.data.password | |||||
| const numReg = /^\d+$/ | |||||
| if (!password) { | |||||
| wx.showToast({ | |||||
| title: '密码不能为空!', | |||||
| icon: 'none' | |||||
| }) | |||||
| return | |||||
| } | |||||
| if (!numReg.test(password) || password.length != 6) { | |||||
| wx.showToast({ | |||||
| title: '密码只能为6位数字!', | |||||
| icon: 'none' | |||||
| }) | |||||
| return | |||||
| } | |||||
| } | |||||
| const e = { | const e = { | ||||
| detail: { value: { code: this.data.code } } | detail: { value: { code: this.data.code } } | ||||
| } | } | ||||
| @@ -55,23 +55,17 @@ | |||||
| <text class="cancelChangePhone" bindtap="cancelChangePhone">取消</text> | <text class="cancelChangePhone" bindtap="cancelChangePhone">取消</text> | ||||
| </view> | </view> | ||||
| <!-- <view class="security"> | |||||
| <view wx:if="{{tabIndex == 0}}" class="security"> | |||||
| <text>支付安全设置:</text> | <text>支付安全设置:</text> | ||||
| <radio-group wx:if="{{tabIndex == 0}}" class="radioGroup" bindchange="securityChange"> | |||||
| <radio-group class="radioGroup" bindchange="securityChange"> | |||||
| <label> | <label> | ||||
| <radio value="0" checked="true" />无验证 | <radio value="0" checked="true" />无验证 | ||||
| </label> | </label> | ||||
| <label> | <label> | ||||
| <radio value="1" />密码验证 | |||||
| <radio value="1" />设置支付密码 | |||||
| </label> | </label> | ||||
| </radio-group> | </radio-group> | ||||
| <radio-group wx:if="{{tabIndex == 1}}" class="radioGroup" bindchange="securityChange"> | |||||
| <label> | |||||
| <radio value="0" checked="true" />无验证 | |||||
| </label> | |||||
| </radio-group> | |||||
| </view> --> | |||||
| </view> | |||||
| <view wx:if="{{pdwSwitch && tabIndex == 0}}" class="pwdBox"> | <view wx:if="{{pdwSwitch && tabIndex == 0}}" class="pwdBox"> | ||||
| <view wx:if="{{!isShowPwd}}" style="margin-bottom: 0;"> | <view wx:if="{{!isShowPwd}}" style="margin-bottom: 0;"> | ||||
| @@ -170,6 +170,7 @@ Page({ | |||||
| * 来自我的 | * 来自我的 | ||||
| */ | */ | ||||
| if (that.data.path == 'main') { | if (that.data.path == 'main') { | ||||
| wx.switchTab({ | wx.switchTab({ | ||||
| url: `/index/user` | url: `/index/user` | ||||
| }) | }) | ||||
| @@ -219,6 +220,7 @@ Page({ | |||||
| url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}` | url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}` | ||||
| }) | }) | ||||
| } else if (that.data.mineFlag == 'mine') { | } else if (that.data.mineFlag == 'mine') { | ||||
| wx.switchTab({ | wx.switchTab({ | ||||
| url: '/index/user' | url: '/index/user' | ||||
| }); | }); | ||||
| @@ -245,9 +247,16 @@ Page({ | |||||
| url: '/pages3/setUserInfo/index', | url: '/pages3/setUserInfo/index', | ||||
| }) | }) | ||||
| } else { | } else { | ||||
| wx.switchTab({ | |||||
| url: '/index/passCar', | |||||
| }) | |||||
| const ifSetUserInfo = wx.getStorageSync('ifSetUserInfo') || 0 | |||||
| if (ifSetUserInfo) { | |||||
| wx.switchTab({ | |||||
| url: '/index/user' | |||||
| }); | |||||
| } else { | |||||
| wx.switchTab({ | |||||
| url: '/index/passCar', | |||||
| }) | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -1,6 +1,7 @@ | |||||
| page{ | |||||
| page { | |||||
| background: #fbfbfb; | background: #fbfbfb; | ||||
| } | } | ||||
| .login-body { | .login-body { | ||||
| padding-top: 200rpx; | padding-top: 200rpx; | ||||
| display: flex; | display: flex; | ||||
| @@ -8,9 +9,11 @@ page{ | |||||
| align-items: center; | align-items: center; | ||||
| justify-content: center; | justify-content: center; | ||||
| } | } | ||||
| .backHome{ | |||||
| margin-top: 20rpx!important; | |||||
| .backHome { | |||||
| margin-top: 20rpx !important; | |||||
| } | } | ||||
| .login-logo { | .login-logo { | ||||
| width: 320rpx; | width: 320rpx; | ||||
| /* height: 320rpx; */ | /* height: 320rpx; */ | ||||
| @@ -27,7 +30,8 @@ page{ | |||||
| padding-top: 120rpx; | padding-top: 120rpx; | ||||
| width: 600rpx; | width: 600rpx; | ||||
| } | } | ||||
| .active{ | |||||
| .active { | |||||
| opacity: .6; | opacity: .6; | ||||
| } | } | ||||
| @@ -43,18 +47,22 @@ page{ | |||||
| letter-spacing: 0.75rpx !important; | letter-spacing: 0.75rpx !important; | ||||
| text-align: center; | text-align: center; | ||||
| } | } | ||||
| .title{ | |||||
| .title { | |||||
| margin-top: 30rpx; | margin-top: 30rpx; | ||||
| } | } | ||||
| .title text{ | |||||
| .title text { | |||||
| display: block; | display: block; | ||||
| text-align: center; | text-align: center; | ||||
| } | } | ||||
| .title text:nth-of-type(1){ | |||||
| .title text:nth-of-type(1) { | |||||
| font-size: 38rpx; | font-size: 38rpx; | ||||
| font-weight: bold; | font-weight: bold; | ||||
| } | } | ||||
| .title text:nth-of-type(2){ | |||||
| .title text:nth-of-type(2) { | |||||
| font-size: 30rpx; | font-size: 30rpx; | ||||
| margin-top: 25rpx; | margin-top: 25rpx; | ||||
| } | } | ||||
| @@ -17,8 +17,8 @@ Page({ | |||||
| wjId: "", | wjId: "", | ||||
| composeOrderType: "", | composeOrderType: "", | ||||
| fillIndentId: "", | fillIndentId: "", | ||||
| url:null,//游戏路径 | |||||
| id:null,//游戏id, | |||||
| url: null,//游戏路径 | |||||
| id: null,//游戏id, | |||||
| gameId: null,//游戏gameId | gameId: null,//游戏gameId | ||||
| }, | }, | ||||
| //是否授权手机号 | //是否授权手机号 | ||||
| @@ -45,21 +45,20 @@ Page({ | |||||
| url: app.globalData.skipUrl, | url: app.globalData.skipUrl, | ||||
| }) | }) | ||||
| } | } | ||||
| }).catch(err => { | }).catch(err => { | ||||
| wx.redirectTo({ | wx.redirectTo({ | ||||
| url: `/pages/getphoneInfo/index?skipUrl=1` | url: `/pages/getphoneInfo/index?skipUrl=1` | ||||
| }); | }); | ||||
| }) | |||||
| }) | |||||
| }, | }, | ||||
| onLoad: function(options) { | |||||
| onLoad: function (options) { | |||||
| console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址") | console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址") | ||||
| var that = this; | var that = this; | ||||
| // options.fromflag == 'coupondetail'; | // options.fromflag == 'coupondetail'; | ||||
| // 游戏页面 | // 游戏页面 | ||||
| if (options && options.url && options.id && options.gameId){ | |||||
| if (options && options.url && options.id && options.gameId) { | |||||
| that.setData({ | that.setData({ | ||||
| url: options.url,//游戏路径 | url: options.url,//游戏路径 | ||||
| id: options.id,//游戏id, | id: options.id,//游戏id, | ||||
| @@ -144,18 +143,18 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.marketicon, | |||||
| data: { | |||||
| appId: config.weapp.AppId | |||||
| } | |||||
| }).then(res => { | |||||
| that.setData({ | |||||
| mallImgUrl: res.data.mallImgUrl | |||||
| }); | |||||
| wx.setNavigationBarTitle({ | |||||
| title: res.data.mallName | |||||
| }) | |||||
| url: config.api.marketicon, | |||||
| data: { | |||||
| appId: config.weapp.AppId | |||||
| } | |||||
| }).then(res => { | |||||
| that.setData({ | |||||
| mallImgUrl: res.data.mallImgUrl | |||||
| }); | |||||
| wx.setNavigationBarTitle({ | |||||
| title: res.data.mallName | |||||
| }) | }) | ||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: err.errMsg, | title: err.errMsg, | ||||
| @@ -165,7 +164,7 @@ Page({ | |||||
| }); | }); | ||||
| }) | }) | ||||
| }, | }, | ||||
| onShow: function() { | |||||
| onShow: function () { | |||||
| wx.checkSession({ | wx.checkSession({ | ||||
| success() { | success() { | ||||
| //session_key 未过期,并且在本生命周期一直有效 | //session_key 未过期,并且在本生命周期一直有效 | ||||
| @@ -193,7 +192,7 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| backHome: function() { | |||||
| backHome: function () { | |||||
| wx.switchTab({ | wx.switchTab({ | ||||
| url: app.globalData.goHomeUrl, | url: app.globalData.goHomeUrl, | ||||
| @@ -210,238 +209,238 @@ Page({ | |||||
| var iv = res.iv; | var iv = res.iv; | ||||
| var encryptedData = res.encryptedData; | var encryptedData = res.encryptedData; | ||||
| wx.getUserInfo({ | wx.getUserInfo({ | ||||
| success: function(res) { | |||||
| success: function (res) { | |||||
| Http.post({ | Http.post({ | ||||
| url: config.api.getUserInfo, | |||||
| data: { | |||||
| encryptedData: encryptedData, | |||||
| iv: iv | |||||
| url: config.api.getUserInfo, | |||||
| data: { | |||||
| encryptedData: encryptedData, | |||||
| iv: iv | |||||
| } | |||||
| }).then( | |||||
| function (res) { | |||||
| // wx.showToast({ | |||||
| // title: "授权个人信息成功11", | |||||
| // icon: "none" | |||||
| // }); | |||||
| if (app.globalData.type == 'gm' && that.data.id && that.data.gameId && that.data.url) {//游戏页面 | |||||
| app.globalData.skipUrl = '/pages/game/index?url=' + that.data.url + "&id=" + that.data.id + "&gameId=" + that.data.gameId, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| if (that.data.wjId) { | |||||
| app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | } | ||||
| }).then( | |||||
| function(res) { | |||||
| // wx.showToast({ | |||||
| // title: "授权个人信息成功11", | |||||
| // icon: "none" | |||||
| // }); | |||||
| if (app.globalData.type == 'gm' && that.data.id && that.data.gameId && that.data.url){//游戏页面 | |||||
| app.globalData.skipUrl = '/pages/game/index?url=' + that.data.url + "&id=" + that.data.id + "&gameId=" + that.data.gameId, | |||||
| if (that.data.fromflag == 'poster') { | |||||
| app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| // | |||||
| if (that.data.optionData != null && that.data.optionData.orderGroupId != null && that.data.optionData.orderGroupId != "") { | |||||
| app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}` | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| if (that.data.path == 'index') { | |||||
| app.globalData.skipUrl = "/pages/game/index" | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| //返回主页 | |||||
| // if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') { | |||||
| if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') { | |||||
| // 跳转普通券/消费卡/限时秒杀/砍价详情 | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'navigateTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.couponChannelId && that.data.cuserId && !that.data.spellGroup && app.globalData.type != 'sd') { | |||||
| // 来自转赠 | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}` | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) { | |||||
| // 拼团详情页 | |||||
| app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
| that.judgePhonelngo() | that.judgePhonelngo() | ||||
| return; | |||||
| } | |||||
| if (that.data.wjId) { | |||||
| app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
| } else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'gm') { | |||||
| // 游戏页面 | |||||
| that.getGameOne(app.globalData.token, that.data.optionData.id) | |||||
| } else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'td') { | |||||
| app.globalData.skipUrl = `/pages/topicDetail/index?id=${that.data.optionData.id}` | |||||
| app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
| that.judgePhonelngo() | that.judgePhonelngo() | ||||
| return; | |||||
| } | } | ||||
| if (that.data.fromflag == 'poster') { | |||||
| app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| // 报名活动 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'ra') { | |||||
| app.globalData.skipUrl = `/pages/radetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | that.judgePhonelngo() | ||||
| return; | |||||
| } | } | ||||
| // | |||||
| if (that.data.optionData != null && that.data.optionData.orderGroupId != null && that.data.optionData.orderGroupId != "") { | |||||
| app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}` | |||||
| app.globalData.skip = 'reLaunch' | |||||
| // 报名签到 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'si') { | |||||
| app.globalData.skipUrl = `/pages/acSignIn/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | that.judgePhonelngo() | ||||
| return; | |||||
| } | } | ||||
| if (that.data.path == 'index') { | |||||
| app.globalData.skipUrl = "/pages/game/index" | |||||
| app.globalData.skip = 'reLaunch' | |||||
| // 门店详情 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'md') { | |||||
| app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | that.judgePhonelngo() | ||||
| } else { | |||||
| //返回主页 | |||||
| // if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') { | |||||
| if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') { | |||||
| // 跳转普通券/消费卡/限时秒杀/砍价详情 | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'navigateTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.couponChannelId && that.data.cuserId && !that.data.spellGroup && app.globalData.type != 'sd') { | |||||
| // 来自转赠 | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}` | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) { | |||||
| // 拼团详情页 | |||||
| app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'gm') { | |||||
| // 游戏页面 | |||||
| that.getGameOne(app.globalData.token, that.data.optionData.id) | |||||
| } else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'td') { | |||||
| app.globalData.skipUrl = `/pages/topicDetail/index?id=${that.data.optionData.id}` | |||||
| } | |||||
| // 通过分享进入的门店详情页面 | |||||
| else if (that.data.id && that.data.frommd == 'md') { | |||||
| app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`, | |||||
| app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 报名活动 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'ra') { | |||||
| app.globalData.skipUrl = `/pages/radetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 报名签到 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'si') { | |||||
| app.globalData.skipUrl = `/pages/acSignIn/index?id=${that.data.optionData.id}`, | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.optionData != null && that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') { | |||||
| // 宣传页详情 | |||||
| if (that.data.optionData != null && that.data.optionData.bt == '2') { | |||||
| // 自由图文 | |||||
| app.globalData.skipUrl = `/pages/freeBannerDetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
| that.judgePhonelngo() | that.judgePhonelngo() | ||||
| } | |||||
| // 门店详情 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'md') { | |||||
| app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.optionData.id}`, | |||||
| } else { | |||||
| // 标准格式 | |||||
| app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
| that.judgePhonelngo() | that.judgePhonelngo() | ||||
| } | } | ||||
| // 通过分享进入的门店详情页面 | |||||
| else if (that.data.id && that.data.frommd == 'md') { | |||||
| app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.optionData != null && that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') { | |||||
| // 宣传页详情 | |||||
| if (that.data.optionData != null && that.data.optionData.bt == '2') { | |||||
| // 自由图文 | |||||
| app.globalData.skipUrl = `/pages/freeBannerDetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| // 标准格式 | |||||
| app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| } else if (that.data.orderId || that.data.orderId && app.globalData.type == 'bg') { | |||||
| // 参与砍价 | |||||
| app.globalData.skipUrl = `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&composeOrderType=${that.composeOrderType}`, | |||||
| app.globalData.skip = 'navigateTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'uc') { | |||||
| // 我的 | |||||
| app.globalData.skipUrl = '/index/user', | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'in') { | |||||
| // 首页 | |||||
| app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == "qd") { | |||||
| //每日签到 | |||||
| app.globalData.skipUrl = "/pages/activityCalendar/activityCalendar" | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == "hdrl") { | |||||
| //活动日历 | |||||
| app.globalData.skipUrl = `/pages/radetail/index?id=${app.globalData.activityId}` | |||||
| } else if (that.data.orderId || that.data.orderId && app.globalData.type == 'bg') { | |||||
| // 参与砍价 | |||||
| app.globalData.skipUrl = `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&composeOrderType=${that.composeOrderType}`, | |||||
| app.globalData.skip = 'navigateTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'uc') { | |||||
| // 我的 | |||||
| app.globalData.skipUrl = '/index/user', | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'in') { | |||||
| // 首页 | |||||
| app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == "qd") { | |||||
| //每日签到 | |||||
| app.globalData.skipUrl = "/pages/activityCalendar/activityCalendar" | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == "hdrl") { | |||||
| //活动日历 | |||||
| app.globalData.skipUrl = `/pages/radetail/index?id=${app.globalData.activityId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 积分 | |||||
| else if (app.globalData.type == 'jf') { | |||||
| app.globalData.skipUrl = '/pages/integralmall/index', | |||||
| app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 积分 | |||||
| else if (app.globalData.type == 'jf') { | |||||
| app.globalData.skipUrl = '/pages/integralmall/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'pc') { | |||||
| // 停车 | |||||
| app.globalData.skipUrl = '/index/passCar', | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mc') { | |||||
| // 我的券包 | |||||
| app.globalData.skipUrl = '/pages/couponorder/index/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mo') { | |||||
| // 我的订单 | |||||
| app.globalData.skipUrl = '/pages/order/index/index?id=all', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ca') { | |||||
| // 我的卡包 | |||||
| app.globalData.skipUrl = '/pages/cardorder/index/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'sc') { | |||||
| // 特享礼遇 | |||||
| app.globalData.skipUrl = '/pages/specialcourtesy/specialcourtesy', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'rb') { | |||||
| // 限时秒杀 | |||||
| app.globalData.skipUrl = '/pages/rushToBuy/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'bl') { | |||||
| // 砍价专场 | |||||
| app.globalData.skipUrl = '/pages/bargain/bargain', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mb') { | |||||
| // 我的砍价 | |||||
| app.globalData.skipUrl = '/pages/bargain/bargain?from=myhtml', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'sl') { | |||||
| // 拼团专场 | |||||
| app.globalData.skipUrl = '/pages/spellGroup/spellGroup', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ms') { | |||||
| // 我的拼团 | |||||
| app.globalData.skipUrl = '/pages/spellGroup/spellGroup?from=myhtml', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'dc') { | |||||
| // 消费卡 | |||||
| app.globalData.skipUrl = '/pages/discountCardList/discountCardList', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'td') { | |||||
| // 专题活动页 | |||||
| app.globalData.skipUrl = '/pages/topicDetail/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ml') { | |||||
| // 门店 | |||||
| app.globalData.skipUrl = '/index/searchbar', | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'coupondetail' && that.data.couponChannelIdflag) { | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'spellcoupondetail' && that.data.couponChannelIdflag) { | |||||
| app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId) { | |||||
| //线上配送 填写订单 | |||||
| app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'pc') { | |||||
| // 停车 | |||||
| app.globalData.skipUrl = '/index/passCar', | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mc') { | |||||
| // 我的券包 | |||||
| app.globalData.skipUrl = '/pages/couponorder/index/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mo') { | |||||
| // 我的订单 | |||||
| app.globalData.skipUrl = '/pages/order/index/index?id=all', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ca') { | |||||
| // 我的卡包 | |||||
| app.globalData.skipUrl = '/pages/cardorder/index/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'sc') { | |||||
| // 特享礼遇 | |||||
| app.globalData.skipUrl = '/pages/specialcourtesy/specialcourtesy', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'rb') { | |||||
| // 限时秒杀 | |||||
| app.globalData.skipUrl = '/pages/rushToBuy/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'bl') { | |||||
| // 砍价专场 | |||||
| app.globalData.skipUrl = '/pages/bargain/bargain', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mb') { | |||||
| // 我的砍价 | |||||
| app.globalData.skipUrl = '/pages/bargain/bargain?from=myhtml', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'sl') { | |||||
| // 拼团专场 | |||||
| app.globalData.skipUrl = '/pages/spellGroup/spellGroup', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ms') { | |||||
| // 我的拼团 | |||||
| app.globalData.skipUrl = '/pages/spellGroup/spellGroup?from=myhtml', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'dc') { | |||||
| // 消费卡 | |||||
| app.globalData.skipUrl = '/pages/discountCardList/discountCardList', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'td') { | |||||
| // 专题活动页 | |||||
| app.globalData.skipUrl = '/pages/topicDetail/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ml') { | |||||
| // 门店 | |||||
| app.globalData.skipUrl = '/index/searchbar', | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'coupondetail' && that.data.couponChannelIdflag) { | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'spellcoupondetail' && that.data.couponChannelIdflag) { | |||||
| app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId) { | |||||
| //线上配送 填写订单 | |||||
| app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
| app.globalData.skip = 'switchTab' | |||||
| that.judgePhonelngo() | |||||
| } | } | ||||
| }, | |||||
| function(error) { | |||||
| console.log(error) | |||||
| wx.showToast({ | |||||
| title: "请授权个人信息", | |||||
| icon: "none" | |||||
| }); | |||||
| } | } | ||||
| ) | |||||
| }, | |||||
| function (error) { | |||||
| console.log(error) | |||||
| wx.showToast({ | |||||
| title: "请授权个人信息", | |||||
| icon: "none" | |||||
| }); | |||||
| } | |||||
| ) | |||||
| .catch(err => { | .catch(err => { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: err.code, | title: err.code, | ||||
| @@ -458,25 +457,25 @@ Page({ | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| getGameOne: function(token, id) { | |||||
| getGameOne: function (token, id) { | |||||
| let _this = this; | let _this = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getOneGame, | |||||
| data: { | |||||
| token: token, | |||||
| id: id | |||||
| } | |||||
| }).then(res => { | |||||
| wx.redirectTo({ | |||||
| url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId, | |||||
| }) | |||||
| url: config.api.getOneGame, | |||||
| data: { | |||||
| token: token, | |||||
| id: id | |||||
| } | |||||
| }).then(res => { | |||||
| wx.redirectTo({ | |||||
| url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId, | |||||
| }) | }) | ||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| wx.showModal({ | wx.showModal({ | ||||
| title: '提示', | title: '提示', | ||||
| content: err.message, | content: err.message, | ||||
| showCancel: false, | showCancel: false, | ||||
| success: function(res) { | |||||
| success: function (res) { | |||||
| // 如果游戏下架或者找不到,重启首页 | // 如果游戏下架或者找不到,重启首页 | ||||
| if (res.confirm) { | if (res.confirm) { | ||||
| wx.reLaunch({ | wx.reLaunch({ | ||||
| @@ -7,7 +7,7 @@ Page({ | |||||
| */ | */ | ||||
| data: { | data: { | ||||
| navigationBarHeight, | navigationBarHeight, | ||||
| data:null, | |||||
| data: null, | |||||
| pay_success: imgurl.pay_success.url | pay_success: imgurl.pay_success.url | ||||
| }, | }, | ||||
| @@ -18,12 +18,15 @@ Page({ | |||||
| let pamars = JSON.parse(options.data); | let pamars = JSON.parse(options.data); | ||||
| pamars.updateDate = Util.formatTime(pamars.updateDate, "yyyy-MM-dd hh:mm:ss"); | pamars.updateDate = Util.formatTime(pamars.updateDate, "yyyy-MM-dd hh:mm:ss"); | ||||
| this.setData({ | this.setData({ | ||||
| data:pamars | |||||
| data: pamars | |||||
| }) | }) | ||||
| }, | }, | ||||
| goIndex:function(){ | |||||
| wx.navigateBack({ | |||||
| delta: 2 | |||||
| goIndex: function () { | |||||
| // wx.navigateBack({ | |||||
| // delta: 2 | |||||
| // }) | |||||
| wx.navigateTo({ | |||||
| url: '/pages/cardorder/index/index', | |||||
| }) | }) | ||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -20,7 +20,11 @@ Page({ | |||||
| showInput: false, | showInput: false, | ||||
| ids: "", | ids: "", | ||||
| wmyes: imgurl.wmyes.url, | wmyes: imgurl.wmyes.url, | ||||
| wmclose: imgurl.wmclose.url | |||||
| wmclose: imgurl.wmclose.url, | |||||
| isPwd: false, | |||||
| payCheck: 0, | |||||
| pwdSw: false, | |||||
| password: '' | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -36,6 +40,7 @@ Page({ | |||||
| cardids: options.cardid, | cardids: options.cardid, | ||||
| remainingAmount: options.remainingAmount, | remainingAmount: options.remainingAmount, | ||||
| remainingAmounts: options.remainingAmount, | remainingAmounts: options.remainingAmount, | ||||
| payCheck: options.payCheck * 1 | |||||
| }) | }) | ||||
| }, | }, | ||||
| bindKeyInput(e) { | bindKeyInput(e) { | ||||
| @@ -44,6 +49,28 @@ Page({ | |||||
| inputValue: e.detail.value | inputValue: e.detail.value | ||||
| }) | }) | ||||
| }, | }, | ||||
| // 关闭密码框 | |||||
| contentClick(e) { | |||||
| if (this.data.pwdSw && e.target.id != 'checkPwd') { | |||||
| this.setData({ | |||||
| isPwd: false, | |||||
| pwdSw: false, | |||||
| password: '' | |||||
| }) | |||||
| } | |||||
| }, | |||||
| inputPwd(e) { | |||||
| this.setData({ | |||||
| password: e.detail.value | |||||
| }) | |||||
| }, | |||||
| goGetPay() { | |||||
| this.startAuth() | |||||
| }, | |||||
| suretoPay: function (e) { | suretoPay: function (e) { | ||||
| let that = this; | let that = this; | ||||
| if (e.currentTarget.dataset.sure == 'sure' && that.data.checked) { | if (e.currentTarget.dataset.sure == 'sure' && that.data.checked) { | ||||
| @@ -59,6 +86,25 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| checkPwd() { | |||||
| if (!this.data.inputValue) { | |||||
| wx.showToast({ | |||||
| title: '金额不能为空!', | |||||
| icon: 'error' | |||||
| }) | |||||
| return | |||||
| } | |||||
| if (this.data.payCheck && !this.data.pwdSw) { | |||||
| this.setData({ | |||||
| isPwd: true, // 打开密码框 | |||||
| pwdSw: true // 允许点击其他区域时关闭密码框 | |||||
| }) | |||||
| } else { | |||||
| this.startAuth() | |||||
| } | |||||
| }, | |||||
| gotoPayMoney: function () { | gotoPayMoney: function () { | ||||
| let that = this; | let that = this; | ||||
| const startSoterAuthentication = () => { | const startSoterAuthentication = () => { | ||||
| @@ -140,7 +186,9 @@ Page({ | |||||
| data: { | data: { | ||||
| cardId: that.data.cardid, | cardId: that.data.cardid, | ||||
| merchantId: that.data.merChant.id, | merchantId: that.data.merChant.id, | ||||
| totalFee: that.data.inputValue | |||||
| totalFee: that.data.inputValue, | |||||
| payCheck: that.data.payCheck, | |||||
| password: that.data.password | |||||
| } | } | ||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| @@ -148,9 +196,13 @@ Page({ | |||||
| wx.hideLoading(); | wx.hideLoading(); | ||||
| that.setData({ | that.setData({ | ||||
| showModel: false, | showModel: false, | ||||
| showInput: false | |||||
| showInput: false, | |||||
| isPwd: false, | |||||
| pwdSw: false, | |||||
| password: '' | |||||
| }) | }) | ||||
| wx.navigateTo({ | |||||
| wx.reLaunch({ | |||||
| url: `/pages/paySuccess/paySuccess?data=${JSON.stringify(res.data)}`, | url: `/pages/paySuccess/paySuccess?data=${JSON.stringify(res.data)}`, | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -248,7 +300,7 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| showPage: true, | showPage: true, | ||||
| cardList: res.data.list, | cardList: res.data.list, | ||||
| arrays: arrays | |||||
| arrays: arrays, | |||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1,6 +1,7 @@ | |||||
| <navbar home back text="付款"></navbar> | <navbar home back text="付款"></navbar> | ||||
| <view style="height:{{navigationBarHeight}} "></view> | <view style="height:{{navigationBarHeight}} "></view> | ||||
| <view class='content' > | |||||
| <view class='{{isPwd?"content active":"content"}}' bindtap="contentClick"> | |||||
| <view class='head clearfix'> | <view class='head clearfix'> | ||||
| <text class='fl'>付款给{{merChant.merchantName}}</text> | <text class='fl'>付款给{{merChant.merchantName}}</text> | ||||
| <image class='fr' src='{{merChant.merchantImgUrl}}' mode='widthFix'></image> | <image class='fr' src='{{merChant.merchantImgUrl}}' mode='widthFix'></image> | ||||
| @@ -9,7 +10,7 @@ | |||||
| <view class='money'> | <view class='money'> | ||||
| <text class='icon'>¥</text> | <text class='icon'>¥</text> | ||||
| <input bindinput="bindKeyInput" disabled='{{showInput}}' class='num' type="digit" focus placeholder="" /> | <input bindinput="bindKeyInput" disabled='{{showInput}}' class='num' type="digit" focus placeholder="" /> | ||||
| <button bindtap='startAuth' hover-class='active'>确认付款</button> | |||||
| <button id="checkPwd" bindtap='checkPwd' hover-class='active'>确认付款</button> | |||||
| </view> | </view> | ||||
| <view class='model' wx:if="{{showModel}}"> | <view class='model' wx:if="{{showModel}}"> | ||||
| <view class='zhezhao'></view> | <view class='zhezhao'></view> | ||||
| @@ -29,11 +30,11 @@ | |||||
| <view class='card-items-right'> | <view class='card-items-right'> | ||||
| <view class='card-items-right-text'>余额:{{item.remainingAmount/100}}元</view> | <view class='card-items-right-text'>余额:{{item.remainingAmount/100}}元</view> | ||||
| <view class='card-items-right-radio' class='icons'> | <view class='card-items-right-radio' class='icons'> | ||||
| <image wx:if="{{item.id == ids&&item.flag}}" src='{{wmyes}}' mode='widthFix'></image> | |||||
| <image wx:if="{{item.id == ids&&item.flag}}" src='{{wmyes}}' mode='widthFix'></image> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view wx:if='{{item.remainingAmount/100<inputValue||!item.flag}}' class='card-items {{item.flag?"":"opcacity"}}' wx:for="{{cardList}}" wx:key="index"> | |||||
| <view wx:if='{{item.remainingAmount/100<inputValue||!item.flag}}' class='card-items {{item.flag?"":"opcacity"}}' wx:for="{{cardList}}" wx:key="index"> | |||||
| <view class='card-items-left'> | <view class='card-items-left'> | ||||
| <view class='card-items-left-img'> | <view class='card-items-left-img'> | ||||
| <image src='{{item.coverImg}}'></image> | <image src='{{item.coverImg}}'></image> | ||||
| @@ -52,4 +53,12 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | |||||
| <view class='{{isPwd?"pwdDialog active":"pwdDialog"}}'> | |||||
| <view class="title"> | |||||
| 输入密码 | |||||
| </view> | |||||
| <input class="pwdForm" type="password" placeholder="请输入密码" bindinput="inputPwd" value="{{password}}" /> | |||||
| <button type="primary" bindtap="goGetPay" data-type='pwdTrue'>确定</button> | |||||
| </view> | </view> | ||||
| @@ -1,67 +1,83 @@ | |||||
| .content{ | |||||
| padding:0 57rpx; | |||||
| .content { | |||||
| height: 1300rpx; | |||||
| padding: 0 57rpx; | |||||
| } | } | ||||
| .title{ | |||||
| .content.active { | |||||
| opacity: 0.5; | |||||
| } | |||||
| .title { | |||||
| margin-top: 60rpx; | margin-top: 60rpx; | ||||
| } | } | ||||
| .head{ | |||||
| .head { | |||||
| margin-top: 40rpx; | margin-top: 40rpx; | ||||
| } | } | ||||
| .head image{ | |||||
| .head image { | |||||
| width: 100rpx; | width: 100rpx; | ||||
| height: 100rpx; | height: 100rpx; | ||||
| border-radius:50%; | |||||
| } | |||||
| .head .fl{ | |||||
| font-size:32rpx; | |||||
| font-family:PingFang-SC-Bold; | |||||
| font-weight:bold; | |||||
| color:rgba(51,51,51,1); | |||||
| } | |||||
| .txt1{ | |||||
| font-size:32rpx; | |||||
| font-family:PingFang-SC-Regular; | |||||
| font-weight:400; | |||||
| color:rgba(134,134,134,1); | |||||
| } | |||||
| .money button{ | |||||
| width:636rpx; | |||||
| height:95rpx; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .head .fl { | |||||
| font-size: 32rpx; | |||||
| font-family: PingFang-SC-Bold; | |||||
| font-weight: bold; | |||||
| color: rgba(51, 51, 51, 1); | |||||
| } | |||||
| .txt1 { | |||||
| font-size: 32rpx; | |||||
| font-family: PingFang-SC-Regular; | |||||
| font-weight: 400; | |||||
| color: rgba(134, 134, 134, 1); | |||||
| } | |||||
| .money button { | |||||
| width: 636rpx; | |||||
| height: 95rpx; | |||||
| line-height: 95rpx; | line-height: 95rpx; | ||||
| margin:80rpx auto 0; | |||||
| margin: 80rpx auto 0; | |||||
| /* background:rgba(2,192,255,1); */ | /* background:rgba(2,192,255,1); */ | ||||
| background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); | |||||
| border-radius:48rpx; | |||||
| background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); | |||||
| border-radius: 48rpx; | |||||
| color: #fff; | color: #fff; | ||||
| } | } | ||||
| .money .icon{ | |||||
| font-size:38rpx; | |||||
| font-weight:500; | |||||
| color:rgba(51,51,51,1); | |||||
| } | |||||
| .money .num{ | |||||
| font-size:58rpx!important; | |||||
| font-family:PingFang-SC-Bold; | |||||
| font-weight:bold; | |||||
| color:rgba(51,51,51,1); | |||||
| display: inline-block!important; | |||||
| .money .icon { | |||||
| font-size: 38rpx; | |||||
| font-weight: 500; | |||||
| color: rgba(51, 51, 51, 1); | |||||
| } | |||||
| .money .num { | |||||
| font-size: 58rpx !important; | |||||
| font-family: PingFang-SC-Bold; | |||||
| font-weight: bold; | |||||
| color: rgba(51, 51, 51, 1); | |||||
| display: inline-block !important; | |||||
| width: 580rpx; | width: 580rpx; | ||||
| height: 60rpx; | height: 60rpx; | ||||
| margin-top: 16rpx; | margin-top: 16rpx; | ||||
| padding-top: 4rpx; | padding-top: 4rpx; | ||||
| line-height: 60rpx; | line-height: 60rpx; | ||||
| } | } | ||||
| .active{ | |||||
| .active { | |||||
| opacity: .6; | opacity: .6; | ||||
| } | } | ||||
| .model{ | |||||
| .model { | |||||
| height: 100vh; | height: 100vh; | ||||
| width: 100%; | width: 100%; | ||||
| position: fixed; | position: fixed; | ||||
| top: 0; | top: 0; | ||||
| left: 0; | left: 0; | ||||
| } | } | ||||
| .zhezhao{ | |||||
| .zhezhao { | |||||
| position: fixed; | position: fixed; | ||||
| top: 0; | top: 0; | ||||
| left: 0; | left: 0; | ||||
| @@ -71,7 +87,8 @@ | |||||
| background: #000; | background: #000; | ||||
| opacity: 0.5; | opacity: 0.5; | ||||
| } | } | ||||
| .card-model{ | |||||
| .card-model { | |||||
| position: fixed; | position: fixed; | ||||
| height: 750rpx; | height: 750rpx; | ||||
| width: 100%; | width: 100%; | ||||
| @@ -80,33 +97,37 @@ | |||||
| z-index: 20; | z-index: 20; | ||||
| background: #fff; | background: #fff; | ||||
| } | } | ||||
| .card-top{ | |||||
| .card-top { | |||||
| position: relative; | position: relative; | ||||
| height: 85rpx; | height: 85rpx; | ||||
| width: 100%; | width: 100%; | ||||
| background: #E67663; | background: #E67663; | ||||
| line-height: 85rpx; | line-height: 85rpx; | ||||
| text-align: center; | text-align: center; | ||||
| font-size:30rpx; | |||||
| font-weight:500; | |||||
| color:rgba(255,255,255,1); | |||||
| font-size: 30rpx; | |||||
| font-weight: 500; | |||||
| color: rgba(255, 255, 255, 1); | |||||
| } | } | ||||
| .card-content{ | |||||
| .card-content { | |||||
| height: 550rpx; | height: 550rpx; | ||||
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| .card-content image{ | |||||
| .card-content image { | |||||
| width: 64rpx; | width: 64rpx; | ||||
| height: 64rpx; | height: 64rpx; | ||||
| border-radius:10rpx; | |||||
| border-radius: 10rpx; | |||||
| position: absolute; | position: absolute; | ||||
| left: 20rpx; | left: 20rpx; | ||||
| top: 0; | top: 0; | ||||
| bottom: 0; | bottom: 0; | ||||
| margin: auto; | |||||
| margin: auto; | |||||
| z-index: 100; | z-index: 100; | ||||
| } | } | ||||
| .card-items{ | |||||
| .card-items { | |||||
| position: relative; | position: relative; | ||||
| height: 130rpx; | height: 130rpx; | ||||
| line-height: 130rpx; | line-height: 130rpx; | ||||
| @@ -115,43 +136,52 @@ | |||||
| margin: 0 auto; | margin: 0 auto; | ||||
| border-bottom: 1rpx solid #eee; | border-bottom: 1rpx solid #eee; | ||||
| } | } | ||||
| .card-items-left{ | |||||
| .card-items-left { | |||||
| width: 50%; | width: 50%; | ||||
| float: left; | float: left; | ||||
| font-size: 30rpx; | font-size: 30rpx; | ||||
| } | } | ||||
| .card-items-right{ | |||||
| .card-items-right { | |||||
| width: 50%; | width: 50%; | ||||
| float: right; | float: right; | ||||
| font-size: 30rpx; | font-size: 30rpx; | ||||
| } | } | ||||
| .card-items-left-img{ | |||||
| .card-items-left-img { | |||||
| width: 30%; | width: 30%; | ||||
| height: 130rpx; | height: 130rpx; | ||||
| float: left; | float: left; | ||||
| } | } | ||||
| .card-items-left-text{ | |||||
| .card-items-left-text { | |||||
| width: 70%; | width: 70%; | ||||
| height: 130rpx; | height: 130rpx; | ||||
| float: left; | float: left; | ||||
| } | } | ||||
| .card-items-right-text{ | |||||
| .card-items-right-text { | |||||
| text-align: right; | text-align: right; | ||||
| float: left; | float: left; | ||||
| width: 80%; | width: 80%; | ||||
| } | } | ||||
| .card-items-right-radio{ | |||||
| .card-items-right-radio { | |||||
| float: left; | float: left; | ||||
| width: 20%; | width: 20%; | ||||
| } | } | ||||
| .checkcard-box{ | |||||
| .checkcard-box { | |||||
| width: 84%; | width: 84%; | ||||
| background: #02C0FF!important; | |||||
| background: #02C0FF !important; | |||||
| } | } | ||||
| .opcacity{ | |||||
| opacity: .2!important; | |||||
| .opcacity { | |||||
| opacity: .2 !important; | |||||
| } | } | ||||
| .icons{ | |||||
| .icons { | |||||
| width: 40rpx; | width: 40rpx; | ||||
| height: 40rpx; | height: 40rpx; | ||||
| position: absolute; | position: absolute; | ||||
| @@ -160,10 +190,12 @@ | |||||
| right: 20rpx; | right: 20rpx; | ||||
| margin: auto; | margin: auto; | ||||
| } | } | ||||
| .icons image{ | |||||
| width:100%; | |||||
| .icons image { | |||||
| width: 100%; | |||||
| } | } | ||||
| .close{ | |||||
| .close { | |||||
| position: absolute; | position: absolute; | ||||
| width: 40rpx; | width: 40rpx; | ||||
| height: 40rpx; | height: 40rpx; | ||||
| @@ -171,4 +203,41 @@ | |||||
| bottom: 0; | bottom: 0; | ||||
| right: 40rpx; | right: 40rpx; | ||||
| margin: auto; | margin: auto; | ||||
| } | |||||
| .pwdDialog { | |||||
| position: absolute; | |||||
| top: 40%; | |||||
| left: 50%; | |||||
| transform: translate(-50%, -50%); | |||||
| width: 500rpx; | |||||
| height: 300rpx; | |||||
| background-color: #fff; | |||||
| box-shadow: 0 6px 20px 0 #00000026; | |||||
| transition: all .3s; | |||||
| opacity: 0; | |||||
| z-index: -1; | |||||
| border-radius: 20rpx; | |||||
| padding: 0 60rpx 80rpx 60rpx; | |||||
| } | |||||
| .pwdDialog.active { | |||||
| opacity: 1; | |||||
| z-index: 999; | |||||
| } | |||||
| .pwdDialog .title { | |||||
| text-align: center; | |||||
| font-weight: 600; | |||||
| font-size: 36rpx; | |||||
| margin-bottom: 20rpx; | |||||
| } | |||||
| .pwdForm { | |||||
| height: 80rpx; | |||||
| border: 1px solid #f99c32; | |||||
| background-color: #fefcf3; | |||||
| border-radius: 10rpx; | |||||
| padding-left: 20rpx; | |||||
| margin-bottom: 40rpx; | |||||
| } | } | ||||
| @@ -13,8 +13,11 @@ Page({ | |||||
| myspeacialUrl: imgurl.myspeacial.url, | myspeacialUrl: imgurl.myspeacial.url, | ||||
| teliconUrl: imgurl.telicon.url, | teliconUrl: imgurl.telicon.url, | ||||
| wmhome: imgurl.wmhome.url, | wmhome: imgurl.wmhome.url, | ||||
| memberId:"000000", | |||||
| memberId: "000000", | |||||
| goHomeUrl: "", | goHomeUrl: "", | ||||
| showCode: true, | |||||
| showTimeLine: true, | |||||
| expiredSeconds: 0 | |||||
| }, | }, | ||||
| phone: function (e) { | phone: function (e) { | ||||
| console.log(e) | console.log(e) | ||||
| @@ -41,36 +44,67 @@ Page({ | |||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| onShow: function () { | onShow: function () { | ||||
| this.ifPhoneInfo() | |||||
| let that = this; | let that = this; | ||||
| that.ifPhoneInfo() | |||||
| that.setData({ | that.setData({ | ||||
| goHomeUrl: app.globalData.goHomeUrl, | goHomeUrl: app.globalData.goHomeUrl, | ||||
| }) | }) | ||||
| console.log("渲染开始") | console.log("渲染开始") | ||||
| that.getDiscountInfo() | |||||
| }, | |||||
| refreshCode() { | |||||
| this.setData({ | |||||
| showCode: true | |||||
| }) | |||||
| this.getDiscountInfo() | |||||
| }, | |||||
| getDiscountInfo() { | |||||
| let that = this; | |||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getDiscountInfo, | url: config.api.getDiscountInfo, | ||||
| data: {} | |||||
| }) | }) | ||||
| .then(res=>{ | |||||
| that.setData({ | |||||
| level: res.data.level ? res.data.level : '' | |||||
| }) | |||||
| that.qrcode(res.data.id); | |||||
| that.setData({ | |||||
| memberId: res.data.id | |||||
| }) | |||||
| console.log(res.data.levelMerchantList) | |||||
| let discountMerchantList = []; | |||||
| res.data.levelMerchantList.map(file=>{ | |||||
| if (file.discount != 100){ | |||||
| discountMerchantList.push(file); | |||||
| .then(res => { | |||||
| that.setData({ | |||||
| level: res.data.level ? res.data.level : '' | |||||
| }) | |||||
| that.qrcode(res.data.dynamicId); | |||||
| that.setData({ | |||||
| memberId: res.data.id, | |||||
| expiredSeconds: res.data.expiredSeconds, | |||||
| }) | |||||
| let discountMerchantList = []; | |||||
| res.data.levelMerchantList.map(file => { | |||||
| if (file.discount != 100) { | |||||
| discountMerchantList.push(file); | |||||
| } | |||||
| }) | |||||
| that.setData({ | |||||
| discountMerchantList: discountMerchantList, | |||||
| }) | |||||
| if (that.data.expiredSeconds * 1) { | |||||
| const timer = setInterval(() => { | |||||
| const expiredSeconds = that.data.expiredSeconds | |||||
| if (expiredSeconds) { | |||||
| that.setData({ | |||||
| expiredSeconds: expiredSeconds - 1, | |||||
| }) | |||||
| } else { | |||||
| clearInterval(timer) | |||||
| that.setData({ | |||||
| showCode: false, | |||||
| }) | |||||
| } | |||||
| }, 1000); | |||||
| } | } | ||||
| }).catch(err => { | |||||
| console.log(err, 'err'); | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| }) | |||||
| }) | }) | ||||
| that.setData({ | |||||
| discountMerchantList: discountMerchantList, | |||||
| }) | |||||
| }) | |||||
| }, | }, | ||||
| goback: function () { | goback: function () { | ||||
| @@ -82,7 +116,7 @@ Page({ | |||||
| /** | /** | ||||
| * 二维码 | * 二维码 | ||||
| */ | */ | ||||
| qrcode: function (memberId){ | |||||
| qrcode(memberId) { | |||||
| let that = this; | let that = this; | ||||
| var size = that.setCanvasSize(); | var size = that.setCanvasSize(); | ||||
| let url = JSON.stringify({ | let url = JSON.stringify({ | ||||
| @@ -95,7 +129,7 @@ Page({ | |||||
| createQrCode: function (url, canvasId, cavW, cavH) { | createQrCode: function (url, canvasId, cavW, cavH) { | ||||
| //调用插件中的draw方法,绘制二维码图片 | //调用插件中的draw方法,绘制二维码图片 | ||||
| let that = this; | let that = this; | ||||
| QR.api.draw(url, canvasId, cavW, cavH,function(res){ | |||||
| QR.api.draw(url, canvasId, cavW, cavH, function (res) { | |||||
| that.setData({ | that.setData({ | ||||
| tempFilePath: res | tempFilePath: res | ||||
| }) | }) | ||||
| @@ -119,5 +153,5 @@ Page({ | |||||
| } | } | ||||
| return size; | return size; | ||||
| }, | }, | ||||
| }) | }) | ||||
| @@ -1,14 +1,29 @@ | |||||
| <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | ||||
| <navbar back home text="我的特权" background='#FD832D' color="#fff"></navbar> | <navbar back home text="我的特权" background='#FD832D' color="#fff"></navbar> | ||||
| <view style="height:{{navigationBarHeight}} "></view> | <view style="height:{{navigationBarHeight}} "></view> | ||||
| <view class='codeBox'> | |||||
| <view class='codeBox'> | |||||
| <view class='code' > | |||||
| <view class="canWrap"> | |||||
| <canvas canvas-id="mycanvas2" style="width: 1200rpx; height: 800rpx;" /> | |||||
| <view class='code'> | |||||
| <view wx:if="{{showCode}}"> | |||||
| <view class="canWrap"> | |||||
| <canvas canvas-id="mycanvas2" style="width: 1200rpx; height: 800rpx;" /> | |||||
| </view> | |||||
| <image src="{{tempFilePath}}" mode="aspectFit" /> | |||||
| </view> | |||||
| <view wx:else class="negatived" bindtap="refreshCode"> | |||||
| <view class="canWrap"> | |||||
| <canvas canvas-id="mycanvas2" style="width: 1200rpx; height: 800rpx;" /> | |||||
| </view> | |||||
| <view class="refreshCode">点击刷新</view> | |||||
| <image src="../../assets/images/negatived.png" mode="aspectFit" /> | |||||
| </view> | </view> | ||||
| <image src="{{tempFilePath}}" mode="aspectFit" /> | |||||
| <view class='memCode'><text>会员码:</text><text class="memNum">{{memberId}}</text></view> | |||||
| <view class="coedTiem" wx:if="{{expiredSeconds}}">二维码将在 | |||||
| <text style="color:red">{{expiredSeconds}}s</text> | |||||
| 后失效 | |||||
| </view> | |||||
| <view class='memCode'><text>会员码:</text><text class="memNum">{{memberId}}</text></view> | |||||
| <view class='con'> | <view class='con'> | ||||
| <view class="title">会员等级为<text class='level'>[{{level}}]</text>对应门店的优惠折扣</view> | <view class="title">会员等级为<text class='level'>[{{level}}]</text>对应门店的优惠折扣</view> | ||||
| </view> | </view> | ||||
| @@ -20,7 +35,8 @@ | |||||
| <text><i>></i></text> | <text><i>></i></text> | ||||
| </view> | </view> | ||||
| <view class='discount'> | <view class='discount'> | ||||
| <text style='display:inline-block;'>{{item.discount/10}}</text>折</view> | |||||
| <text style='display:inline-block;'>{{item.discount/10}}</text>折 | |||||
| </view> | |||||
| <text class='tit'>{{item.merchantName}}</text> | <text class='tit'>{{item.merchantName}}</text> | ||||
| <view class='clearfix footer'> | <view class='clearfix footer'> | ||||
| <view class='fl' style='margin-top:-30rpx;margin-left:10rpx;'> | <view class='fl' style='margin-top:-30rpx;margin-left:10rpx;'> | ||||
| @@ -38,4 +54,4 @@ | |||||
| 此等级暂未开放折扣,敬请期待! | 此等级暂未开放折扣,敬请期待! | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | |||||
| </view> | |||||
| @@ -1,12 +1,15 @@ | |||||
| @import "../../app.wxss"; | @import "../../app.wxss"; | ||||
| page{ | |||||
| background:linear-gradient(180deg,#FD832D 0%,#FE4A16 100%); | |||||
| page { | |||||
| background: linear-gradient(180deg, #FD832D 0%, #FE4A16 100%); | |||||
| } | } | ||||
| .codeBox{ | |||||
| background:linear-gradient(180deg,#FD832D 0%,#FE4A16 100%); | |||||
| .codeBox { | |||||
| background: linear-gradient(180deg, #FD832D 0%, #FE4A16 100%); | |||||
| height: 100%; | height: 100%; | ||||
| overflow: auto; | overflow: auto; | ||||
| } | } | ||||
| .none { | .none { | ||||
| font-size: 24rpx; | font-size: 24rpx; | ||||
| text-align: center; | text-align: center; | ||||
| @@ -15,6 +18,12 @@ page{ | |||||
| float: none !important; | float: none !important; | ||||
| } | } | ||||
| .coedTiem { | |||||
| text-align: center; | |||||
| color: rgba(253, 131, 45, 1); | |||||
| margin-bottom: 10rpx; | |||||
| } | |||||
| .headerbg image { | .headerbg image { | ||||
| display: block; | display: block; | ||||
| width: 100%; | width: 100%; | ||||
| @@ -160,7 +169,7 @@ page{ | |||||
| .code { | .code { | ||||
| width: 690rpx; | width: 690rpx; | ||||
| height: 800rpx; | |||||
| height: 900rpx; | |||||
| background: #fff; | background: #fff; | ||||
| margin: 20rpx auto; | margin: 20rpx auto; | ||||
| border-radius: 10rpx; | border-radius: 10rpx; | ||||
| @@ -172,35 +181,53 @@ page{ | |||||
| height: 150rpx; | height: 150rpx; | ||||
| margin: 0 auto 10rpx; | margin: 0 auto 10rpx; | ||||
| } | } | ||||
| .canWrap{ | |||||
| .canWrap { | |||||
| width: 358rpx; | width: 358rpx; | ||||
| height: 358rpx; | height: 358rpx; | ||||
| } | } | ||||
| .negatived { | |||||
| position: relative; | |||||
| } | |||||
| .negatived .refreshCode { | |||||
| position: absolute; | |||||
| top: 350rpx; | |||||
| left: 50%; | |||||
| transform: translateX(-50%); | |||||
| color: #7a7a7a; | |||||
| font-weight: 600; | |||||
| } | |||||
| .code image { | .code image { | ||||
| width: 500rpx; | width: 500rpx; | ||||
| height: 500rpx; | height: 500rpx; | ||||
| display: block; | display: block; | ||||
| margin:70rpx auto 60rpx; | |||||
| margin: 70rpx auto 60rpx; | |||||
| } | } | ||||
| .memCode{ | |||||
| .memCode { | |||||
| width: 562rpx; | width: 562rpx; | ||||
| height: 88rpx; | height: 88rpx; | ||||
| line-height: 88rpx; | line-height: 88rpx; | ||||
| border-radius:16rpx; | |||||
| border:1px solid rgba(225,225,225,1); | |||||
| border-radius: 16rpx; | |||||
| border: 1px solid rgba(225, 225, 225, 1); | |||||
| margin: 36rpx auto 0; | margin: 36rpx auto 0; | ||||
| color: #666; | color: #666; | ||||
| display: block; | display: block; | ||||
| font-size: 24rpx; | font-size: 24rpx; | ||||
| text-align: center; | text-align: center; | ||||
| } | } | ||||
| .memNum{ | |||||
| font-weight:600; | |||||
| .memNum { | |||||
| font-weight: 600; | |||||
| font-size: 32rpx; | font-size: 32rpx; | ||||
| color: #3C3C3C; | color: #3C3C3C; | ||||
| font-family:PingFangSC-Medium; | |||||
| font-family: PingFangSC-Medium; | |||||
| text-align: center; | text-align: center; | ||||
| } | } | ||||
| .building{ | |||||
| .building { | |||||
| display: inline-block; | display: inline-block; | ||||
| } | } | ||||
| @@ -7,7 +7,7 @@ | |||||
| "preloadBackgroundData": false, | "preloadBackgroundData": false, | ||||
| "useIsolateContext": true | "useIsolateContext": true | ||||
| }, | }, | ||||
| "libVersion": "2.11.2", | |||||
| "libVersion": "2.30.2", | |||||
| "condition": { | "condition": { | ||||
| "miniprogram": { | "miniprogram": { | ||||
| "list": [ | "list": [ | ||||