diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 464401c..267dd64 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -1,9 +1,9 @@ const install = (Vue, vm) => { uni.setStorageSync('deptId', 100); Vue.prototype.$u.http.setConfig({ - baseUrl: 'http://192.168.1.3:4101', //键辉本地 + // baseUrl: 'http://192.168.1.3:4101', //键辉本地 // baseUrl: 'http://192.168.2.221:4101', //景森本地 - // baseUrl: 'https://ele.ccttiot.com/prod-api', //线上 小鹿appid: wx8a05cf95418a6859 小兔骑骑appid:wx38f96c87621a87ab 遇福兴https://fu.chuantewulian.cn wxcb1d6a5d9dca8bbe + baseUrl: 'https://ele.ccttiot.com/prod-api', //线上 小鹿appid: wx8a05cf95418a6859 小兔骑骑appid:wx38f96c87621a87ab 遇福兴https://fu.chuantewulian.cn wxcb1d6a5d9dca8bbe // baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上 // baseUrl:'https://ysd.chuantewulian.cn/prod-api', //嵛山岛线上api 嵛山岛appid:wx4d178f8c80348214 loadingText: '努力加载中~', diff --git a/page_fenbao/huiyuan/index.vue b/page_fenbao/huiyuan/index.vue index 56e502a..253e57f 100644 --- a/page_fenbao/huiyuan/index.vue +++ b/page_fenbao/huiyuan/index.vue @@ -102,11 +102,15 @@ areaId:'', channelId:'', zfflag:true, - area: {} + area: {}, + redirectUrl: '', + redirectRemark: '' } }, onLoad(option) { this.areaId = option.areaId + this.redirectUrl = option.redirectUrl + this.redirectRemark = option.redirectRemark this.getAreaDetail() this.gethuiyuan() this.getchannelid() @@ -219,7 +223,7 @@ }, goVerify() { uni.navigateTo({ - url: '/page_user/verify/index?areaId=' + this.areaId, + url: `/page_user/verify/index?areaId=${this.areaId}&redirectUrl=${this.redirectUrl}&redirectRemark=${this.redirectRemark}`, }) } } diff --git a/page_fenbao/huiyuan/myhuiyuan.vue b/page_fenbao/huiyuan/myhuiyuan.vue index 7f207ba..9f6e1aa 100644 --- a/page_fenbao/huiyuan/myhuiyuan.vue +++ b/page_fenbao/huiyuan/myhuiyuan.vue @@ -1,6 +1,6 @@ @@ -151,7 +154,9 @@ export default { appId: '1', areaId: null, successPopupVisible: false, - successCouponName: '' + successCouponName: '', + redirectUrl: '', + redirectRemark: '' } }, computed: { @@ -162,6 +167,10 @@ export default { onLoad(options) { this.appId = this.$store.state.appid || '1' this.areaId = options.areaId + if (options.redirectUrl) { + this.redirectUrl = decodeURIComponent(options.redirectUrl) + } + this.redirectRemark = options.redirectRemark this.initDefaultArea() }, methods: { @@ -259,7 +268,7 @@ export default { }) uni.hideLoading() if (res.code === 200) { - this.successCouponName = item.skuTitle || (item.vip && item.vip.name) || '卡券' + this.successCouponName = item?.vip?.name this.successPopupVisible = true this.couponCode = '' this.preparePayload = null @@ -282,6 +291,17 @@ export default { this.couponCode = '' this.preparePayload = null this.prepareItemList = [] + }, + /** 重定向(redirectRemark 按钮点击) */ + onRedirect() { + this.successPopupVisible = false + if (this.redirectUrl) { + if (this.redirectUrl.startsWith('http')) { + uni.redirectTo({ url: '/page_fenbao/webview?url=' + encodeURIComponent(this.redirectUrl) }) + } else { + uni.redirectTo({ url: this.redirectUrl.startsWith('/') ? this.redirectUrl : '/' + this.redirectUrl }) + } + } } } }