Commit 6f641eb6 by LJM

验证码

parent b3eec796
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
background: #f5f5f7; background: #f5f5f7;
border-radius: 10rpx; border-radius: 10rpx;
margin: 0 60rpx; margin: 0 60rpx;
transition: all 0.4s ease;
border: 1px solid transparent;
&.mobile { &.mobile {
.picker-box { .picker-box {
padding-left: 24rpx; padding-left: 24rpx;
...@@ -115,6 +117,10 @@ ...@@ -115,6 +117,10 @@
height: 62rpx; height: 62rpx;
} }
} }
&:focus-within {
background-color: #ffffff;
border: 1px solid #1969f9;
}
} }
.btn { .btn {
margin: 0 60rpx; margin: 0 60rpx;
......
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
height: 88rpx; height: 88rpx;
background: #f5f5f7; background: #f5f5f7;
border-radius: 10rpx; border-radius: 10rpx;
border: 1px solid transparent;
transition: all 0.4s ease;
&.mobile { &.mobile {
.picker-box { .picker-box {
padding-left: 24rpx; padding-left: 24rpx;
...@@ -112,6 +114,10 @@ ...@@ -112,6 +114,10 @@
height: 62rpx; height: 62rpx;
} }
} }
&:focus-within {
background-color: #ffffff;
border: 1px solid #1969f9;
}
} }
.btn { .btn {
height: 88rpx; height: 88rpx;
......
.page-setting { .page-setting {
padding-top: 104rpx;
.list {
.box {
margin: 0 24rpx;
margin-bottom: 16rpx;
padding: 0 24rpx;
height: 88rpx;
background: #ffffff;
border-radius: 10rpx;
.text {
.t1 {
font-size: 26rpx;
color: #484b59;
}
.t2 {
margin-left: 30rpx;
font-size: 24rpx;
color: #1969f9;
}
}
.right {
.t1 {
font-size: 24rpx;
color: #919399;
}
.iconfont {
font-size: 28rpx;
color: #919399;
margin-left: 8rpx;
}
}
}
.show-info {
margin: 0 24rpx;
background-color: #ffffff;
padding: 24rpx;
.label-box {
margin-bottom: 12px;
}
.t1 {
width: 120rpx;
font-size: 24rpx;
color: #919399;
white-space: nowrap;
}
.t2 {
font-size: 24rpx;
color: #484b59;
}
}
}
.exit {
position: fixed;
bottom: 16rpx;
left: 0;
right: 0;
margin: 0 24rpx;
height: 88rpx;
border-radius: 10rpx;
border: 1px solid #c6c7cc;
font-size: 26rpx;
color: #484b59;
}
} }
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
<script> <script>
import { Ichunt_Api, Api_Url, Code_Url } from '@/util/api.js'; import { Ichunt_Api, Api_Url, Code_Url } from '@/util/api.js';
import navElement from '@/components/nav.vue'; import navElement from '@/components/nav.vue';
import { setCookie, delCookie, getCookie, startCountdown } from '@/util/util.js';
export default { export default {
components: { components: {
...@@ -166,7 +167,55 @@ export default { ...@@ -166,7 +167,55 @@ export default {
}, },
submit(type) { submit(type) {
if (type == 1) { if (type == 1) {
this.curr = type; var reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
if (!this.formParams.account) {
uni.showToast({
title: '请输入手机号',
icon: 'none'
});
return false;
}
if (!reg.test(this.formParams.account)) {
uni.showToast({
title: '手机格式错误',
icon: 'none'
});
return false;
}
if (!this.formParams.sms_verify) {
uni.showToast({
title: '请输入验证码',
icon: 'none'
});
return false;
}
this.request(Api_Url + '/reg/forgetPassword', 'POST', { account: this.formParams.account, verify: this.formParams.verify, sms_verify: this.formParams.sms_verify, intl_code: this.formParams.intl_code }, true, true).then(res => {
if (res.err_code === 0) {
this.curr = type;
} else if (res.err_code === 10001 || res.err_code === 10002) {
uni.showModal({
itle: '提示',
content: res.err_msg,
showCancel: false,
success: res => {
if (res.confirm) {
this.verify_flag = true;
this.refresh(); //刷新验证码
}
}
});
} else {
this.verify_flag = false;
uni.showModal({
itle: '提示',
content: res.err_msg,
showCancel: false
});
}
});
} else if (type == 2) { } else if (type == 2) {
this.request(Api_Url + '/reg/changePasswordFromMsg', 'POST', { account: this.formParams.account, password: this.formParams.password, intl_code: this.formParams.intl_code }, true, true).then(res => { this.request(Api_Url + '/reg/changePasswordFromMsg', 'POST', { account: this.formParams.account, password: this.formParams.password, intl_code: this.formParams.intl_code }, true, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
......
...@@ -89,6 +89,7 @@ import w_md5 from '@/util/md5.js'; ...@@ -89,6 +89,7 @@ import w_md5 from '@/util/md5.js';
export default { export default {
data() { data() {
return { return {
referer: '',
code_text: '获取验证码', code_text: '获取验证码',
code_disabled: false, code_disabled: false,
login_type: false, login_type: false,
...@@ -108,7 +109,9 @@ export default { ...@@ -108,7 +109,9 @@ export default {
} }
}; };
}, },
onLoad() {}, onLoad(options) {
this.referer = options.referer;
},
methods: { methods: {
bindPickerChange: function(e) { bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value); console.log('picker发送选择改变,携带值为', e.detail.value);
...@@ -229,9 +232,15 @@ export default { ...@@ -229,9 +232,15 @@ export default {
setCookie('Yo4teW_skey', res.data.cookie.Yo4teW_skey, 15); setCookie('Yo4teW_skey', res.data.cookie.Yo4teW_skey, 15);
setTimeout(() => { setTimeout(() => {
uni.navigateBack({ if (this.referer) {
delta: 1 uni.navigateTo({
}); url: this.referer
});
} else {
uni.navigateBack({
delta: 1
});
}
}, 2000); }, 2000);
} else if (res.err_code === 10001 || res.err_code === 10002) { } else if (res.err_code === 10001 || res.err_code === 10002) {
uni.showModal({ uni.showModal({
......
<template> <template>
<view class="page-setting"><navElement title="账户设置"></navElement></view> <view class="page-setting">
<navElement title="账户设置"></navElement>
<view class="list">
<navigator class="box row bothSide verCenter" url="/forget" hover-class="none">
<view class="text">
<text class="t1">手机号</text>
<text class="t2">18589050841</text>
</view>
<view class="right">
<text class="t1">修改密码</text>
<text class="iconfont icon-jt"></text>
</view>
</navigator>
<view class="box row bothSide verCenter curr">
<view class="text"><text class="t1">邮箱</text></view>
<view class="right">
<text class="t1">绑定</text>
<text class="iconfont icon-jt"></text>
</view>
</view>
<view class="box row bothSide verCenter curr">
<view class="text"><text class="t1">QQ号</text></view>
<view class="right">
<text class="t1">绑定</text>
<text class="iconfont icon-jt"></text>
</view>
</view>
<view class="box row bothSide verCenter curr">
<view class="text"><text class="t1">微信号</text></view>
<view class="right">
<text class="t1">绑定</text>
<text class="iconfont icon-jt"></text>
</view>
</view>
<view class="company">
<view class="box row bothSide verCenter curr" style="margin-bottom: 0;border-radius:0;border-bottom: 1px solid #F0F0F2;">
<view class="text"><text class="t1">公司信息</text></view>
<view class="right">
<text class="t1">编辑</text>
<text class="iconfont icon-bjt"></text>
</view>
</view>
<view class="show-info">
<view class="label-box">
<text class="t1">公司名称:</text>
<text class="t2">深圳市猎芯科技有限公司</text>
</view>
<view class="label-box">
<text class="t1">公司坐机:</text>
<text class="t2">0755-12345678</text>
</view>
<view class="label-box">
<text class="t1">移动电话:</text>
<text class="t2">13800138000</text>
</view>
<view class="label-box">
<text class="t1">公司类型:</text>
<text class="t2">个人</text>
</view>
<view class="label-box">
<text class="t1">传真号码:</text>
<text class="t2">0755-12345678</text>
</view>
<view class="label-box row">
<text class="t1">公司地址:</text>
<text class="t2">深圳市龙岗区坂田街道岗头社区清湖工业区宝能科技园(南区)一期B区B3栋1101</text>
</view>
<view class="label-box row">
<text class="t1">主营品牌:</text>
<text class="t2" style="color: #1969F9;">SAMWIN(西安芯派)</text>
</view>
<view class="label-box row">
<text class="t1">公司简介:</text>
<text class="t2">深圳市龙岗区坂田街道岗头社区清湖工业区宝能科技园(南区)一期B区B3栋1101</text>
</view>
</view>
</view>
</view>
<view class="exit row rowCenter verCenter" @click="exit()">退出登录</view>
</view>
</template> </template>
<script> <script>
import { Api_Url } from '@/util/api.js'; import { Api_Url } from '@/util/api.js';
import { setCookie, delCookie, getCookie, startCountdown } from '@/util/util.js';
import navElement from '@/components/nav.vue'; import navElement from '@/components/nav.vue';
export default { export default {
components: { components: {
...@@ -13,7 +93,28 @@ export default { ...@@ -13,7 +93,28 @@ export default {
return {}; return {};
}, },
onShow() {}, onShow() {},
methods: {} methods: {
exit() {
uni.showModal({
title: '',
content: '您确定退出系统嘛?',
success: function(res) {
if (res.confirm) {
delCookie('Yo4teW_csrf');
delCookie('Yo4teW_gid');
delCookie('Yo4teW_uid');
delCookie('Yo4teW_lskey');
delCookie('Yo4teW_skey');
uni.navigateTo({
url: '/'
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment