mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-24 19:32:53 +08:00
save
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: PangXingYue
|
||||
* @Date: 2021-03-23 13:34:15
|
||||
* @LastEditTime: 2023-03-01 17:12:18
|
||||
* @LastEditTime: 2023-03-01 17:17:02
|
||||
* @LastEditors: jiawei jia.wei@ebiz-digits.com
|
||||
* @Description:
|
||||
* @FilePath: \ebiz-h5\src\config\index.js
|
||||
@@ -27,27 +27,28 @@ function getSearchString (key) {
|
||||
}
|
||||
return obj[key]
|
||||
}
|
||||
let apiVersion = 'v2'
|
||||
// let apiVersion = 'v2'
|
||||
let apiVersion = 'v1'
|
||||
var ua = window.navigator.userAgent.toLowerCase()
|
||||
//通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信
|
||||
if (localStorage.getItem('apiVersion')) {
|
||||
apiVersion = localStorage.getItem('apiVersion')
|
||||
} else {
|
||||
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
||||
//report/reportList数据报表页面在浏览器可以打开了,但在微信或企业微信中打开不了,接口请求不需要token
|
||||
if (window.location.href.indexOf('apiVersion') > 0) {
|
||||
apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时,为v2
|
||||
} else {
|
||||
apiVersion = 'v3'
|
||||
}
|
||||
} else {
|
||||
// 在app
|
||||
if (navigator.userAgent.indexOf('JZG_') > 0) {
|
||||
apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2'
|
||||
}
|
||||
}
|
||||
window.localStorage.setItem('apiVersion', apiVersion)
|
||||
}
|
||||
// if (localStorage.getItem('apiVersion')) {
|
||||
// apiVersion = localStorage.getItem('apiVersion')
|
||||
// } else {
|
||||
// if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
||||
// //report/reportList数据报表页面在浏览器可以打开了,但在微信或企业微信中打开不了,接口请求不需要token
|
||||
// if (window.location.href.indexOf('apiVersion') > 0) {
|
||||
// apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时,为v2
|
||||
// } else {
|
||||
// apiVersion = 'v3'
|
||||
// }
|
||||
// } else {
|
||||
// // 在app
|
||||
// if (navigator.userAgent.indexOf('JZG_') > 0) {
|
||||
// apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2'
|
||||
// }
|
||||
// }
|
||||
// window.localStorage.setItem('apiVersion', apiVersion)
|
||||
// }
|
||||
// 可以多个接口域名,按需添加
|
||||
console.log('环境:', process.env.VUE_APP_FLAG)
|
||||
switch (process.env.VUE_APP_FLAG) {
|
||||
|
||||
@@ -650,7 +650,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
// this.$store.commit('updateAnswerType', false )
|
||||
this.$store.commit('updateAnswerType', false )
|
||||
let res = await getOrderDetail({ orderNo: localStorage.orderNo })
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
@@ -677,8 +677,8 @@ export default {
|
||||
// on close
|
||||
})
|
||||
}
|
||||
let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
this.$store.commit('updateAnswerType', updateAnswerType )
|
||||
let updateAnswerType = res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint =='1'?true:false
|
||||
this.$store.commit('updateAnswerType', updateAnswerType )
|
||||
this.appntDTO = res.orderDTO.appntDTO
|
||||
this.orderInfoDTO = res.orderDTO.orderInfoDTO
|
||||
//如果是从编辑进来的
|
||||
|
||||
Reference in New Issue
Block a user