Commit a179a568 by yuzhenWang

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

Dev

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