update api
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
</u-form>
|
||||
</view>
|
||||
<text class="tips">密码必须是8-16位,至少含数字/字母/字符两种组合</text>
|
||||
<view class="btn">确定</view>
|
||||
<view class="btn" @click="update">确定</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@@ -28,6 +29,29 @@ export default {
|
||||
rePassword: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
update(){
|
||||
let that = this;
|
||||
this.$u.api.editpassword({
|
||||
old_password:that.model.password,
|
||||
password:that.model.newPassword,
|
||||
repassword:that.model.rePassword
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error'
|
||||
});
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user