diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue
index fd81fb1..36afe05 100644
--- a/BagStation/pages/stationDetail/stationDetail.vue
+++ b/BagStation/pages/stationDetail/stationDetail.vue
@@ -101,20 +101,15 @@
-
+
-
+ -->
-
@@ -275,12 +265,20 @@
let user = uni.getStorageSync('user');
let data2 = {
...uni.getStorageSync('location'),
- siteId: id
+ siteId: id,
+ clientBelong: "BAICHUAN"
}
if (user) {
oilSiteApi.getSiteDetails(data2).then(res => {
if (res.code == 20000) {
this.siteInfo = res.data
+ }else {
+ setTimeout(()=>{
+ uni.showToast({
+ title:res.msg,
+ icon:'none'
+ })
+ },1000)
}
})
} else {
@@ -290,36 +288,28 @@
},
makePay() {
let user = uni.getStorageSync('user');
- if (this.activePay && user) {
- if (this.siteInfo.juli > 1000) {
- this.showtitle = true
- } else {
- this.innerAudioContext && this.innerAudioContext.stop()
- uni.navigateTo({
- url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
- })
- }
- } else {
- if(!user){
- uni.showModal({
- title: '请您登录',
- content: "登录佰川加油才可以加油 |˛˙꒳˙)♡",
- confirmText: '去登陆',
- success: (res) => {
- if (res.confirm) {
- uni.reLaunch({
- url: '../../../BagAuth/pages/login/login?loginType=true'
- })
- }
+ if(!user){
+ uni.showModal({
+ title: '请您登录',
+ content: "登录佰川加油才可以加油 |˛˙꒳˙)♡",
+ confirmText: '去登陆',
+ success: (res) => {
+ if (res.confirm) {
+ uni.reLaunch({
+ url: '../../../BagAuth/pages/login/login?loginType=true'
+ })
}
- })
- }else{
- uni.showToast({
- title:'暂无可选油品',
- icon:'none'
- })
- }
-
+ }
+ })
+ return
+ }
+ if (this.siteInfo.juli > 1000) {
+ this.showtitle = true
+ } else {
+ this.innerAudioContext && this.innerAudioContext.stop()
+ uni.navigateTo({
+ url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
+ })
}
},
@@ -327,6 +317,7 @@
this.qrcodePay = val
},
onChangePay(val, active) {
+ console.log(val)
this.activePay = val
this.activeCur = active
},
diff --git a/utils/request.js b/utils/request.js
index 86de926..21a1888 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -37,25 +37,17 @@ service.interceptors.request.use(
config.headers['dataSources'] = 'MP'
if (env === 'production') {
- // 生产环境,加密,不输出任何东西
- // 设置jsessionid和token
const JSESSIONID = utils.uuid()
config.headers['JSESSIONID'] = JSESSIONID
config.headers['token'] = utils.md5Salt(JSESSIONID)
- // if ( encryptWhite.indexOf(config.url) < 0) {
- // if (!notEncrypt && encryptWhite.indexOf(config.url) < 0) {
- // 这是定义在哪的
+
const data = { // 用于存储加密
params: '' // 加密后的密文
}
// 要加密
data.params = utils.encrypt(JSON.stringify(config.data))
- // console.log('参数', config.url, '参数加密前',config.data)
config.data = data
- // }
} else {
- console.log('\n\n-----------------------')
- console.log('参数', config.url, '参数加密前', config.data)
url = config.url
}
@@ -78,15 +70,10 @@ service.interceptors.response.use(
if (env === 'production') {
// 生产环境,进行加密解密,不输出日志
if (res.encrypt == 1) {
- // 加密的数据,需要解密
const dataParam = JSON.parse(utils.decrypt(res.data))
res.data = JSON.stringify(dataParam) === '{}' ? null : dataParam
- // console.log('返回', response.config.url, '返回结果',res)
}
- } else {
- console.log('返回', response.config.url, '返回结果未加密', res)
- console.log('-------------------------------------------\n\n')
- }
+ }
uni.hideLoading()
if(response.config.url.indexOf('/oil-site/oilSiteOrderInfo/getOrderQrCode') === -1){
@@ -95,9 +82,7 @@ service.interceptors.response.use(
title: res.msg,
icon: "none"
})
-
}
-
}
return res
},