| @@ -896,7 +896,7 @@ Page({ | |||
| */ | |||
| if (app.globalData.ifCongPh == 1) { | |||
| tt.navigateTo({ | |||
| url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&path=qr`, | |||
| url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&mallTenantId=${that.data.mallTenantId}&path=qr`, | |||
| }); | |||
| } else { | |||
| this.setData({ | |||
| @@ -906,7 +906,7 @@ Page({ | |||
| } else if (err.code == 11006) { | |||
| // 用户手机已加密 | |||
| tt.navigateTo({ | |||
| url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&path=qr` | |||
| url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&mallTenantId=${that.data.mallTenantId}&path=qr` | |||
| }); | |||
| } else { | |||
| tt.showToast({ | |||
| @@ -485,12 +485,13 @@ Page({ | |||
| */ | |||
| onLoad(options) { | |||
| console.log(options, 'options'); | |||
| if (options.mallTenantId) { | |||
| if (options.mallTenantId || options.tenantId) { | |||
| this.setData({ | |||
| mallTenantId: options.mallTenantId, | |||
| mallTenantId: options.mallTenantId || options.tenantId, | |||
| }) | |||
| } | |||
| this.setData({ | |||
| mouldType: app.globalData.mouldType, | |||
| }) | |||
| @@ -926,7 +927,7 @@ Page({ | |||
| * | |||
| */ | |||
| tt.redirectTo({ | |||
| url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate, | |||
| url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate | |||
| }); | |||
| } else if (err.code == 11006) { | |||
| // 用户手机已加密 | |||
| @@ -129,7 +129,7 @@ Page({ | |||
| url: config.api.couponOrderDetail, | |||
| data: { | |||
| couponOrderId: options.quancode, | |||
| mallTenantId: tt.getStorageSync('mallTenantId') || '' | |||
| mallTenantId: options.mallTenantId | |||
| } | |||
| }).then(res => { | |||
| if (res.data.tenantId) { | |||
| @@ -49,7 +49,7 @@ Page({ | |||
| bindPickerChange(e) { | |||
| const index = e.detail.value | |||
| const mallTenantId = this.data.shopList[index].tenantId | |||
| // tt.setStorageSync('mallTenantId', mallTenantId) | |||
| tt.setStorageSync('mallTenantId', mallTenantId) | |||
| // tt.setStorageSync('mallIndex', index) | |||
| this.setData({ | |||
| index: index, | |||
| @@ -35,11 +35,11 @@ | |||
| </view> | |||
| </view> | |||
| <navigator class="useBtn" tt:if="{{item.couponOrderStatus==0}}" | |||
| url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}&validStatus={{item.validStatus}}" | |||
| url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}&validStatus={{item.validStatus}}&mallTenantId={{item.tenantId}}" | |||
| hover-class="navigator-hover" open-type="navigate">去使用</navigator> | |||
| <navigator class="nouseBtn" | |||
| tt:if="{{item.couponOrderStatus==1||item.couponOrderStatus==2||item.couponOrderStatus==3}}" | |||
| url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}&validStatus={{item.validStatus}}" | |||
| url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}&validStatus={{item.validStatus}}&mallTenantId={{item.tenantId}}" | |||
| hover-class="navigator-hover" open-type="navigate">查看</navigator> | |||
| </view> | |||
| @@ -16,16 +16,18 @@ Page({ | |||
| couponId: "", | |||
| // skip: app.globalData.skip | |||
| }, | |||
| onLoad: function(options) { | |||
| onLoad: function (options) { | |||
| var that = this; | |||
| console.log(options.skipUrl, "options.skipUrl") | |||
| if (options.skipUrl) { | |||
| that.setData({ | |||
| skipUrl: options.skipUrl | |||
| }) | |||
| } | |||
| if (options.mallTenantId) { | |||
| that.setData({ | |||
| mallTenantId: options.mallTenantId | |||
| }) | |||
| } | |||
| that.setData({ | |||
| path: options.path | |||
| }) | |||
| @@ -44,7 +46,7 @@ Page({ | |||
| }); | |||
| } | |||
| if (options && options.mineFlag) { | |||
| if (options && options.mineFlag) { | |||
| that.setData({ | |||
| mineFlag: options.mineFlag | |||
| }) | |||
| @@ -77,7 +79,7 @@ Page({ | |||
| }); | |||
| }) | |||
| }, | |||
| onShow: function() { | |||
| onShow: function () { | |||
| tt.checkSession({ | |||
| success() { | |||
| //session_key 未过期,并且在本生命周期一直有效 | |||
| @@ -105,15 +107,15 @@ Page({ | |||
| } | |||
| }) | |||
| }, | |||
| backHome(){ | |||
| backHome() { | |||
| console.log("我调用的返回"); | |||
| tt.navigateBack({ | |||
| delta: 1, | |||
| success: (res) => { | |||
| }, | |||
| fail: (res) => { | |||
| }, | |||
| }); | |||
| @@ -122,11 +124,11 @@ Page({ | |||
| // success: (res) => { | |||
| // }, | |||
| // fail: (res) => { | |||
| // }, | |||
| // }); | |||
| }, | |||
| getPhoneNumber: function(e) { | |||
| getPhoneNumber: function (e) { | |||
| var that = this; | |||
| var iv = e.detail.iv; | |||
| var encryptedData = e.detail.encryptedData; | |||
| @@ -137,7 +139,7 @@ Page({ | |||
| iv: iv | |||
| } | |||
| }).then(res => { | |||
| app.globalData.phone = res.data.phone; | |||
| if (that.data.skipUrl == '1') { | |||
| console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | |||
| @@ -161,7 +163,7 @@ Page({ | |||
| url: app.globalData.skipUrl, | |||
| }) | |||
| return; | |||
| }else if (app.globalData.skip == 'navigateBack') { | |||
| } else if (app.globalData.skip == 'navigateBack') { | |||
| tt.navigateBack({ | |||
| delta: 1, | |||
| }) | |||
| @@ -229,7 +231,7 @@ Page({ | |||
| }) | |||
| } else if (that.data.path == 'index' && that.data.paramData.cuserId) { | |||
| tt.redirectTo({ | |||
| url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate | |||
| url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate + "&mallTenantId=" + that.data.mallTenantId, | |||
| }) | |||
| } | |||
| /** | |||
| @@ -251,10 +253,10 @@ Page({ | |||
| tt.showToast({ | |||
| title: res.data.msg, | |||
| icon: "success", | |||
| success: function(res) { | |||
| success: function (res) { | |||
| if (that.data.couponChannelId) { | |||
| tt.redirectTo({ | |||
| url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay" | |||
| url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay" + "&mallTenantId=" + that.data.mallTenantId, | |||
| }) | |||
| } else { | |||
| tt.redirectTo({ | |||
| @@ -21,9 +21,9 @@ | |||
| "list": [ | |||
| { | |||
| "id": 1670551556787, | |||
| "name": "pages/coupon/detail/index", | |||
| "pathName": "pages/coupon/detail/index", | |||
| "query": "couponChannelId=760764417613029376&couponId=760349248090595328", | |||
| "name": "pages/main/index", | |||
| "pathName": "pages/main/index", | |||
| "query": "type=cd&couponChannelId=762472141677453312&tenantId=1032", | |||
| "scene": "990001", | |||
| "launchFrom": "scan", | |||
| "location": "qr_code" | |||