版本不兼容时可以到浏览器下载安装包
This commit is contained in:
37
pages/workbench/sales/sales.vue
Normal file
37
pages/workbench/sales/sales.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<view>
|
||||
<oa-file-upload @choose="onFileChoose" />
|
||||
<view v-if="fileInfo">
|
||||
已选择文件:{{ fileInfo.name }}
|
||||
</view>
|
||||
<button @click="test">测试下载</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fileInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFileChoose(file) {
|
||||
this.fileInfo = file;
|
||||
},
|
||||
test() {
|
||||
// 替换为你的下载地址
|
||||
const downloadUrl = 'http://47.117.71.33:11295/fadapp-update/fad.wgt';
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.openURL(downloadUrl);
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
window.open(downloadUrl, '_blank');
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
Reference in New Issue
Block a user