修改功能
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<view class="content">
|
||||
<view class="topimg">
|
||||
<uni-file-picker fileMediatype="image" limit="1" :list-styles="imageStyles" :del-icon="false" disable-preview @select="select" @delete="delfn('picture')">
|
||||
<image class="user" :src="userinfo.avatar==''||userinfo.avatar==null||userinfo.avatar=='null'?'/static/image/mine/user.png':userinfo.avatar"mode=""></image>
|
||||
<image class="user" :src="userinfo.avatar"mode=""></image>
|
||||
<!-- <image class="xj" src="/static/image/mine/xiangji.png" mode=""></image> -->
|
||||
</uni-file-picker>
|
||||
<view>{{$t('mine.changeavatar')}}</view>
|
||||
@@ -105,7 +105,11 @@
|
||||
url:'user/getInfo',
|
||||
method:'get',
|
||||
}).then(res => {
|
||||
if(res.data.data.position=='null'){
|
||||
res.data.data.position=''
|
||||
}
|
||||
that.userinfo = res.data.data;
|
||||
|
||||
that.select1()
|
||||
})
|
||||
},
|
||||
@@ -166,7 +170,7 @@
|
||||
url: 'http://219.157.255.213:9007/upload/uploadImage',
|
||||
filePath: imgUrl,
|
||||
name: 'files',
|
||||
// header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('token')},
|
||||
header:{'Authorization': 'Bearer ' + uni.getStorageSync('token')},
|
||||
success: (uploadFileRes) => {
|
||||
const path=JSON.parse(uploadFileRes.data)
|
||||
if(path.code==-1){
|
||||
|
||||
@@ -80,6 +80,10 @@
|
||||
leftClick(){
|
||||
uni.navigateBack({})
|
||||
},
|
||||
validateEmail(email) {
|
||||
const regex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
||||
return regex.test(email);
|
||||
},
|
||||
login() {
|
||||
if(this.email==''){
|
||||
uni.showToast({
|
||||
@@ -134,6 +138,13 @@
|
||||
});
|
||||
return false
|
||||
}
|
||||
if (!this.validateEmail(this.email)) {
|
||||
uni.showToast({
|
||||
title:this.$t('emailerr1'),
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.vcodeTime = 60
|
||||
this.vcodeTimer = setInterval(() => {
|
||||
if (this.vcodeTime > 0) {
|
||||
|
||||
Reference in New Issue
Block a user