@zscreate/zhxy-app-component 1.0.123 → 1.0.127
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.
|
@@ -64,6 +64,7 @@ import {downloadFile, getOpenId, toAwait} from "../../utils/util";
|
|
|
64
64
|
async mounted() {
|
|
65
65
|
if (this.widget.options.uploadEncrypt) {
|
|
66
66
|
this.openId = await getOpenId()
|
|
67
|
+
this.openId = this.openId.replaceAll("+", "%2B").replaceAll("=", "%3D")
|
|
67
68
|
}
|
|
68
69
|
if(this.disabled){
|
|
69
70
|
this.isShow =!this.disabled
|
|
@@ -152,7 +153,9 @@ import {downloadFile, getOpenId, toAwait} from "../../utils/util";
|
|
|
152
153
|
url: that.url,
|
|
153
154
|
filePath: path[0].path,
|
|
154
155
|
name: 'file',
|
|
155
|
-
|
|
156
|
+
formData: {
|
|
157
|
+
fileName: that.name,
|
|
158
|
+
},
|
|
156
159
|
// header['X-Access-Token'] = uni.getStorageSync('token') || vm.$store.state.token
|
|
157
160
|
header: {
|
|
158
161
|
'X-Access-Token': uni.getStorageSync('token') || this.$store.state.token || this.$store.getters.token
|
|
@@ -184,7 +187,12 @@ import {downloadFile, getOpenId, toAwait} from "../../utils/util";
|
|
|
184
187
|
}
|
|
185
188
|
that.$emit('filePost', imgObj)
|
|
186
189
|
},
|
|
190
|
+
fail() {
|
|
191
|
+
uni.showToast({title: '文件上传失败', icon: 'none'})
|
|
192
|
+
},
|
|
187
193
|
complete() {
|
|
194
|
+
that.show = false
|
|
195
|
+
that.percent = 0
|
|
188
196
|
that.uploadIng = false
|
|
189
197
|
}
|
|
190
198
|
});
|
|
@@ -65,6 +65,7 @@ export default {
|
|
|
65
65
|
async created() {
|
|
66
66
|
if (this.widget.options.uploadEncrypt) {
|
|
67
67
|
this.openId = await getOpenId()
|
|
68
|
+
this.openId = this.openId.replaceAll("+", "%2B").replaceAll("=", "%3D")
|
|
68
69
|
}
|
|
69
70
|
if (this.widget && Object.keys(this.widget).length > 0) {
|
|
70
71
|
this.initWidget();
|