Commit beb93bee by yuzhenWang

Merge branch 'feature-20250710wyz-修复验证码倒计时' into 'dev'

Feature 20250710wyz 修复验证码倒计时

See merge request !43
parents 44534917 a7193f75
......@@ -4,6 +4,11 @@
import {baseURL,apiURL,cffpURL,companyInfo} from "@/environments/environment";
import api from './api/api';
export default {
data() {
return {
invitationHandled: false // 在data中明确定义
}
},
onLaunch: function() {
console.log('App Launch');
if(!uni.getStorageSync('loginType')){
......@@ -99,10 +104,12 @@
const pages = getCurrentPages();
if(pages.length > 0) {
const currentRoute = pages[pages.length - 1].route;
console.log('currentRoute',currentRoute);
const whiteList = [
'/myPackageA/login/login',
'/pages/invitationRegister/invitationlogin',
'/myPackageA/applyFranchise/applyFranchise',
'/pages/applyFranchise/applyFranchise',
'/myPackageA/ruleAndContract/clause',
'/pages/courselist/courselist',
'/pages/courseDetail/courseDetail',
......
......@@ -15,6 +15,7 @@
优质资源,专业服务
</view>
</view>
<view class="applyBox">
<view style="height: 550rpx;">
<view class="inputBox">
......@@ -117,7 +118,7 @@
import dataHandling from "@/util/dataHandling";
export default {
components:{
everyJoinPopup
everyJoinPopup,
},
data() {
return {
......@@ -160,7 +161,9 @@
uni.clearStorageSync()
uni.setStorageSync('loginType', 'visitor')
}
},
onShow(){
if(uni.getStorageSync('loginType')){
......@@ -184,10 +187,7 @@
if(!this.inviteUserId&&this.loginType == 'codelogin'&&!this.form.nickName){
this.queryInfo()
}
// 邀请状态
// if(this.inviteUserId){
// this.getqueryById(this.shareId)
// }
},
methods: {
getqueryById(shareId){
......@@ -195,7 +195,9 @@
this.form.nickName = res.data.data.name
this.form.mobile = res.data.data.mobileNumber
this.editNickName = this.editMobile = true
if(res.data.data.isPartner){
this.$refs.successJoinPopup.open()
}
})
},
jumpPage(e){
......@@ -223,6 +225,7 @@
c_agreeFlag(){
this.agreeFlag=!this.agreeFlag;
},
delayTime() {
this.disabledSendBtn = true;
this.timer = setInterval(() => {
......@@ -235,27 +238,27 @@
clearInterval(this.timer);
}
}, 1000);
},
sendMessage(){
const params = {
mobileNo:this.form.mobile,
type:"1",
source: "cffp"
}
if(common.mobileNoValid(this.form.mobile)){
if(!this.disabledSendBtn){
api.verificationCode(params).then((res)=>{
if(res['success']){
this.delayTime()
}else{
common.errorDialog(2,res['message'])
}
})
}
}else{
common.errorDialog(2,'请填写手机号')
}
},
sendMessage(){
const params = {
mobileNo:this.form.mobile,
type:"1",
source: "cffp"
}
if(common.mobileNoValid(this.form.mobile)){
if(!this.disabledSendBtn){
api.verificationCode(params).then((res)=>{
if(res['success']){
this.delayTime()
}else{
common.errorDialog(2,res['message'])
}
})
}
}else{
common.errorDialog(2,'请填写手机号')
}
},
gotoApply(){
if(!this.form.nickName){
common.errorDialog(1,'请输入昵称');
......
......@@ -27,7 +27,7 @@
"softinputMode": "adjustResize"
}
}
}, {
}, {
"path": "pages/product/product",
"style": {
"navigationBarTitleText": "SFP",
......@@ -502,10 +502,7 @@
},{
"path": "applyFranchise/applyFranchise",
"style": {
"navigationBarTitleText": "申请加盟",
"h5": {
"reload": false // 禁用自动重新加载
}
"navigationBarTitleText": "申请加盟"
}
},{
"path": "integralExchange/exchange",
......@@ -540,12 +537,9 @@
},{
"path": "ruleAndContract/clause",
"style": {
"navigationBarTitleText": "协议",
"h5": {
"reload": false // 禁用自动重新加载
}
"navigationBarTitleText": "协议"
}
}
},
]
},{
"root": "officialWebsite",
......
import {apiURL,cffpURL} from "../environments/environment";
import {apiURL,cffpURL,sfpUrl} from "../environments/environment";
import api from "@/api/api";
// 白名单,不需要携带token就允许被访问的接口
const whiteApiList = [`${apiURL}/authorize/obtainToken`, `${apiURL}/authorize/checkToken`, `${cffpURL}/user/loginVerification`,`${apiURL}/appVersion/checkIsUpdate`,
`${cffpURL}/accessLog/accessLogSave`,`${cffpURL}/user/powerQuery`,`${cffpURL}/user/wxLogin`,`${cffpURL}/certificate/officialWebsiteDetail`];
const whiteApiList = [`${apiURL}/authorize/obtainToken`,
`${apiURL}/authorize/checkToken`,
`${cffpURL}/user/loginVerification`,
`${apiURL}/appVersion/checkIsUpdate`,
`${cffpURL}/accessLog/accessLogSave`,
`${cffpURL}/user/powerQuery`,`${cffpURL}/user/wxLogin`,
`${cffpURL}/certificate/officialWebsiteDetail`,
`${apiURL}/verificationCode`,
`${sfpUrl}/sfp/sfpMain/pocessTracking`,
`${cffpURL}/partner/queryById`,
];
export const interceptor = () => {
uni.addInterceptor('request', {
// 请求拦截器
......
......@@ -6,6 +6,7 @@ const whiteList = [
'/myPackageA/login/login',
'/pages/invitationRegister/invitationlogin',
'/myPackageA/applyFranchise/applyFranchise',
'/pages/applyFranchise/applyFranchise',
'/myPackageA/ruleAndContract/clause',
'/pages/orderDetail/orderDetail',
'/pages/courseDetail/courseDetail',
......@@ -16,15 +17,11 @@ const whiteList = [
export default function initApp(){
let date = Date.now()
uni.addInterceptor('navigateTo', {
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke (e) {
// 移除URL中的t_reload参数
let url = e.url;
if(url.includes('t_reload=')) {
url = url.split('?')[0] + (url.includes('?') ? '?' : '') +
url.split('?')[1].split('&').filter(param => !param.startsWith('t_reload=')).join('&');
}
console.log(e);
let pages = getCurrentPages()
let pagesLength = pages.length
......@@ -44,7 +41,7 @@ export default function initApp(){
uni.navigateTo({
url: '/myPackageA/login/login'
})
return
return true
}
// 保存用户得个人信息
if (res['success']) {
......@@ -68,8 +65,8 @@ export default function initApp(){
return params.get(key);
};
const fromParam = getQueryParam(url, 'from');
if(!hasPermission(url)){
const fromParam = getQueryParam(e.url, 'from');
if(!hasPermission(e.url)){
// 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页
if (fromParam && whiteArr.includes(fromParam)) {
uni.redirectTo({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment