jufubao-base 1.0.319-beta2 → 1.0.319-beta3
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
|
@@ -225,8 +225,13 @@
|
|
|
225
225
|
sourceType: ['camera','album'],
|
|
226
226
|
success: async (res) => {
|
|
227
227
|
console.log('chooseImage',res);
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
let file
|
|
229
|
+
// #ifdef MP-WEIXIN
|
|
230
|
+
file = res.tempFilePaths[0];
|
|
231
|
+
// #endif
|
|
232
|
+
// #ifdef H5
|
|
233
|
+
file = res.tempFiles[0];
|
|
234
|
+
// #endif
|
|
230
235
|
this.$xdShowLoading({});
|
|
231
236
|
try{
|
|
232
237
|
let image = await this.uploadImage(file);
|
|
@@ -251,7 +256,12 @@
|
|
|
251
256
|
delete res['cdn_url']
|
|
252
257
|
uni.uploadFile({
|
|
253
258
|
url: res.action,
|
|
259
|
+
// #ifdef H5
|
|
254
260
|
file: file,
|
|
261
|
+
// #endif
|
|
262
|
+
// #ifdef MP-WEIXIN
|
|
263
|
+
filePath: file, // 小程序图片临时路径
|
|
264
|
+
// #endif
|
|
255
265
|
name: 'file',
|
|
256
266
|
formData: {
|
|
257
267
|
...res,
|