二维码生成页面中心icon没了的bug
一次大型分包更新生产了 合作企业路由 /packageQr/pages/partnership/partnership 员工管理路由 /packageStaff/pages/staff/List/List 油站二维码路由 /packageQr/pages/qrsite/QrCode_xy 加油订单路由改成 /packageOrders/pages/orderList/orderList
This commit is contained in:
115
packageSecurity/changePhone/auth.vue
Normal file
115
packageSecurity/changePhone/auth.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<view class="page-content my-bg">
|
||||
<cu-custom :isBack="true" class="main-topbar bg-main-oil" bgColor="bg-main-oil">
|
||||
<block slot="content">手机短信验证</block>
|
||||
<block slot="backText">返回</block>
|
||||
</cu-custom>
|
||||
<view class="bg-white cu-card margin-bottom-lg">
|
||||
<view class="text-gray text-lg padding-top-lg padding-bottom-lg margin-bottom margin-top-lg text-center">
|
||||
请输入 <text class="text-black">
|
||||
{{oldPhone}}
|
||||
</text> 收到的短信验证码
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group padding-top-sm padding-bottom-sm">
|
||||
<view class="title text-black ">验证码</view>
|
||||
<input type="number" :maxlength="6" v-model="authCode" placeholder="填写验证码" name="input" />
|
||||
<text class="mini-left-border" :class="frozen?'text-gray':'oil-main-color'" @tap="sendMsg">{{tips}}</text>
|
||||
</view>
|
||||
<view class="padding margin-top-lg padding-top-lg">
|
||||
<button class="bg-main-oil" @tap="nextStep">下一步</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
oldPhone: uni.getStorageSync('oldPhone'),
|
||||
loginUser: uni.getStorageSync('loginUser'),
|
||||
auth: {},
|
||||
type: 'oldPhone',
|
||||
authCode: "",
|
||||
tips: '获取验证码',
|
||||
frozen: false // 冷却时间
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
nextStep() {
|
||||
if (this.authCode) {
|
||||
const data3 = {
|
||||
phone: this.loginUser.userPhone,
|
||||
authCode: this.authCode,
|
||||
type: this.type
|
||||
}
|
||||
cloudSiteApi.updatePhone(data3).then(res => {
|
||||
if (res.code == 20000) {
|
||||
uni.showToast({
|
||||
title: res.msg
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/setup/changePhone/changePhone',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
}, 800);
|
||||
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
sendMsg() {
|
||||
if (!this.frozen) {
|
||||
const data2 = {
|
||||
phone: this.loginUser.userPhone
|
||||
}
|
||||
cloudSiteApi.updatePhoneSms(data2).then(res => {
|
||||
console.log('res', res)
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
if (res.code == 20000) {
|
||||
this.frozen = true
|
||||
let second = 60
|
||||
this.tips = `${second}秒后重发`
|
||||
setTimeout(() => {
|
||||
this.frozen = false
|
||||
clearInterval(timer)
|
||||
this.tips = `发送验证码`
|
||||
}, 1000 * 60);
|
||||
|
||||
const timer = setInterval(() => {
|
||||
second--
|
||||
if (second) {
|
||||
this.tips = `${second}秒后重发`
|
||||
} else {
|
||||
this.tips = `发送验证码`
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.mini-left-border {
|
||||
border-left: 1px solid #999;
|
||||
padding-left: 1rem;
|
||||
}
|
||||
</style>
|
||||
134
packageSecurity/changePhone/changePhone.vue
Normal file
134
packageSecurity/changePhone/changePhone.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<view class="page-content ">
|
||||
<cu-custom :isBack="true" class="main-topbar bg-main-oil" bgColor="bg-main-oil">
|
||||
<block slot="content">更换手机号</block>
|
||||
<block slot="backText">返回</block>
|
||||
</cu-custom>
|
||||
<view class="boforeChange">
|
||||
<view class="solid-bottom margin-bottom-lg">
|
||||
<view class="cu-form-group padding-top-sm padding-bottom-sm">
|
||||
<view class="title text-black ">新手机号</view>
|
||||
<input type="number" :maxlength="11" v-model="newPhone" placeholder="请输入手机号" name="input" />
|
||||
</view>
|
||||
<view class="cu-form-group padding-top-sm solid-bottom padding-bottom-sm">
|
||||
<view class="title text-black ">验证码</view>
|
||||
<input type="number" :maxlength="6" v-model="authCode" placeholder="请输入验证码" name="input" />
|
||||
<text :class="frozen?'text-gray':'oil-main-color'" @tap="sendMsg">{{tips}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-left padding-bottom-lg">
|
||||
<text class="cuIcon-infofill padding-right-xs text-sm oil-main-color"></text>
|
||||
<text class="text-sm text-grey">更换成功将会重新登录</text>
|
||||
</view>
|
||||
<view class="padding-xl margin-top-lg ">
|
||||
<button class="bg-main-oil margin-top-lg" @tap="nextStep">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="afterChange">
|
||||
<view class="">
|
||||
<view class="cu-avatar xl round margin-left bg-red">
|
||||
<text class="cuIcon-roundcheck"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
oldPhone: uni.getStorageSync('oldPhone'),
|
||||
newPhone: '',
|
||||
loginUser: uni.getStorageSync('loginUser'),
|
||||
auth: {},
|
||||
type: 'newPhone',
|
||||
authCode: "",
|
||||
tips: '获取验证码',
|
||||
frozen: false // 冷却时间
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
nextStep() {
|
||||
if (this.authCode) {
|
||||
const data3 = {
|
||||
phone: this.newPhone,
|
||||
authCode: this.authCode,
|
||||
type: this.type
|
||||
}
|
||||
cloudSiteApi.updatePhone(data3).then(res => {
|
||||
if (res.code == 20000) {
|
||||
uni.showToast({
|
||||
title: res.msg + '请重新登录'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.clearStorage()
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/boforeLogin/boforeLogin',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
sendMsg() {
|
||||
if (!this.frozen) {
|
||||
if (this.newPhone) {
|
||||
|
||||
const data2 = {
|
||||
phone: this.newPhone
|
||||
}
|
||||
cloudSiteApi.updatePhoneSms(data2).then(res => {
|
||||
console.log('res', res)
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
if (res.code == 20000) {
|
||||
this.frozen = true
|
||||
let second = 60
|
||||
this.tips = `${second}秒后重发`
|
||||
setTimeout(() => {
|
||||
this.frozen = false
|
||||
clearInterval(timer)
|
||||
this.tips = `发送验证码`
|
||||
}, 1000 * 60);
|
||||
|
||||
const timer = setInterval(() => {
|
||||
second--
|
||||
if (second) {
|
||||
this.tips = `${second}秒后重发`
|
||||
} else {
|
||||
this.tips = `发送验证码`
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请输入新手机号'
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user