1. 【修复】申请退款后积分等操作可能出现错误的问题 2. 【修复】拼团支付可能出现支付错误的问题 3. 【修复】退款申请后的订单流程优化和积分赠送的问题 4. 【修复】回收站中的商品无法恢复的问题 5. 【修复】一号通短信查询记录不完整的问题 6. 【修复】用户管理批量加分组,标签的问题 7. 【修复】积分日志搜索显示有误的问题 8. 【修复】手动发送优惠券可能会出错的问题 9. 【修复】核销订单创建在某种条件下会出错的问题 10. 【修复】移动端商品详情,购物车等样式兼容问题 11. 【修复】业务流程性的优化
162 lines
4.0 KiB
Vue
162 lines
4.0 KiB
Vue
<template>
|
|
<div class="register absolute">
|
|
<div class="shading">
|
|
<div class="pictrue acea-row row-center-wrapper">
|
|
<image src="../../../static/images/logo2.png" />
|
|
</div>
|
|
</div>
|
|
<div class="whiteBg">
|
|
<div class="title">找回密码</div>
|
|
<div class="list">
|
|
<div class="item">
|
|
<div class="acea-row row-middle">
|
|
<image src="/static/images/phone_1.png"></image>
|
|
<input type="text" placeholder="输入手机号码" v-model="account" />
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
|
|
<div class="acea-row row-middle">
|
|
<image src="/static/images/code_2.png"></image>
|
|
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
|
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
|
{{ text }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="acea-row row-middle">
|
|
<image src="/static/images/code_2.png"></image>
|
|
<input type="password" placeholder="填写您的新密码" v-model="password" />
|
|
</div>
|
|
</div>
|
|
<div class="item" v-if="isShowCode">
|
|
<div class="align-left">
|
|
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
|
|
<div class="code" @click="again"><img :src="codeUrl" /></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="logon" @click="registerReset">确认</div>
|
|
<div class="tip">
|
|
<span class="font-color-red" @click="back">立即登录</span>
|
|
</div>
|
|
</div>
|
|
<div class="bottom"></div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
|
import {
|
|
registerVerify,
|
|
registerReset,
|
|
getCodeApi
|
|
} from "@/api/user";
|
|
// import { validatorDefaultCatch } from "@/utils/dialog";
|
|
// import attrs, { required, alpha_num, chs_phone } from "@utils/validate";
|
|
// import { VUE_APP_API_URL } from "@utils";
|
|
|
|
export default {
|
|
name: "RetrievePassword",
|
|
data: function() {
|
|
return {
|
|
account: "",
|
|
password: "",
|
|
captcha: "",
|
|
keyCode: "",
|
|
codeUrl: "",
|
|
codeVal: "",
|
|
isShowCode: false
|
|
};
|
|
},
|
|
mixins: [sendVerifyCode],
|
|
mounted: function() {
|
|
this.getCode();
|
|
},
|
|
methods: {
|
|
back() {
|
|
uni.navigateBack();
|
|
},
|
|
again() {
|
|
this.codeUrl =
|
|
VUE_APP_API_URL + "/captcha?" + this.keyCode + Date.parse(new Date());
|
|
},
|
|
getCode() {
|
|
getCodeApi()
|
|
.then(res => {
|
|
this.keyCode = res.data.key;
|
|
})
|
|
.catch(res => {
|
|
this.$dialog.error(res.msg);
|
|
});
|
|
},
|
|
async registerReset() {
|
|
var that = this;
|
|
if (!that.account) return that.$util.Tips({
|
|
title: '请填写手机号码'
|
|
});
|
|
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
|
title: '请输入正确的手机号码'
|
|
});
|
|
if (!that.captcha) return that.$util.Tips({
|
|
title: '请填写验证码'
|
|
});
|
|
registerReset({
|
|
account: that.account,
|
|
captcha: that.captcha,
|
|
password: that.password,
|
|
code: that.codeVal
|
|
})
|
|
.then(res => {
|
|
that.$util.Tips({
|
|
title: res.message
|
|
}, {
|
|
tab: 3
|
|
})
|
|
})
|
|
.catch(res => {
|
|
that.$util.Tips({
|
|
title: res
|
|
})
|
|
});
|
|
},
|
|
async code() {
|
|
let that = this;
|
|
if (!that.account) return that.$util.Tips({
|
|
title: '请填写手机号码'
|
|
});
|
|
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
|
title: '请输入正确的手机号码'
|
|
});
|
|
if (that.formItem == 2) that.type = "register";
|
|
await registerVerify({
|
|
phone: that.account,
|
|
type: that.type,
|
|
key: that.keyCode,
|
|
code: that.codeVal
|
|
})
|
|
.then(res => {
|
|
that.$dialog.success(res.message);
|
|
that.sendCode();
|
|
})
|
|
.catch(res => {
|
|
// if (res.data.status === 402) {
|
|
// that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;
|
|
// that.isShowCode = true;
|
|
// }
|
|
that.$util.Tips({
|
|
title: res
|
|
});
|
|
});
|
|
},
|
|
}
|
|
};
|
|
</script>
|
|
<style scoped>
|
|
.code img {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|