forked from angelo/web-retail-h5
feat(userSecure): 移除月度累计业绩入口,删除更新邮箱相关内容
This commit is contained in:
parent
d6a998fb1a
commit
27f4be0621
|
@ -24,9 +24,6 @@ export const forgetVerification = (params) => http.get('/member/api/sms/forget-v
|
||||||
//保存地址
|
//保存地址
|
||||||
export const saveAddress = (data) => http.post('/member/api/member-address/save', data)
|
export const saveAddress = (data) => http.post('/member/api/member-address/save', data)
|
||||||
|
|
||||||
//更新邮箱
|
|
||||||
export const updateEmail = (data) => http.put('/member/api/member/update-email', data)
|
|
||||||
|
|
||||||
//更新密码
|
//更新密码
|
||||||
export const updatePassword = (data) => http.put('/member/api/member/update-password', data)
|
export const updatePassword = (data) => http.put('/member/api/member/update-password', data)
|
||||||
|
|
||||||
|
|
|
@ -80,13 +80,6 @@
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/forgetEmail/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "邮箱设置",
|
|
||||||
"navigationBarBackgroundColor": "#fff"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/forgetPayPassword/index",
|
"path": "pages/forgetPayPassword/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -1,239 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="main">
|
|
||||||
<view class="contents">
|
|
||||||
<u-form ref="uForm" :model="emailObj"
|
|
||||||
class="paddings"
|
|
||||||
labelWidth="auto">
|
|
||||||
<u-form-item :label="'邮箱'"
|
|
||||||
label-width="60px"
|
|
||||||
prop="emailed">
|
|
||||||
<u-input v-model="emailObj.emailed" class="border-color"
|
|
||||||
disabled
|
|
||||||
placeholder=""
|
|
||||||
placeholder-class="place-class" />
|
|
||||||
</u-form-item>
|
|
||||||
<u-form-item :label="'验证码'"
|
|
||||||
label-width="60px"
|
|
||||||
prop="code">
|
|
||||||
<u-input v-model="emailObj.code" class="border-color width-s"
|
|
||||||
|
|
||||||
:placeholder="'请输入验证码'"
|
|
||||||
placeholder-class="place-class" />
|
|
||||||
|
|
||||||
<!-- <view class="yzm" @click="submit">
|
|
||||||
{{getCodeText}}
|
|
||||||
</view> -->
|
|
||||||
<button :disabled="disabled" class="yzm" @click.stop="getCode()">
|
|
||||||
{{getCodeText}}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</u-form-item>
|
|
||||||
<u-form-item label="新邮箱"
|
|
||||||
label-width="60px"
|
|
||||||
prop="email"
|
|
||||||
style="display: flex;">
|
|
||||||
<u-input v-model="emailObj.email" class="border-color"
|
|
||||||
:placeholder="'请输入新邮箱'"
|
|
||||||
placeholder-class="place-class" />
|
|
||||||
|
|
||||||
</u-form-item>
|
|
||||||
</u-form>
|
|
||||||
</view>
|
|
||||||
<u-button class="btn"
|
|
||||||
shape="circle"
|
|
||||||
type="success"
|
|
||||||
@click="submit"
|
|
||||||
>{{'确定'}}</u-button>
|
|
||||||
<view style="height: 20rpx;"></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import * as api from '@/config/login.js'
|
|
||||||
import { setToken } from '@/config/auth.js'
|
|
||||||
import address from '@/components/address.vue'
|
|
||||||
import store from '@/store'
|
|
||||||
import {getData} from "../../config/login";
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
getCodeText: '获取验证码',
|
|
||||||
disabled:false,
|
|
||||||
time:60,
|
|
||||||
yzmCheck:false,
|
|
||||||
userInfo:'',
|
|
||||||
emailObj: {
|
|
||||||
emailed: '',
|
|
||||||
code: '',
|
|
||||||
email: '',
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
emailed:[
|
|
||||||
{
|
|
||||||
// 必填项
|
|
||||||
required: false,
|
|
||||||
// 提示内容(会出现在u-form-item内的底部)
|
|
||||||
message: "邮箱不能为空",
|
|
||||||
trigger: ["blur"],
|
|
||||||
}
|
|
||||||
],
|
|
||||||
code:[
|
|
||||||
{
|
|
||||||
// 必填项
|
|
||||||
required: true,
|
|
||||||
// 提示内容(会出现在u-form-item内的底部)
|
|
||||||
message: "验证码不能为空",
|
|
||||||
trigger: ["blur"],
|
|
||||||
}
|
|
||||||
],
|
|
||||||
email:[
|
|
||||||
{
|
|
||||||
// 必填项
|
|
||||||
required: true,
|
|
||||||
// 提示内容(会出现在u-form-item内的底部)
|
|
||||||
message: "新邮箱不能为空",
|
|
||||||
trigger: ["blur"],
|
|
||||||
}
|
|
||||||
],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(option) {
|
|
||||||
this.getMemberInfo();
|
|
||||||
},
|
|
||||||
onReady() {
|
|
||||||
this.$refs.uForm.setRules(this.rules);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getMemberInfo() {
|
|
||||||
api.getData().then((res) => {
|
|
||||||
// safty: {
|
|
||||||
// loginPwd: 111111,
|
|
||||||
// payPwd: 111111,
|
|
||||||
// email: 111111,
|
|
||||||
// tel: 111111,
|
|
||||||
// },
|
|
||||||
this.emailObj.emailed = res.data.email || ''
|
|
||||||
})
|
|
||||||
},
|
|
||||||
submit() {
|
|
||||||
this.$refs.uForm.validate().then((res) => {
|
|
||||||
api.updateEmail(this.emailObj).then((res)=>{
|
|
||||||
if(res.code=='200'){
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
success() {
|
|
||||||
setTimeout(()=>{
|
|
||||||
uni.navigateTo({
|
|
||||||
url:"/pages/login/index"
|
|
||||||
})
|
|
||||||
},2000)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
uni.showToast({
|
|
||||||
icon:"none",
|
|
||||||
title:res.msg
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getCode() {
|
|
||||||
// this.disabled = true
|
|
||||||
// this.getCodeText = "发送中..." //发送验证码
|
|
||||||
// this.getCodeisWaiting = true;
|
|
||||||
// this.getCodeBtnColor = "rgba(255,255,255,0.5)" //追加样式,修改颜色
|
|
||||||
this.getYzm()
|
|
||||||
},
|
|
||||||
getYzm() {
|
|
||||||
api.verification().then((res)=>{
|
|
||||||
if(res.code=='200'){
|
|
||||||
setTimeout(() => {
|
|
||||||
//this.$common.msg('验证码已发送')
|
|
||||||
uni.showToast({
|
|
||||||
title: '验证码已发送',
|
|
||||||
icon: "none"
|
|
||||||
}); //弹出提示框
|
|
||||||
this.setTimer(); //调用定时器方法
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
setTimer() {
|
|
||||||
this.disabled = true
|
|
||||||
let holdTime = 60; //定义变量并赋值
|
|
||||||
this.getCodeText = '重新获取' + "(60)"
|
|
||||||
//setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
|
|
||||||
//setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
|
|
||||||
this.time = setInterval(() => {
|
|
||||||
if (holdTime <= 0) {
|
|
||||||
this.disabled = false
|
|
||||||
this.getCodeisWaiting = false;
|
|
||||||
this.getCodeBtnColor = "#ffffff";
|
|
||||||
this.getCodeText = '获取验证码'
|
|
||||||
clearInterval(this.time); //清除该函数
|
|
||||||
return; //返回前面
|
|
||||||
}
|
|
||||||
this.getCodeText = '重新获取' + "(" + holdTime + ")"
|
|
||||||
holdTime--;
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
:v-deep uni-button:after{
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
:v-deep .u-form-item__body__right__message{
|
|
||||||
margin-left: 170rpx !important;
|
|
||||||
}
|
|
||||||
.yzm{
|
|
||||||
// width: 161rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
line-height: 74rpx;
|
|
||||||
text-align: center;
|
|
||||||
color: #fff;
|
|
||||||
background: #2FBC42;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
margin-left: 30rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
:v-deep .u-form-item:nth-child(2){
|
|
||||||
width: 670rpx;
|
|
||||||
}
|
|
||||||
.contents{
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
page{
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
}
|
|
||||||
:v-deep .width-s{
|
|
||||||
width: 200rpx !important;
|
|
||||||
}
|
|
||||||
.paddings{
|
|
||||||
padding: 30rpx 0rpx;
|
|
||||||
margin: 0 40rpx;
|
|
||||||
}
|
|
||||||
.border-color{
|
|
||||||
border-radius: 50rpx;
|
|
||||||
padding-left: 50rpx !important;
|
|
||||||
font-size: 28rpx;
|
|
||||||
width: 400rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
background: #F5F6F8;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
.btn{
|
|
||||||
background-color: #005BAC;
|
|
||||||
border: none;
|
|
||||||
height: 92rpx;
|
|
||||||
line-height: 92rpx;
|
|
||||||
font-size:30rpx;
|
|
||||||
margin: 40rpx auto;
|
|
||||||
width: 690rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,48 +1,55 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="contents">
|
<view class="contents">
|
||||||
<u-form ref="uForm" :model="emailObj"
|
<u-form ref="uForm" :model="emailObj" class="paddings" labelWidth="auto">
|
||||||
class="paddings"
|
<u-form-item
|
||||||
labelWidth="auto">
|
:label="'旧密码'"
|
||||||
<u-form-item :label="'旧密码'"
|
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
prop="email"
|
prop="email"
|
||||||
style="display: flex;">
|
style="display: flex"
|
||||||
<u-input v-model="emailObj.oldPassword" class="border-color"
|
>
|
||||||
|
<u-input
|
||||||
|
v-model="emailObj.oldPassword"
|
||||||
|
class="border-color"
|
||||||
:placeholder="'请输入密码'"
|
:placeholder="'请输入密码'"
|
||||||
:password="true"
|
:password="true"
|
||||||
placeholder-class="place-class" />
|
placeholder-class="place-class"
|
||||||
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item :label="'新密码'"
|
<u-form-item
|
||||||
|
:label="'新密码'"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
prop="email"
|
prop="email"
|
||||||
style="display: flex;">
|
style="display: flex"
|
||||||
<u-input v-model="emailObj.newPassword" class="border-color"
|
>
|
||||||
|
<u-input
|
||||||
|
v-model="emailObj.newPassword"
|
||||||
|
class="border-color"
|
||||||
:password="true"
|
:password="true"
|
||||||
:placeholder="'请输入密码'"
|
:placeholder="'请输入密码'"
|
||||||
placeholder-class="place-class" />
|
placeholder-class="place-class"
|
||||||
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item :label="'请确认密码'"
|
<u-form-item
|
||||||
|
:label="'请确认密码'"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
prop="email"
|
prop="email"
|
||||||
style="display: flex;">
|
style="display: flex"
|
||||||
<u-input v-model="emailObj.loginPassword" class="border-color"
|
>
|
||||||
|
<u-input
|
||||||
|
v-model="emailObj.loginPassword"
|
||||||
|
class="border-color"
|
||||||
:password="true"
|
:password="true"
|
||||||
:placeholder="'请输入新邮箱'"
|
:placeholder="'请输入新邮箱'"
|
||||||
placeholder-class="place-class" />
|
placeholder-class="place-class"
|
||||||
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
</view>
|
</view>
|
||||||
<u-button class="btn"
|
<u-button class="btn" shape="circle" type="success" @click="upLoginPwd">{{
|
||||||
shape="circle"
|
'确定'
|
||||||
type="success"
|
}}</u-button>
|
||||||
@click="upLoginPwd"
|
<view style="height: 20rpx"></view>
|
||||||
>{{'确定'}}</u-button>
|
|
||||||
<view style="height: 20rpx;"></view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -55,50 +62,49 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
getCodeText: '获取验证码',
|
getCodeText: '获取验证码',
|
||||||
disabled:false,
|
disabled: false,
|
||||||
time:60,
|
time: 60,
|
||||||
yzmCheck:false,
|
yzmCheck: false,
|
||||||
userInfo:'',
|
userInfo: '',
|
||||||
emailObj: {
|
emailObj: {
|
||||||
oldPassword: '',
|
oldPassword: '',
|
||||||
loginPassword: '',
|
loginPassword: '',
|
||||||
newPassword: '',
|
newPassword: '',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
oldPassword:[
|
oldPassword: [
|
||||||
{
|
{
|
||||||
// 必填项
|
// 必填项
|
||||||
required: true,
|
required: true,
|
||||||
// 提示内容(会出现在u-form-item内的底部)
|
// 提示内容(会出现在u-form-item内的底部)
|
||||||
message: '密码不能为空',
|
message: '密码不能为空',
|
||||||
trigger: ["blur"],
|
trigger: ['blur'],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
loginPassword:[
|
loginPassword: [
|
||||||
{
|
{
|
||||||
// 必填项
|
// 必填项
|
||||||
required: true,
|
required: true,
|
||||||
// 提示内容(会出现在u-form-item内的底部)
|
// 提示内容(会出现在u-form-item内的底部)
|
||||||
message: '密码不能为空',
|
message: '密码不能为空',
|
||||||
trigger: ["blur"],
|
trigger: ['blur'],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
newPassword:[
|
newPassword: [
|
||||||
{
|
{
|
||||||
// 必填项
|
// 必填项
|
||||||
required: true,
|
required: true,
|
||||||
// 提示内容(会出现在u-form-item内的底部)
|
// 提示内容(会出现在u-form-item内的底部)
|
||||||
message: '密码不能为空',
|
message: '密码不能为空',
|
||||||
trigger: ["blur"],
|
trigger: ['blur'],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {},
|
||||||
},
|
|
||||||
onReady() {
|
onReady() {
|
||||||
this.$refs.uForm.setRules(this.rules);
|
this.$refs.uForm.setRules(this.rules)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
upLoginPwd(index) {
|
upLoginPwd(index) {
|
||||||
|
@ -112,49 +118,25 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// loginObj
|
// loginObj
|
||||||
api.updatePassword(this.emailObj).then((res) => {
|
api.updatePassword(this.emailObj).then(res => {
|
||||||
if (res.code == '200') {
|
if (res.code == '200') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none"
|
icon: 'none',
|
||||||
});
|
})
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
this.$store.dispatch('LogOut')
|
this.$store.dispatch('LogOut')
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/index'
|
url: '/pages/login/index',
|
||||||
})
|
})
|
||||||
},2000)
|
}, 2000)
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none"
|
icon: 'none',
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
submit() {
|
|
||||||
this.$refs.uForm.validate().then((res) => {
|
|
||||||
api.updateEmail(this.emailObj).then((res)=>{
|
|
||||||
if(res.code=='200'){
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
success() {
|
|
||||||
setTimeout(()=>{
|
|
||||||
uni.navigateTo({
|
|
||||||
url:"/pages/login/index"
|
|
||||||
})
|
|
||||||
},2000)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
uni.showToast({
|
|
||||||
icon:"none",
|
|
||||||
title:res.msg
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getCode() {
|
getCode() {
|
||||||
// this.disabled = true
|
// this.disabled = true
|
||||||
|
@ -164,92 +146,92 @@ export default {
|
||||||
this.getYzm()
|
this.getYzm()
|
||||||
},
|
},
|
||||||
getYzm() {
|
getYzm() {
|
||||||
api.verification().then((res)=>{
|
api.verification().then(res => {
|
||||||
if(res.code=='200'){
|
if (res.code == '200') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
//this.$common.msg('验证码已发送')
|
//this.$common.msg('验证码已发送')
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码已发送',
|
title: '验证码已发送',
|
||||||
icon: "none"
|
icon: 'none',
|
||||||
}); //弹出提示框
|
}) //弹出提示框
|
||||||
this.setTimer(); //调用定时器方法
|
this.setTimer() //调用定时器方法
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setTimer() {
|
setTimer() {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
let holdTime = 60; //定义变量并赋值
|
let holdTime = 60 //定义变量并赋值
|
||||||
this.getCodeText = '重新获取' + "(60)"
|
this.getCodeText = '重新获取' + '(60)'
|
||||||
//setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
|
//setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
|
||||||
//setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
|
//setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
|
||||||
this.time = setInterval(() => {
|
this.time = setInterval(() => {
|
||||||
if (holdTime <= 0) {
|
if (holdTime <= 0) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.getCodeisWaiting = false;
|
this.getCodeisWaiting = false
|
||||||
this.getCodeBtnColor = "#ffffff";
|
this.getCodeBtnColor = '#ffffff'
|
||||||
this.getCodeText = '获取验证码'
|
this.getCodeText = '获取验证码'
|
||||||
clearInterval(this.time); //清除该函数
|
clearInterval(this.time) //清除该函数
|
||||||
return; //返回前面
|
return //返回前面
|
||||||
}
|
}
|
||||||
this.getCodeText = '重新获取' + "(" + holdTime + ")"
|
this.getCodeText = '重新获取' + '(' + holdTime + ')'
|
||||||
holdTime--;
|
holdTime--
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:v-deep uni-button:after{
|
:v-deep uni-button:after {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
:v-deep .u-form-item__body__right__message{
|
:v-deep .u-form-item__body__right__message {
|
||||||
margin-left: 170rpx !important;
|
margin-left: 170rpx !important;
|
||||||
}
|
}
|
||||||
.yzm{
|
.yzm {
|
||||||
// width: 161rpx;
|
// width: 161rpx;
|
||||||
height: 74rpx;
|
height: 74rpx;
|
||||||
line-height: 74rpx;
|
line-height: 74rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #2FBC42;
|
background: #2fbc42;
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
:v-deep .u-form-item:nth-child(2){
|
:v-deep .u-form-item:nth-child(2) {
|
||||||
width: 670rpx;
|
width: 670rpx;
|
||||||
}
|
}
|
||||||
.contents{
|
.contents {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
page{
|
page {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
}
|
}
|
||||||
:v-deep .width-s{
|
:v-deep .width-s {
|
||||||
width: 200rpx !important;
|
width: 200rpx !important;
|
||||||
}
|
}
|
||||||
.paddings{
|
.paddings {
|
||||||
padding: 30rpx 0rpx;
|
padding: 30rpx 0rpx;
|
||||||
margin: 0 40rpx;
|
margin: 0 40rpx;
|
||||||
}
|
}
|
||||||
.border-color{
|
.border-color {
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
padding-left: 50rpx !important;
|
padding-left: 50rpx !important;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
width: 400rpx;
|
width: 400rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
background: #F5F6F8;
|
background: #f5f6f8;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.btn{
|
.btn {
|
||||||
background-color: #005BAC;
|
background-color: #005bac;
|
||||||
border: none;
|
border: none;
|
||||||
height: 92rpx;
|
height: 92rpx;
|
||||||
line-height: 92rpx;
|
line-height: 92rpx;
|
||||||
font-size:30rpx;
|
font-size: 30rpx;
|
||||||
margin: 40rpx auto;
|
margin: 40rpx auto;
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,48 +1,55 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="contents">
|
<view class="contents">
|
||||||
<u-form ref="uForm" :model="emailObj"
|
<u-form ref="uForm" :model="emailObj" class="paddings" labelWidth="auto">
|
||||||
class="paddings"
|
<u-form-item
|
||||||
labelWidth="auto">
|
:label="'旧密码'"
|
||||||
<u-form-item :label="'旧密码'"
|
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
prop="email"
|
prop="email"
|
||||||
style="display: flex;">
|
style="display: flex"
|
||||||
<u-input v-model="emailObj.oldPassword" class="border-color"
|
>
|
||||||
|
<u-input
|
||||||
|
v-model="emailObj.oldPassword"
|
||||||
|
class="border-color"
|
||||||
:placeholder="'请输入旧密码'"
|
:placeholder="'请输入旧密码'"
|
||||||
:password="true"
|
:password="true"
|
||||||
placeholder-class="place-class" />
|
placeholder-class="place-class"
|
||||||
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item :label="'新密码'"
|
<u-form-item
|
||||||
|
:label="'新密码'"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
prop="email"
|
prop="email"
|
||||||
style="display: flex;">
|
style="display: flex"
|
||||||
<u-input v-model="emailObj.payPassword" class="border-color"
|
>
|
||||||
|
<u-input
|
||||||
|
v-model="emailObj.payPassword"
|
||||||
|
class="border-color"
|
||||||
:password="true"
|
:password="true"
|
||||||
:placeholder="'请输入新密码'"
|
:placeholder="'请输入新密码'"
|
||||||
placeholder-class="place-class" />
|
placeholder-class="place-class"
|
||||||
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item :label="'请确认密码'"
|
<u-form-item
|
||||||
|
:label="'请确认密码'"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
prop="email"
|
prop="email"
|
||||||
style="display: flex;">
|
style="display: flex"
|
||||||
<u-input v-model="emailObj.loginPassword" class="border-color"
|
>
|
||||||
|
<u-input
|
||||||
|
v-model="emailObj.loginPassword"
|
||||||
|
class="border-color"
|
||||||
:password="true"
|
:password="true"
|
||||||
:placeholder="'请确认密码'"
|
:placeholder="'请确认密码'"
|
||||||
placeholder-class="place-class" />
|
placeholder-class="place-class"
|
||||||
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
</view>
|
</view>
|
||||||
<u-button class="btn"
|
<u-button class="btn" shape="circle" type="success" @click="upLoginPwd">{{
|
||||||
shape="circle"
|
'确定'
|
||||||
type="success"
|
}}</u-button>
|
||||||
@click="upLoginPwd"
|
<view style="height: 20rpx"></view>
|
||||||
>{{'确定'}}</u-button>
|
|
||||||
<view style="height: 20rpx;"></view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -55,50 +62,49 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
getCodeText: '获取验证码',
|
getCodeText: '获取验证码',
|
||||||
disabled:false,
|
disabled: false,
|
||||||
time:60,
|
time: 60,
|
||||||
yzmCheck:false,
|
yzmCheck: false,
|
||||||
userInfo:'',
|
userInfo: '',
|
||||||
emailObj: {
|
emailObj: {
|
||||||
oldPassword: '',
|
oldPassword: '',
|
||||||
loginPassword: '',
|
loginPassword: '',
|
||||||
payPassword: '',
|
payPassword: '',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
oldPassword:[
|
oldPassword: [
|
||||||
{
|
{
|
||||||
// 必填项
|
// 必填项
|
||||||
required: true,
|
required: true,
|
||||||
// 提示内容(会出现在u-form-item内的底部)
|
// 提示内容(会出现在u-form-item内的底部)
|
||||||
message: '密码不能为空',
|
message: '密码不能为空',
|
||||||
trigger: ["blur"],
|
trigger: ['blur'],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
loginPassword:[
|
loginPassword: [
|
||||||
{
|
{
|
||||||
// 必填项
|
// 必填项
|
||||||
required: true,
|
required: true,
|
||||||
// 提示内容(会出现在u-form-item内的底部)
|
// 提示内容(会出现在u-form-item内的底部)
|
||||||
message: '密码不能为空',
|
message: '密码不能为空',
|
||||||
trigger: ["blur"],
|
trigger: ['blur'],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
payPassword:[
|
payPassword: [
|
||||||
{
|
{
|
||||||
// 必填项
|
// 必填项
|
||||||
required: true,
|
required: true,
|
||||||
// 提示内容(会出现在u-form-item内的底部)
|
// 提示内容(会出现在u-form-item内的底部)
|
||||||
message: '密码不能为空',
|
message: '密码不能为空',
|
||||||
trigger: ["blur"],
|
trigger: ['blur'],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {},
|
||||||
},
|
|
||||||
onReady() {
|
onReady() {
|
||||||
this.$refs.uForm.setRules(this.rules);
|
this.$refs.uForm.setRules(this.rules)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
upLoginPwd(index) {
|
upLoginPwd(index) {
|
||||||
|
@ -116,49 +122,26 @@ export default {
|
||||||
delete data.loginPassword
|
delete data.loginPassword
|
||||||
|
|
||||||
// loginObj
|
// loginObj
|
||||||
api.updatePassword(data).then((res) => {
|
api.updatePassword(data).then(res => {
|
||||||
if (res.code == '200') {
|
if (res.code == '200') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none"
|
icon: 'none',
|
||||||
});
|
|
||||||
setTimeout(()=>{
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/userSecure/index'
|
|
||||||
})
|
})
|
||||||
},2000)
|
setTimeout(() => {
|
||||||
}else{
|
uni.navigateTo({
|
||||||
|
url: '/pages/userSecure/index',
|
||||||
|
})
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none"
|
icon: 'none',
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
|
||||||
this.$refs.uForm.validate().then((res) => {
|
|
||||||
api.updateEmail(this.emailObj).then((res)=>{
|
|
||||||
if(res.code=='200'){
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
success() {
|
|
||||||
setTimeout(()=>{
|
|
||||||
uni.navigateTo({
|
|
||||||
url:"/pages/login/index"
|
|
||||||
})
|
|
||||||
},2000)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
uni.showToast({
|
|
||||||
icon:"none",
|
|
||||||
title:res.msg
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getCode() {
|
getCode() {
|
||||||
// this.disabled = true
|
// this.disabled = true
|
||||||
// this.getCodeText = "发送中..." //发送验证码
|
// this.getCodeText = "发送中..." //发送验证码
|
||||||
|
@ -167,92 +150,92 @@ export default {
|
||||||
this.getYzm()
|
this.getYzm()
|
||||||
},
|
},
|
||||||
getYzm() {
|
getYzm() {
|
||||||
api.verification().then((res)=>{
|
api.verification().then(res => {
|
||||||
if(res.code=='200'){
|
if (res.code == '200') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
//this.$common.msg('验证码已发送')
|
//this.$common.msg('验证码已发送')
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码已发送',
|
title: '验证码已发送',
|
||||||
icon: "none"
|
icon: 'none',
|
||||||
}); //弹出提示框
|
}) //弹出提示框
|
||||||
this.setTimer(); //调用定时器方法
|
this.setTimer() //调用定时器方法
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setTimer() {
|
setTimer() {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
let holdTime = 60; //定义变量并赋值
|
let holdTime = 60 //定义变量并赋值
|
||||||
this.getCodeText = '重新获取' + "(60)"
|
this.getCodeText = '重新获取' + '(60)'
|
||||||
//setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
|
//setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
|
||||||
//setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
|
//setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
|
||||||
this.time = setInterval(() => {
|
this.time = setInterval(() => {
|
||||||
if (holdTime <= 0) {
|
if (holdTime <= 0) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.getCodeisWaiting = false;
|
this.getCodeisWaiting = false
|
||||||
this.getCodeBtnColor = "#ffffff";
|
this.getCodeBtnColor = '#ffffff'
|
||||||
this.getCodeText = '获取验证码'
|
this.getCodeText = '获取验证码'
|
||||||
clearInterval(this.time); //清除该函数
|
clearInterval(this.time) //清除该函数
|
||||||
return; //返回前面
|
return //返回前面
|
||||||
}
|
}
|
||||||
this.getCodeText = '重新获取' + "(" + holdTime + ")"
|
this.getCodeText = '重新获取' + '(' + holdTime + ')'
|
||||||
holdTime--;
|
holdTime--
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:v-deep uni-button:after{
|
:v-deep uni-button:after {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
:v-deep .u-form-item__body__right__message{
|
:v-deep .u-form-item__body__right__message {
|
||||||
margin-left: 170rpx !important;
|
margin-left: 170rpx !important;
|
||||||
}
|
}
|
||||||
.yzm{
|
.yzm {
|
||||||
// width: 161rpx;
|
// width: 161rpx;
|
||||||
height: 74rpx;
|
height: 74rpx;
|
||||||
line-height: 74rpx;
|
line-height: 74rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #2FBC42;
|
background: #2fbc42;
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
:v-deep .u-form-item:nth-child(2){
|
:v-deep .u-form-item:nth-child(2) {
|
||||||
width: 670rpx;
|
width: 670rpx;
|
||||||
}
|
}
|
||||||
.contents{
|
.contents {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
page{
|
page {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
}
|
}
|
||||||
:v-deep .width-s{
|
:v-deep .width-s {
|
||||||
width: 200rpx !important;
|
width: 200rpx !important;
|
||||||
}
|
}
|
||||||
.paddings{
|
.paddings {
|
||||||
padding: 30rpx 0rpx;
|
padding: 30rpx 0rpx;
|
||||||
margin: 0 40rpx;
|
margin: 0 40rpx;
|
||||||
}
|
}
|
||||||
.border-color{
|
.border-color {
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
padding-left: 50rpx !important;
|
padding-left: 50rpx !important;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
width: 400rpx;
|
width: 400rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
background: #F5F6F8;
|
background: #f5f6f8;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.btn{
|
.btn {
|
||||||
background-color: #005BAC;
|
background-color: #005bac;
|
||||||
border: none;
|
border: none;
|
||||||
height: 92rpx;
|
height: 92rpx;
|
||||||
line-height: 92rpx;
|
line-height: 92rpx;
|
||||||
font-size:30rpx;
|
font-size: 30rpx;
|
||||||
margin: 40rpx auto;
|
margin: 40rpx auto;
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -49,12 +49,12 @@ export default {
|
||||||
path: '/pages/delear/index',
|
path: '/pages/delear/index',
|
||||||
id: '4',
|
id: '4',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: '月度历史累计业绩',
|
// name: '月度历史累计业绩',
|
||||||
url: '../../static/images/zz_thhdd.png',
|
// url: '../../static/images/zz_thhdd.png',
|
||||||
path: '/pages/selfService/monthlyHistory/monthlyHistory',
|
// path: '/pages/selfService/monthlyHistory/monthlyHistory',
|
||||||
id: '7',
|
// id: '7',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: '自助撤单',
|
name: '自助撤单',
|
||||||
url: '../../static/images/zz_gzs.png',
|
url: '../../static/images/zz_gzs.png',
|
||||||
|
@ -95,12 +95,12 @@ export default {
|
||||||
path: '/pages/selfService/updateDomicile/updateDomicile',
|
path: '/pages/selfService/updateDomicile/updateDomicile',
|
||||||
id: '3',
|
id: '3',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: '月度历史累计业绩',
|
// name: '月度历史累计业绩',
|
||||||
url: '../../static/images/zz_thhdd.png',
|
// url: '../../static/images/zz_thhdd.png',
|
||||||
path: '/pages/selfService/monthlyHistory/monthlyHistory',
|
// path: '/pages/selfService/monthlyHistory/monthlyHistory',
|
||||||
id: '7',
|
// id: '7',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: '自助撤单',
|
name: '自助撤单',
|
||||||
url: '../../static/images/zz_gzs.png',
|
url: '../../static/images/zz_gzs.png',
|
||||||
|
@ -140,12 +140,12 @@ export default {
|
||||||
path: '/pages/makerspace/index',
|
path: '/pages/makerspace/index',
|
||||||
id: '6',
|
id: '6',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: '月度历史累计业绩',
|
// name: '月度历史累计业绩',
|
||||||
url: '../../static/images/zz_thhdd.png',
|
// url: '../../static/images/zz_thhdd.png',
|
||||||
path: '/pages/selfService/monthlyHistory/monthlyHistory',
|
// path: '/pages/selfService/monthlyHistory/monthlyHistory',
|
||||||
id: '7',
|
// id: '7',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: '自助撤单',
|
name: '自助撤单',
|
||||||
url: '../../static/images/zz_gzs.png',
|
url: '../../static/images/zz_gzs.png',
|
||||||
|
|
|
@ -27,14 +27,6 @@
|
||||||
<text class="u-cell-text">{{'重置支付密码'}}</text>
|
<text class="u-cell-text">{{'重置支付密码'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
<u-cell isLink
|
|
||||||
url="/pages/forgetEmail/index"
|
|
||||||
class="border-style">
|
|
||||||
<view slot="title"
|
|
||||||
class="u-slot-title">
|
|
||||||
<text class="u-cell-text">{{'设置邮箱'}}</text>
|
|
||||||
</view>
|
|
||||||
</u-cell>
|
|
||||||
<u-cell v-if="showFix == 1">
|
<u-cell v-if="showFix == 1">
|
||||||
<view slot="title"
|
<view slot="title"
|
||||||
class="u-slot-title">
|
class="u-slot-title">
|
||||||
|
|
Loading…
Reference in New Issue