|
@@ -10,10 +10,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view @click="uploadImg1(1)" class="arrow-right">
|
|
<view @click="uploadImg1(1)" class="arrow-right">
|
|
|
<view class="head-img">
|
|
<view class="head-img">
|
|
|
- <image v-if="userInfo.facePhotoUrl" :src="userInfo.facePhotoUrl" mode=""></image>
|
|
|
|
|
- <image v-else src="/static/me/u1796.png" mode=""></image>
|
|
|
|
|
|
|
+ <image :src="userInfo.facePhotoUrl || '/static/me/u4.png'" mode=""></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <!-- <u-icon name="arrow-right" color="#666" size="26"></u-icon> -->
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -33,7 +31,7 @@
|
|
|
>
|
|
>
|
|
|
<u--input
|
|
<u--input
|
|
|
v-model="userInfo.nickName"
|
|
v-model="userInfo.nickName"
|
|
|
- placeholder=""
|
|
|
|
|
|
|
+ placeholder="请输入昵称"
|
|
|
border="bottom"
|
|
border="bottom"
|
|
|
maxlength="20"
|
|
maxlength="20"
|
|
|
type="text"
|
|
type="text"
|
|
@@ -49,7 +47,7 @@
|
|
|
<u--input
|
|
<u--input
|
|
|
maxlength="20"
|
|
maxlength="20"
|
|
|
v-model="userInfo.blood"
|
|
v-model="userInfo.blood"
|
|
|
- placeholder=""
|
|
|
|
|
|
|
+ placeholder="请输入关系"
|
|
|
border="bottom"
|
|
border="bottom"
|
|
|
type="text"
|
|
type="text"
|
|
|
></u--input>
|
|
></u--input>
|
|
@@ -64,7 +62,7 @@
|
|
|
<u--input
|
|
<u--input
|
|
|
maxlength="20"
|
|
maxlength="20"
|
|
|
v-model="userInfo.remark"
|
|
v-model="userInfo.remark"
|
|
|
- placeholder=""
|
|
|
|
|
|
|
+ placeholder="请输入备注"
|
|
|
border="bottom"
|
|
border="bottom"
|
|
|
type="text"
|
|
type="text"
|
|
|
></u--input>
|
|
></u--input>
|
|
@@ -95,30 +93,47 @@
|
|
|
},
|
|
},
|
|
|
genderShow: false,
|
|
genderShow: false,
|
|
|
value1: '2023-12-12',
|
|
value1: '2023-12-12',
|
|
|
- imgUrl1: ''
|
|
|
|
|
|
|
+ imgUrl1: '',
|
|
|
|
|
+ rules:[]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
},
|
|
},
|
|
|
|
|
+ onShow(){
|
|
|
|
|
+ if (this.userInfo.facePhoto){
|
|
|
|
|
+ this.getImgUrlByOssId(this.userInfo.facePhoto)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
|
|
|
|
|
console.log('++++++++++++++++option+++++++++++++++',option)
|
|
console.log('++++++++++++++++option+++++++++++++++',option)
|
|
|
-
|
|
|
|
|
if(option.data){
|
|
if(option.data){
|
|
|
- const data = JSON.parse(option.data);
|
|
|
|
|
- let url = data.facePhoto;
|
|
|
|
|
- this.userInfo.facePhoto = url.startsWith("https") ? url :url.replace("http", "https");
|
|
|
|
|
- this.userInfo = data;
|
|
|
|
|
|
|
+ this.userInfo = JSON.parse(option.data);
|
|
|
|
|
+ if (this.userInfo.facePhoto){
|
|
|
|
|
+ this.getImgUrlByOssId(this.userInfo.facePhoto)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // 用户信息
|
|
|
|
|
- let user = uni.getStorageInfo('userInfo');
|
|
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
+ getImgUrlByOssId(Id){
|
|
|
|
|
+ if (Id) {
|
|
|
|
|
+ this.$api.getImage(Id).then(res=>{
|
|
|
|
|
+ this.userInfo.facePhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
|
|
|
|
|
+ this.$set(this.userInfo)
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
// 保存用户信息
|
|
// 保存用户信息
|
|
|
saveUserInfo(){
|
|
saveUserInfo(){
|
|
|
|
|
+
|
|
|
|
|
+ if(!this.userInfo.nickName){
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: "请填写昵称"
|
|
|
|
|
+ })
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if(!this.userInfo.blood){
|
|
if(!this.userInfo.blood){
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: "请填写关系"
|
|
title: "请填写关系"
|
|
@@ -176,7 +191,7 @@
|
|
|
},
|
|
},
|
|
|
success: (uploadFileRes) => {
|
|
success: (uploadFileRes) => {
|
|
|
let res = JSON.parse(uploadFileRes.data)
|
|
let res = JSON.parse(uploadFileRes.data)
|
|
|
- that.imgUrl1 = res.data.url;
|
|
|
|
|
|
|
+ that.userInfo.facePhotoUrl = res.data.url.replace(/^http:/, "https:");
|
|
|
that.userInfo.facePhoto = res.data.ossId
|
|
that.userInfo.facePhoto = res.data.ossId
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -207,6 +222,7 @@
|
|
|
padding-bottom: 6px;
|
|
padding-bottom: 6px;
|
|
|
.nav-info{
|
|
.nav-info{
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
padding-left: 10px;
|
|
padding-left: 10px;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
.logo {
|
|
.logo {
|
|
@@ -244,24 +260,19 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.arrow-right{
|
|
.arrow-right{
|
|
|
- width:64%;
|
|
|
|
|
- text-align: right;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
- padding-top: 3px;
|
|
|
|
|
|
|
+ width: 50px;
|
|
|
|
|
+ height: 50px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
- align-items: center;
|
|
|
|
|
- image{
|
|
|
|
|
- width: 18px;
|
|
|
|
|
- height: 18px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
.head-img {
|
|
.head-img {
|
|
|
- text-align: center;
|
|
|
|
|
- padding-right: 20px;
|
|
|
|
|
|
|
+ width: 50px;
|
|
|
|
|
+ height: 50px;
|
|
|
|
|
+ border-radius: 25px;
|
|
|
image{
|
|
image{
|
|
|
- width: 24px;
|
|
|
|
|
- height: 24px;
|
|
|
|
|
|
|
+ width: 50px;
|
|
|
|
|
+ height: 50px;
|
|
|
|
|
+ border-radius: 25px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.change-store{
|
|
.change-store{
|