diff --git a/App.vue b/App.vue index da18809..4a542a5 100644 --- a/App.vue +++ b/App.vue @@ -19,6 +19,7 @@ orderurl: '', userurl: '', brestUrl: '', + payurl: '', imgUrl: '', imageWxImg: '', imageqrImg: '', @@ -63,40 +64,44 @@ //千猪名称 qianzhuCityName: '重庆市', //团油数据 - pelletoilList: '' + pelletoilList: '', + //分享领取次数 + shareNum:0 }, - onLaunch: function() { - }, + onLaunch: function() {}, onShow: function() { // #ifdef MP let accountInfo = uni.getAccountInfoSync(); - if (accountInfo.miniProgram.envVersion == 'develop' || accountInfo.miniProgram.envVersion == 'trial') { - this.globalData.url = 'https://hsgcs.dctpay.com/crest'; - this.globalData.v1url = 'https://hsgcs.dctpay.com/v1'; - this.globalData.orderurl = 'https://hsgcs.dctpay.com/order'; - this.globalData.userurl = 'https://hsgcs.dctpay.com/user'; - this.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest'; - this.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/'; - this.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/'; - this.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/'; - } - if (accountInfo.miniProgram.envVersion == 'release') { + // if (accountInfo.miniProgram.envVersion == 'develop' || accountInfo.miniProgram.envVersion == 'trial') { + // this.globalData.url = 'https://hsgcs.dctpay.com/crest'; + // this.globalData.v1url = 'https://hsgcs.dctpay.com/v1'; + // this.globalData.payurl = 'https://gratia-pay.dctpay.com/crest'; + // this.globalData.orderurl = 'https://hsgcs.dctpay.com/order'; + // this.globalData.userurl = 'https://hsgcs.dctpay.com/user'; + // this.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest'; + // this.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/'; + // this.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/'; + // this.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/'; + // } + // if (accountInfo.miniProgram.envVersion == 'release') { this.globalData.url = 'https://hsg.dctpay.com/crest'; this.globalData.v1url = 'https://hsg.dctpay.com/v1'; + this.globalData.payurl = 'https://pay.dctpay.com/crest'; this.globalData.orderurl = 'https://hsg.dctpay.com/order'; this.globalData.userurl = 'https://hsg.dctpay.com/user'; this.globalData.brestUrl = 'https://hsg.dctpay.com/brest'; this.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/'; this.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/'; this.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/'; - } + // } // #endif // #ifdef H5 let that = this; // that.globalData.url = 'https://hsgcs.dctpay.com/crest'; // that.globalData.v1url = 'https://hsgcs.dctpay.com/v1'; + // that.globalData.payurl = 'https://gratia-pay.dctpay.com/crest'; // that.globalData.orderurl = 'https://hsgcs.dctpay.com/order'; // that.globalData.userurl = 'https://hsgcs.dctpay.com/user'; // that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest'; @@ -106,6 +111,7 @@ that.globalData.url = 'https://hsg.dctpay.com/crest'; that.globalData.v1url = 'https://hsg.dctpay.com/v1'; + that.globalData.payurl = 'https://pay.dctpay.com/crest'; that.globalData.orderurl = 'https://hsg.dctpay.com/order'; that.globalData.userurl = 'https://hsg.dctpay.com/user'; that.globalData.brestUrl = 'https://hsg.dctpay.com/brest'; @@ -226,22 +232,22 @@ }) // #endif }, - onHide: function() { - } + onHide: function() {} } diff --git a/Utils/Api.js b/Utils/Api.js index 8e6b502..98236e9 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -10,6 +10,7 @@ let orderbase = app.globalData.orderurl; let userbase = app.globalData.userurl; let v1base = app.globalData.v1url; let brestBase = app.globalData.brestUrl; +let payBase = app.globalData.payurl; //公众号获取跳小程序参数 export const verifyWx = params => { return POST('GET', `${v1base}/wxMsg/verifyWx`, params).then(res => res.data); @@ -651,7 +652,15 @@ export const getOrderByOrderNo = params => { // 获取登录验证码 export const getLoginSMSCode = params => { return POST('POST', `${userbase}/sms/getLoginSMSCode`, params).then(res => res.data); -} +} +//获取优惠列表 +export const queryHzfDiscountList = params => { + return POST('GET', `${userbase}/discount/queryHzfDiscountList`, params).then(res => res.data); +} +//查询总次数 +export const queryHzfDiscountTotalNum = params => { + return POST('GET', `${userbase}/discount/queryHzfDiscountTotalNum`, params).then(res => res.data); +} // 手机号登录 export const phone = params => { @@ -684,3 +693,22 @@ export const getUserAccount = params => { export const getUserDiscountList = params => { return POST('GET', `${userbase}/discount/getUserDiscountList`, params).then(res => res.data); } + + +//支付项目 领取优惠券 +export const getReceiveDiscountList = params => { + return POST('GET', `${payBase}/storeDiscountActivityPartakeUser/getReceiveDiscountList`, params).then(res => res.data); +} +export const payReceiveDiscount = params => { + return POST('POST', `${payBase}/storeDiscountActivityPartakeUser/receiveDiscount`, params).then(res => res.data); +} +//获取二维码 +export const generateWeChatMpQrCode = params => { + return POST('POST', `${payBase}/storeDiscountActivityPartakeUser/generateWeChatMpQrCode`, params).then(res => res.data); +} +//查询订单详情 +export const getOrderByOutTradeOrder = params => { + return POST('POST', `${payBase}/tradeOrder/getOrderByOutTradeOrder`, params).then(res => res.data); +} + + diff --git a/index.html b/index.html index 9ae818a..86f2ca8 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,6 @@ -