From 5a6193c34f1a19f90dd038b5a2c8da092a6a9618 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Mon, 20 Mar 2023 09:32:18 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 3 ++- .../pages/stationDetail/stationDetail.vue | 23 ++++++++++++++++++- pages/tabbar/home/home.vue | 1 - utils/request.js | 14 +++++------ 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/App.vue b/App.vue index d06c90b..6ad0d6d 100644 --- a/App.vue +++ b/App.vue @@ -29,7 +29,8 @@ let custom = wx.getMenuButtonBoundingClientRect(); Vue.prototype.Custom = custom; Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight; - // #endif // #ifdef MP-ALIPAY + // #endif + // #ifdef MP-ALIPAY Vue.prototype.StatusBar = e.statusBarHeight; Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight; // #endif diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue index 6572681..3d6f1ca 100644 --- a/BagStation/pages/stationDetail/stationDetail.vue +++ b/BagStation/pages/stationDetail/stationDetail.vue @@ -88,7 +88,7 @@ 加 {{itm.oilsCode}} {{itm.volume}}L 节省 ¥{{itm.discountAmount}} - + 暂无 @@ -187,7 +187,17 @@ console.log('这里是卸载页面') this.innerAudioContext.stop() }, + + onLoad(option) { + console.log(22222) + if(option.q) { + let originLink = decodeURIComponent(option.q) + let target = this.obtainUrlPathParameterTarget(originLink) + console.log('target',target) + return + } + if(!option.item){ let siteInfos = uni.getStorageSync('siteInfo') var oilItem = JSON.parse(decodeURIComponent(siteInfos)) @@ -209,6 +219,17 @@ this.ContextAudio(this.audioUrl) }, methods: { + obtainUrlPathParameterTarget(url) { + let target = {} + if(url.includes('?')) { + let paramsText = url.split("?")[1] + let paramsArr = paramsText.split("&") + paramsArr.forEach(item => { + target[item.split('=')[0]] = item.split('=')[1] + }) + } + return target + }, // 生成音频文件 ContextAudio(url){ this.innerAudioContext = uni.createInnerAudioContext(); diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue index 12bc10c..37ea9d5 100644 --- a/pages/tabbar/home/home.vue +++ b/pages/tabbar/home/home.vue @@ -576,7 +576,6 @@ }, toDetail(item) { let itemS = encodeURIComponent(JSON.stringify(item)) - console.log(itemS) if (uni.getStorageSync('user')) { uni.navigateTo({ url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`, diff --git a/utils/request.js b/utils/request.js index 91d109e..0df125e 100644 --- a/utils/request.js +++ b/utils/request.js @@ -2,9 +2,9 @@ import axios from 'axios' import utils from '@/utils/encode' // const env = process.env.NODE_ENV -const env = 'production'/* */ -// const env = 'test' -const testUrl = 'http://192.168.0.45:38080' +// const env = 'production'/* */ +const env = 'test' +const testUrl = 'http://192.168.110.230:38080' // const productUrl = 'http://121.196.213.68/adminapi' //预生产 // const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new @@ -54,8 +54,8 @@ service.interceptors.request.use( config.data = data // } } else { - console.log('\n\n-----------------------') - console.log('参数', config.url, '参数加密前', config.data) + // console.log('\n\n-----------------------') + // console.log('参数', config.url, '参数加密前', config.data) url = config.url } @@ -84,8 +84,8 @@ service.interceptors.response.use( // console.log('返回', response.config.url, '返回结果',res) } } else { - console.log('返回', response.config.url, '返回结果未加密', res) - console.log('-------------------------------------------\n\n') + // console.log('返回', response.config.url, '返回结果未加密', res) + // console.log('-------------------------------------------\n\n') } uni.hideLoading() From 604e9b3bb639e874dace3d73868a1b3526c39c71 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Mon, 20 Mar 2023 13:08:21 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 3 +- BagAuth/pages/login/login.vue | 22 +++++---- .../pages/stationDetail/stationDetail.vue | 45 ++++++++++--------- pages/tabbar/home/home.vue | 21 ++++----- 4 files changed, 51 insertions(+), 40 deletions(-) diff --git a/App.vue b/App.vue index 363fde5..aabebca 100644 --- a/App.vue +++ b/App.vue @@ -58,7 +58,8 @@ let custom = wx.getMenuButtonBoundingClientRect(); Vue.prototype.Custom = custom; Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight; - // #endif + // #endif + // #ifdef MP-ALIPAY Vue.prototype.StatusBar = e.statusBarHeight; Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight; diff --git a/BagAuth/pages/login/login.vue b/BagAuth/pages/login/login.vue index 8d18d54..aa39ac4 100644 --- a/BagAuth/pages/login/login.vue +++ b/BagAuth/pages/login/login.vue @@ -152,22 +152,24 @@ loginRes: {}, sessionKey: '', nickName: '', - loginOut: uni.getStorageSync('loginOut') ? true : false + loginOut: uni.getStorageSync('loginOut') ? true : false, + scanningParams:null } }, - onLoad() { + onLoad(options) { uni.clearStorageSync() this.refreshLocation() uni.login({ provider: 'weixin', success: (loginRes) => { - console.log(loginRes,'loginRes') const code = loginRes.code this.onceCode = code - console.log(this.onceCode,'----------') oilIdentityApi.sendCode(this.onceCode).then(res => { - console.log(res,'sendCode') if (res.code === 20000) { + if(options.scanningParams) { + // 用于扫码进入油站详情页面 + this.scanningParams = options.scanningParams + } this.sessionKey = res.data.sessionKey uni.setStorageSync('openid', res.data.openId) uni.setStorageSync('unionid', res.data.unionId) @@ -184,7 +186,6 @@ } }).catch(err => { - console.log(err) uni.reLaunch({ url: '/BagAuth/pages/login/boforeLogin/boforeLogin', fail: (err) => { @@ -231,7 +232,6 @@ decryptPhoneNumber(e) { - // console.log(e.detail) if (e.detail.errMsg === 'getPhoneNumber:ok') { const data1 = { ...e.detail, @@ -251,7 +251,6 @@ bindLoginByPhone(data, url) { if (this.count < 1) { oilIdentityApi.bindLoginByPhone(data, url).then(res => { - console.log(res) if (res.code == 20000) { this.loginSuccess(res) @@ -278,11 +277,16 @@ title: res.msg, icon: 'none', complete: (err) => { - // console.log(err) } }) }, 1000); // 这里有问题 + if(this.scanningParams) { + uni.redirectTo({ + url: `/BagStation/pages/stationDetail/stationDetail?q=${this.scanningParams}` + }) + return + } uni.switchTab({ url: '/pages/tabbar/home/home' }) diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue index fc4530e..378ea55 100644 --- a/BagStation/pages/stationDetail/stationDetail.vue +++ b/BagStation/pages/stationDetail/stationDetail.vue @@ -180,21 +180,29 @@ } }, onHide() { - console.log('这里是hiden') - this.innerAudioContext.stop() + this.audioUrl && this.innerAudioContext.stop() }, onUnload() { - console.log('这里是卸载页面') - this.innerAudioContext.stop() + this.audioUrl && this.innerAudioContext.stop() }, onLoad(option) { - console.log(22222) + let userInfo = uni.getStorageSync('user') + if(!userInfo && option.q) { + uni.redirectTo({ + url: `/BagAuth/pages/login/login?scanningParams=${option.q}` + }) + return + } + if(option.q) { let originLink = decodeURIComponent(option.q) let target = this.obtainUrlPathParameterTarget(originLink) - console.log('target',target) + if(target.siteId) { + this.siteId = target.siteId + this.getSiteInfo(target.siteId) + } return } @@ -204,6 +212,7 @@ }else{ var oilItem = JSON.parse(decodeURIComponent(option.item)) } + uni.setStorageSync('oilItem',oilItem) this.getSiteInfo(oilItem.siteId) this.siteId = oilItem.siteId @@ -239,12 +248,11 @@ console.log('开始播放'); }); this.innerAudioContext.onError((res) => { - console.log(res.errMsg); - console.log(res.errCode); + console.log(res); }); }, backTohome(){ - this.innerAudioContext.stop() + this.audioUrl && this.innerAudioContext.stop() uni.switchTab({ url:'../../../pages/tabbar/home/home' }) @@ -253,7 +261,7 @@ this.showtitle =false }, gotoPay(){ - this.innerAudioContext.stop() + this.audioUrl && this.innerAudioContext.stop() uni.navigateTo({ url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}` }) @@ -263,32 +271,28 @@ this.secondChannelCode = sec }, siteQrPay() { - this.innerAudioContext.stop() - // let siteId = + this.audioUrl && this.innerAudioContext.stop() uni.navigateTo({ url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}` }) }, getSiteInfo(id) { - console.log('进入获取油站信息') let data2 = { ...uni.getStorageSync('location'), siteId: id, clientBelong: "ZHONGPIN" } - oilSiteApi.getSiteDetails(data2).then(res => { - console.log('进入获取油站信息getSiteDetails',res) + oilSiteApi.getSiteDetails(data2).then(res => { if (res.code == 20000) { this.siteInfo = res.data } }) }, makePay() { - console.log(this.siteInfo.juli) if(this.siteInfo.juli > 1000 ){ this.showtitle = true }else{ - this.innerAudioContext.stop() + this.audioUrl && this.innerAudioContext.stop() uni.navigateTo({ url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}` }) @@ -316,10 +320,11 @@ }, goBack() { - this.innerAudioContext.stop() - uni.navigateBack({ + // this.innerAudioContext.stop() - }) + uni.switchTab({ + url: '/pages/tabbar/home/home' + }); }, selectRadio() { this.radio === 'A' ? this.radio = '' : this.radio = 'A' diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue index ec1b788..72fc993 100644 --- a/pages/tabbar/home/home.vue +++ b/pages/tabbar/home/home.vue @@ -489,25 +489,26 @@ }, getSiteList() { - let data1 = { + let params = { currentPage: 1, pageSize: 10, params: { //类型:Object 必有字段 备注:// 筛选对象 - clientBelong:'ZHONGPIN', - sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序 // longitude: 117.157817, // 必有字段 备注:// 当前位置经度 // latitude: 31.802472, // 必有字段 备注:// 当前位置维度 - ...uni.getStorageSync('location'), - ...this.filterData, // siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 ) // channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌)) // oilProductCode: "0#" // 备注:// 油号选择 ( 0# 92# 92#) - comprehensiveSort:1 + clientBelong:'ZHONGPIN', + comprehensiveSort:1, + zpDisable:'ENABLE', + sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序 + ...uni.getStorageSync('location'), + ...this.filterData, } } if (!uni.getStorageSync('user')) { - oilSiteApi.readOnlySites(data1).then(res => { + oilSiteApi.readOnlySites(params).then(res => { this.getCount++ if (res.code == 20000) { // console.log(res.data.list) @@ -542,10 +543,8 @@ } }) } else { - console.log(data1,'dayindata111111111111') - oilSiteApi.getSiteLists(data1).then(res => { + oilSiteApi.getSiteLists(params).then(res => { if (res.code == 20000) { - // console.log(res.data.list) this.siteList = res.data.list } }) @@ -553,6 +552,8 @@ }, toDetail(item) { let itemS = encodeURIComponent(JSON.stringify(item)) + // console.log(uni.getStorageSync('user')) + // return if (uni.getStorageSync('user')) { uni.navigateTo({ url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`, From df5a31f55aebb2cdbce8ca4b48a79481ffad61be Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Tue, 21 Mar 2023 14:20:50 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BagStation/pages/stationDetail/stationDetail.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue index 378ea55..8238682 100644 --- a/BagStation/pages/stationDetail/stationDetail.vue +++ b/BagStation/pages/stationDetail/stationDetail.vue @@ -180,14 +180,15 @@ } }, onHide() { - this.audioUrl && this.innerAudioContext.stop() + this.innerAudioContext && this.innerAudioContext.stop() }, onUnload() { - this.audioUrl && this.innerAudioContext.stop() + this.innerAudioContext && this.innerAudioContext.stop() }, onLoad(option) { + console.log(6667) let userInfo = uni.getStorageSync('user') if(!userInfo && option.q) { uni.redirectTo({ @@ -199,6 +200,7 @@ if(option.q) { let originLink = decodeURIComponent(option.q) let target = this.obtainUrlPathParameterTarget(originLink) + console.log('target',target) if(target.siteId) { this.siteId = target.siteId this.getSiteInfo(target.siteId) @@ -252,7 +254,7 @@ }); }, backTohome(){ - this.audioUrl && this.innerAudioContext.stop() + innerAudioContext && this.innerAudioContext.stop() uni.switchTab({ url:'../../../pages/tabbar/home/home' }) @@ -261,7 +263,7 @@ this.showtitle =false }, gotoPay(){ - this.audioUrl && this.innerAudioContext.stop() + innerAudioContext && this.innerAudioContext.stop() uni.navigateTo({ url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}` }) @@ -271,7 +273,7 @@ this.secondChannelCode = sec }, siteQrPay() { - this.audioUrl && this.innerAudioContext.stop() + innerAudioContext && this.innerAudioContext.stop() uni.navigateTo({ url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}` }) @@ -292,7 +294,7 @@ if(this.siteInfo.juli > 1000 ){ this.showtitle = true }else{ - this.audioUrl && this.innerAudioContext.stop() + innerAudioContext && this.innerAudioContext.stop() uni.navigateTo({ url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}` }) From c943ba57c0b9c442d39f21f6ea2f43b182fbdee8 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Tue, 21 Mar 2023 15:23:36 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BagAuth/pages/login/login.vue | 2 +- BagAuth/pages/login/oldLogin.vue | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/BagAuth/pages/login/login.vue b/BagAuth/pages/login/login.vue index aa39ac4..150fca8 100644 --- a/BagAuth/pages/login/login.vue +++ b/BagAuth/pages/login/login.vue @@ -225,7 +225,7 @@ }, refuseEmpower() { uni.navigateTo({ - url: '/BagAuth/pages/login/oldLogin' + url: `/BagAuth/pages/login/oldLogin?scanningParams=${this.scanningParams}` }) }, diff --git a/BagAuth/pages/login/oldLogin.vue b/BagAuth/pages/login/oldLogin.vue index b098323..4ba57bc 100644 --- a/BagAuth/pages/login/oldLogin.vue +++ b/BagAuth/pages/login/oldLogin.vue @@ -171,7 +171,14 @@ count: 0, loginRes: {}, checked: false, - next: false + next: false, + scanningParams:null + } + }, + onLoad(option) { + if(options.scanningParams) { + // 用于扫码进入油站详情页面 + this.scanningParams = options.scanningParams } }, onShow() {}, @@ -402,6 +409,12 @@ icon: 'none' }) }, 1000); + if(this.scanningParams) { + uni.redirectTo({ + url: `/BagStation/pages/stationDetail/stationDetail?q=${this.scanningParams}` + }) + return + } // 这里有问题 uni.switchTab({ url: '/pages/tabbar/home/home' From 83d7ade43b2f2c19c184640b5501c69e3f850792 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Tue, 21 Mar 2023 15:24:01 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BagAuth/pages/login/login.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BagAuth/pages/login/login.vue b/BagAuth/pages/login/login.vue index 150fca8..a6694c1 100644 --- a/BagAuth/pages/login/login.vue +++ b/BagAuth/pages/login/login.vue @@ -280,13 +280,13 @@ } }) }, 1000); - // 这里有问题 if(this.scanningParams) { uni.redirectTo({ url: `/BagStation/pages/stationDetail/stationDetail?q=${this.scanningParams}` }) return } + // 这里有问题 uni.switchTab({ url: '/pages/tabbar/home/home' }) From cf9907998dad2984fbb2637b6ae10d5961bd1973 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Tue, 21 Mar 2023 15:31:35 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BagAuth/pages/login/oldLogin.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BagAuth/pages/login/oldLogin.vue b/BagAuth/pages/login/oldLogin.vue index 4ba57bc..60a59c5 100644 --- a/BagAuth/pages/login/oldLogin.vue +++ b/BagAuth/pages/login/oldLogin.vue @@ -175,7 +175,7 @@ scanningParams:null } }, - onLoad(option) { + onLoad(options) { if(options.scanningParams) { // 用于扫码进入油站详情页面 this.scanningParams = options.scanningParams From 5876735edcf800d1913dd18804ce6f21ddc160a0 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Wed, 22 Mar 2023 12:01:28 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 46 +++++++++++++++++-- .../pages/stationDetail/stationDetail.vue | 18 ++++---- utils/request.js | 2 +- 3 files changed, 51 insertions(+), 15 deletions(-) diff --git a/App.vue b/App.vue index aabebca..32a1711 100644 --- a/App.vue +++ b/App.vue @@ -132,10 +132,26 @@ if (view.route != 'pages/index/startPage/startPage' && view.route.indexOf('BagAuth') == -1) { const token = uni.getStorageSync('Authorization') const openid = uni.getStorageSync('openid') + + let jumpUrl = '/BagAuth/pages/login/login' + let urlTarget = this.obtainUrlPathParameterTarget(view.$page.fullPath) + console.log('urlTarget',urlTarget) + let target = {} + if(urlTarget.q) { + let originLink = decodeURIComponent(decodeURIComponent(urlTarget.q)) + target = this.obtainUrlPathParameterTarget(originLink) + target.siteId && (jumpUrl += `?scanningParams=${decodeURIComponent(urlTarget.q)}`) + } + // console.log('jumpUrl',jumpUrl) if (token && openid) { - if(!white.includes(view.route)){ - this.getAmount() - } + // if(!white.includes(view.route) ){ + // this.getAmount() + // } + + // if(target.siteId || !white.includes(view.route) ){ + // this.getAmount() + // } + onlineTimer = setTimeout(() => { if (this.loginStatus == 'offline') { uni.clearStorageSync() @@ -146,7 +162,7 @@ success: function(res) { if (res.confirm) { uni.redirectTo({ - url: '/BagAuth/pages/login/login' + url: jumpUrl }) } }, @@ -162,6 +178,9 @@ }, 500) } else { + target.siteId && uni.redirectTo({ + url: jumpUrl + }) // loginTimer = setTimeout(() => { // uni.showModal({ // title: '请您登录', @@ -183,10 +202,26 @@ // } }) }, + + obtainUrlPathParameterTarget(url) { + let target = {} + if(url.includes('?')) { + let paramsText = url.split("?")[1] + let paramsArr = paramsText.split("&") + paramsArr.forEach(item => { + target[item.split('=')[0]] = item.split('=')[1] + }) + } + console.log('11target',target) + return target + }, + // 是否token过期或ip更改 - getAmount() { + getAmount() { clearTimeout(loginTimer) accountApi.getTotalOilCardInfo().then(res => { + console.log('res.code',res.code) + console.log(555) if (res.code == 20000) { this.loginStatus = 'online' } else if (res.code == 42011) { @@ -202,6 +237,7 @@ }, onShow: function() { + console.log(12388) uni.getLocation({ type: 'wgs84', success: function(res) { diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue index 8238682..7aa57b8 100644 --- a/BagStation/pages/stationDetail/stationDetail.vue +++ b/BagStation/pages/stationDetail/stationDetail.vue @@ -188,20 +188,20 @@ onLoad(option) { - console.log(6667) - let userInfo = uni.getStorageSync('user') - if(!userInfo && option.q) { - uni.redirectTo({ - url: `/BagAuth/pages/login/login?scanningParams=${option.q}` - }) - return - } + // console.log('option',option) + // let userInfo = uni.getStorageSync('user') + // if(!userInfo && option.q) { + // uni.redirectTo({ + // url: `/BagAuth/pages/login/login?scanningParams=${option.q}` + // }) + // return + // } if(option.q) { let originLink = decodeURIComponent(option.q) let target = this.obtainUrlPathParameterTarget(originLink) console.log('target',target) - if(target.siteId) { + if(userInfo && target.siteId) { this.siteId = target.siteId this.getSiteInfo(target.siteId) } diff --git a/utils/request.js b/utils/request.js index 0df125e..e858b0a 100644 --- a/utils/request.js +++ b/utils/request.js @@ -3,7 +3,7 @@ import utils from '@/utils/encode' // const env = process.env.NODE_ENV // const env = 'production'/* */ -const env = 'test' +const env = 'product' const testUrl = 'http://192.168.110.230:38080' // const productUrl = 'http://121.196.213.68/adminapi' //预生产 From cb276d7befc2645bc22fe4231ee133f1c8a40445 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Wed, 22 Mar 2023 17:25:40 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 1 + BagStation/orderDetail/orderDetail.vue | 4 +++- BagStation/pages/stationDetail/stationDetail.vue | 10 +++++----- components/three-sites.vue | 1 + pages/tabbar/station/stationList.vue | 10 ++++------ utils/request.js | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/App.vue b/App.vue index 32a1711..1393cf9 100644 --- a/App.vue +++ b/App.vue @@ -144,6 +144,7 @@ } // console.log('jumpUrl',jumpUrl) if (token && openid) { + this.getAmount() // if(!white.includes(view.route) ){ // this.getAmount() // } diff --git a/BagStation/orderDetail/orderDetail.vue b/BagStation/orderDetail/orderDetail.vue index a34a303..0e1b371 100644 --- a/BagStation/orderDetail/orderDetail.vue +++ b/BagStation/orderDetail/orderDetail.vue @@ -43,7 +43,7 @@ - + 油站: {{order.siteName?order.siteName:''}} @@ -312,6 +312,7 @@ }) }, toDetail(item) { + if(item.zpDisable === 'DISABLE') return var itemS = JSON.stringify(item) uni.setStorageSync('siteInfo',itemS) uni.navigateTo({ @@ -325,6 +326,7 @@ }) }, cancelOrder() { + orderApi.cancelOrder(this.id).then(res => { if (res.code == 20000) { uni.showToast({ diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue index 7aa57b8..8231a16 100644 --- a/BagStation/pages/stationDetail/stationDetail.vue +++ b/BagStation/pages/stationDetail/stationDetail.vue @@ -201,7 +201,7 @@ let originLink = decodeURIComponent(option.q) let target = this.obtainUrlPathParameterTarget(originLink) console.log('target',target) - if(userInfo && target.siteId) { + if(target.siteId) { this.siteId = target.siteId this.getSiteInfo(target.siteId) } @@ -254,7 +254,7 @@ }); }, backTohome(){ - innerAudioContext && this.innerAudioContext.stop() + this.innerAudioContext && this.innerAudioContext.stop() uni.switchTab({ url:'../../../pages/tabbar/home/home' }) @@ -263,7 +263,7 @@ this.showtitle =false }, gotoPay(){ - innerAudioContext && this.innerAudioContext.stop() + this.innerAudioContext && this.innerAudioContext.stop() uni.navigateTo({ url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}` }) @@ -273,7 +273,7 @@ this.secondChannelCode = sec }, siteQrPay() { - innerAudioContext && this.innerAudioContext.stop() + this.innerAudioContext && this.innerAudioContext.stop() uni.navigateTo({ url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}` }) @@ -294,7 +294,7 @@ if(this.siteInfo.juli > 1000 ){ this.showtitle = true }else{ - innerAudioContext && this.innerAudioContext.stop() + this.innerAudioContext && this.innerAudioContext.stop() uni.navigateTo({ url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}` }) diff --git a/components/three-sites.vue b/components/three-sites.vue index f5e9fbf..56eda33 100644 --- a/components/three-sites.vue +++ b/components/three-sites.vue @@ -78,6 +78,7 @@ ...uni.getStorageSync('location'), ...this.filterData, comprehensiveSort:1, + zpDisable:'ENABLE', // siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 ) // channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌)) // oilProductCode: "" // 备注:// 油号选择 ( 0# 92# 92#) diff --git a/pages/tabbar/station/stationList.vue b/pages/tabbar/station/stationList.vue index 650649b..e92ac3c 100644 --- a/pages/tabbar/station/stationList.vue +++ b/pages/tabbar/station/stationList.vue @@ -384,16 +384,14 @@ siteName: this.siteName, ...uni.getStorageSync('location'), // ...this.filterData - siteBrand: this.siteName ? '' : this.filterData - .siteBrand, // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 ) - channelCode: this.siteName ? '' : this.filterData - .channelCode, // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌)) - oilProductCode: this.siteName ? '' : this.filterData - .oilProductCode, // 备注:// 油号选择 ( 0# 92# 92#) + siteBrand: this.siteName ? '' : this.filterData.siteBrand, // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 ) + channelCode: this.siteName ? '' : this.filterData.channelCode, // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌)) + oilProductCode: this.siteName ? '' : this.filterData.oilProductCode, // 备注:// 油号选择 ( 0# 92# 92#) provinceCode: this.filterData.provinceCode, cityCode: this.filterData.cityCode, areaCode: this.filterData.areaCode, distance: this.filterData.distance, + zpDisable:'ENABLE', comprehensiveSort: this.filterData.comprehensiveSort ? this.filterData.comprehensiveSort : 1 } diff --git a/utils/request.js b/utils/request.js index e858b0a..3aa35eb 100644 --- a/utils/request.js +++ b/utils/request.js @@ -3,7 +3,7 @@ import utils from '@/utils/encode' // const env = process.env.NODE_ENV // const env = 'production'/* */ -const env = 'product' +const env = 'production' const testUrl = 'http://192.168.110.230:38080' // const productUrl = 'http://121.196.213.68/adminapi' //预生产 From 4fb1d03356f3b4646f53a53eb7316a6c2b8114d4 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Wed, 22 Mar 2023 19:23:00 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/site-item/site-item.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/site-item/site-item.vue b/components/site-item/site-item.vue index e061c24..20a61f8 100644 --- a/components/site-item/site-item.vue +++ b/components/site-item/site-item.vue @@ -1,5 +1,5 @@