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