fix; bug

This commit is contained in:
杨航
2025-09-22 13:51:22 +08:00
parent aa7d58ebed
commit 1a94e26b77
4 changed files with 19 additions and 12 deletions
+3 -2
View File
@@ -11,14 +11,15 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# app入口
#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
# VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
# VITE_APP_BASE_API_Url = 'http://25.16.122.92:9786'
# VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
# h5专用地址x2
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.21:9786'
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
+6 -2
View File
@@ -14,12 +14,14 @@
<script setup>
import {
ref,
unref,
onMounted,
computed,
watch
} from 'vue'
import {
getToken
getToken,
getUserInfo
} from "@/common/common.js"
import {
downloadFile
@@ -49,6 +51,8 @@
showView.value = false
}
})
const userInfo = ref(getUserInfo());
const userParams = '/' + (unref(userInfo)?.userName??'') + ' ' + (unref(userInfo)?.loginName??'');
const base_url = get_base_url('/traask/traFilePreview/')
const showUrl = ref('')
const viewerUrl = ref('/static/pdf-view/web/viewer.html')
@@ -57,7 +61,7 @@
const token = getToken();
const header = {};
let _id = data?.fileId || props.fileId
let fileUrl = base_url + '/traask/traFilePreview/' + _id
let fileUrl = base_url + '/traask/traFilePreview/' + _id + userParams
if (token)
header['summary'] = token
uni.downloadFile({
+2 -1
View File
@@ -172,6 +172,7 @@
const feedbackRef = ref();
const userInfo = ref(getUserInfo());
const userParams = '/' + (unref(userInfo)?.userName??'') + ' ' + (unref(userInfo)?.loginName??'');
const questionList = ref([
// '对公小程序开户流程?',
// '厅堂服务经理2025年管理办法?',
@@ -479,7 +480,7 @@
common.navigateTo('/pages/index/preview?fileId=' + info.docId);
} else {
const base_url = get_base_url('/traask/traFilePreview/');
let fileUrl = base_url + '/traask/traFilePreview/' + info.docId;
let fileUrl = base_url + '/traask/traFilePreview/' + info.docId + userParams;
const localFilePath = '_doc/pdf_view/' + info.docName + '.pdf';
downloadAndSaveAvatar(fileUrl, localFilePath).then((res) => {
uni.openDocument({
+8 -7
View File
@@ -17,9 +17,8 @@
</template>
<script>
import { getToken } from '@/common/common.js'
import common from '@/common/common'
import {getPhoneEnvBool} from '@/common/common'
import { getToken, getPhoneEnvBool, getUserInfo } from '@/common/common'
import { downloadFile } from '@/api/common.js'
import { get_base_url } from '@/api/request.js'
var wv
@@ -31,22 +30,24 @@ export default {
// viewerUrl: '/static/pdf-view/web/viewer.html',
viewerUrl: '/static/view-pdf/pdf.html',
showView: false,
wv: null
wv: null,
userParams: ''
}
},
onLoad(params) {
this.fileId = params.fileId || ''
const userInfo = getUserInfo();
this.userParams = '/' + (userInfo?.userName??'') + ' ' + (userInfo?.loginName??'');
},
onShow() {
console.log(getPhoneEnvBool('AND'),111)
if (getPhoneEnvBool('AND')) {
this.openPdfFn({
fileId: this.fileId
})
}else{
const base_url = get_base_url('/traask/traFilePreview/');
let fileUrl = base_url + '/traask/traFilePreview/' + this.fileId;
this.showUrl = 'https://aitstest.jlbank.com.cn:7002/traask/traFilePreview/d0c9e8cf-c862-44e7-bfa8-514a54d4baf2'//fileUrl
let fileUrl = base_url + '/traask/traFilePreview/' + this.fileId + this.userParams;
this.showUrl = fileUrl
console.log(this.showUrl,111)
}
},
@@ -78,7 +79,7 @@ export default {
openPdfFn(data) {
const base_url = get_base_url('/traask/traFilePreview/')
let _id = data?.fileId
let fileUrl = base_url + '/traask/traFilePreview/' + _id
let fileUrl = base_url + '/traask/traFilePreview/' + _id + this.userParams
this.showUrl = this.viewerUrl + '?url=' + fileUrl
console.log(this.showUrl)
this.showView = true