Commit 932e7f3e authored by renjie's avatar renjie

进入相册首页获取优惠券

parent 7620c9d6
...@@ -182,7 +182,9 @@ export default { ...@@ -182,7 +182,9 @@ export default {
} }
], ],
rules: [],//使用规则 rules: [],//使用规则
options: {}//路由参数 options: {},//路由参数
openid: '',
userId: ''
} }
}, },
methods: { methods: {
...@@ -199,9 +201,8 @@ export default { ...@@ -199,9 +201,8 @@ export default {
this.showUseRule = true this.showUseRule = true
}, },
jumpToScanFaceClick() {//---跳转扫脸页面 jumpToScanFaceClick() {//---跳转扫脸页面
const openid = uni.getStorageSync('openid')
this.$request('wechatUser/pdFace/checkScanFace',{openid}).then(res => { this.$request('wechatUser/pdFace/checkScanFace',{openid: this.openid}).then(res => {
if (res.code === '00') { if (res.code === '00') {
const merchantId = this.options.merchantId || 'z0015605022691a5945bbe463141668c'// 默认长江索道 const merchantId = this.options.merchantId || 'z0015605022691a5945bbe463141668c'// 默认长江索道
if(res.data.isScanFace === 0) {//未扫脸 if(res.data.isScanFace === 0) {//未扫脸
...@@ -292,10 +293,26 @@ export default { ...@@ -292,10 +293,26 @@ export default {
this.show = true this.show = true
} }
}, },
findPageMarketFun(){//---获取优惠券
var data = {
pageCode: 'orderInfo',
marketingStatus: 1,
openid: this.openid,
userId: this.userId,
}
this.$request('scenic/market/findPageMarket',data).then((res)=>{
if(res.code === '00'){
this.couponIsUse()
}else{
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
couponIsUse() {//---判断是否有劵 couponIsUse() {//---判断是否有劵
const openid = uni.getStorageSync('openid') this.$request('wechatUser/myPage/getUserCouponList',{openid: this.openid}).then(res => {
this.$request('wechatUser/myPage/getUserCouponList',{openid}).then(res => {
if (res.code === '00') { if (res.code === '00') {
res.data.forEach(item => { res.data.forEach(item => {
if(item.useRange === 11 && item.couponStatus === 1) { if(item.useRange === 11 && item.couponStatus === 1) {
...@@ -342,7 +359,9 @@ export default { ...@@ -342,7 +359,9 @@ export default {
}, },
onLoad(options) { onLoad(options) {
this.$commonjs.getCompanyId(options) this.$commonjs.getCompanyId(options)
this.couponIsUse() this.openid = uni.getStorageSync('openid')
this.userId = uni.getStorageSync('userId')
this.findPageMarketFun()
this.recordDeviceInfo() this.recordDeviceInfo()
this.options = options this.options = options
if(this.options.tip === 'true') {// 从模板选择页进入 if(this.options.tip === 'true') {// 从模板选择页进入
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment