耀实惠小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

54 lines
983 B

<template>
<view class="edit-name flex-1">
<view class="edit-name-box m-b-60">
<u-input v-model="name" placeholder="请输入新的名称" />
</view>
<u-button type="primary" @click="confirm">完成</u-button>
</view>
</template>
<script>
export default {
data () {
return {
name: ''
}
},
onLoad(options) {
this.name = options?.name
},
methods: {
confirm () {
uni.$emit('EDITNAME', this.name)
this.editUserInfo({name: this.name})
uni.navigateBack({
delta: 1
})
},
editUserInfo (params = {},status= 0) {
uni.showLoading();
this.$api('editUserInfo', params)
.then(res => {
uni.hideLoading();
this.$Toast(res.message)
}).catch(err => {
uni.hideLoading();
this.$Toast(err.message)
})
},
}
}
</script>
<style lang="scss" scoped>
.edit-name{
background: #F5F6F8;
padding: 34rpx;
&-box {
border-bottom: 2rpx solid #ccc;
padding: 0 20rpx;
}
}
</style>