新增删除账号
This commit is contained in:
parent
277f8641e0
commit
f8f8616221
1
App.vue
1
App.vue
|
|
@ -123,6 +123,7 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/*每个页面公共css */
|
||||
/* #ifndef APP-NVUE */
|
||||
@import "/assets/common.scss";
|
||||
@import "/assets/iconfont.css";
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
}
|
||||
|
||||
.login {
|
||||
width: 86%;
|
||||
width: 94%;
|
||||
height: auto;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
background-color: #fff;
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
left: 7%;
|
||||
left: 3%;
|
||||
top: 28%;
|
||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||
|
||||
|
|
@ -105,14 +105,15 @@
|
|||
|
||||
.yanzhengma {
|
||||
input {
|
||||
right: 50%;
|
||||
right: 180px;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 50%;
|
||||
color: #333;
|
||||
width: 180px;
|
||||
background: #dfdfdf;
|
||||
font-size: 28rpx;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -244,14 +244,15 @@
|
|||
|
||||
.yanzhengma {
|
||||
input {
|
||||
right: 50%;
|
||||
right: 180px;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 50%;
|
||||
color: #333;
|
||||
width: 180px;
|
||||
background: #dfdfdf;
|
||||
font-size: 28rpx;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t("btnConfirm")}}</view>
|
||||
<view class="btnlogin" @click="handleOutLogin">{{$t("btnConfirm")}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -36,40 +36,35 @@
|
|||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleEmail')
|
||||
title: that.$t('btnDeleteAccount')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 登录、
|
||||
handleTelLogin() {
|
||||
handleOutLogin() {
|
||||
let that = this
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg(that.$t("verifyCode"))
|
||||
return
|
||||
}
|
||||
that.$model.getAccountMsg({
|
||||
data: that.phone,
|
||||
code: that.code,
|
||||
}).then(res => {
|
||||
if (res.code != 0) {
|
||||
that.$tools.msg(res.msg)
|
||||
return
|
||||
} else {
|
||||
that.$tools.msg(that.$t("msgSetSuccess"))
|
||||
that.$store.commit('changeAccountNumber', {
|
||||
my_email: that.phone
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.redirectTo({
|
||||
url: "/pageTwo/setting/setting"
|
||||
uni.showModal({
|
||||
title: that.$t("msgTitle"),
|
||||
confirmText: that.$t("btnDelete"),
|
||||
content: that.$t("verifyDeleteAccount"),
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getdeleteAccount({}).then((res) => {
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg($t('msgDelete'));
|
||||
uni.setStorageSync('token', null)
|
||||
uni.setStorageSync('aan_id', null)
|
||||
uni.clearStorageSync()
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: "/pageTwo/login/login"
|
||||
})
|
||||
}, 3000);
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
}).catch(err => {})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg($t("msgCancel"));
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
// 获取验证码
|
||||
handleCode() {
|
||||
|
|
@ -144,19 +139,21 @@
|
|||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.text {
|
||||
width: 80px;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: calc(100% - 100px);
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
display: flex;
|
||||
|
|
@ -179,14 +176,15 @@
|
|||
|
||||
.yanzhengma {
|
||||
input {
|
||||
right: 140rpx;
|
||||
right: 180px;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
width: auto;
|
||||
color: #333;
|
||||
width: 180px;
|
||||
background: #dfdfdf;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,21 @@
|
|||
<view class="content">
|
||||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">{{$t("infoEmail")}}</view>
|
||||
<view class="input">
|
||||
<input v-model="phone" :placeholder="$t('verifyEmail')" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item ">
|
||||
<view class="text">{{$t("titleCode")}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+$t("titleSendCodeRetry"):$t("titleSendCode")}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">{{$t('titlePassword')}}</view>
|
||||
<view class="input">
|
||||
|
|
@ -26,6 +41,10 @@
|
|||
return {
|
||||
password: "",
|
||||
password2: "",
|
||||
phone: "",
|
||||
code: "",
|
||||
disabled: false,
|
||||
second: 60,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
|
@ -38,6 +57,14 @@
|
|||
// 登录、
|
||||
handleTelLogin() {
|
||||
let that = this
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg(that.$t("verifyCode"))
|
||||
return
|
||||
}
|
||||
if (!that.password) {
|
||||
that.$tools.msg(that.$t('verifyPassword'))
|
||||
return
|
||||
|
|
@ -51,6 +78,8 @@
|
|||
return
|
||||
}
|
||||
that.$model.getAccountPassword({
|
||||
data: that.phone,
|
||||
code: that.code,
|
||||
password: that.password,
|
||||
c_password: that.password2,
|
||||
}).then(res => {
|
||||
|
|
@ -65,6 +94,38 @@
|
|||
}
|
||||
}).catch(err => {})
|
||||
},
|
||||
// 获取验证码
|
||||
handleCode() {
|
||||
let that = this
|
||||
if (!that.phone) {
|
||||
that.$tools.msg(that.$t("verifyEmail"))
|
||||
return
|
||||
}
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
//
|
||||
that.$model.getSendCode({
|
||||
data: that.phone,
|
||||
// type: that.type
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code != 0) {
|
||||
that.$tools.msg(res.msg)
|
||||
return
|
||||
}
|
||||
that.disabled = true
|
||||
let interval = setInterval(() => {
|
||||
--that.second
|
||||
}, 1000)
|
||||
setTimeout(() => {
|
||||
clearInterval(interval)
|
||||
that.disabled = false
|
||||
that.second = 60
|
||||
}, 60000)
|
||||
}).catch(err => {})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -99,13 +160,14 @@
|
|||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.text {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.input {
|
||||
|
|
@ -129,9 +191,28 @@
|
|||
z-index: 88;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.yanzhengma {
|
||||
input {
|
||||
right: 180px;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
color: #333;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 35px;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
width: 180px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.btnlogin {
|
||||
width: 100%;
|
||||
margin: 30rpx 0;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,12 @@
|
|||
<view class="text">{{$t('titleSetPassword')}}</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view class="caritem" @click="navTo('/pageTwo/setting/email')">
|
||||
<view class="text">{{$t('btnDeleteAccount')}}</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<!-- <view class="btn mb-15" @click="handleOutLogin">删除账号</view> -->
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -55,7 +60,7 @@
|
|||
content: that.$t('verifyDeleteAccount'),
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getdeleteAccount({}).then((res) => {
|
||||
that.$model.getDeleteAccount({}).then((res) => {
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg(that.$t('msgDelete'));
|
||||
uni.setStorageSync('token', null)
|
||||
|
|
@ -129,7 +134,7 @@
|
|||
}
|
||||
|
||||
.btn {
|
||||
width: auto;
|
||||
width: 90%;
|
||||
background: #999;
|
||||
margin: 100rpx 30rpx 0 30rpx;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@
|
|||
{
|
||||
"path": "setting/email",
|
||||
"style": {
|
||||
"navigationBarTitleText": "绑定邮箱",
|
||||
"navigationBarTitleText": "删除账号",
|
||||
"enablePullDownRefresh": false
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default {
|
|||
})
|
||||
},
|
||||
getAccountPassword(param) { // 修改密码
|
||||
return http.post("/kitchenscale3/update_my_password", param).then(res => {
|
||||
return http.post("/kitchenscale3/reset_password", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
|
@ -53,12 +53,18 @@ export default {
|
|||
return res
|
||||
})
|
||||
},
|
||||
getCheckDevice(param) { // 设备过滤
|
||||
getCheckDevice(param) { // 设备过滤
|
||||
return http.post("/de/check_device_msg", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
getDeleteAccount(param) { // 账号注销
|
||||
return http.post("/kitchenscale3/delete_account", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
// 首页
|
||||
getHomeInfo(param) { // 默认数据
|
||||
return http.post("/kitchenscale3/get_homepage_information", param).then(res => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -24,6 +24,7 @@
|
|||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/*每个页面公共css */
|
||||
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
|
||||
@font-face {
|
||||
font-family: 'iconfont';
|
||||
|
|
|
|||
|
|
@ -18527,7 +18527,7 @@ var _default = {
|
|||
}, {
|
||||
"path": "setting/email",
|
||||
"style": {
|
||||
"navigationBarTitleText": "绑定邮箱",
|
||||
"navigationBarTitleText": "删除账号",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
|
|
@ -28275,7 +28275,7 @@ var _default = (_getonlogin$getSendCo = {
|
|||
},
|
||||
getAccountPassword: function getAccountPassword(param) {
|
||||
// 修改密码
|
||||
return _https.default.post("/kitchenscale3/update_my_password", param).then(function (res) {
|
||||
return _https.default.post("/kitchenscale3/reset_password", param).then(function (res) {
|
||||
return res;
|
||||
});
|
||||
},
|
||||
|
|
@ -28298,11 +28298,17 @@ var _default = (_getonlogin$getSendCo = {
|
|||
});
|
||||
},
|
||||
getCheckDevice: function getCheckDevice(param) {
|
||||
// 设备过滤
|
||||
// 设备过滤
|
||||
return _https.default.post("/de/check_device_msg", param).then(function (res) {
|
||||
return res;
|
||||
});
|
||||
},
|
||||
getDeleteAccount: function getDeleteAccount(param) {
|
||||
// 账号注销
|
||||
return _https.default.post("/kitchenscale3/delete_account", param).then(function (res) {
|
||||
return res;
|
||||
});
|
||||
},
|
||||
// 首页
|
||||
getHomeInfo: function getHomeInfo(param) {
|
||||
// 默认数据
|
||||
|
|
|
|||
|
|
@ -96,11 +96,12 @@
|
|||
font-size: 28rpx;
|
||||
}
|
||||
.login .editem .item .yanzhengma input.data-v-56b2e1a4 {
|
||||
right: 50%;
|
||||
right: 180px;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.login .editem .code.data-v-56b2e1a4 {
|
||||
width: 50%;
|
||||
color: #333;
|
||||
width: 180px;
|
||||
background: #dfdfdf;
|
||||
font-size: 28rpx;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
.login.data-v-111bb4d3 {
|
||||
width: 86%;
|
||||
width: 94%;
|
||||
height: auto;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
background-color: #fff;
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
left: 7%;
|
||||
left: 3%;
|
||||
top: 28%;
|
||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||
}
|
||||
|
|
@ -120,11 +120,12 @@
|
|||
font-size: 32rpx;
|
||||
}
|
||||
.login .editem .item .yanzhengma input.data-v-111bb4d3 {
|
||||
right: 50%;
|
||||
right: 180px;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.login .editem .code.data-v-111bb4d3 {
|
||||
width: 50%;
|
||||
color: #333;
|
||||
width: 180px;
|
||||
background: #dfdfdf;
|
||||
font-size: 28rpx;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -197,40 +197,35 @@ var _default = {
|
|||
onLoad: function onLoad() {
|
||||
var that = this;
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleEmail')
|
||||
title: that.$t('btnDeleteAccount')
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 登录、
|
||||
handleTelLogin: function handleTelLogin() {
|
||||
handleOutLogin: function handleOutLogin() {
|
||||
var that = this;
|
||||
if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
||||
return;
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg(that.$t("verifyCode"));
|
||||
return;
|
||||
}
|
||||
that.$model.getAccountMsg({
|
||||
data: that.phone,
|
||||
code: that.code
|
||||
}).then(function (res) {
|
||||
if (res.code != 0) {
|
||||
that.$tools.msg(res.msg);
|
||||
return;
|
||||
} else {
|
||||
that.$tools.msg(that.$t("msgSetSuccess"));
|
||||
that.$store.commit('changeAccountNumber', {
|
||||
my_email: that.phone
|
||||
});
|
||||
setTimeout(function () {
|
||||
uni.redirectTo({
|
||||
url: "/pageTwo/setting/setting"
|
||||
uni.showModal({
|
||||
title: that.$t("msgTitle"),
|
||||
confirmText: that.$t("btnDelete"),
|
||||
content: that.$t("verifyDeleteAccount"),
|
||||
success: function success(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getdeleteAccount({}).then(function (res) {
|
||||
if (res.code != 0) return;
|
||||
that.$tools.msg($t('msgDelete'));
|
||||
uni.setStorageSync('token', null);
|
||||
uni.setStorageSync('aan_id', null);
|
||||
uni.clearStorageSync();
|
||||
setTimeout(function () {
|
||||
uni.reLaunch({
|
||||
url: "/pageTwo/login/login"
|
||||
});
|
||||
}, 3000);
|
||||
});
|
||||
}, 1000);
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg($t("msgCancel"));
|
||||
}
|
||||
}
|
||||
}).catch(function (err) {});
|
||||
});
|
||||
},
|
||||
// 获取验证码
|
||||
handleCode: function handleCode() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"navigationBarTitleText": "绑定邮箱",
|
||||
"navigationBarTitleText": "删除账号",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
<view class="content data-v-4f40ebad"><view class="login data-v-4f40ebad"><view class="editem data-v-4f40ebad"><view class="item data-v-4f40ebad"><view class="text data-v-4f40ebad">{{$root.m0}}</view><view class="input data-v-4f40ebad"><input placeholder="{{$root.m1}}" data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-4f40ebad"/></view></view><view class="item data-v-4f40ebad"><view class="text data-v-4f40ebad">{{$root.m2}}</view><view class="input yanzhengma data-v-4f40ebad"><input data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" class="uni-input data-v-4f40ebad" value="{{code}}" bindinput="__e"/><button class="code data-v-4f40ebad" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second+$root.m3:$root.m4)+''}}</button></view></view></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-4f40ebad" bindtap="__e">{{$root.m5}}</view></view></view>
|
||||
<view class="content data-v-4f40ebad"><view class="login data-v-4f40ebad"><view class="editem data-v-4f40ebad"><view class="item data-v-4f40ebad"><view class="text data-v-4f40ebad">{{$root.m0}}</view><view class="input data-v-4f40ebad"><input placeholder="{{$root.m1}}" data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-4f40ebad"/></view></view><view class="item data-v-4f40ebad"><view class="text data-v-4f40ebad">{{$root.m2}}</view><view class="input yanzhengma data-v-4f40ebad"><input data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" class="uni-input data-v-4f40ebad" value="{{code}}" bindinput="__e"/><button class="code data-v-4f40ebad" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second+$root.m3:$root.m4)+''}}</button></view></view></view><view data-event-opts="{{[['tap',[['handleOutLogin',['$event']]]]]}}" class="btnlogin data-v-4f40ebad" bindtap="__e">{{$root.m5}}</view></view></view>
|
||||
|
|
@ -55,18 +55,20 @@
|
|||
.login .editem .item.data-v-4f40ebad {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.login .editem .item .text.data-v-4f40ebad {
|
||||
width: 80px;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.login .editem .item .input.data-v-4f40ebad {
|
||||
width: calc(100% - 100px);
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
display: flex;
|
||||
|
|
@ -86,11 +88,12 @@
|
|||
font-size: 32rpx;
|
||||
}
|
||||
.login .editem .item .yanzhengma input.data-v-4f40ebad {
|
||||
right: 140rpx;
|
||||
right: 180px;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.login .editem .code.data-v-4f40ebad {
|
||||
width: auto;
|
||||
color: #333;
|
||||
width: 180px;
|
||||
background: #dfdfdf;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -102,11 +102,16 @@ var render = function () {
|
|||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var m0 = _vm.$t("titlePassword")
|
||||
var m1 = _vm.$t("verifyPassword")
|
||||
var m2 = _vm.$t("titleConfirmPassword")
|
||||
var m3 = _vm.$t("verifyPasswordTwo")
|
||||
var m4 = _vm.$t("btnSubmit")
|
||||
var m0 = _vm.$t("infoEmail")
|
||||
var m1 = _vm.$t("verifyEmail")
|
||||
var m2 = _vm.$t("titleCode")
|
||||
var m3 = _vm.second < 60 ? _vm.$t("titleSendCodeRetry") : null
|
||||
var m4 = !(_vm.second < 60) ? _vm.$t("titleSendCode") : null
|
||||
var m5 = _vm.$t("titlePassword")
|
||||
var m6 = _vm.$t("verifyPassword")
|
||||
var m7 = _vm.$t("titleConfirmPassword")
|
||||
var m8 = _vm.$t("verifyPasswordTwo")
|
||||
var m9 = _vm.$t("btnSubmit")
|
||||
_vm.$mp.data = Object.assign(
|
||||
{},
|
||||
{
|
||||
|
|
@ -116,6 +121,11 @@ var render = function () {
|
|||
m2: m2,
|
||||
m3: m3,
|
||||
m4: m4,
|
||||
m5: m5,
|
||||
m6: m6,
|
||||
m7: m7,
|
||||
m8: m8,
|
||||
m9: m9,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
|
@ -180,11 +190,30 @@ exports.default = void 0;
|
|||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
var _default = {
|
||||
data: function data() {
|
||||
return {
|
||||
password: "",
|
||||
password2: ""
|
||||
password2: "",
|
||||
phone: "",
|
||||
code: "",
|
||||
disabled: false,
|
||||
second: 60
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad() {
|
||||
|
|
@ -197,6 +226,14 @@ var _default = {
|
|||
// 登录、
|
||||
handleTelLogin: function handleTelLogin() {
|
||||
var that = this;
|
||||
if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
||||
return;
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg(that.$t("verifyCode"));
|
||||
return;
|
||||
}
|
||||
if (!that.password) {
|
||||
that.$tools.msg(that.$t('verifyPassword'));
|
||||
return;
|
||||
|
|
@ -210,6 +247,8 @@ var _default = {
|
|||
return;
|
||||
}
|
||||
that.$model.getAccountPassword({
|
||||
data: that.phone,
|
||||
code: that.code,
|
||||
password: that.password,
|
||||
c_password: that.password2
|
||||
}).then(function (res) {
|
||||
|
|
@ -223,6 +262,38 @@ var _default = {
|
|||
}, 1000);
|
||||
}
|
||||
}).catch(function (err) {});
|
||||
},
|
||||
// 获取验证码
|
||||
handleCode: function handleCode() {
|
||||
var that = this;
|
||||
if (!that.phone) {
|
||||
that.$tools.msg(that.$t("verifyEmail"));
|
||||
return;
|
||||
}
|
||||
if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
||||
return;
|
||||
}
|
||||
//
|
||||
that.$model.getSendCode({
|
||||
data: that.phone
|
||||
// type: that.type
|
||||
}).then(function (res) {
|
||||
console.log(res);
|
||||
if (res.code != 0) {
|
||||
that.$tools.msg(res.msg);
|
||||
return;
|
||||
}
|
||||
that.disabled = true;
|
||||
var interval = setInterval(function () {
|
||||
--that.second;
|
||||
}, 1000);
|
||||
setTimeout(function () {
|
||||
clearInterval(interval);
|
||||
that.disabled = false;
|
||||
that.second = 60;
|
||||
}, 60000);
|
||||
}).catch(function (err) {});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<view class="content data-v-02e9ad9a"><view class="login data-v-02e9ad9a"><view class="editem data-v-02e9ad9a"><view class="item data-v-02e9ad9a"><view class="text data-v-02e9ad9a">{{$root.m0}}</view><view class="input data-v-02e9ad9a"><input class="uni-input data-v-02e9ad9a" placeholder="{{$root.m1}}" data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" value="{{password}}" bindinput="__e"/></view></view><view class="item data-v-02e9ad9a"><view class="text data-v-02e9ad9a">{{$root.m2}}</view><view class="input data-v-02e9ad9a"><input class="uni-input data-v-02e9ad9a" placeholder="{{$root.m3}}" data-event-opts="{{[['input',[['__set_model',['','password2','$event',[]]]]]]}}" value="{{password2}}" bindinput="__e"/></view></view></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-02e9ad9a" bindtap="__e">{{$root.m4}}</view></view></view>
|
||||
<view class="content data-v-02e9ad9a"><view class="login data-v-02e9ad9a"><view class="editem data-v-02e9ad9a"><view class="item data-v-02e9ad9a"><view class="text data-v-02e9ad9a">{{$root.m0}}</view><view class="input data-v-02e9ad9a"><input placeholder="{{$root.m1}}" data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-02e9ad9a"/></view></view><view class="item data-v-02e9ad9a"><view class="text data-v-02e9ad9a">{{$root.m2}}</view><view class="input yanzhengma data-v-02e9ad9a"><input data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" class="uni-input data-v-02e9ad9a" value="{{code}}" bindinput="__e"/><button class="code data-v-02e9ad9a" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second+$root.m3:$root.m4)+''}}</button></view></view><view class="item data-v-02e9ad9a"><view class="text data-v-02e9ad9a">{{$root.m5}}</view><view class="input data-v-02e9ad9a"><input class="uni-input data-v-02e9ad9a" placeholder="{{$root.m6}}" data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" value="{{password}}" bindinput="__e"/></view></view><view class="item data-v-02e9ad9a"><view class="text data-v-02e9ad9a">{{$root.m7}}</view><view class="input data-v-02e9ad9a"><input class="uni-input data-v-02e9ad9a" placeholder="{{$root.m8}}" data-event-opts="{{[['input',[['__set_model',['','password2','$event',[]]]]]]}}" value="{{password2}}" bindinput="__e"/></view></view></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-02e9ad9a" bindtap="__e">{{$root.m9}}</view></view></view>
|
||||
|
|
@ -51,13 +51,14 @@
|
|||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.login .editem .item .text.data-v-02e9ad9a {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.login .editem .item .input.data-v-02e9ad9a {
|
||||
width: 100%;
|
||||
|
|
@ -79,6 +80,21 @@
|
|||
z-index: 88;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.login .editem .item .yanzhengma input.data-v-02e9ad9a {
|
||||
right: 180px;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.login .code.data-v-02e9ad9a {
|
||||
color: #333;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 35px;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
width: 180px;
|
||||
z-index: 999;
|
||||
}
|
||||
.login .btnlogin.data-v-02e9ad9a {
|
||||
width: 100%;
|
||||
margin: 30rpx 0;
|
||||
|
|
|
|||
|
|
@ -126,11 +126,13 @@ var render = function () {
|
|||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var m0 = _vm.$t("titleSetPassword")
|
||||
var m1 = _vm.$t("btnDeleteAccount")
|
||||
_vm.$mp.data = Object.assign(
|
||||
{},
|
||||
{
|
||||
$root: {
|
||||
m0: m0,
|
||||
m1: m1,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
|
@ -206,7 +208,7 @@ var _default = {
|
|||
content: that.$t('verifyDeleteAccount'),
|
||||
success: function success(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getdeleteAccount({}).then(function (res) {
|
||||
that.$model.getDeleteAccount({}).then(function (res) {
|
||||
if (res.code != 0) return;
|
||||
that.$tools.msg(that.$t('msgDelete'));
|
||||
uni.setStorageSync('token', null);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<view class="content data-v-4a3c3a21"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/setting/password']]]]]}}" class="caritem data-v-4a3c3a21" bindtap="__e"><view class="text data-v-4a3c3a21">{{$root.m0}}</view><uni-icons vue-id="0568e9f6-1" type="forward" size="20" color="#666" class="data-v-4a3c3a21" bind:__l="__l"></uni-icons></view></view>
|
||||
<view class="content data-v-4a3c3a21"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/setting/password']]]]]}}" class="caritem data-v-4a3c3a21" bindtap="__e"><view class="text data-v-4a3c3a21">{{$root.m0}}</view><uni-icons vue-id="0568e9f6-1" type="forward" size="20" color="#666" class="data-v-4a3c3a21" bind:__l="__l"></uni-icons></view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/setting/email']]]]]}}" class="caritem data-v-4a3c3a21" bindtap="__e"><view class="text data-v-4a3c3a21">{{$root.m1}}</view><uni-icons vue-id="0568e9f6-2" type="forward" size="20" color="#666" class="data-v-4a3c3a21" bind:__l="__l"></uni-icons></view></view>
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
border-bottom: 1px solid #dfdfdf;
|
||||
}
|
||||
.btn.data-v-4a3c3a21 {
|
||||
width: auto;
|
||||
width: 90%;
|
||||
background: #999;
|
||||
margin: 100rpx 30rpx 0 30rpx;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue