bug
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
onLoad () {
|
||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#000000'
|
||||
frontColor: 'black'
|
||||
})
|
||||
this.getList()
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
|
||||
uploadFile (img, total, type) {
|
||||
uni.uploadFile({
|
||||
url: this.$instance.defaults.baseURL + '/api/file/add',
|
||||
url: this.$instance.defaults.baseURL + '/file/add',
|
||||
filePath: img,
|
||||
name: 'file',
|
||||
header: {
|
||||
@@ -162,7 +162,7 @@ export default {
|
||||
getList () {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$instance.post(`/appwechatescalation/list`, null, {
|
||||
this.$instance.post(`/api/appwechatescalation/list`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10,
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
uploadFile (img, total) {
|
||||
uni.uploadFile({
|
||||
url: this.$instance.defaults.baseURL + '/api/file/add',
|
||||
url: this.$instance.defaults.baseURL + '/file/add',
|
||||
filePath: img,
|
||||
name: 'file',
|
||||
header: {
|
||||
|
||||
@@ -70,6 +70,10 @@
|
||||
this.getUserInfo()
|
||||
this.getList()
|
||||
}
|
||||
|
||||
uni.$on('updateUserInfo', () => {
|
||||
this.getUserInfo()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -100,7 +104,8 @@
|
||||
this.$instance.post(`/api/appwechatintegraldetail/list`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10
|
||||
size: 10,
|
||||
openId: this.user.openId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
@@ -161,12 +166,12 @@
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 18px;
|
||||
color: #8891A1;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 18px;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #1D2229;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-wrapper">
|
||||
<div class="btn" hover-class="text-hover">保存</div>
|
||||
<div class="btn" hover-class="text-hover" @click="save">保存</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -57,10 +57,37 @@
|
||||
})
|
||||
},
|
||||
|
||||
save () {
|
||||
if (!this.userInfo.avatarUrl) {
|
||||
return this.$toast('请上传头像')
|
||||
}
|
||||
|
||||
if (!this.userInfo.nickName) {
|
||||
return this.$toast('请输入昵称')
|
||||
}
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post('/api/appwechatuser/update-nickName', null, {
|
||||
params: {
|
||||
...this.userInfo
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast('保存成功')
|
||||
|
||||
uni.$emit('updateUserInfo')
|
||||
|
||||
setTimeout(() => {
|
||||
wx.navigateBack()
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onChooseAvatar (e) {
|
||||
this.$loading()
|
||||
uni.uploadFile({
|
||||
url: this.$instance.defaults.baseURL + '/api/file/add',
|
||||
url: this.$instance.defaults.baseURL + '/file/add',
|
||||
filePath: e.detail.avatarUrl,
|
||||
name: 'file',
|
||||
header: {
|
||||
@@ -92,19 +119,6 @@
|
||||
success: res => {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
save () {
|
||||
this.$loading()
|
||||
this.$http.post('/app/editUserInfo', null, {
|
||||
params: {
|
||||
...this.userInfo
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast('保存成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user