部署bug修复
This commit is contained in:
parent
31b55c8150
commit
b63d996716
|
|
@ -240,7 +240,10 @@ const resetPhone = async () => {
|
|||
}
|
||||
|
||||
onMounted(() => {
|
||||
getUserListData()
|
||||
// 有token才请求用户信息
|
||||
if (store.token) {
|
||||
getUserListData()
|
||||
}
|
||||
circleUrl.value = store.userInfo.avatar
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ service.interceptors.request.use(
|
|||
if (config.data) {
|
||||
let data = typeof config.data === 'object' ? JSON.stringify(config.data) : config.data
|
||||
config.data = encryptWithSM4(data + '|' + hashWithSM3AndSalt(data))
|
||||
// config.data = data
|
||||
}
|
||||
return config
|
||||
},
|
||||
|
|
@ -67,6 +68,8 @@ service.interceptors.response.use(
|
|||
return data
|
||||
} else if (data.code == '403') {
|
||||
ElMessage.error('请重新登录')
|
||||
// 清除token
|
||||
localStorage.removeItem('tokenNew')
|
||||
// 根据环境变量 VITE_API_URL 判断是否是本地开发环境
|
||||
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||
router.push('/login')
|
||||
|
|
@ -79,6 +82,7 @@ service.interceptors.response.use(
|
|||
}
|
||||
} else if (data.code == '401') {
|
||||
ElMessage.error('请重新登录')
|
||||
localStorage.removeItem('tokenNew')
|
||||
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||
router.push('/login')
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -139,7 +139,9 @@ const getHotSearchListData = async () => {
|
|||
console.log(res, '热词')
|
||||
}
|
||||
|
||||
getHotSearchListData()
|
||||
if (tokenNew) {
|
||||
getHotSearchListData()
|
||||
}
|
||||
|
||||
// 搜索按钮
|
||||
const searchKeywordBtn = () => {
|
||||
|
|
|
|||
|
|
@ -722,8 +722,13 @@ const handleViewWord = async (index: any) => {
|
|||
|
||||
console.log('查询参数', queryParams)
|
||||
const res: any = await getBookCarAgreementApi(queryParams)
|
||||
|
||||
wordUrl.value = res.data.url
|
||||
|
||||
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||
wordUrl.value = res.data.url
|
||||
} else {
|
||||
wordUrl.value = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + res.data.url
|
||||
}
|
||||
console.log('🚀 ~ handleViewWord ~ wordUrl.value:', wordUrl.value)
|
||||
dialogFormVisibleSettleWord.value = true
|
||||
|
||||
settleWordTitle.value = '租赁服务合同'
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ const { getCompanyList, getGoodsClassList } = userClass()
|
|||
const router: any = useRouter()
|
||||
const userStore = useStore()
|
||||
const store: any = mainStore()
|
||||
const tokenNew = localStorage.getItem('tokenNew')
|
||||
|
||||
// const leftNavList: any = ref([])
|
||||
const companyList: any = ref([])
|
||||
|
|
@ -57,6 +58,7 @@ const getCompanyListData = async () => {
|
|||
// console.log('res公司名称', res)
|
||||
}
|
||||
|
||||
// console.log('🚀 ~ tokenNew:', tokenNew)
|
||||
getCompanyListData()
|
||||
|
||||
// 点击跳转装备共享大厅
|
||||
|
|
@ -166,7 +168,7 @@ const onClickSwiper = (item: any) => {
|
|||
getSwiperListData()
|
||||
|
||||
onMounted(async () => {
|
||||
if (!store.token) {
|
||||
if (!tokenNew) {
|
||||
const origin = window.location.href
|
||||
|
||||
console.log(origin.split('ticket=')[1], 'origin')
|
||||
|
|
|
|||
|
|
@ -554,8 +554,12 @@ const handleViewWord = async (index: any) => {
|
|||
|
||||
console.log('查询参数', queryParams)
|
||||
const res: any = await getBookCarAgreementApi(queryParams)
|
||||
|
||||
wordUrl.value = res.data.url
|
||||
|
||||
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||
wordUrl.value = res.data.url
|
||||
} else {
|
||||
wordUrl.value = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + res.data.url
|
||||
}
|
||||
dialogFormVisibleSettleWord.value = true
|
||||
|
||||
settleWordTitle.value = '租赁服务合同'
|
||||
|
|
|
|||
|
|
@ -539,12 +539,12 @@ const onFileChange = (fileList: any) => {
|
|||
testUrl = e.url // 公司-测试环境
|
||||
} else {
|
||||
console.log('走入宏源测试环境----------', )
|
||||
testUrl = origin + '/ahbns/' + e.url // 宏源-测试环境
|
||||
testUrl = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + e.url // 宏源-测试环境
|
||||
console.log('输出testUrl----------', testUrl)
|
||||
}
|
||||
return {
|
||||
fileName: e.name,
|
||||
fileUrl: isProd ? 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + e.url : testUrl,
|
||||
fileUrl: testUrl,
|
||||
}
|
||||
})
|
||||
console.log('22222222查看file路径', fileListTemp)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,9 @@ const statusList: any = [
|
|||
]
|
||||
|
||||
const orderText = (status: any) => {
|
||||
return statusList.filter((e: any) => e.id == status)[0].name
|
||||
// return statusList.filter((e: any) => e.id == status)[0].name
|
||||
const statusItem = statusList.find((e: any) => e.id == status)
|
||||
return statusItem ? statusItem.name : ''
|
||||
}
|
||||
const orderType = (status: any) => {
|
||||
if (status == 1 || status == 2 || status == 3 || status == 5) return 'primary'
|
||||
|
|
@ -347,7 +349,12 @@ const handleViewWord = async (index: Number, row: any) => {
|
|||
const res: any = await getContractDetailApi({ orderId })
|
||||
// cardList.value = res.rows
|
||||
// 打开租赁协议弹框
|
||||
wordUrl.value = res.data.url
|
||||
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||
wordUrl.value = res.data.url
|
||||
} else {
|
||||
wordUrl.value = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + res.data.url
|
||||
}
|
||||
console.log('🚀 ~ handleViewWord ~ wordUrl.value:', wordUrl.value)
|
||||
dialogFormVisibleSettleWord.value = true
|
||||
dialogFormVisibleSettleWord.value = true
|
||||
setTimeout(() => {
|
||||
|
|
@ -367,7 +374,13 @@ const handleViewWord = async (index: Number, row: any) => {
|
|||
|
||||
// 下载合同为 Word 文件
|
||||
const downloadContract = () => {
|
||||
window.location.href = wordUrl.value
|
||||
console.log('🚀 ~ downloadContract ~ wordUrl.value:', wordUrl.value)
|
||||
window.open(wordUrl.value)
|
||||
// if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||
// window.open(wordUrl.value)
|
||||
// } else {
|
||||
// window.open('http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + wordUrl.value)
|
||||
// }
|
||||
}
|
||||
|
||||
const confirmFail = async (index: number) => {
|
||||
|
|
|
|||
|
|
@ -669,7 +669,11 @@ const handleViewWord = async (index: Number, row: any) => {
|
|||
const res: any = await getContractDetailApi({ orderId })
|
||||
// cardList.value = res.rows
|
||||
// 打开租赁协议弹框
|
||||
wordUrl.value = res.data.url
|
||||
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||
wordUrl.value = res.data.url
|
||||
} else {
|
||||
wordUrl.value = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + res.data.url
|
||||
}
|
||||
dialogFormVisibleSettleWord.value = true
|
||||
setTimeout(() => {
|
||||
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
|
||||
|
|
@ -694,7 +698,8 @@ const contract = ref({
|
|||
|
||||
// 下载合同为 Word 文件
|
||||
const downloadContract = () => {
|
||||
window.location.href = wordUrl.value
|
||||
console.log('🚀 ~ downloadContract ~ wordUrl.value:', wordUrl.value)
|
||||
window.open(wordUrl.value)
|
||||
}
|
||||
|
||||
const wordUrl = ref('')
|
||||
|
|
|
|||
Loading…
Reference in New Issue