update api

This commit is contained in:
cmxdd
2020-07-29 20:35:33 +08:00
parent fef56d1b52
commit 243e1f93bd
13 changed files with 622 additions and 177 deletions

View File

@@ -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>