@zscreate/zhxy-app-component 1.0.125 → 1.0.128
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
|
|
@@ -63,6 +63,9 @@
|
|
|
63
63
|
url,
|
|
64
64
|
filePath: res.tempFilePath,
|
|
65
65
|
name: 'file',
|
|
66
|
+
header: {
|
|
67
|
+
'X-Access-Token': uni.getStorageSync('token') || this.$store.state.token || this.$store.getters.token
|
|
68
|
+
},
|
|
66
69
|
success: (uploadFileRes) => {
|
|
67
70
|
const res = JSON.parse(uploadFileRes.data)
|
|
68
71
|
let imgSrc = this.uniEnv.imgUrl + res.message;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import {getOpenId, toAwait} from "../../utils/util";
|
|
25
|
+
import {cloneObj, getOpenId, toAwait} from "../../utils/util";
|
|
26
26
|
|
|
27
27
|
var _self;
|
|
28
28
|
export default {
|
|
@@ -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();
|
|
@@ -186,7 +187,7 @@ export default {
|
|
|
186
187
|
});
|
|
187
188
|
},
|
|
188
189
|
showImage() {
|
|
189
|
-
this.emitList = this.defaultImg
|
|
190
|
+
this.emitList = cloneObj(this.defaultImg || [])
|
|
190
191
|
this.showProgress = false;
|
|
191
192
|
if (this.defaultImg && this.defaultImg.length && this.defaultImg.length > 0) {
|
|
192
193
|
this.fileList = this.defaultImg
|