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