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