Commit 3ab425f8 authored by 肖健's avatar 肖健

个人中心编辑修复

parent aefaa669
......@@ -33,6 +33,8 @@
</div>
</u-popup>
<u-datetime-picker :show="show__date" v-model="dateValue" ref='datetimePicker' :minDate="-2209017600000" mode="date" @confirm='confirm' @close='close__date' @cancel='close__date' :formatter="formatter" closeOnClickOverlay>
</u-datetime-picker>
......@@ -73,7 +75,7 @@ export default {
id: "kjjns", //id必须唯一 可以是数字
placeholder: "请填写",
label: "昵称", // 提示输入名
type: "text", //类型
type: "select", //类型
rules: {
name: "nickName", //字段名 即提交给后端的字段
value: "",
......@@ -131,6 +133,11 @@ export default {
//console.log(time);
var y = time.getFullYear(); //getFullYear方法以四位数字返回年份
var M = time.getMonth() + 1; // getMonth方法从 Date 对象返回月份 (0 ~ 11),返回结果需要手动加一
if(M < 10) {
M = '0' + M;
}
var d = time.getDate(); // getDate方法从 Date 对象返回一个月中的某一天 (1 ~ 31)
return y + '-' + M + '-' + d
} else {
......@@ -182,6 +189,7 @@ export default {
this.show__six = false
},
save() {
let that = this
this.formData.forEach(element => {
if (element.label === '昵称') {
element.rules.value = this.user__nikename
......@@ -321,7 +329,7 @@ export default {
element.rules.value = this.userInfo.mobile
}
if (element.label === '昵称') {
element.rules.value = this.userInfo.nickName
element.rules.label = this.userInfo.nickName
}
if (element.label === '性别') {
element.rules.label = this.userInfo.sex == "0" ? "男" : "女"
......
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