Commit 6e678ad5 authored by Mac's avatar Mac

修改个人中心

parent d7aaf456
......@@ -8,7 +8,7 @@
编辑个人主页
</text>
</view> -->
<view class="dataBox">
<view class="dataBox" style="padding-bottom: 70px;">
<view v-for="(item,index) in dataList" :key="index">
<view class="itemBox">
<view class="tip" v-if="item.tip">
......@@ -80,8 +80,8 @@
<text v-if="item1.must!=undefined && item1.must" style="font-size: 12px;color: #F70027;margin-left: 3px;font-weight: normal;">*</text>
</view>
<input type="text" v-if="item1.name=='昵称' && item1.subType==1" maxlength='10' :placeholder="item1.placehloder" :disabled="item1.disabled" v-model="data[item1.field]" :type="item1.showType" class="subInput" />
<input type="text" v-if="item1.name!='昵称' && item1.subType==1" :placeholder="item1.placehloder" :disabled="item1.disabled" v-model="data[item1.field]" :type="item1.showType" class="subInput" />
<input v-if="item1.name=='昵称' && item1.subType==1" maxlength='10' :placeholder="item1.placehloder" :disabled="item1.disabled" v-model="data[item1.field]" :type="item1.showType" class="subInput" />
<input v-if="item1.name!='昵称' && item1.subType==1" :placeholder="item1.placehloder" :disabled="item1.disabled" v-model="data[item1.field]" :type="item1.showType" class="subInput" @input='srnumber($event,item1.field)' />
<!-- 显示有昵称的长度 -->
<view class="unit" v-if="item1.name=='昵称' && item1.subType==1">{{data[item1.field].length}}/10</view>
<view class="unit" v-if="item1.unit">
......@@ -144,10 +144,13 @@
</view>
</view>
</view>
<view style="width: 100%;height:60px;position: fixed;left: 0;bottom: 0;display: flex;align-items: center;justify-content: center;background: #FFF;z-index: 99999;">
<view class="saveBtn" :style="{'background-color': `${mainColor}`}" @click="saveData">
保存
</view>
</view>
</view>
</template>
<script>
......@@ -204,6 +207,22 @@
mode:"date",
disabled:false,
must:true,
},{
name:"手机号码",
field:"Moblie",
placehloder:"请输入手机号码",
subType:1,
showType:"number",
disabled:false,
must:true,
},{
name:"微信号",
field:"WechatNo",
placehloder:"请输入微信号",
subType:1,
showType:"text",
disabled:false,
must:true,
},{
name:"身高",
field:"Height",
......@@ -440,6 +459,8 @@
ActivityRegion:'',//活动区域
IDCard:'',//身份证信息正面
IDCardBack:'',//反面
Moblie:'',//手机号
WechatNo:'',//微信号
},
//控制图片显示
AlbumListShow:{
......@@ -613,6 +634,22 @@
});
return
}
if(this.data.Moblie==""){
uni.showToast({
title: '请输入电话号码',
duration: 2000,
icon:"none"
});
return
}
if(this.data.WechatNo==""){
uni.showToast({
title: '请输入微信号',
duration: 2000,
icon:"none"
});
return
}
if(this.data.Height ==""){
uni.showToast({
title: '请填写身高',
......@@ -901,6 +938,13 @@
let r = JSON.parse(data);
this.data.Photo = r.data;
},
srnumber(e,Name){//处理输入的是01的情况
let value = e.target.value;
value = value.replace(/\b(0+)/gi,"")
if(Name=='Height' || Name == 'Weight' || Name == 'YearMoney'|| Name == 'Moblie'){
this.data[Name] = value
}
}
},
onLoad(options) {
this.UserId = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserId:null;
......@@ -1111,7 +1155,7 @@
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
margin-top: 50rpx;
// margin-top: 50rpx;
}
/deep/.input-placeholder{
font-size: 24rpx;
......
......@@ -239,7 +239,7 @@
},
mounted() {
uni.setNavigationBarTitle({
title: '用户列表',
title: '筛选条件',
});
},
......
......@@ -330,9 +330,10 @@
<view class="pd-title">基础资料</view>
<view class="pd-bubble">
<view class="bubble" v-if="dataList.SexStr">{{dataList.SexStr}}</view>
<view class="bubble" v-if="dataList.Birthday">{{dataList.Birthday}}</view>
<!-- <view class="bubble" v-if="dataList.Birthday">{{dataList.Birthday}}</view> -->
<view class="bubble" v-if="dataList.Birthday">出生年份:{{dataList.BirthdayYear}}</view>
<view class="bubble" v-if="dataList.Age">{{dataList.Age}}</view>
<view class="bubble" v-if="dataList.ShenXiao">{{dataList.ShenXiao}}</view>
<!-- <view class="bubble" v-if="dataList.ShenXiao">{{dataList.ShenXiao}}</view> -->
<view class="bubble" v-if="dataList.ConoldBaseInfostellation">{{dataList.ConoldBaseInfostellation}}</view>
<view class="bubble" v-if="dataList.Height">{{dataList.Height}}cm</view>
<view class="bubble" v-if="dataList.Weight">{{dataList.Weight}}kg</view>
......@@ -340,6 +341,8 @@
<view class="bubble" v-if="dataList.YearMoney">年收入(税后):{{dataList.YearMoney}}万元</view>
<view class="bubble" v-if="dataList.HouseInfoStr">{{dataList.HouseInfoStr}}</view>
<view class="bubble" v-if="dataList.CarInfoStr">{{dataList.CarInfoStr}}</view>
<view class="bubble" v-if="dataList.Moblie && mall_UserInfo.UserId == dataList.Id">电话号码:{{dataList.Moblie}}</view>
<view class="bubble" v-if="dataList.WechatNo && mall_UserInfo.UserId == dataList.Id" >微信号:{{dataList.WechatNo}}</view>
</view>
<view class="pd-title">其他资料</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment