|
@@ -35,7 +35,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
- <button class="btn" v-if="btnTitle=='编辑资料'" @click="edit">{{btnTitle}}</button>
|
|
|
|
|
|
+ <button class="btn" @click="edit">编辑资料</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -46,7 +46,6 @@
|
|
return {
|
|
return {
|
|
person: {},
|
|
person: {},
|
|
enable: true,
|
|
enable: true,
|
|
- btnTitle: '编辑资料',
|
|
|
|
name: ''
|
|
name: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -64,16 +63,15 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
edit(){
|
|
edit(){
|
|
- this.enable = false
|
|
|
|
- this.btnTitle = '确认修改'
|
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '请输入用户名',
|
|
title: '请输入用户名',
|
|
editable: true,
|
|
editable: true,
|
|
- placeholderText: '请输入用户名',
|
|
|
|
|
|
+ placeholderText: '请输入新的用户名',
|
|
success: res => {
|
|
success: res => {
|
|
if(res.confirm){
|
|
if(res.confirm){
|
|
this.name = res.content
|
|
this.name = res.content
|
|
this.updateUser()
|
|
this.updateUser()
|
|
|
|
+ // uni.navigateBack({delta: 1})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|