diff --git a/assets/images/scanSvg.txt b/assets/images/scanSvg.txt
new file mode 100644
index 0000000..468883f
--- /dev/null
+++ b/assets/images/scanSvg.txt
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/config/config.js b/config/config.js
index 7f957d4..3392ef7 100755
--- a/config/config.js
+++ b/config/config.js
@@ -309,6 +309,10 @@ var config = {
* 根据code查询接口
*/
findByCode: "/merchant/findByCode",
+ /**
+ * 设置密码
+ */
+ updatePayPassword: "/couponOrder/updatePayPassword",
/**
* 参与砍价
*/
diff --git a/index/user.js b/index/user.js
index e2b5036..287cdfd 100644
--- a/index/user.js
+++ b/index/user.js
@@ -109,6 +109,7 @@ Page({
}).then(res => {
return
}).catch(err => {
+ wx.setStorageSync('ifSetUserInfo', 1) //手机号未授权
wx.navigateTo({
url: `/pages/getphoneInfo/index?mineFlag=mine`,
})
@@ -167,7 +168,7 @@ Page({
url: '/pages3/setUserInfo/index'
})
},
- onLoad() {
+ onLoad(options) {
// this.getLocation();
this.updateScene();
// this.getRoomId();
@@ -241,7 +242,30 @@ Page({
* 生命周期函数--监听页面显示
*/
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) {
let openId = wx.getStorageSync("openId")
this.setData({
diff --git a/pages/ConsumeDetail/ConsumeDetail.wxml b/pages/ConsumeDetail/ConsumeDetail.wxml
index c3d397b..94a20d0 100644
--- a/pages/ConsumeDetail/ConsumeDetail.wxml
+++ b/pages/ConsumeDetail/ConsumeDetail.wxml
@@ -32,11 +32,11 @@
{{item.merchantName}}
退款:+ {{item.deductionAmount/100}}元
- - {{item.deductionAmount/100}}元
+ {{item.payType == 0 ?'-':'+'}}{{item.deductionAmount/100}}元
- 更新时间:{{item.updateDate}}
+ 交易时间:{{item.createDate}}
余 {{item.cardRemainAmount/100}}元
订单号:{{item.orderId}}
diff --git a/pages/cardorder/cardUse/cardUse.js b/pages/cardorder/cardUse/cardUse.js
index 9a9e936..7a5667c 100644
--- a/pages/cardorder/cardUse/cardUse.js
+++ b/pages/cardorder/cardUse/cardUse.js
@@ -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() {
wx.navigateTo({
url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${this.data.data.id}`,
@@ -206,7 +261,7 @@ Page({
merChantDetail = encodeURIComponent(merChantDetail)
console.log(that.data.data, 'data');
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}`,
})
}
}
diff --git a/pages/cardorder/cardUse/cardUse.wxml b/pages/cardorder/cardUse/cardUse.wxml
index 01903d1..d571463 100644
--- a/pages/cardorder/cardUse/cardUse.wxml
+++ b/pages/cardorder/cardUse/cardUse.wxml
@@ -150,6 +150,7 @@
-->
+
diff --git a/pages/cardorder/cardUse/cardUse.wxss b/pages/cardorder/cardUse/cardUse.wxss
index 36421cb..8224cf0 100644
--- a/pages/cardorder/cardUse/cardUse.wxss
+++ b/pages/cardorder/cardUse/cardUse.wxss
@@ -372,7 +372,7 @@ page {
.bottomBtn {
position: sticky;
bottom: 0;
- padding: 50rpx;
+ padding: 70rpx;
z-index: 99999;
}
diff --git a/pages/exchangeCard/exchangeCard.js b/pages/exchangeCard/exchangeCard.js
index 95c6295..08b58c6 100644
--- a/pages/exchangeCard/exchangeCard.js
+++ b/pages/exchangeCard/exchangeCard.js
@@ -145,8 +145,8 @@ Page({
supportTransfer: res.data.supportTransfer || ""
})
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) {
wx.navigateTo({
url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${this.data.eCardId}`,
@@ -172,10 +172,13 @@ Page({
},
getCouponOrderByPassword(password) {
+ const that = this
Http.post({
url: config.api.getCouponOrderByPassword,
data: {
password,
+ payCheck: that.data.pdwSwitch,
+ payPassword: that.data.password
}
})
.then(res => {
@@ -217,6 +220,26 @@ Page({
},
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 = {
detail: { value: { code: this.data.code } }
}
diff --git a/pages/exchangeCard/exchangeCard.wxml b/pages/exchangeCard/exchangeCard.wxml
index 23bb958..f948f16 100644
--- a/pages/exchangeCard/exchangeCard.wxml
+++ b/pages/exchangeCard/exchangeCard.wxml
@@ -55,23 +55,17 @@
取消
-
+
diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js
index c0a1014..ed43fa6 100755
--- a/pages/getphoneInfo/index.js
+++ b/pages/getphoneInfo/index.js
@@ -170,6 +170,7 @@ Page({
* 来自我的
*/
if (that.data.path == 'main') {
+
wx.switchTab({
url: `/index/user`
})
@@ -219,6 +220,7 @@ Page({
url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}`
})
} else if (that.data.mineFlag == 'mine') {
+
wx.switchTab({
url: '/index/user'
});
@@ -245,9 +247,16 @@ Page({
url: '/pages3/setUserInfo/index',
})
} 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',
+ })
+ }
}
}
}
diff --git a/pages/getphoneInfo/index.wxss b/pages/getphoneInfo/index.wxss
index 8493d60..2442b8f 100755
--- a/pages/getphoneInfo/index.wxss
+++ b/pages/getphoneInfo/index.wxss
@@ -1,6 +1,7 @@
-page{
+page {
background: #fbfbfb;
}
+
.login-body {
padding-top: 200rpx;
display: flex;
@@ -8,9 +9,11 @@ page{
align-items: center;
justify-content: center;
}
-.backHome{
- margin-top: 20rpx!important;
+
+.backHome {
+ margin-top: 20rpx !important;
}
+
.login-logo {
width: 320rpx;
/* height: 320rpx; */
@@ -27,7 +30,8 @@ page{
padding-top: 120rpx;
width: 600rpx;
}
-.active{
+
+.active {
opacity: .6;
}
@@ -43,18 +47,22 @@ page{
letter-spacing: 0.75rpx !important;
text-align: center;
}
-.title{
+
+.title {
margin-top: 30rpx;
}
-.title text{
+
+.title text {
display: block;
text-align: center;
}
-.title text:nth-of-type(1){
+
+.title text:nth-of-type(1) {
font-size: 38rpx;
font-weight: bold;
}
-.title text:nth-of-type(2){
+
+.title text:nth-of-type(2) {
font-size: 30rpx;
margin-top: 25rpx;
}
\ No newline at end of file
diff --git a/pages/getuserinfo/index.js b/pages/getuserinfo/index.js
index 75db406..4ef5d25 100755
--- a/pages/getuserinfo/index.js
+++ b/pages/getuserinfo/index.js
@@ -17,8 +17,8 @@ Page({
wjId: "",
composeOrderType: "",
fillIndentId: "",
- url:null,//游戏路径
- id:null,//游戏id,
+ url: null,//游戏路径
+ id: null,//游戏id,
gameId: null,//游戏gameId
},
//是否授权手机号
@@ -45,21 +45,20 @@ Page({
url: app.globalData.skipUrl,
})
}
-
}).catch(err => {
wx.redirectTo({
url: `/pages/getphoneInfo/index?skipUrl=1`
});
- })
+ })
},
- onLoad: function(options) {
+ onLoad: function (options) {
console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址")
var that = this;
// options.fromflag == 'coupondetail';
// 游戏页面
- if (options && options.url && options.id && options.gameId){
+ if (options && options.url && options.id && options.gameId) {
that.setData({
url: options.url,//游戏路径
id: options.id,//游戏id,
@@ -144,18 +143,18 @@ Page({
})
}
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 => {
wx.showToast({
title: err.errMsg,
@@ -165,7 +164,7 @@ Page({
});
})
},
- onShow: function() {
+ onShow: function () {
wx.checkSession({
success() {
//session_key 未过期,并且在本生命周期一直有效
@@ -193,7 +192,7 @@ Page({
}
})
},
- backHome: function() {
+ backHome: function () {
wx.switchTab({
url: app.globalData.goHomeUrl,
@@ -210,238 +209,238 @@ Page({
var iv = res.iv;
var encryptedData = res.encryptedData;
wx.getUserInfo({
- success: function(res) {
+ success: function (res) {
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'
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'
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()
- 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()
- 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()
- } 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'
- 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'
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'
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'
- 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 => {
wx.showToast({
title: err.code,
@@ -458,25 +457,25 @@ Page({
})
})
},
- getGameOne: function(token, id) {
+ getGameOne: function (token, id) {
let _this = this;
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 => {
wx.showModal({
title: '提示',
content: err.message,
showCancel: false,
- success: function(res) {
+ success: function (res) {
// 如果游戏下架或者找不到,重启首页
if (res.confirm) {
wx.reLaunch({
diff --git a/pages/paySuccess/paySuccess.js b/pages/paySuccess/paySuccess.js
index 3c4ff43..356aeeb 100644
--- a/pages/paySuccess/paySuccess.js
+++ b/pages/paySuccess/paySuccess.js
@@ -7,7 +7,7 @@ Page({
*/
data: {
navigationBarHeight,
- data:null,
+ data: null,
pay_success: imgurl.pay_success.url
},
@@ -18,12 +18,15 @@ Page({
let pamars = JSON.parse(options.data);
pamars.updateDate = Util.formatTime(pamars.updateDate, "yyyy-MM-dd hh:mm:ss");
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',
})
},
/**
diff --git a/pages/scanPay/scanPay.js b/pages/scanPay/scanPay.js
index 3ba2c48..91ad1b4 100644
--- a/pages/scanPay/scanPay.js
+++ b/pages/scanPay/scanPay.js
@@ -20,7 +20,11 @@ Page({
showInput: false,
ids: "",
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,
remainingAmount: options.remainingAmount,
remainingAmounts: options.remainingAmount,
+ payCheck: options.payCheck * 1
})
},
bindKeyInput(e) {
@@ -44,6 +49,28 @@ Page({
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) {
let that = this;
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 () {
let that = this;
const startSoterAuthentication = () => {
@@ -140,7 +186,9 @@ Page({
data: {
cardId: that.data.cardid,
merchantId: that.data.merChant.id,
- totalFee: that.data.inputValue
+ totalFee: that.data.inputValue,
+ payCheck: that.data.payCheck,
+ password: that.data.password
}
})
.then(res => {
@@ -148,9 +196,13 @@ Page({
wx.hideLoading();
that.setData({
showModel: false,
- showInput: false
+ showInput: false,
+ isPwd: false,
+ pwdSw: false,
+ password: ''
})
- wx.navigateTo({
+
+ wx.reLaunch({
url: `/pages/paySuccess/paySuccess?data=${JSON.stringify(res.data)}`,
})
}
@@ -248,7 +300,7 @@ Page({
that.setData({
showPage: true,
cardList: res.data.list,
- arrays: arrays
+ arrays: arrays,
})
}
})
diff --git a/pages/scanPay/scanPay.wxml b/pages/scanPay/scanPay.wxml
index 32fb7ff..ed31770 100644
--- a/pages/scanPay/scanPay.wxml
+++ b/pages/scanPay/scanPay.wxml
@@ -1,6 +1,7 @@
-
+
+
付款给{{merChant.merchantName}}
@@ -9,7 +10,7 @@
¥
-
+
@@ -29,11 +30,11 @@
余额:{{item.remainingAmount/100}}元
-
+
-
+
@@ -52,4 +53,12 @@
+
+
+
+
+ 输入密码
+
+
+
\ No newline at end of file
diff --git a/pages/scanPay/scanPay.wxss b/pages/scanPay/scanPay.wxss
index ce78c93..3d95c4b 100644
--- a/pages/scanPay/scanPay.wxss
+++ b/pages/scanPay/scanPay.wxss
@@ -1,67 +1,83 @@
-.content{
- padding:0 57rpx;
+.content {
+ height: 1300rpx;
+ padding: 0 57rpx;
}
-.title{
+
+.content.active {
+ opacity: 0.5;
+}
+
+.title {
margin-top: 60rpx;
}
-.head{
+
+.head {
margin-top: 40rpx;
}
-.head image{
+
+.head image {
width: 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;
- margin:80rpx auto 0;
+ margin: 80rpx auto 0;
/* 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;
}
-.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;
height: 60rpx;
margin-top: 16rpx;
padding-top: 4rpx;
line-height: 60rpx;
}
-.active{
+
+.active {
opacity: .6;
}
-.model{
+
+.model {
height: 100vh;
width: 100%;
position: fixed;
top: 0;
left: 0;
}
-.zhezhao{
+
+.zhezhao {
position: fixed;
top: 0;
left: 0;
@@ -71,7 +87,8 @@
background: #000;
opacity: 0.5;
}
-.card-model{
+
+.card-model {
position: fixed;
height: 750rpx;
width: 100%;
@@ -80,33 +97,37 @@
z-index: 20;
background: #fff;
}
-.card-top{
+
+.card-top {
position: relative;
height: 85rpx;
width: 100%;
background: #E67663;
line-height: 85rpx;
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;
overflow: hidden;
}
-.card-content image{
+
+.card-content image {
width: 64rpx;
height: 64rpx;
- border-radius:10rpx;
+ border-radius: 10rpx;
position: absolute;
left: 20rpx;
top: 0;
bottom: 0;
- margin: auto;
+ margin: auto;
z-index: 100;
}
-.card-items{
+
+.card-items {
position: relative;
height: 130rpx;
line-height: 130rpx;
@@ -115,43 +136,52 @@
margin: 0 auto;
border-bottom: 1rpx solid #eee;
}
-.card-items-left{
+
+.card-items-left {
width: 50%;
float: left;
font-size: 30rpx;
}
-.card-items-right{
+
+.card-items-right {
width: 50%;
float: right;
font-size: 30rpx;
}
-.card-items-left-img{
+
+.card-items-left-img {
width: 30%;
height: 130rpx;
float: left;
}
-.card-items-left-text{
+
+.card-items-left-text {
width: 70%;
height: 130rpx;
float: left;
}
-.card-items-right-text{
+
+.card-items-right-text {
text-align: right;
float: left;
width: 80%;
}
-.card-items-right-radio{
+
+.card-items-right-radio {
float: left;
width: 20%;
}
-.checkcard-box{
+
+.checkcard-box {
width: 84%;
- background: #02C0FF!important;
+ background: #02C0FF !important;
}
-.opcacity{
- opacity: .2!important;
+
+.opcacity {
+ opacity: .2 !important;
}
-.icons{
+
+.icons {
width: 40rpx;
height: 40rpx;
position: absolute;
@@ -160,10 +190,12 @@
right: 20rpx;
margin: auto;
}
-.icons image{
- width:100%;
+
+.icons image {
+ width: 100%;
}
-.close{
+
+.close {
position: absolute;
width: 40rpx;
height: 40rpx;
@@ -171,4 +203,41 @@
bottom: 0;
right: 40rpx;
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;
}
\ No newline at end of file
diff --git a/pages/specialcourtesy/specialcourtesy.js b/pages/specialcourtesy/specialcourtesy.js
index 22fe444..63838ad 100644
--- a/pages/specialcourtesy/specialcourtesy.js
+++ b/pages/specialcourtesy/specialcourtesy.js
@@ -13,8 +13,11 @@ Page({
myspeacialUrl: imgurl.myspeacial.url,
teliconUrl: imgurl.telicon.url,
wmhome: imgurl.wmhome.url,
- memberId:"000000",
+ memberId: "000000",
goHomeUrl: "",
+ showCode: true,
+ showTimeLine: true,
+ expiredSeconds: 0
},
phone: function (e) {
console.log(e)
@@ -41,36 +44,67 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
-
- this.ifPhoneInfo()
let that = this;
+ that.ifPhoneInfo()
that.setData({
goHomeUrl: app.globalData.goHomeUrl,
})
console.log("渲染开始")
+ that.getDiscountInfo()
+ },
+
+ refreshCode() {
+ this.setData({
+ showCode: true
+ })
+ this.getDiscountInfo()
+ },
+
+ getDiscountInfo() {
+ let that = this;
Http.get({
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 () {
@@ -82,7 +116,7 @@ Page({
/**
* 二维码
*/
- qrcode: function (memberId){
+ qrcode(memberId) {
let that = this;
var size = that.setCanvasSize();
let url = JSON.stringify({
@@ -95,7 +129,7 @@ Page({
createQrCode: function (url, canvasId, cavW, cavH) {
//调用插件中的draw方法,绘制二维码图片
let that = this;
- QR.api.draw(url, canvasId, cavW, cavH,function(res){
+ QR.api.draw(url, canvasId, cavW, cavH, function (res) {
that.setData({
tempFilePath: res
})
@@ -119,5 +153,5 @@ Page({
}
return size;
},
-
+
})
\ No newline at end of file
diff --git a/pages/specialcourtesy/specialcourtesy.wxml b/pages/specialcourtesy/specialcourtesy.wxml
index 46f21bb..ccf9cb1 100644
--- a/pages/specialcourtesy/specialcourtesy.wxml
+++ b/pages/specialcourtesy/specialcourtesy.wxml
@@ -1,14 +1,29 @@
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ 点击刷新
+
-
- 会员码:{{memberId}}
+
+ 二维码将在
+ {{expiredSeconds}}s
+ 后失效
+
+ 会员码:{{memberId}}
会员等级为[{{level}}]对应门店的优惠折扣
@@ -20,7 +35,8 @@
>
- {{item.discount/10}}折
+ {{item.discount/10}}折
+
{{item.merchantName}}
-
+
\ No newline at end of file
diff --git a/pages/specialcourtesy/specialcourtesy.wxss b/pages/specialcourtesy/specialcourtesy.wxss
index c46eec2..fb2e9e8 100644
--- a/pages/specialcourtesy/specialcourtesy.wxss
+++ b/pages/specialcourtesy/specialcourtesy.wxss
@@ -1,12 +1,15 @@
@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%;
overflow: auto;
}
+
.none {
font-size: 24rpx;
text-align: center;
@@ -15,6 +18,12 @@ page{
float: none !important;
}
+.coedTiem {
+ text-align: center;
+ color: rgba(253, 131, 45, 1);
+ margin-bottom: 10rpx;
+}
+
.headerbg image {
display: block;
width: 100%;
@@ -160,7 +169,7 @@ page{
.code {
width: 690rpx;
- height: 800rpx;
+ height: 900rpx;
background: #fff;
margin: 20rpx auto;
border-radius: 10rpx;
@@ -172,35 +181,53 @@ page{
height: 150rpx;
margin: 0 auto 10rpx;
}
-.canWrap{
+
+.canWrap {
width: 358rpx;
height: 358rpx;
}
+
+.negatived {
+ position: relative;
+}
+
+.negatived .refreshCode {
+ position: absolute;
+ top: 350rpx;
+ left: 50%;
+ transform: translateX(-50%);
+ color: #7a7a7a;
+ font-weight: 600;
+}
+
.code image {
width: 500rpx;
height: 500rpx;
display: block;
- margin:70rpx auto 60rpx;
+ margin: 70rpx auto 60rpx;
}
-.memCode{
+
+.memCode {
width: 562rpx;
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;
color: #666;
display: block;
font-size: 24rpx;
text-align: center;
}
-.memNum{
- font-weight:600;
+
+.memNum {
+ font-weight: 600;
font-size: 32rpx;
color: #3C3C3C;
- font-family:PingFangSC-Medium;
+ font-family: PingFangSC-Medium;
text-align: center;
}
-.building{
+
+.building {
display: inline-block;
}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index 9a8b04a..a8033e7 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -7,7 +7,7 @@
"preloadBackgroundData": false,
"useIsolateContext": true
},
- "libVersion": "2.11.2",
+ "libVersion": "2.30.2",
"condition": {
"miniprogram": {
"list": [