新增删除账号
This commit is contained in:
parent
277f8641e0
commit
f8f8616221
1
App.vue
1
App.vue
|
|
@ -123,6 +123,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
/*每个页面公共css */
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
@import "/assets/common.scss";
|
@import "/assets/common.scss";
|
||||||
@import "/assets/iconfont.css";
|
@import "/assets/iconfont.css";
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.login {
|
.login {
|
||||||
width: 86%;
|
width: 94%;
|
||||||
height: auto;
|
height: auto;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 7%;
|
left: 3%;
|
||||||
top: 28%;
|
top: 28%;
|
||||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||||
|
|
||||||
|
|
@ -105,14 +105,15 @@
|
||||||
|
|
||||||
.yanzhengma {
|
.yanzhengma {
|
||||||
input {
|
input {
|
||||||
right: 50%;
|
right: 180px;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.code {
|
.code {
|
||||||
width: 50%;
|
color: #333;
|
||||||
|
width: 180px;
|
||||||
background: #dfdfdf;
|
background: #dfdfdf;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -244,14 +244,15 @@
|
||||||
|
|
||||||
.yanzhengma {
|
.yanzhengma {
|
||||||
input {
|
input {
|
||||||
right: 50%;
|
right: 180px;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.code {
|
.code {
|
||||||
width: 50%;
|
color: #333;
|
||||||
|
width: 180px;
|
||||||
background: #dfdfdf;
|
background: #dfdfdf;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btnlogin" @click="handleTelLogin">{{$t("btnConfirm")}}</view>
|
<view class="btnlogin" @click="handleOutLogin">{{$t("btnConfirm")}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -36,40 +36,35 @@
|
||||||
onLoad() {
|
onLoad() {
|
||||||
let that = this
|
let that = this
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: that.$t('titleEmail')
|
title: that.$t('btnDeleteAccount')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 登录、
|
handleOutLogin() {
|
||||||
handleTelLogin() {
|
|
||||||
let that = this
|
let that = this
|
||||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
uni.showModal({
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
title: that.$t("msgTitle"),
|
||||||
return
|
confirmText: that.$t("btnDelete"),
|
||||||
}
|
content: that.$t("verifyDeleteAccount"),
|
||||||
if (!that.code) {
|
success: function(res) {
|
||||||
that.$tools.msg(that.$t("verifyCode"))
|
if (res.confirm) {
|
||||||
return
|
that.$model.getdeleteAccount({}).then((res) => {
|
||||||
}
|
if (res.code != 0) return
|
||||||
that.$model.getAccountMsg({
|
that.$tools.msg($t('msgDelete'));
|
||||||
data: that.phone,
|
uni.setStorageSync('token', null)
|
||||||
code: that.code,
|
uni.setStorageSync('aan_id', null)
|
||||||
}).then(res => {
|
uni.clearStorageSync()
|
||||||
if (res.code != 0) {
|
setTimeout(() => {
|
||||||
that.$tools.msg(res.msg)
|
uni.reLaunch({
|
||||||
return
|
url: "/pageTwo/login/login"
|
||||||
} else {
|
})
|
||||||
that.$tools.msg(that.$t("msgSetSuccess"))
|
}, 3000);
|
||||||
that.$store.commit('changeAccountNumber', {
|
|
||||||
my_email: that.phone
|
|
||||||
})
|
|
||||||
setTimeout(function() {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: "/pageTwo/setting/setting"
|
|
||||||
})
|
})
|
||||||
}, 1000)
|
} else if (res.cancel) {
|
||||||
}
|
that.$tools.msg($t("msgCancel"));
|
||||||
}).catch(err => {})
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
handleCode() {
|
handleCode() {
|
||||||
|
|
@ -144,19 +139,21 @@
|
||||||
.item {
|
.item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
width: 80px;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
width: calc(100% - 100px);
|
width: 100%;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -179,14 +176,15 @@
|
||||||
|
|
||||||
.yanzhengma {
|
.yanzhengma {
|
||||||
input {
|
input {
|
||||||
right: 140rpx;
|
right: 180px;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.code {
|
.code {
|
||||||
width: auto;
|
color: #333;
|
||||||
|
width: 180px;
|
||||||
background: #dfdfdf;
|
background: #dfdfdf;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,21 @@
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="login">
|
<view class="login">
|
||||||
<view class="editem">
|
<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="item">
|
||||||
<view class="text">{{$t('titlePassword')}}</view>
|
<view class="text">{{$t('titlePassword')}}</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
|
|
@ -26,6 +41,10 @@
|
||||||
return {
|
return {
|
||||||
password: "",
|
password: "",
|
||||||
password2: "",
|
password2: "",
|
||||||
|
phone: "",
|
||||||
|
code: "",
|
||||||
|
disabled: false,
|
||||||
|
second: 60,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -38,6 +57,14 @@
|
||||||
// 登录、
|
// 登录、
|
||||||
handleTelLogin() {
|
handleTelLogin() {
|
||||||
let that = this
|
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) {
|
if (!that.password) {
|
||||||
that.$tools.msg(that.$t('verifyPassword'))
|
that.$tools.msg(that.$t('verifyPassword'))
|
||||||
return
|
return
|
||||||
|
|
@ -51,6 +78,8 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
that.$model.getAccountPassword({
|
that.$model.getAccountPassword({
|
||||||
|
data: that.phone,
|
||||||
|
code: that.code,
|
||||||
password: that.password,
|
password: that.password,
|
||||||
c_password: that.password2,
|
c_password: that.password2,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
@ -65,6 +94,38 @@
|
||||||
}
|
}
|
||||||
}).catch(err => {})
|
}).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>
|
</script>
|
||||||
|
|
@ -99,13 +160,14 @@
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
|
|
@ -129,9 +191,28 @@
|
||||||
z-index: 88;
|
z-index: 88;
|
||||||
font-size: 28rpx;
|
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 {
|
.btnlogin {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,12 @@
|
||||||
<view class="text">{{$t('titleSetPassword')}}</view>
|
<view class="text">{{$t('titleSetPassword')}}</view>
|
||||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||||
</view>
|
</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 class="btn mb-15" @click="handleOutLogin">删除账号</view> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -55,7 +60,7 @@
|
||||||
content: that.$t('verifyDeleteAccount'),
|
content: that.$t('verifyDeleteAccount'),
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
that.$model.getdeleteAccount({}).then((res) => {
|
that.$model.getDeleteAccount({}).then((res) => {
|
||||||
if (res.code != 0) return
|
if (res.code != 0) return
|
||||||
that.$tools.msg(that.$t('msgDelete'));
|
that.$tools.msg(that.$t('msgDelete'));
|
||||||
uni.setStorageSync('token', null)
|
uni.setStorageSync('token', null)
|
||||||
|
|
@ -129,7 +134,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
width: auto;
|
width: 90%;
|
||||||
background: #999;
|
background: #999;
|
||||||
margin: 100rpx 30rpx 0 30rpx;
|
margin: 100rpx 30rpx 0 30rpx;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@
|
||||||
{
|
{
|
||||||
"path": "setting/email",
|
"path": "setting/email",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "绑定邮箱",
|
"navigationBarTitleText": "删除账号",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAccountPassword(param) { // 修改密码
|
getAccountPassword(param) { // 修改密码
|
||||||
return http.post("/kitchenscale3/update_my_password", param).then(res => {
|
return http.post("/kitchenscale3/reset_password", param).then(res => {
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -59,6 +59,12 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getDeleteAccount(param) { // 账号注销
|
||||||
|
return http.post("/kitchenscale3/delete_account", param).then(res => {
|
||||||
|
return res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 首页
|
// 首页
|
||||||
getHomeInfo(param) { // 默认数据
|
getHomeInfo(param) { // 默认数据
|
||||||
return http.post("/kitchenscale3/get_homepage_information", param).then(res => {
|
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-face {
|
||||||
font-family: 'iconfont';
|
font-family: 'iconfont';
|
||||||
|
|
|
||||||
|
|
@ -18527,7 +18527,7 @@ var _default = {
|
||||||
}, {
|
}, {
|
||||||
"path": "setting/email",
|
"path": "setting/email",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "绑定邮箱",
|
"navigationBarTitleText": "删除账号",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
|
@ -28275,7 +28275,7 @@ var _default = (_getonlogin$getSendCo = {
|
||||||
},
|
},
|
||||||
getAccountPassword: function getAccountPassword(param) {
|
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;
|
return res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -28303,6 +28303,12 @@ var _default = (_getonlogin$getSendCo = {
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getDeleteAccount: function getDeleteAccount(param) {
|
||||||
|
// 账号注销
|
||||||
|
return _https.default.post("/kitchenscale3/delete_account", param).then(function (res) {
|
||||||
|
return res;
|
||||||
|
});
|
||||||
|
},
|
||||||
// 首页
|
// 首页
|
||||||
getHomeInfo: function getHomeInfo(param) {
|
getHomeInfo: function getHomeInfo(param) {
|
||||||
// 默认数据
|
// 默认数据
|
||||||
|
|
|
||||||
|
|
@ -96,11 +96,12 @@
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
.login .editem .item .yanzhengma input.data-v-56b2e1a4 {
|
.login .editem .item .yanzhengma input.data-v-56b2e1a4 {
|
||||||
right: 50%;
|
right: 180px;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
.login .editem .code.data-v-56b2e1a4 {
|
.login .editem .code.data-v-56b2e1a4 {
|
||||||
width: 50%;
|
color: #333;
|
||||||
|
width: 180px;
|
||||||
background: #dfdfdf;
|
background: #dfdfdf;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.login.data-v-111bb4d3 {
|
.login.data-v-111bb4d3 {
|
||||||
width: 86%;
|
width: 94%;
|
||||||
height: auto;
|
height: auto;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 7%;
|
left: 3%;
|
||||||
top: 28%;
|
top: 28%;
|
||||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||||
}
|
}
|
||||||
|
|
@ -120,11 +120,12 @@
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.login .editem .item .yanzhengma input.data-v-111bb4d3 {
|
.login .editem .item .yanzhengma input.data-v-111bb4d3 {
|
||||||
right: 50%;
|
right: 180px;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.login .editem .code.data-v-111bb4d3 {
|
.login .editem .code.data-v-111bb4d3 {
|
||||||
width: 50%;
|
color: #333;
|
||||||
|
width: 180px;
|
||||||
background: #dfdfdf;
|
background: #dfdfdf;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -197,40 +197,35 @@ var _default = {
|
||||||
onLoad: function onLoad() {
|
onLoad: function onLoad() {
|
||||||
var that = this;
|
var that = this;
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: that.$t('titleEmail')
|
title: that.$t('btnDeleteAccount')
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 登录、
|
handleOutLogin: function handleOutLogin() {
|
||||||
handleTelLogin: function handleTelLogin() {
|
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
uni.showModal({
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
title: that.$t("msgTitle"),
|
||||||
return;
|
confirmText: that.$t("btnDelete"),
|
||||||
}
|
content: that.$t("verifyDeleteAccount"),
|
||||||
if (!that.code) {
|
success: function success(res) {
|
||||||
that.$tools.msg(that.$t("verifyCode"));
|
if (res.confirm) {
|
||||||
return;
|
that.$model.getdeleteAccount({}).then(function (res) {
|
||||||
}
|
if (res.code != 0) return;
|
||||||
that.$model.getAccountMsg({
|
that.$tools.msg($t('msgDelete'));
|
||||||
data: that.phone,
|
uni.setStorageSync('token', null);
|
||||||
code: that.code
|
uni.setStorageSync('aan_id', null);
|
||||||
}).then(function (res) {
|
uni.clearStorageSync();
|
||||||
if (res.code != 0) {
|
setTimeout(function () {
|
||||||
that.$tools.msg(res.msg);
|
uni.reLaunch({
|
||||||
return;
|
url: "/pageTwo/login/login"
|
||||||
} else {
|
});
|
||||||
that.$tools.msg(that.$t("msgSetSuccess"));
|
}, 3000);
|
||||||
that.$store.commit('changeAccountNumber', {
|
|
||||||
my_email: that.phone
|
|
||||||
});
|
|
||||||
setTimeout(function () {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: "/pageTwo/setting/setting"
|
|
||||||
});
|
});
|
||||||
}, 1000);
|
} else if (res.cancel) {
|
||||||
|
that.$tools.msg($t("msgCancel"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catch(function (err) {});
|
});
|
||||||
},
|
},
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
handleCode: function handleCode() {
|
handleCode: function handleCode() {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "绑定邮箱",
|
"navigationBarTitleText": "删除账号",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"usingComponents": {}
|
"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 {
|
.login .editem .item.data-v-4f40ebad {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
.login .editem .item .text.data-v-4f40ebad {
|
.login .editem .item .text.data-v-4f40ebad {
|
||||||
width: 80px;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.login .editem .item .input.data-v-4f40ebad {
|
.login .editem .item .input.data-v-4f40ebad {
|
||||||
width: calc(100% - 100px);
|
width: 100%;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -86,11 +88,12 @@
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.login .editem .item .yanzhengma input.data-v-4f40ebad {
|
.login .editem .item .yanzhengma input.data-v-4f40ebad {
|
||||||
right: 140rpx;
|
right: 180px;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.login .editem .code.data-v-4f40ebad {
|
.login .editem .code.data-v-4f40ebad {
|
||||||
width: auto;
|
color: #333;
|
||||||
|
width: 180px;
|
||||||
background: #dfdfdf;
|
background: #dfdfdf;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -102,11 +102,16 @@ var render = function () {
|
||||||
var _vm = this
|
var _vm = this
|
||||||
var _h = _vm.$createElement
|
var _h = _vm.$createElement
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
var m0 = _vm.$t("titlePassword")
|
var m0 = _vm.$t("infoEmail")
|
||||||
var m1 = _vm.$t("verifyPassword")
|
var m1 = _vm.$t("verifyEmail")
|
||||||
var m2 = _vm.$t("titleConfirmPassword")
|
var m2 = _vm.$t("titleCode")
|
||||||
var m3 = _vm.$t("verifyPasswordTwo")
|
var m3 = _vm.second < 60 ? _vm.$t("titleSendCodeRetry") : null
|
||||||
var m4 = _vm.$t("btnSubmit")
|
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(
|
_vm.$mp.data = Object.assign(
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
|
|
@ -116,6 +121,11 @@ var render = function () {
|
||||||
m2: m2,
|
m2: m2,
|
||||||
m3: m3,
|
m3: m3,
|
||||||
m4: m4,
|
m4: m4,
|
||||||
|
m5: m5,
|
||||||
|
m6: m6,
|
||||||
|
m7: m7,
|
||||||
|
m8: m8,
|
||||||
|
m9: m9,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -180,11 +190,30 @@ exports.default = void 0;
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
var _default = {
|
var _default = {
|
||||||
data: function data() {
|
data: function data() {
|
||||||
return {
|
return {
|
||||||
password: "",
|
password: "",
|
||||||
password2: ""
|
password2: "",
|
||||||
|
phone: "",
|
||||||
|
code: "",
|
||||||
|
disabled: false,
|
||||||
|
second: 60
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function onLoad() {
|
onLoad: function onLoad() {
|
||||||
|
|
@ -197,6 +226,14 @@ var _default = {
|
||||||
// 登录、
|
// 登录、
|
||||||
handleTelLogin: function handleTelLogin() {
|
handleTelLogin: function handleTelLogin() {
|
||||||
var that = this;
|
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) {
|
if (!that.password) {
|
||||||
that.$tools.msg(that.$t('verifyPassword'));
|
that.$tools.msg(that.$t('verifyPassword'));
|
||||||
return;
|
return;
|
||||||
|
|
@ -210,6 +247,8 @@ var _default = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
that.$model.getAccountPassword({
|
that.$model.getAccountPassword({
|
||||||
|
data: that.phone,
|
||||||
|
code: that.code,
|
||||||
password: that.password,
|
password: that.password,
|
||||||
c_password: that.password2
|
c_password: that.password2
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
|
|
@ -223,6 +262,38 @@ var _default = {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
}).catch(function (err) {});
|
}).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;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
.login .editem .item .text.data-v-02e9ad9a {
|
.login .editem .item .text.data-v-02e9ad9a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.login .editem .item .input.data-v-02e9ad9a {
|
.login .editem .item .input.data-v-02e9ad9a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -79,6 +80,21 @@
|
||||||
z-index: 88;
|
z-index: 88;
|
||||||
font-size: 28rpx;
|
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 {
|
.login .btnlogin.data-v-02e9ad9a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
|
|
|
||||||
|
|
@ -126,11 +126,13 @@ var render = function () {
|
||||||
var _h = _vm.$createElement
|
var _h = _vm.$createElement
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
var m0 = _vm.$t("titleSetPassword")
|
var m0 = _vm.$t("titleSetPassword")
|
||||||
|
var m1 = _vm.$t("btnDeleteAccount")
|
||||||
_vm.$mp.data = Object.assign(
|
_vm.$mp.data = Object.assign(
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
$root: {
|
$root: {
|
||||||
m0: m0,
|
m0: m0,
|
||||||
|
m1: m1,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -206,7 +208,7 @@ var _default = {
|
||||||
content: that.$t('verifyDeleteAccount'),
|
content: that.$t('verifyDeleteAccount'),
|
||||||
success: function success(res) {
|
success: function success(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
that.$model.getdeleteAccount({}).then(function (res) {
|
that.$model.getDeleteAccount({}).then(function (res) {
|
||||||
if (res.code != 0) return;
|
if (res.code != 0) return;
|
||||||
that.$tools.msg(that.$t('msgDelete'));
|
that.$tools.msg(that.$t('msgDelete'));
|
||||||
uni.setStorageSync('token', null);
|
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;
|
border-bottom: 1px solid #dfdfdf;
|
||||||
}
|
}
|
||||||
.btn.data-v-4a3c3a21 {
|
.btn.data-v-4a3c3a21 {
|
||||||
width: auto;
|
width: 90%;
|
||||||
background: #999;
|
background: #999;
|
||||||
margin: 100rpx 30rpx 0 30rpx;
|
margin: 100rpx 30rpx 0 30rpx;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue