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.
49 lines
928 B
49 lines
928 B
12 months ago
|
<template>
|
||
|
<view class="page">
|
||
|
<view class="input">
|
||
12 months ago
|
<uni-easyinput v-model.trim="account" placeholder="请输入用户名"></uni-easyinput>
|
||
12 months ago
|
</view>
|
||
|
<button type="primary" @click="submit">确认</button>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import { checkIfAnAccountExists, changeAccount } from '@/apis/modules/user.js'
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
account: '',
|
||
|
repeat: false
|
||
|
}
|
||
|
},
|
||
|
onShow() {
|
||
|
|
||
|
},
|
||
|
methods: {
|
||
|
submit() {
|
||
|
const { account } = this
|
||
12 months ago
|
if(!account) return this.$util.errMsg('请输入用户名')
|
||
12 months ago
|
changeAccount(account).then(res => {
|
||
|
this.$util.sucMsg('修改成功!')
|
||
|
setTimeout(() => {
|
||
|
uni.navigateBack()
|
||
|
}, 1000)
|
||
|
}).catch(e => {})
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped lang="scss">
|
||
|
.page {
|
||
|
padding: 20px;
|
||
|
background-color: #fff;
|
||
|
}
|
||
|
/deep/.input {
|
||
|
margin-bottom: 15px;
|
||
|
.is-input-border {
|
||
|
border-color: #dedede !important;
|
||
|
}
|
||
|
}
|
||
|
</style>
|