w-ui-v1 1.0.23 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-ui-v1",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "w-ui",
5
5
  "author": "wgxshh",
6
6
  "license": "ISC",
@@ -65,31 +65,36 @@
65
65
  success: (res) => {
66
66
  if (res.statusCode === 200) {
67
67
  console.log('下载成功', res.tempFilePath);
68
-
69
- // 将临时文件保存到本地
70
- uni.saveFile({
71
- tempFilePath: res.tempFilePath,
72
- success: (saveRes) => {
73
- console.log('文件保存成功', saveRes.savedFilePath);
74
- const savedFilePath = saveRes.savedFilePath; // 保存后的路径
75
- // 打开文件(如PDF、Word等)
68
+ // 打开文件(如PDF、Word等)
76
69
  uni.openDocument({
77
- filePath: savedFilePath,
70
+ filePath: res.tempFilePath,
71
+ showMenu:true,
78
72
  success: () => console.log('打开文件成功')
79
73
  });
80
- uni.showToast({
81
- title: '文件保存成功',
82
- icon: 'success'
83
- });
84
- },
85
- fail: (saveErr) => {
86
- console.error('文件保存失败', saveErr);
87
- uni.showToast({
88
- title: '文件保存失败',
89
- icon: 'none'
90
- });
91
- }
92
- });
74
+ // // 将临时文件保存到本地
75
+ // uni.saveFile({
76
+ // tempFilePath: res.tempFilePath,
77
+ // success: (saveRes) => {
78
+ // console.log('文件保存成功', saveRes.savedFilePath);
79
+ // const savedFilePath = saveRes.savedFilePath; // 保存后的路径
80
+ // // 打开文件(如PDF、Word等)
81
+ // uni.openDocument({
82
+ // filePath: savedFilePath,
83
+ // success: () => console.log('打开文件成功')
84
+ // });
85
+ // uni.showToast({
86
+ // title: '文件保存成功',
87
+ // icon: 'success'
88
+ // });
89
+ // },
90
+ // fail: (saveErr) => {
91
+ // console.error('文件保存失败', saveErr);
92
+ // uni.showToast({
93
+ // title: '文件保存失败',
94
+ // icon: 'none'
95
+ // });
96
+ // }
97
+ // });
93
98
  } else {
94
99
  console.error('下载失败', res);
95
100
  uni.showToast({