|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <web-view src="http://192.168.0.117:3200" @message="handleMessage"></web-view>
|
|
|
+ <web-view src="http://192.168.0.205:8000" @message="handleMessage"></web-view>
|
|
|
<!-- <button @click="downloadFile">点击下载文件</button> -->
|
|
|
</view>
|
|
|
</template>
|
|
@@ -23,7 +23,7 @@
|
|
|
|
|
|
|
|
|
onLoad: function() {
|
|
|
- this.handleMessage();
|
|
|
+ // this.handleMessage();
|
|
|
// this.downloadFile();
|
|
|
},
|
|
|
methods: {
|
|
@@ -102,16 +102,21 @@
|
|
|
entry.getParent(_oldFile => {
|
|
|
entry.moveTo(_oldFile, '/' + _name,
|
|
|
newFilePath => {
|
|
|
- console.log('newFilePath',
|
|
|
- newFilePath
|
|
|
- .fullPath)
|
|
|
+ console.log('文件名称替换完成');
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
- uni.openDocument({
|
|
|
- filePath: newFilePath
|
|
|
- });
|
|
|
+ setTimeout(()=>{
|
|
|
+ uni.openDocument({
|
|
|
+ filePath: newFilePath,
|
|
|
+ success() {
|
|
|
+ console.log('打开成功');
|
|
|
+ },
|
|
|
+ fail() {
|
|
|
+ console.log('打开失败');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },1000)
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -124,7 +129,7 @@
|
|
|
});
|
|
|
},
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
|
|
|
}
|
|
|
}
|