Commit 17e64a3c by yuzhenWang

Merge branch 'feature-20250731wyz-修改bug' into 'dev'

Feature 20250731wyz 修改bug

See merge request !62
parents 3d081fa0 4f69162c
<script> <script>
import initApp from "@/util/router.js"; import initApp from "@/util/router.js";
import {interceptor} from "@/util/interceptor"; import {interceptor} from "@/util/interceptor";
import {baseURL,apiURL,cffpURL,companyInfo} from "@/environments/environment"; import {baseURL,apiURL,cffpURL,companyInfo} from "@/environments/environment";
import api from './api/api'; import api from './api/api';
import {hshare} from '@/util/fiveshare'; import {hshare} from '@/util/fiveshare';
export default { export default {
data() { data() {
return { return {
invitationHandled: false // 在data中明确定义 invitationHandled: false ,// 在data中明确定义,
dataToken:'',
} }
}, },
onLaunch: function() { onLaunch: function() {
console.log('App Launch'); console.log('App Launch');
if(!uni.getStorageSync('loginType')){ if(!uni.getStorageSync('loginType')){
console.log('走进来了');
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor'); uni.setStorageSync('loginType','visitor');
} }
// 处理外部链接参数 // 处理外部链接参数
...@@ -79,8 +80,36 @@ ...@@ -79,8 +80,36 @@
onShow: function(options) { onShow: function(options) {
console.log('App Show', options); console.log('App Show', options);
// 每次进应用显示时检查用户状态 if(this.dataToken){
this.checkUserStatus();
const params = {
loginType:'5',
authToken:this.dataToken.replace(/\%/g, ' ')
// authToken:'zuihuibi eyJhbGciOiJIUzUxMiJ9.eyJVc2VySWQiOjEyODMsImNyZWF0ZWQiOjE3NTQ2NDk1MDA5NzIsImV4cCI6MTc1NzI0MTUwMH0.udjBlMY4FswgBU7zv9jD-zK8ANGR1KKXk_DiJEQkwhiC9DYwxAc7wAp6BWIKY_oiNr58QJqDtBAJ85bGOcCpeQ'
}
api.loginVerification(params).then((res)=>{
if(res['success']){
uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', res.data.userId);
uni.setStorageSync('uni-token', res.data['token']);
this.checkUserStatus();
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
return
}else {
// 每次进应用显示时检查用户状态
this.checkUserStatus();
}
// App平台从options获取参数 // App平台从options获取参数
// #ifdef APP-PLUS // #ifdef APP-PLUS
if(options && options.query) { if(options && options.query) {
...@@ -92,7 +121,8 @@ ...@@ -92,7 +121,8 @@
console.log('App Hide') console.log('App Hide')
}, },
methods: { methods: {
// 检查用户状态的方法
// 检查用户状态的方法 防止多端操作导致此用户不存在
async checkUserStatus() { async checkUserStatus() {
// 只有已登录用户才需要检查 // 只有已登录用户才需要检查
if(uni.getStorageSync('loginType') == 'codelogin' && uni.getStorageSync('cffp_userId')) { if(uni.getStorageSync('loginType') == 'codelogin' && uni.getStorageSync('cffp_userId')) {
...@@ -128,15 +158,12 @@ ...@@ -128,15 +158,12 @@
} }
} }
if (res['success']) { if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = { const cffp_userInfo = {
name: res['data']['realName'], ...res.data
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
} }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)) uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
uni.setStorageSync('userinfodataForm', res.data);
} }
} catch (err) { } catch (err) {
console.error('检查用户状态失败:', err); console.error('检查用户状态失败:', err);
...@@ -148,7 +175,7 @@ ...@@ -148,7 +175,7 @@
}, },
// 清除登录状态 // 清除登录状态
clearLoginState() { clearLoginState() {
uni.clearStorageSync(); // uni.clearStorageSync();
uni.setStorageSync('loginType', 'visitor'); uni.setStorageSync('loginType', 'visitor');
this.checkToken() this.checkToken()
// 可以在这里添加其他需要清除的状态 // 可以在这里添加其他需要清除的状态
...@@ -238,6 +265,17 @@ ...@@ -238,6 +265,17 @@
// 使用uni.setStorageSync存储到本地 // 使用uni.setStorageSync存储到本地
try { try {
// #ifdef H5
if(params.dataToken){
this.dataToken = params.dataToken
}
// #endif
// #ifdef MP-WEIXIN
if(params.dataToken){
this.dataToken = uni.getStorageSync('hoservice_token')
}
// #endif
if(params.addSystemType){ if(params.addSystemType){
uni.setStorageSync('addSystemType', params.addSystemType); uni.setStorageSync('addSystemType', params.addSystemType);
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<image style="width: 80rpx;height: 80rpx;" src="../../static/Slice3.png" mode=""></image> <image style="width: 80rpx;height: 80rpx;" src="../../static/Slice3.png" mode=""></image>
</view> </view>
</view> </view>
<restrictedTip ref="restrictedTip"/>
</view> </view>
</template> </template>
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
import common from '../../common/common'; import common from '../../common/common';
import {companyInfo} from "@/environments/environment"; import {companyInfo} from "@/environments/environment";
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue'
export default { export default {
props:{ props:{
wayType:{ wayType:{
...@@ -47,8 +48,15 @@ ...@@ -47,8 +48,15 @@
// 哪个地方中用到了这个登录 // 哪个地方中用到了这个登录
loginSource:{ loginSource:{
type:String, type:String,
},
// 哪个页面中用到了这个登录
pageSource:{
type:String,
} }
}, },
components:{
restrictedTip
},
data() { data() {
return { return {
agreeFlag:false, agreeFlag:false,
...@@ -132,6 +140,11 @@ ...@@ -132,6 +140,11 @@
} }
api.loginVerification(params).then((res)=>{ api.loginVerification(params).then((res)=>{
if(res['success']){ if(res['success']){
// 禁用账号,不让登录
if(res.data.userIsActive == 2){
this.$refs.restrictedTip.open()
return
}
this.userId = String(res['data']['userId']); this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1'); uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin'); uni.setStorageSync('loginType','codelogin');
...@@ -140,7 +153,7 @@ ...@@ -140,7 +153,7 @@
this.loginTypeSync = "codelogin"; this.loginTypeSync = "codelogin";
this.queryInfo() this.queryInfo()
uni.$emit('loginUpdate'); uni.$emit('loginUpdate');
this.$emit('afterLogin')
}else{ }else{
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
...@@ -170,12 +183,9 @@ ...@@ -170,12 +183,9 @@
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if (res['success']) { if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = { const cffp_userInfo = {
name: res['data']['realName'], ...res.data
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
} }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)) uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
this.closebootpage() this.closebootpage()
......
<template>
<uni-popup ref="popup" type="center" background-color="#fff" v-if="visible">
<!-- 你的弹窗内容 -->
<view class="joinContent">
<view class="title">{{ title }}</view>
<view class="joinHeader" >
<view class="iconfont icon-exclamation" ></view>
</view>
<view class="joinCon">
<view class="one">{{ content }}</view>
<view class="qrCode" v-if="showCode">
<image src="@/static/images/customer.jpg" mode="widthFix"></image>
</view>
</view>
<view class="joinFotter">
<view @click="handleConfirm">{{ confirmText }}</view>
</view>
</view>
</uni-popup>
</template>
<script>
import {shareURL} from "@/environments/environment";
export default {
name: 'restrictedTip',
props: {
title: String,
content: {
type: String,
default: '您的账号处在不可用状态,请扫码添加客服咨询情况'
},
showCode: {
type: Boolean,
default: true
},
confirmText: {
type: String,
default: '我知道了'
}
},
data() {
return {
visible: false
}
},
methods: {
open() {
this.visible = true
this.$nextTick(() => {
this.$refs.popup.open() // 确保DOM渲染后再打开
})
},
close() {
this.visible = false
},
handleConfirm() {
this.close()
this.$emit('confirm')
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .uni-popup .uni-popup__wrapper{
margin: 0 !important;
border-radius: 30rpx;
}
.joinContent {
width: 550rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.title{
text-align: center;
width: 100%;
}
.joinHeader {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: #FFC300;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
.icon-exclamation{
color: #fff;
font-size: 30rpx;
}
}
.joinCon {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 10rpx;
box-sizing: border-box;
.one {
font-size: 28rpx;
color: #F43530;
text-align: center;
margin-bottom: 10rpx;
}
.qrCode{
width: 50%;
image{
width: 100rpx;
}
}
.two {
color: rgba(145, 144, 148, 1);
font-size: 26rpx;
text-align: center;
margin-top: 10rpx;
margin-bottom: 20rpx;
}
}
.joinFotter {
width: 100%;
color: #fff;
display: flex;
align-items: center;
flex-direction: column;
box-sizing: border-box;
font-size: 26rpx;
view {
width: 80%;
background: rgba(54, 57, 169, 1);
border-radius: 40rpx;
padding: 20rpx;
text-align: center;
margin-top: 20rpx;
}
}
.horizontal{
flex-direction: row;
justify-content: space-between;
view{
width: auto;
border-radius:15rpx;
}
}
}
</style>
\ No newline at end of file
<template> <template>
<view class="wrapper"> <view class="wrapper">
<restrictedTip ref="restrictedTip"/>
<view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin"> <view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin">
<view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view> <view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view>
<!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> --> <!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> -->
...@@ -183,7 +184,7 @@ ...@@ -183,7 +184,7 @@
uni.setStorageSync('cffp_userId',this.userId); uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('loginType',this.loginType); uni.setStorageSync('loginType',this.loginType);
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
if(urlType == 'personalCenter'){ if(urlType == 'personalCenter'){
uni.switchTab({ uni.switchTab({
url:'/pages/personalCenter/personalCenter' url:'/pages/personalCenter/personalCenter'
......
...@@ -16,16 +16,27 @@ ...@@ -16,16 +16,27 @@
</view> </view>
</view> </view>
</view> </view>
<restrictedTip
ref="restrictedOrCanelTip"
:showCode="false"
confirmText="知道了"
content="您已解约,无需重复操作"
@confirm="$refs.restrictedOrCanelTip.close()"
/>
</view> </view>
</template> </template>
<script> <script>
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
props: { props: {
menuList: { menuList: {
type: Array type: Array
} }
}, },
components:{
restrictedTip
},
data() { data() {
return {} return {}
}, },
...@@ -50,7 +61,14 @@ ...@@ -50,7 +61,14 @@
} }
} }
}); });
} else if (item.link != null) { } else if (item.isJump) {
console.log('333333',item)
this.$refs.restrictedOrCanelTip.open()
// uni.navigateTo({
// url: item.link
// });
return
}else if (item.link != null) {
uni.navigateTo({ uni.navigateTo({
url: item.link url: item.link
}); });
......
import App from './App'; import App from './App';
// #ifndef VUE3 // // #ifndef VUE3
import Vue from 'vue' // import Vue from 'vue'
App.mpType = 'app' // App.mpType = 'app'
const app = new Vue({ // const app = new Vue({
...App // ...App
}) // })
app.$mount()
// #endif // app.$mount()
// // #endif
// #ifdef VUE3 // #ifdef VUE3
import { createSSRApp } from 'vue' import { createSSRApp } from 'vue'
...@@ -22,3 +23,5 @@ export function createApp() { ...@@ -22,3 +23,5 @@ export function createApp() {
//#ifdef H5 //#ifdef H5
window.sessionStorage.setItem('firstEntryUrl',window.location.href.split('#')[0]) window.sessionStorage.setItem('firstEntryUrl',window.location.href.split('#')[0])
// #endif // #endif
<template> <template>
<view class="container"> <view class="container">
<!-- 禁用弹窗 -->
<restrictedTip
ref="restrictedOrCanelTip"
:showCode="showCode"
confirmText="前往首页"
:content="restrictedOrCanelContent"
@confirm="gotoIndex()"
/>
<image <image
class="imgbox" class="imgbox"
:src="baseURL + `/${imgType}/static/images/applyBg.png`" :src="baseURL + `/${imgType}/static/images/applyBg.png`"
...@@ -29,7 +37,6 @@ ...@@ -29,7 +37,6 @@
type="text" type="text"
placeholder="请输入2~10个字符" placeholder="请输入2~10个字符"
v-model="form.nickName" v-model="form.nickName"
:disabled="editNickName"
/> />
</view> </view>
</view> </view>
...@@ -119,9 +126,11 @@ ...@@ -119,9 +126,11 @@
import common from '@/common/common'; import common from '@/common/common';
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
components:{ components:{
everyJoinPopup, everyJoinPopup,
restrictedTip
}, },
data() { data() {
return { return {
...@@ -147,6 +156,9 @@ ...@@ -147,6 +156,9 @@
editMobile:false, editMobile:false,
shareId:'',//邀请人分享得id shareId:'',//邀请人分享得id
invitationCode:'',//邀请码 invitationCode:'',//邀请码
showCode:false ,//弹窗是否展示客服二维码
restrictedOrCanelContent:'', //禁用/注销展示文本
sharePosterObj:{invitationCode:'',inviteUserId:''},//通过分享海报进来
} }
}, },
onLoad(options){ onLoad(options){
...@@ -161,20 +173,20 @@ ...@@ -161,20 +173,20 @@
if(options.shareId){ if(options.shareId){
this.shareId = options.shareId this.shareId = options.shareId
this.getqueryById(options.shareId) this.getqueryById(options.shareId)
uni.clearStorageSync() // uni.clearStorageSync()
uni.setStorageSync('loginType', 'visitor') uni.setStorageSync('loginType', 'visitor')
} }
}, },
onShow(){ onShow(){
if(uni.getStorageSync('loginType')){ if(uni.getStorageSync('loginType')){
this.loginType = uni.getStorageSync('loginType') this.loginType = uni.getStorageSync('loginType')
} }
if(uni.getStorageSync('cffp_userInfo')){ if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo')) this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
} }
console.log('show',this.userInfo)
if(uni.getStorageSync('cffp_userId')){ if(uni.getStorageSync('cffp_userId')){
this.userId = uni.getStorageSync('cffp_userId') this.userId = uni.getStorageSync('cffp_userId')
} }
...@@ -183,12 +195,12 @@ ...@@ -183,12 +195,12 @@
this.checkToken() this.checkToken()
} }
// 非邀请状态 // 非邀请状态
if(!this.inviteUserId&&this.loginType == 'codelogin'&&this.userInfo.mobile){ if(!this.shareId&&this.loginType == 'codelogin'&&this.userInfo.mobile){
this.form.mobile = this.userInfo.mobile this.form.mobile = this.userInfo.mobile
this.editMobile = true this.editMobile = true
} }
// 非邀请状态 // 非邀请状态
if(!this.inviteUserId&&this.loginType == 'codelogin'&&!this.form.nickName){ if(!this.shareId&&this.loginType == 'codelogin'&&!this.form.nickName){
this.queryInfo() this.queryInfo()
} }
// 登录状态 // 登录状态
...@@ -202,6 +214,12 @@ ...@@ -202,6 +214,12 @@
}, },
methods: { methods: {
gotoIndex(){
uni.switchTab({
url:'/pages/index/index'
})
this.$refs.restrictedOrCanelTip.close()
},
// 未登录状态下需要重新获取token // 未登录状态下需要重新获取token
checkToken(){ checkToken(){
api.checkToken().then(res=>{ api.checkToken().then(res=>{
...@@ -289,6 +307,24 @@ ...@@ -289,6 +307,24 @@
} }
}, },
gotoApply(){ gotoApply(){
if(uni.getStorageSync('sharePosterObj')){
this.sharePosterObj = uni.getStorageSync('sharePosterObj')
}
console.log('this.sharePosterObj',this.sharePosterObj)
// 登录并且是禁用状态
if(this.loginType == 'codelogin'&& this.userInfo.userIsActive == 2){
this.showCode = true
this.restrictedOrCanelContent = '您的账号处在不可用状态,请扫码添加客服咨询情况'
this.$refs.restrictedOrCanelTip.open()
return
}
// 登录并且是注销状态
if(this.loginType == 'codelogin'&& this.userInfo.partnerIsActive == 2){
this.showCode = false
this.restrictedOrCanelContent = '90天内不可再次申请加盟为合伙人'
this.$refs.restrictedOrCanelTip.open()
return
}
if(!this.form.nickName){ if(!this.form.nickName){
common.errorDialog(1,'请输入昵称'); common.errorDialog(1,'请输入昵称');
return false; return false;
...@@ -330,13 +366,29 @@ ...@@ -330,13 +366,29 @@
if(!this.loginType || this.loginType == 'visitor'){ if(!this.loginType || this.loginType == 'visitor'){
api.loginVerification(params).then((res)=>{ api.loginVerification(params).then((res)=>{
if(res['success']){ if(res['success']){
// 不能登录并且是禁用状态
if(res.data.userIsActive == 2){
this.showCode = true
this.restrictedOrCanelContent = '您的账号处在不可用状态,请扫码添加客服咨询情况'
this.$refs.restrictedOrCanelTip.open()
return
}
this.userId = String(res['data']['userId']); this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1'); uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin'); uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', this.userId); uni.setStorageSync('cffp_userId', this.userId);
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
this.queryInfo() this.queryInfo()
// 禁用和注销状态并存,以禁用为准
// 已经进行过注销操作的, 弹窗提示90天内不可再次申请加盟为合伙人
// 登录并且是注销状态
if(res.data.partnerIsActive==2){
this.showCode = false
this.restrictedOrCanelContent = '90天内不可再次申请加盟为合伙人'
this.$refs.restrictedOrCanelTip.open()
return
}
// 是合伙人就不让在加盟 // 是合伙人就不让在加盟
if(res.data.isPartner){ if(res.data.isPartner){
this.$refs.everyJoinPopup.open() this.$refs.everyJoinPopup.open()
...@@ -370,12 +422,9 @@ ...@@ -370,12 +422,9 @@
}else { }else {
this.editNickName = false this.editNickName = false
} }
delete res.data.commonResult
const cffp_userInfo = { const cffp_userInfo = {
name: res['data']['realName'], ...res.data
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
} }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)) uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
...@@ -388,7 +437,7 @@ ...@@ -388,7 +437,7 @@
// 申请加盟 // 申请加盟
getApply(){ getApply(){
let params = {} let params = {}
if(this.inviteUserId){ if(this.shareId){
params = { params = {
applyType:'1', applyType:'1',
applyUserId:this.userId, applyUserId:this.userId,
...@@ -398,13 +447,14 @@ ...@@ -398,13 +447,14 @@
inviterInvitationCode:this.invitationCode, inviterInvitationCode:this.invitationCode,
shareId:this.shareId shareId:this.shareId
} }
// return
}else { }else {
params = { params = {
applyType:'2', applyType:'2',
applyUserId:this.userId, applyUserId:this.userId,
applyMobile:this.form.mobile, applyMobile:this.form.mobile,
nickName:this.form.nickName nickName:this.form.nickName,
inviteUserId:this.sharePosterObj.inviteUserId,
invitationCode:this.sharePosterObj.invitationCode
} }
} }
api.newSaveApplyInfo(params).then((res)=>{ api.newSaveApplyInfo(params).then((res)=>{
...@@ -423,23 +473,20 @@ ...@@ -423,23 +473,20 @@
'pages/saleCourseLists/saleCourseLists' 'pages/saleCourseLists/saleCourseLists'
) )
this.$refs.successJoinPopup.open() this.$refs.successJoinPopup.open()
}else{
// 由于注销需求,依据后端报错展示弹窗
this.showCode = false
this.restrictedOrCanelContent = res['message']
this.$refs.restrictedOrCanelTip.open()
// uni.showToast({ // uni.showToast({
// title: '您已加盟成功', // title: res['message'],
// duration: 1000, // duration: 2000,
// icon: 'none' // icon: 'none'
// }) // })
// uni.switchTab({
// url:'/pages/index/index'
// })
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
} }
}) })
} },
}, },
} }
......
...@@ -168,8 +168,8 @@ ...@@ -168,8 +168,8 @@
continueText="暂不解绑" continueText="暂不解绑"
btnType="horizontal" btnType="horizontal"
:tipIcon="false" :tipIcon="false"
@join="continueBind()" @join="$refs.unbindTipPopup.close()"
@continue="$refs.unbindTipPopup.close()" @continue="continueBind()"
/> />
</view> </view>
...@@ -226,6 +226,7 @@ ...@@ -226,6 +226,7 @@
}, },
methods:{ methods:{
continueBind(){ continueBind(){
console.log('解绑');
let params = { let params = {
userId:uni.getStorageSync('cffp_userId'), userId:uni.getStorageSync('cffp_userId'),
oprType:this.paymentMethod oprType:this.paymentMethod
...@@ -593,7 +594,8 @@ ...@@ -593,7 +594,8 @@
color: black; color: black;
font-size: 26rpx; font-size: 26rpx;
text-align: right; text-align: right;
padding-right: 20rpx;
width: 60%;
} }
.error-tip{ .error-tip{
position: absolute; position: absolute;
......
<template> <template>
<view class="wrapper"> <view class="wrapper">
<restrictedTip ref="restrictedTip"/>
<view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin"> <view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin">
<view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view> <view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view>
<!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> --> <!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> -->
...@@ -61,6 +62,7 @@ ...@@ -61,6 +62,7 @@
import common from '../../common/common'; import common from '../../common/common';
import {companyInfo} from "@/environments/environment"; import {companyInfo} from "@/environments/environment";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
data() { data() {
return { return {
...@@ -89,6 +91,9 @@ ...@@ -89,6 +91,9 @@
goBack:true goBack:true
} }
}, },
components:{
restrictedTip
},
methods: { methods: {
c_agreeFlag(){ c_agreeFlag(){
this.agreeFlag=!this.agreeFlag; this.agreeFlag=!this.agreeFlag;
...@@ -179,12 +184,18 @@ ...@@ -179,12 +184,18 @@
} }
api.loginVerification(params).then((res)=>{ api.loginVerification(params).then((res)=>{
if(res['success']){ if(res['success']){
// 禁用账号,不让登录
if(res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.hideLoading()
return
}
this.userId = String(res['data']['userId']); this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1'); uni.setStorageSync('isLogin','1');
uni.setStorageSync('cffp_userId',this.userId); uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('loginType',this.loginType); uni.setStorageSync('loginType',this.loginType);
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
if(urlType == 'personalCenter'){ if(urlType == 'personalCenter'){
uni.switchTab({ uni.switchTab({
url:'/pages/personalCenter/personalCenter' url:'/pages/personalCenter/personalCenter'
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
} }
}, },
onShow() { onShow() {
this.userInfo = uni.getStorageSync('userinfodataForm') this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.loginType = uni.getStorageSync('loginType') this.loginType = uni.getStorageSync('loginType')
if(!this.loginType || this.loginType == 'visitor'){ if(!this.loginType || this.loginType == 'visitor'){
this.codeUrl = `${this.baseURL}/pages/index/index` this.codeUrl = `${this.baseURL}/pages/index/index`
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
<view class="wapperBox"> <view class="wapperBox">
<view class="warn"> <view class="warn">
<text class="iconfont icon-redgantanhao"></text> <text class="iconfont icon-redgantanhao"></text>
<text>注销后,您将无法使用当前账号</text> <text>解约后,您可正常使用当前账号</text>
<text>相关数据也将被删除无法找回</text> <text>但合伙人相关数据也将被删除无法找回</text>
</view> </view>
<view class="cancelBox"> <view class="cancelBox">
<view class="title"> <view class="title">
注销账号 解约账号
</view> </view>
<view class="phone"> <view class="phone">
{{mobile}} {{mobile}}
...@@ -51,19 +51,20 @@ ...@@ -51,19 +51,20 @@
<view class="empty" v-if="!isTick" @click="isTick=true"></view> <view class="empty" v-if="!isTick" @click="isTick=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="isTick=false"></text> <text v-else class="iconfont icon-icon_duihao-mian" @click="isTick=false"></text>
<text style="color: #666;">我已阅读并同意</text> <text style="color: #666;">我已阅读并同意</text>
<text style="color: #20269B;" @click="jump()">账号注销协议》</text> <text style="color: #20269B;" @click="jump()">合伙人解约协议》</text>
</view> </view>
<view <view
class="bottomBtn" class="bottomBtn"
:style="{opacity:isTick?'1':'.5'}" :style="{opacity:isTick?'1':'.5'}"
@click="applyCancel()" @click="applyCancel()"
> >
申请注销 申请解约
</view> </view>
</view> </view>
<everyJoinPopup <everyJoinPopup
ref="successCancelPopup" ref="successCancelPopup"
content="注销成功" content="解约成功"
continueText="前往我的"
:maskClick="false" :maskClick="false"
@continue="jumpPage" @continue="jumpPage"
/> />
...@@ -96,16 +97,17 @@ ...@@ -96,16 +97,17 @@
} }
}, },
onLoad() { onLoad() {
let dataForm = uni.getStorageSync('userinfodataForm')
this.mobile = dataForm.mobile
}, },
onShow(){ onShow(){
let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.mobile = dataForm.mobile
this.lockScroll() this.lockScroll()
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
}, },
beforeDestroy() { beforeDestroy() {
console.log('组件销毁'); console.log('组件销毁');
...@@ -134,15 +136,15 @@ ...@@ -134,15 +136,15 @@
}, },
jumpPage(){ jumpPage(){
dataHandling.pocessTracking( dataHandling.pocessTracking(
'注销', '解约',
`用户注销账号`, `用户解约`,
'点击', '点击',
2, 2,
'注销账号', '解约账号',
'/myPackageA/setting/logOff' '/myPackageA/setting/logOff'
) )
uni.switchTab({ uni.switchTab({
url:'/pages/index/index' url:'/pages/personalCenter/personalCenter'
}) })
this.$refs.successCancelPopup.close() this.$refs.successCancelPopup.close()
}, },
...@@ -199,10 +201,10 @@ ...@@ -199,10 +201,10 @@
jump(){ jump(){
dataHandling.pocessTracking( dataHandling.pocessTracking(
'查看', '查看',
`用户点击了账户注销协议`, `用户点击了合伙人解约协议`,
'点击', '点击',
2, 2,
'注销账号', '解约账号',
'/myPackageA/setting/logOff' '/myPackageA/setting/logOff'
) )
uni.navigateTo({ uni.navigateTo({
...@@ -213,7 +215,7 @@ ...@@ -213,7 +215,7 @@
applyCancel(){ applyCancel(){
if(!this.isTick){ if(!this.isTick){
uni.showToast({ uni.showToast({
title: '请阅读并勾选《账号注销协议》', title: '请阅读并勾选《合伙人解约协议》',
duration: 3000, duration: 3000,
icon: 'none' icon: 'none'
}) })
...@@ -251,11 +253,10 @@ ...@@ -251,11 +253,10 @@
"signatureHash":hashResult, "signatureHash":hashResult,
"timestamp":timestamp, "timestamp":timestamp,
} }
console.log('注销参数',params);
api.cancellation(params).then(res =>{ api.cancellation(params).then(res =>{
if(res['success']){ if(res['success']){
uni.clearStorageSync(); // uni.clearStorageSync();
uni.setStorageSync('loginType','visitor'); // uni.setStorageSync('loginType','visitor');
this.$refs.successCancelPopup.open() this.$refs.successCancelPopup.open()
}else{ }else{
uni.showToast({ uni.showToast({
...@@ -265,7 +266,7 @@ ...@@ -265,7 +266,7 @@
} }
}) })
this.releaseScroll() this.releaseScroll()
this.checkToken() // this.checkToken()
} }
}) })
}, },
...@@ -290,21 +291,6 @@ ...@@ -290,21 +291,6 @@
cancel(){ cancel(){
uni.navigateBack({delta:1}) uni.navigateBack({delta:1})
}, },
sunmit(){
api.cancellation({userId: this.userId}).then(res =>{
if(res['success']){
uni.showToast({
title: '操作成功',
icon: 'none'
});
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
uni.redirectTo({
url:'/myPackageA/login/login?from=index'
})
}
})
},
} }
} }
</script> </script>
......
...@@ -544,6 +544,11 @@ ...@@ -544,6 +544,11 @@
"style": { "style": {
"navigationBarTitleText": "分销海报" "navigationBarTitleText": "分销海报"
} }
},{
"path": "myTeam/myTeam",
"style": {
"navigationBarTitleText": "我的团队"
}
} }
] ]
},{ },{
......
...@@ -103,7 +103,8 @@ ...@@ -103,7 +103,8 @@
dropIndex:0, dropIndex:0,
dropReasons:[{id:null,name:'请选择'}], dropReasons:[{id:null,name:'请选择'}],
withdrawal: true, withdrawal: true,
readonlyFlag:false readonlyFlag:false,
tipMessage:''
}; };
}, },
methods:{ methods:{
...@@ -136,7 +137,9 @@ ...@@ -136,7 +137,9 @@
if(res['success']){ if(res['success']){
this.dropInfo = res['data'] this.dropInfo = res['data']
}else { }else {
this.tipMessage = res['message']
this.withdrawal = false this.withdrawal = false
this.readonlyFlag = true
} }
}) })
}, },
...@@ -144,7 +147,7 @@ ...@@ -144,7 +147,7 @@
submit(){ submit(){
if(!this.withdrawal){ if(!this.withdrawal){
uni.showToast({ uni.showToast({
title: '已退款不能重新申请', title: this.tipMessage,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
......
<template> <template>
<view class="container"> <view class="container">
<!-- --> <!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="shareheader" style="" v-if="coursesharing != 1 || deviceType==3"> <view class="shareheader" style="" v-if="coursesharing != 1 || deviceType==3">
<!-- #ifdef APP --> <!-- #ifdef APP -->
<view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()"></view> <view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()"></view>
...@@ -184,6 +185,7 @@ ...@@ -184,6 +185,7 @@
</template> </template>
<script> <script>
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue"; import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import api from "../../api/api"; import api from "../../api/api";
import BootPage from "@/components/bootpage/bootpage.vue"; import BootPage from "@/components/bootpage/bootpage.vue";
...@@ -202,7 +204,8 @@ ...@@ -202,7 +204,8 @@
BootPage, BootPage,
LoginPopup, LoginPopup,
VerifyPopup, VerifyPopup,
PartnerTipPopup PartnerTipPopup,
restrictedTip
}, },
data() { data() {
return { return {
...@@ -525,6 +528,15 @@ ...@@ -525,6 +528,15 @@
} }
}, },
jumppurchase() { jumppurchase() {
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
// 登录并且是禁用状态
if(this.userInfo.userIsActive==2){
this.$refs.restrictedTip.open()
return
}
let orderPlatform = '' let orderPlatform = ''
// 不同得公司主题不同得购买平台 // 不同得公司主题不同得购买平台
// #ifdef APP // #ifdef APP
...@@ -962,13 +974,18 @@ ...@@ -962,13 +974,18 @@
queryInfo(){ queryInfo(){
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if(res['success']){ if(res['success']){
uni.setStorageSync('userinfodataForm', res.data); delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
this.realName = res.data.realName; this.realName = res.data.realName;
} }
}) })
}, },
init() { init() {
if (!uni.getStorageSync('isLogin')) { if (!uni.getStorageSync('loginType')&& uni.getStorageSync('loginType')=='visitor') {
api.loginVerification({ api.loginVerification({
"loginType": 1 "loginType": 1
}).then((res) => { }).then((res) => {
...@@ -1010,7 +1027,7 @@ ...@@ -1010,7 +1027,7 @@
uni.setStorageSync('h5_coursesharing', this.coursesharing); uni.setStorageSync('h5_coursesharing', this.coursesharing);
this.getshareData() this.getshareData()
} }
let dataForm = uni.getStorageSync('userinfodataForm') let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.realName = dataForm.realName; this.realName = dataForm.realName;
if(!this.realName){ if(!this.realName){
this.queryInfo(); this.queryInfo();
...@@ -1032,45 +1049,10 @@ ...@@ -1032,45 +1049,10 @@
} }
this.userId = uni.getStorageSync('cffp_userId') this.userId = uni.getStorageSync('cffp_userId')
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
},
mounted() {
let _this = this;
if(this.isWeixin){
//var btn = document.getElementById('launch-btn');
//btn.addEventListener('launch', function(e) {
//console.log('success');
//});
//btn.addEventListener('error', function(e) {
// uni.navigateTo({
// url:'/pages/downloadAppCommon/downloadAppCommon'
// })
// uni.showModal({
// title: '系统消息',
// content: '您的手机未找到当前应用,是否去下载?',
// success: function(res) {
// if (res.confirm) {
// if(uni.getSystemInfoSync().platform == 'ios'){
// window.location.href = "http://itunes.apple.com/us/app/id399608199";
// }else {
// uni.navigateTo({
// url:'/pages/downloadApp/index'
// })
// // alert('android')
// }
// //在App Store Connect中的App Store下的app信息,可找到appleId
// console.log('用户点击确定');
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// });
//});
}
}, },
onReady() { onReady() {
this.videoContext = uni.createVideoContext('myVideo'); this.videoContext = uni.createVideoContext('myVideo');
......
<template> <template>
<!-- :style="{paddingTop: showFlag ? '0' : '60rpx'}" --> <!-- :style="{paddingTop: showFlag ? '0' : '60rpx'}" -->
<view class="container" :style="{paddingTop: showFlag ? '0' : '60rpx'}"> <view class="container" :style="{paddingTop: showFlag ? '0' : '60rpx'}">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="homeHeader" v-if="showFlag"> <view class="homeHeader" v-if="showFlag">
<view class="one"> <view class="one">
<text style="font-size: 80rpx;">01</text> <text style="font-size: 80rpx;">01</text>
...@@ -121,6 +123,7 @@ ...@@ -121,6 +123,7 @@
import {hshare,setWechatShare,initJssdkShare} from '@/util/fiveshare'; import {hshare,setWechatShare,initJssdkShare} from '@/util/fiveshare';
import UniShareWx from "@/uni_modules/uni-share-wx/index.vue"; import UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import {nanoid} from 'nanoid'; import {nanoid} from 'nanoid';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{ export default{
name:'courselist', name:'courselist',
props:{ props:{
...@@ -140,7 +143,8 @@ ...@@ -140,7 +143,8 @@
search, search,
UniShareWx, UniShareWx,
BootPage, BootPage,
PartnerTipPopup PartnerTipPopup,
restrictedTip
}, },
watch: { watch: {
// 监听 prop 变化,更新本地副本 // 监听 prop 变化,更新本地副本
...@@ -447,13 +451,13 @@ ...@@ -447,13 +451,13 @@
}).then((res) => { }).then((res) => {
if (res['success']) { if (res['success']) {
uni.setStorageSync('fileUploadItemCFFPList', res['data']['fileUploadItemCFFPList']) uni.setStorageSync('fileUploadItemCFFPList', res['data']['fileUploadItemCFFPList'])
const cffp_userInfo = { // const cffp_userInfo = {
name: res['data']['userReName'], // name: res['data']['userReName'],
mobile: res['data']['mobile'], // mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'], // partnerType:res['data']['partnerType'],
levelCode:res['data']['levelCode'], // levelCode:res['data']['levelCode'],
} // }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)); // uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
this.fileUploadItemCFFPList = uni.getStorageSync('fileUploadItemCFFPList'); this.fileUploadItemCFFPList = uni.getStorageSync('fileUploadItemCFFPList');
} }
}) })
......
...@@ -15,13 +15,14 @@ ...@@ -15,13 +15,14 @@
<view v-if="tabType===1"> <view v-if="tabType===1">
<view class="ulBox"> <view class="ulBox">
<view class="liBox"> <view class="liBox">
<text>昵称:</text> <text>昵称 <text style="font-size: 22rpx;">(被邀请人可修改)</text> </text>
<text> <text>
<input <input
v-model="dataForm.name" v-model="dataForm.name"
class="uni-input" class="uni-input"
maxlength="10" maxlength="10"
placeholder="昵称" placeholder="昵称"
style="width: 300rpx;"
/> />
</text> </text>
</view> </view>
...@@ -30,48 +31,6 @@ ...@@ -30,48 +31,6 @@
<text><input v-model="dataForm.mobileNumber" class="uni-input" type="number" maxlength="11" <text><input v-model="dataForm.mobileNumber" class="uni-input" type="number" maxlength="11"
placeholder="手机号" /></text> placeholder="手机号" /></text>
</view> </view>
<!-- <view class="liBox">
<text>申请身份:</text>
<text>
<picker @change="bindPickerChange" :value="applyIdentity" :range="identityArr">
<view class="uni-input">{{identityArr[applyIdentity]}}</view>
</picker>
</text>
</view>
<view class="liBox">
<text>所属组织:</text>
<text>
<input v-if="isCross==true" v-model="dataForm.areaName" class="uni-input"
placeholder="请填写组织名称" />
<picker v-else @change="bindPChange" :value="index" :range="orgdataList">
<view class="uni-input">{{ orgdataList[index]}}</view>
</picker>
</text>
</view>
<view class="liBox">
<text>是否跨区邀请:</text>
<view class="isCrossBox">
<view :class="{checked:isCross}">
<i class="circle" @click="isCross = true"></i>
<text></text>
</view>
<view :class="{checked:!isCross}">
<i class="circle" @click="isCross = false"></i>
<text></text>
</view>
</view>
</view>
<view class="describeLabel">晋升机制:当事业伙伴成功邀请加盟人数超过10人时,经过人工审核通过后,即可成功晋升为工作室。</view>
-->
<!-- <view class="liBox" v-if="isCross== true">
<text>所属组织名称:</text>
<text>
<picker @change="bindPickerChange" :value="applyIdentity" :range="identityArr">
<view class="uni-input">{{identityArr[applyIdentity]}}</view>
</picker>
</text>
</view> -->
</view> </view>
<!-- <share></share> --> <!-- <share></share> -->
<button type="primary" plain="true" class="sendInvite" @click="shareToggle()">发出邀请</button> <button type="primary" plain="true" class="sendInvite" @click="shareToggle()">发出邀请</button>
...@@ -81,25 +40,13 @@ ...@@ -81,25 +40,13 @@
<h4 class="noListTip" v-if="!inviteLists || inviteLists.length<=0">暂无邀请记录!</h4> <h4 class="noListTip" v-if="!inviteLists || inviteLists.length<=0">暂无邀请记录!</h4>
<view class="listUl ulBox" v-for="(item,index) in inviteLists" :key="index"> <view class="listUl ulBox" v-for="(item,index) in inviteLists" :key="index">
<view class="liBox"> <view class="liBox">
<text>姓名</text> <text>昵称</text>
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="liBox"> <view class="liBox">
<text>手机号:</text> <text>手机号:</text>
<text>{{item.mobileNumber}}</text> <text>{{item.mobileNumber}}</text>
</view> </view>
<!-- <view class="liBox">
<text>申请身份:</text>
<text>{{item.partnerLevel == 'A1'? '事业伙伴' : '工作室'}}</text>
</view>
<view class="liBox">
<text>所属组织:</text>
<text>{{item.orgName}}</text>
</view>
<view class="liBox">
<text>是否跨区邀请:</text>
<text>{{item.hasCrossDistrict==1 ? '是' : '否'}}</text>
</view> -->
<view class="liBox"> <view class="liBox">
<text>邀请状态:</text> <text>邀请状态:</text>
<text v-if="item.approvalStatus=='0'">邀请中</text> <text v-if="item.approvalStatus=='0'">邀请中</text>
...@@ -199,7 +146,7 @@ ...@@ -199,7 +146,7 @@
}else { }else {
this.ydLogoShare = `${shareURL}/static/logo2.png`; this.ydLogoShare = `${shareURL}/static/logo2.png`;
} }
let dataForm = uni.getStorageSync('userinfodataForm') let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.realName = dataForm.realName || dataForm.nickName; this.realName = dataForm.realName || dataForm.nickName;
this.invitationCode = dataForm.invitationCode this.invitationCode = dataForm.invitationCode
if(!this.realName){ if(!this.realName){
...@@ -222,7 +169,11 @@ ...@@ -222,7 +169,11 @@
queryInfo(){ queryInfo(){
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if(res['success']){ if(res['success']){
uni.setStorageSync('userinfodataForm', res.data); delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
this.realName = res.data.realName ||res.data.nickName ; this.realName = res.data.realName ||res.data.nickName ;
this.invitationCode = res.data.invitationCode; this.invitationCode = res.data.invitationCode;
} }
...@@ -293,6 +244,7 @@ ...@@ -293,6 +244,7 @@
// this.dataForm.name = '' // this.dataForm.name = ''
// return // return
// } // }
this.dataForm.remarkName = this.dataForm.name
if (common.mobileNoValid(this.dataForm.mobileNumber)) { if (common.mobileNoValid(this.dataForm.mobileNumber)) {
api.saveApplyInfo(this.dataForm).then(res => { api.saveApplyInfo(this.dataForm).then(res => {
if (res['success']) { if (res['success']) {
......
...@@ -121,6 +121,14 @@ ...@@ -121,6 +121,14 @@
</view> </view>
</view> </view>
</view> </view>
<boot-page
loginSource="我的团队"
v-if="sharelogin"
ref="sharelogin"
@close="sharelogin = false"
@afterLogin="afterLogin"
pageSource="myTeam"
></boot-page>
</view> </view>
</template> </template>
...@@ -129,9 +137,11 @@ ...@@ -129,9 +137,11 @@
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import api from "@/api/api"; import api from "@/api/api";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import BootPage from "@/components/bootpage/bootpage.vue";
export default { export default {
components: { components: {
CommonTimePicker CommonTimePicker,
BootPage
}, },
data() { data() {
return { return {
...@@ -164,7 +174,6 @@ ...@@ -164,7 +174,6 @@
myTeamList:[],//我的团队表格数据, myTeamList:[],//我的团队表格数据,
myTeamData:{},//我的团队总数据, myTeamData:{},//我的团队总数据,
CffpOrgInfoReqVO: { CffpOrgInfoReqVO: {
userId: uni.getStorageSync('cffp_userId'),
startDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`, startDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
endDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`, endDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
courseOrPolicy: '1', courseOrPolicy: '1',
...@@ -175,7 +184,8 @@ ...@@ -175,7 +184,8 @@
totalCoursePrice: '0.00', // 总销售额 totalCoursePrice: '0.00', // 总销售额
monthStandardSales:'0.00',//本月团队标准销售额 monthStandardSales:'0.00',//本月团队标准销售额
myTeamAchievementList:[],//我的业绩数据列表, myTeamAchievementList:[],//我的业绩数据列表,
marginTop:'30rpx' marginTop:'30rpx',
sharelogin: false,
} }
}, },
watch: { watch: {
...@@ -260,29 +270,30 @@ ...@@ -260,29 +270,30 @@
} }
}, },
}, },
onLoad(){ onLoad(options){
this.getmyseatem() // 未登录,弹出登录框
this.getqueryTeamAchievement() if(options.myTeam&&(!uni.getStorageSync('loginType')||uni.getStorageSync('loginType')=='visitor' )){
this.sharelogin = true
}else {
this.getmyseatem()
this.getqueryTeamAchievement()
}
}, },
onShow() { onShow() {
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
}, },
methods: { methods: {
sortswitch(obj) { sortswitch(obj) {
this.currentFilterBtn = obj.id this.currentFilterBtn = obj.id
this.CffpOrgInfoReqVO.sortType = obj.sortType this.CffpOrgInfoReqVO.sortType = obj.sortType
this.getqueryTeamAchievement() this.getqueryTeamAchievement()
// if(obj.sortType == 4){
// this.CffpOrgInfoReqVO.sortType = obj.sortType
// this.getqueryTeamAchievement()
// }else{
// delete this.CffpOrgInfoReqVO.sortType
// this.getqueryTeamAchievement()
// }
}, },
changeTab(item){ changeTab(item){
this.currentTab = item.id this.currentTab = item.id
...@@ -292,6 +303,7 @@ ...@@ -292,6 +303,7 @@
}, },
getqueryTeamAchievement() { getqueryTeamAchievement() {
this.CffpOrgInfoReqVO.userId=uni.getStorageSync('cffp_userId'),
this.CffpOrgInfoReqVO.queryType = this.tabList.filter(item=>item.id == this.currentTab)[0].type this.CffpOrgInfoReqVO.queryType = this.tabList.filter(item=>item.id == this.currentTab)[0].type
this.CffpOrgInfoReqVO.sortType = this.btnList.filter(item=>item.id == this.currentFilterBtn)[0].sortType this.CffpOrgInfoReqVO.sortType = this.btnList.filter(item=>item.id == this.currentFilterBtn)[0].sortType
api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => { api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => {
...@@ -379,6 +391,11 @@ ...@@ -379,6 +391,11 @@
}) })
} }
}, },
afterLogin(){
this.userId = uni.getStorageSync('cffp_userId'),
this.getmyseatem()
this.getqueryTeamAchievement()
}
}, },
} }
......
...@@ -162,6 +162,7 @@ ...@@ -162,6 +162,7 @@
@join="jumpPage('2')" @join="jumpPage('2')"
@continue="jumpPage('1')" @continue="jumpPage('1')"
/> />
<restrictedTip ref="restrictedTip"/>
</view> </view>
</template> </template>
...@@ -175,6 +176,7 @@ ...@@ -175,6 +176,7 @@
import JoinPopup from '@/components/commonPopup/JoinPopup.vue'; import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue"; import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
data() { data() {
return { return {
...@@ -205,6 +207,7 @@ ...@@ -205,6 +207,7 @@
{title:'申请加盟',icon:'icon-hezuo',link:'/myPackageA/applyFranchise/applyFranchise?',isOpen:true,isShow:true,isApply:true}, {title:'申请加盟',icon:'icon-hezuo',link:'/myPackageA/applyFranchise/applyFranchise?',isOpen:true,isShow:true,isApply:true},
{key:'06',title:'邀请加盟',icon:'icon-yaoqing',link:'/pages/inviteJoin/inviteJoin',isOpen:true,isShow:true,identity: true}, {key:'06',title:'邀请加盟',icon:'icon-yaoqing',link:'/pages/inviteJoin/inviteJoin',isOpen:true,isShow:true,identity: true},
{title:'我的团队',icon:'icon-tuandui',link:'/pages/personalCenter/myTeam',isOpen:true,isShow:true,identity: true}, {title:'我的团队',icon:'icon-tuandui',link:'/pages/personalCenter/myTeam',isOpen:true,isShow:true,identity: true},
// {title:'我的团队',icon:'icon-tuandui',link:'/myPackageA/myTeam/myTeam',isOpen:true,isShow:true,identity: true},
{title:'育成团队',icon:'icon-yuchengguanxi',link:'/pages/personalCenter/myTeamIncubate',isOpen:true,isShow:true,identity: true}, {title:'育成团队',icon:'icon-yuchengguanxi',link:'/pages/personalCenter/myTeamIncubate',isOpen:true,isShow:true,identity: true},
], ],
}, },
...@@ -232,7 +235,8 @@ ...@@ -232,7 +235,8 @@
components:{ components:{
tabBar, tabBar,
JoinPopup, JoinPopup,
PartnerTipPopup PartnerTipPopup,
restrictedTip
}, },
onShow() { onShow() {
this.loginType = uni.getStorageSync('loginType') this.loginType = uni.getStorageSync('loginType')
...@@ -405,7 +409,6 @@ ...@@ -405,7 +409,6 @@
url: '/myPackageA/login/login?from=personalCenter' url: '/myPackageA/login/login?from=personalCenter'
}) })
try { try {
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor'); uni.setStorageSync('loginType','visitor');
} catch (e) { } catch (e) {
...@@ -478,12 +481,15 @@ ...@@ -478,12 +481,15 @@
'我的', '我的',
'pages/personalCenter/personalCenter' 'pages/personalCenter/personalCenter'
) )
if(this.customerBasicInfo.userIsActive == 2){
this.$refs.restrictedTip.open()
return
}
this.getPartnerStatistic() this.getPartnerStatistic()
return return
} }
//当为见习合伙人的时候,弹出框提示 //当为见习合伙人的时候,弹出框提示
if(item.key == '06'&& this.userInfo.levelCode == 'P1' && uni.getStorageSync('loginType') == 'codelogin'){ if(item.key == '06'&& this.userInfo.levelCode == 'P1' && uni.getStorageSync('loginType') == 'codelogin'&& this.userInfo.userIsActive == 1){
this.$refs.PartnerTipPopup.open() this.$refs.PartnerTipPopup.open()
return return
} }
...@@ -597,11 +603,9 @@ ...@@ -597,11 +603,9 @@
this.inviteEqrode = this.customerBasicInfo.invitationCode; this.inviteEqrode = this.customerBasicInfo.invitationCode;
uni.setStorageSync('user_mobile', res.data.mobile) uni.setStorageSync('user_mobile', res.data.mobile)
uni.setStorageSync('userinfodataForm', res.data)
}else { }else {
// 清空全部本地存储
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor') uni.setStorageSync('loginType','visitor')
this.showMyName = '' this.showMyName = ''
this.loginType = 'visitor' this.loginType = 'visitor'
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!-- #endif --> <!-- #endif -->
<view class=""> <view class="">
<menu-list :menuList="minorMenuLists"></menu-list> <menu-list :menuList="minorMenuLists" @tipMessage="tipMessage()"></menu-list>
</view> </view>
...@@ -21,8 +21,10 @@ ...@@ -21,8 +21,10 @@
}, },
data() { data() {
return { return {
userInfo:{},
minorMenuLists: [ minorMenuLists: [
{ {
key:'1',
title: '手机号绑定', title: '手机号绑定',
icon: '', icon: '',
link: '', link: '',
...@@ -30,42 +32,45 @@ ...@@ -30,42 +32,45 @@
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isTips: false, isTips: false,
isType: 'text' isType: 'text',
isJump: true
}, },
// {
// title: '重置密码',
// icon: '',
// link: '/pages/personalCenter/accountoperation/resetpassword',
// isOpen: true,
// isShow: true,
// isTips: false,
// isType: 'radio'
// },
{ {
title: '注销账号', key:'2',
title: '合伙人解约',
icon: '', icon: '',
link: '/myPackageA/setting/logOff', link: '/myPackageA/setting/logOff',
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isTips: false, isTips: false,
isType: 'radio' isType: 'radio',
isJump:false,
} }
] ]
} }
}, },
onShow() { onShow() {
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
if(this.userInfo.partnerIsActive&&this.userInfo.partnerIsActive==2){
this.minorMenuLists.forEach(item=>{
if(item.key=='2'){
item.isJump = true
}
})
}
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
}, },
methods:{ methods:{
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
} },
} }
} }
</script> </script>
......
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
} }
}, },
onLoad() { onLoad() {
let dataForm = uni.getStorageSync('userinfodataForm')
},
onShow() {
let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.mobile = dataForm.mobile this.mobile = dataForm.mobile
}, },
destroyed() { destroyed() {
......
...@@ -43,14 +43,14 @@ ...@@ -43,14 +43,14 @@
isShow: true, isShow: true,
isTips: true, isTips: true,
}, },
{ // {
title: '关于'+companyInfo.appName+'APP', // title: '关于'+companyInfo.appName+'APP',
icon: 'myCertify', // icon: 'myCertify',
link: '/pages/personalCenter/accountoperation/aboutcffp', // link: '/pages/personalCenter/accountoperation/aboutcffp',
isOpen: true, // isOpen: true,
isShow: true, // isShow: true,
isTips: false, // isTips: false,
}, // },
] ]
} }
}, },
...@@ -59,7 +59,17 @@ ...@@ -59,7 +59,17 @@
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
// #ifdef APP
this.minorMenuLists.push({
title: '关于'+companyInfo.appName+'APP',
icon: 'myCertify',
link: '/pages/personalCenter/accountoperation/aboutcffp',
isOpen: true,
isShow: true,
isTips: false,
},)
// #endif
}, },
destroyed() { destroyed() {
uni.hideToast(); uni.hideToast();
...@@ -85,16 +95,16 @@ ...@@ -85,16 +95,16 @@
'设置', '设置',
'pages/personalCenter/system/settings' 'pages/personalCenter/system/settings'
) )
uni.redirectTo({
url:'/myPackageA/login/login'
})
try { try {
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor'); uni.setStorageSync('loginType','visitor');
} catch (e) { } catch (e) {
console.log(e) console.log(e)
// error // error
} }
uni.redirectTo({
url:'/myPackageA/login/login'
})
uni.showToast({ uni.showToast({
title: '操作成功', title: '操作成功',
icon: 'none' icon: 'none'
......
<template> <template>
<view class="container"> <view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="kuaiBox" v-for="item in mainMenuLists" :key="item.id"> <view class="kuaiBox" v-for="item in mainMenuLists" :key="item.id">
<view class="kuaiTit"> <view class="kuaiTit">
{{item.categoryName}} {{item.categoryName}}
...@@ -30,8 +32,8 @@ ...@@ -30,8 +32,8 @@
<script> <script>
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import tabBar from '../../components/tabBar/tabBar.vue'; import tabBar from '../../components/tabBar/tabBar.vue';
import courseItem from "@/components/courseItem/courseItem.vue";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
data() { data() {
return { return {
...@@ -72,6 +74,9 @@ ...@@ -72,6 +74,9 @@
] ]
} }
}, },
components: {
restrictedTip
},
onShow() { onShow() {
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
......
...@@ -55,6 +55,24 @@ ...@@ -55,6 +55,24 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe333;</span>
<div class="name">加号</div>
<div class="code-name">&amp;#xe333;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe302;</span>
<div class="name">save</div>
<div class="code-name">&amp;#xe302;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe301;</span>
<div class="name">加号2-fill</div>
<div class="code-name">&amp;#xe301;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe300;</span> <span class="icon iconfont">&#xe300;</span>
<div class="name">icon_对号-面</div> <div class="name">icon_对号-面</div>
<div class="code-name">&amp;#xe300;</div> <div class="code-name">&amp;#xe300;</div>
...@@ -384,9 +402,9 @@ ...@@ -384,9 +402,9 @@
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.woff2?t=1751592106397') format('woff2'), src: url('iconfont.woff2?t=1754967710345') format('woff2'),
url('iconfont.woff?t=1751592106397') format('woff'), url('iconfont.woff?t=1754967710345') format('woff'),
url('iconfont.ttf?t=1751592106397') format('truetype'); url('iconfont.ttf?t=1754967710345') format('truetype');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
...@@ -413,6 +431,33 @@ ...@@ -413,6 +431,33 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont icon-jiahao"></span>
<div class="name">
加号
</div>
<div class="code-name">.icon-jiahao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-save"></span>
<div class="name">
save
</div>
<div class="code-name">.icon-save
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiahao2fill"></span>
<div class="name">
加号2-fill
</div>
<div class="code-name">.icon-jiahao2fill
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-icon_duihao-mian"></span> <span class="icon iconfont icon-icon_duihao-mian"></span>
<div class="name"> <div class="name">
icon_对号-面 icon_对号-面
...@@ -909,6 +954,30 @@ ...@@ -909,6 +954,30 @@
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiahao"></use>
</svg>
<div class="name">加号</div>
<div class="code-name">#icon-jiahao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-save"></use>
</svg>
<div class="name">save</div>
<div class="code-name">#icon-save</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiahao2fill"></use>
</svg>
<div class="name">加号2-fill</div>
<div class="code-name">#icon-jiahao2fill</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-icon_duihao-mian"></use> <use xlink:href="#icon-icon_duihao-mian"></use>
</svg> </svg>
<div class="name">icon_对号-面</div> <div class="name">icon_对号-面</div>
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4933433 */ font-family: "iconfont"; /* Project id 4933433 */
src: url('iconfont.woff2?t=1751592106397') format('woff2'), src: url('iconfont.woff2?t=1754967710345') format('woff2'),
url('iconfont.woff?t=1751592106397') format('woff'), url('iconfont.woff?t=1754967710345') format('woff'),
url('iconfont.ttf?t=1751592106397') format('truetype'); url('iconfont.ttf?t=1754967710345') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,6 +13,18 @@ ...@@ -13,6 +13,18 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-jiahao:before {
content: "\e333";
}
.icon-save:before {
content: "\e302";
}
.icon-jiahao2fill:before {
content: "\e301";
}
.icon-icon_duihao-mian:before { .icon-icon_duihao-mian:before {
content: "\e300"; content: "\e300";
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,6 +6,27 @@ ...@@ -6,6 +6,27 @@
"description": "", "description": "",
"glyphs": [ "glyphs": [
{ {
"icon_id": "7192356",
"name": "加号",
"font_class": "jiahao",
"unicode": "e333",
"unicode_decimal": 58163
},
{
"icon_id": "448643",
"name": "save",
"font_class": "save",
"unicode": "e302",
"unicode_decimal": 58114
},
{
"icon_id": "577314",
"name": "加号2-fill",
"font_class": "jiahao2fill",
"unicode": "e301",
"unicode_decimal": 58113
},
{
"icon_id": "4735289", "icon_id": "4735289",
"name": "icon_对号-面", "name": "icon_对号-面",
"font_class": "icon_duihao-mian", "font_class": "icon_duihao-mian",
......
import api from "@/api/api"; import api from "@/api/api";
import dataHandling from './dataHandling' import dataHandling from './dataHandling'
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
...@@ -19,16 +24,18 @@ const whiteList = [ ...@@ -19,16 +24,18 @@ const whiteList = [
export default function initApp(){ export default function initApp(){
let date = Date.now() let date = Date.now()
uni.addInterceptor('navigateTo', { uni.addInterceptor('navigateTo', {
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转 // 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke (e) { invoke (e) {
let userInfo = {}
if(uni.getStorageSync('cffp_userInfo')){
userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
let pages = getCurrentPages() let pages = getCurrentPages()
let pagesLength = pages.length let pagesLength = pages.length
if(whiteList.indexOf(e.url)==-1&&!uni.getStorageSync('loginType')){ if(whiteList.indexOf(e.url)==-1&&!uni.getStorageSync('loginType')){
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor') uni.setStorageSync('loginType','visitor')
uni.navigateTo({ uni.navigateTo({
url: '/myPackageA/login/login' url: '/myPackageA/login/login'
...@@ -37,8 +44,6 @@ export default function initApp(){ ...@@ -37,8 +44,6 @@ export default function initApp(){
if(uni.getStorageSync('cffp_userId')){ if(uni.getStorageSync('cffp_userId')){
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if(!res['success']){ if(!res['success']){
// 清空全部本地存储
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor') uni.setStorageSync('loginType','visitor')
uni.navigateTo({ uni.navigateTo({
url: '/myPackageA/login/login' url: '/myPackageA/login/login'
...@@ -47,18 +52,22 @@ export default function initApp(){ ...@@ -47,18 +52,22 @@ export default function initApp(){
} }
// 保存用户得个人信息 // 保存用户得个人信息
if (res['success']) { if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = { const cffp_userInfo = {
name: res['data']['realName'], ...res.data
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
} }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)) uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
} }
}) })
} }
if (userInfo.userIsActive == 2 &&uni.getStorageSync('loginType')=='codelogin') {
// 显示禁用用户弹窗
const currentPage = getCurrentPages()[getCurrentPages().length - 1];
currentPage.$refs.restrictedTip.open()
return false; // 返回对象而不是布尔值
}
let whiteArr = ['index','personalCenter','courselist','product'] let whiteArr = ['index','personalCenter','courselist','product']
// 1. 解析 URL 中的 from 参数 // 1. 解析 URL 中的 from 参数
const getQueryParam = (url, key) => { const getQueryParam = (url, key) => {
...@@ -69,7 +78,6 @@ export default function initApp(){ ...@@ -69,7 +78,6 @@ export default function initApp(){
}; };
const fromParam = getQueryParam(e.url, 'from'); const fromParam = getQueryParam(e.url, 'from');
console.log('2222',!hasPermission(e.url));
if(!hasPermission(e.url)){ if(!hasPermission(e.url)){
// 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页 // 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页
if (fromParam && whiteArr.includes(fromParam)) { if (fromParam && whiteArr.includes(fromParam)) {
...@@ -77,7 +85,6 @@ export default function initApp(){ ...@@ -77,7 +85,6 @@ export default function initApp(){
url: `/myPackageA/login/login?from=${fromParam}` url: `/myPackageA/login/login?from=${fromParam}`
}) })
}else { }else {
console.log('zoujinlaile');
uni.redirectTo({ uni.redirectTo({
url: '/myPackageA/login/login' url: '/myPackageA/login/login'
}) })
...@@ -155,4 +162,4 @@ function hasPermission (url) { ...@@ -155,4 +162,4 @@ function hasPermission (url) {
return true return true
} }
return false return false
} }
\ No newline at end of file
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