flat: bug修复2
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export default {
|
||||
baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网
|
||||
// baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
||||
// baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网
|
||||
baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
||||
// baseUrl: 'http://192.168.3.29:8081',
|
||||
// baseUrl: 'http://10.213.6.207:19010/api',
|
||||
// 语音转文字
|
||||
|
||||
@@ -9,7 +9,11 @@
|
||||
</view>
|
||||
<canvas canvas-id="qrcode" id="qrcode" />
|
||||
</view>
|
||||
<view class="tips" v-if="!loading"> 已上传 <span class="num">{{fileCount}}</span> 个文件 </view>
|
||||
<view class="tips" v-if="!loading">
|
||||
已上传
|
||||
<span class="num">{{ fileCount }}</span>
|
||||
个文件
|
||||
</view>
|
||||
<view class="tips" v-if="!loading">请使用手机扫描二维码上传文件</view>
|
||||
<view class="close-btn" @click="close"></view>
|
||||
</view>
|
||||
@@ -46,14 +50,13 @@ const loadingText = computed(() => ({
|
||||
contentrefresh: '二维码生成中',
|
||||
}));
|
||||
|
||||
|
||||
onUnmounted(() => {
|
||||
stopPolling();
|
||||
clearResources();
|
||||
});
|
||||
|
||||
function open() {
|
||||
uuid.value = UUID.generate()
|
||||
uuid.value = UUID.generate();
|
||||
resetState();
|
||||
isVisible.value = true;
|
||||
popup.value.open();
|
||||
@@ -104,9 +107,15 @@ async function initQrCode() {
|
||||
}
|
||||
|
||||
function makeQrcode() {
|
||||
const htmlPath = `${window.location.host}/static/upload.html?sessionId=${uuid.value}&uploadApi=${
|
||||
config.baseUrl + '/app/kiosk/upload'
|
||||
}`;
|
||||
const protocol = window.location.protocol;
|
||||
const host = window.location.host;
|
||||
const isLocal = host.includes('localhost') || host.includes('127.0.0.1');
|
||||
const pathPrefix = isLocal ? '' : '/rgpp-api/all-in-one';
|
||||
const htmlPath = `${protocol}//${host}${pathPrefix}/static/upload.html?sessionId=${uuid.value}&uploadApi=${config.baseUrl}/app/kiosk/upload`;
|
||||
|
||||
// const htmlPath = `${window.location.host}/static/upload.html?sessionId=${uuid.value}&uploadApi=${
|
||||
// config.baseUrl + '/app/kiosk/upload'
|
||||
// }`;
|
||||
// const htmlPath = `${window.location.host}/static/upload.html?sessionId=${props.sessionId}&uploadApi=${
|
||||
// config.baseUrl + '/app/kiosk/upload'
|
||||
// }`;
|
||||
@@ -148,7 +157,7 @@ function startPolling() {
|
||||
// const { data } = await $api.createRequest('/app/kiosk/list',{sessionId:props.sessionId});
|
||||
if (data && data.length) {
|
||||
// 上传完成,触发事件
|
||||
fileCount.value = data.length
|
||||
fileCount.value = data.length;
|
||||
emit('onSend', data);
|
||||
}
|
||||
if (isPolling.value && isVisible.value) {
|
||||
@@ -231,7 +240,7 @@ defineExpose({ open, close });
|
||||
line-height: 1.6;
|
||||
padding: 0 20rpx;
|
||||
.num {
|
||||
color: #4191FE;
|
||||
color: #4191fe;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ const useLocationStore = defineStore("location", () => {
|
||||
type: 'gcj02',
|
||||
highAccuracyExpireTime: 3000,
|
||||
isHighAccuracy: true,
|
||||
timeout: 2000,
|
||||
success: function(data) {
|
||||
longitudeVal.value = Number(data.longitude)
|
||||
latitudeVal.value = Number(data.latitude)
|
||||
|
||||
Reference in New Issue
Block a user