Commit a179a568 by yuzhenWang

Merge branch 'dev' into 'feature-20260203-解决外部跳转页面登录问题'

Dev

See merge request !81
parents a5333080 de2a5c14
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
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);
console.log('============',uni.getStorageSync('cffp_userId'))
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
this.loginTypeSync = "codelogin"; this.loginTypeSync = "codelogin";
this.queryInfo() this.queryInfo()
......
...@@ -182,6 +182,7 @@ ...@@ -182,6 +182,7 @@
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);
console.log('============',uni.getStorageSync('cffp_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']);
......
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
uni.setStorageSync('isLogin', '1'); uni.setStorageSync('isLogin', '1');
uni.setStorageSync('loginType', 'codelogin'); uni.setStorageSync('loginType', 'codelogin');
uni.setStorageSync('cffp_userId', res.data['userId']); uni.setStorageSync('cffp_userId', res.data['userId']);
console.log('============',uni.getStorageSync('cffp_userId'))
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
//关闭弹窗 //关闭弹窗
this.$refs.loginPopup.close(); this.$refs.loginPopup.close();
......
...@@ -160,7 +160,7 @@ const fetchRateData = async () => { ...@@ -160,7 +160,7 @@ const fetchRateData = async () => {
try { try {
const params = { const params = {
planBizId:planBizId.value, planBizId:planBizId.value,
userId:localStorage.getItem('cffp_userId') userId:uni.getStorageSync('cffp_userId') || ''
} }
const response = await api.queryRate(params) const response = await api.queryRate(params)
...@@ -193,7 +193,7 @@ const fetchRateData = async () => { ...@@ -193,7 +193,7 @@ const fetchRateData = async () => {
// 生命周期 // 生命周期
onMounted(() => { onMounted(() => {
userId.value = localStorage.getItem('cffp_userId') || '' userId.value = uni.getStorageSync('cffp_userId') || ''
fetchRateData() fetchRateData()
}) })
</script> </script>
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<button <button
class="compare-btn" class="compare-btn"
@click="navigateToPKPage" @click="navigateToPKPage"
:disabled="pkList.length < 2" :disabled="pkList.length < 1"
> >
去对比 去对比
</button> </button>
......
...@@ -764,10 +764,9 @@ ...@@ -764,10 +764,9 @@
} }
api.loginVerification(params).then((res)=>{ api.loginVerification(params).then((res)=>{
if(res['success']){ if(res['success']){
uni.setStorageSync('isLogin','1'); uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin'); uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', res.data.userId); uni.setStorageSync('cffp_userId', JSON.stringify(res.data.userId));
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
this.userId = res.data.userId this.userId = res.data.userId
this.querySystemMessage() this.querySystemMessage()
......
...@@ -130,7 +130,8 @@ const companyPdf = ref<PdfItem>({ ...@@ -130,7 +130,8 @@ const companyPdf = ref<PdfItem>({
// urls: Array.from({ length: 21 }, (_, i) => // urls: Array.from({ length: 21 }, (_, i) =>
// `${OSS_BASE_URL}/public/company-intro_part${i + 1}.pdf` // `${OSS_BASE_URL}/public/company-intro_part${i + 1}.pdf`
// ), // ),
urls: [`${OSS_BASE_URL}/public/company-intro.pdf`], // urls: [`${OSS_BASE_URL}/public/company-intro.pdf`],
urls: [`${OSS_BASE_URL}/wslucky/product/2025/06/24/31c164ac-565c-4990-a584-b5d4935840d0.pdf`],
type: 'showURL' type: 'showURL'
}); });
...@@ -271,7 +272,6 @@ const queryUserInfoAndPermission = () => { ...@@ -271,7 +272,6 @@ const queryUserInfoAndPermission = () => {
const initPdfAfterPermission = () => { const initPdfAfterPermission = () => {
loading.value = true; loading.value = true;
const filteredTabs = filteredCurrentTabs.value; const filteredTabs = filteredCurrentTabs.value;
console.log(filteredTabs)
if (currentType.value >= 2 && currentType.value <= 4) { if (currentType.value >= 2 && currentType.value <= 4) {
if (filteredTabs.length > 0) { if (filteredTabs.length > 0) {
activeTab.value = 0; activeTab.value = 0;
...@@ -310,7 +310,7 @@ const switchTab = (index: number) => { ...@@ -310,7 +310,7 @@ const switchTab = (index: number) => {
const tabs = filteredCurrentTabs.value; const tabs = filteredCurrentTabs.value;
if (index < 0 || index >= tabs.length || tabs.length === 0) return; if (index < 0 || index >= tabs.length || tabs.length === 0) return;
uni.showLoading({ title: '切换中...' }); loading.value = true;
setTimeout(() => { setTimeout(() => {
activeTab.value = index; activeTab.value = index;
...@@ -318,7 +318,7 @@ const switchTab = (index: number) => { ...@@ -318,7 +318,7 @@ const switchTab = (index: number) => {
uni.setStorageSync('tabsIndex', index); uni.setStorageSync('tabsIndex', index);
setTimeout(() => { setTimeout(() => {
uni.hideLoading(); loading.value = false;
}, 300); }, 300);
}, 100); }, 100);
}; };
......
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
<view class="headerTop"> <view class="headerTop">
<view class="" style="margin-right: 15rpx;"> <view class="" style="margin-right: 15rpx;">
<view class="myName" v-if="loginType == 'codelogin'"> <view class="myName" v-if="loginType == 'codelogin'">
{{showMyName || '点头像完善信息'}} {{showMyName || '点头像完善信息'}}
<text v-if="customerBasicInfo.partnerType" <text v-if="customerBasicInfo.partnerType"
class="typePartner">{{customerBasicInfo.partnerType}}</text> class="typePartner">{{customerBasicInfo.partnerType}}</text>
</view> </view>
<view class="myName" v-if="loginType == 'visitor'">游客</view> <view class="myName" v-if="loginType == 'visitor'">游客</view>
</view> </view>
...@@ -190,7 +191,7 @@ ...@@ -190,7 +191,7 @@
currentPage: 'personalCenter', currentPage: 'personalCenter',
customerBasicInfo: {}, customerBasicInfo: {},
loginornot: true, loginornot: true,
tabBarPadding: 0, tabBarPadding: 100,
settingItem: { settingItem: {
title: '系统设置', title: '系统设置',
icon: 'setting', icon: 'setting',
...@@ -233,6 +234,7 @@ ...@@ -233,6 +234,7 @@
}, },
], ],
}, },
{ {
id: '01', id: '01',
categoryName: '团队', categoryName: '团队',
...@@ -253,7 +255,6 @@ ...@@ -253,7 +255,6 @@
isShow: true, isShow: true,
identity: true identity: true
}, },
// {title:'我的团队',icon:'icon-tuandui',link:'/pages/personalCenter/myTeam',isOpen:true,isShow:true,identity: true},
{ {
title: '我的团队', title: '我的团队',
icon: 'icon-tuandui', icon: 'icon-tuandui',
...@@ -422,25 +423,22 @@ ...@@ -422,25 +423,22 @@
}); });
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'))
} if (this.userInfo) {
// 计算tabbar高度,避免tabbar遮挡页面底部内容 const levelCode = this.userInfo.levelCode || '';
const sysInfo = uni.getSystemInfoSync(); const dealerId = this.userInfo.dealerId || '';
this.tabBarPadding = 100; // 默认值,可根据你的设计调整 // 2. 找到“申请加盟”菜单项(通过 key)
if (sysInfo.windowBottom) { const team = this.mainMenuLists.find(item => item.id === '01');
// H5 平台下,windowBottom 表示可视区域底部到屏幕底的距离(即 tabbar 高度 + 安全区域) if (!team) return;
this.tabBarPadding = sysInfo.windowBottom;
} else { const applyItem = team.children.find(child => child.key === 'applyFranchise');
// 兜底逻辑:根据平台和设备估算 if (!applyItem) return;
if (sysInfo.platform === 'ios') {
// iPhone 底部安全区一般为 34px(全面屏)或 0(非全面屏) // 3. 更新标题和显示状态
const isIPhoneX = /iPhone X|iPhone 1[0-9]|iPhone [A-Z]/.test(sysInfo.model); applyItem.title = levelCode === '' ? '申请加盟' : '晋升目标';
this.tabBarPadding += isIPhoneX ? 34 : 0; applyItem.isShow = !dealerId && levelCode != 'P3'; // 没有 dealerId 才显示
}
// 如果是 iPad,横屏时底部安全区可能为 0,但 tabbar 仍存在
if (sysInfo.deviceType === 'tablet') {
this.tabBarPadding = 60; // iPad 常见 tabbar 高度
} }
} }
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
......
...@@ -23,10 +23,8 @@ export default [ ...@@ -23,10 +23,8 @@ export default [
"Q": "合伙人晋升条件", "Q": "合伙人晋升条件",
"A": [ "A": [
"见习合伙人:完成加盟申请", "见习合伙人:完成加盟申请",
"新锐合伙人:个人标准销售额≥799元", "新锐合伙人:个人标准销售额≥198元",
"资深合伙人:个人标准销售额≥799元 + 团队有效人数≥5人 + 团队标准销售额≥5万元", "资深合伙人:个人标准销售额≥198元 + 团队有效人数≥5人 + 团队标准销售额≥5万元",
"精英合伙人:个人标准销售额≥799元 + 团队有效人数≥10人 + 团队标准销售额≥15万元",
"营业部部长:个人标准销售额≥799元 + 团队有效人数≥20人 + 团队标准销售额≥50万元"
], ],
"isActive": 1, "isActive": 1,
"isMore": true "isMore": true
...@@ -70,8 +68,6 @@ export default [ ...@@ -70,8 +68,6 @@ export default [
"A": [ "A": [
"见习合伙人:自购或分享产品,他人购买后可获得销售收入", "见习合伙人:自购或分享产品,他人购买后可获得销售收入",
"更高级别合伙人:可额外获得团队订单的一级/二级管理津贴", "更高级别合伙人:可额外获得团队订单的一级/二级管理津贴",
"营业部部长:可享受部长津贴",
"育成营业部部长:可享受育成津贴",
"(以上收益可叠加)" "(以上收益可叠加)"
], ],
"isActive": 1, "isActive": 1,
......
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