Files
im-uniapp/pages/workbench/sales/sales.vue

38 lines
649 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>