From 301289e539c417995f95f5cb91fd1f6043bb7cfd Mon Sep 17 00:00:00 2001 From: zhangxiaoxu123456 <zxx19900626> Date: 星期一, 20 十二月 2021 10:46:27 +0800 Subject: [PATCH] 智慧工会细节 --- components/oss-upload/oss-upload.vue | 29 ++++++++--------------------- 1 files changed, 8 insertions(+), 21 deletions(-) diff --git a/components/oss-upload/oss-upload.vue b/components/oss-upload/oss-upload.vue index 9d271ec..54202fe 100644 --- a/components/oss-upload/oss-upload.vue +++ b/components/oss-upload/oss-upload.vue @@ -32,35 +32,22 @@ return { avatar: require('../../static/img/touxiang.jpg'), formData:{}, - action:'http://39.96.92.240:8099/user/updateImg', + action:'http://Shuinigonghui.cn:8099/user/updateImg', userId:'', autoUpload:true, + userInfo:'', }; }, created() { - console.log("--------created") - _this = this - // uni.$on('uAvatarCropper', path => { - // _this.avatar = path; - // 鍙互鍦ㄦ涓婁紶鍒版湇鍔$ - // uni.uploadFile({ - // url: 'http://192.168.100.17/index.php/index/index/upload', - // filePath: path, - // name: 'file', - // complete: (res) => { - // console.log(res); - // } - // }); - // }) }, mounted() { - let userInfo = this.getStore('userInfo') - this.avatar = userInfo.img + this.userInfo = this.getStore('userInfo') + this.avatar = this.userInfo.img if(this.avatar == '') { this.avatar = '../../static/img/touxiang.jpg' } - _this.userId = userInfo.id - _this.formData.userId=userInfo.id + this.userId = this.userInfo.id + this.formData.userId=this.userInfo.id }, methods: { @@ -70,9 +57,9 @@ }, onSuccess(data, index, lists, name) { - // this.$refs.upload.remove(0) + this.$refs.upload.remove(0) this.avatar = data.obj.img - userInfo.img = data.obj.img; + this.userInfo.img = data.obj.img; // this.setStore("userInfo",data.obj) this.$u.toast('淇敼鎴愬姛') -- Gitblit v1.9.1