Commit 6d76b847 by yuzhenWang

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

修复家办商城跳转bug

See merge request !64
parents 17e64a3c b8b17b87
...@@ -20,23 +20,7 @@ ...@@ -20,23 +20,7 @@
} }
// 处理外部链接参数 // 处理外部链接参数
this.handleExternalUrlParams(); this.handleExternalUrlParams();
// #ifdef APP-PLUS
// uni.downloadFile({
// url: '/cffpUpdate/__UNI__ED34740.wgt',
// success: (downloadResult) => {
// if (downloadResult.statusCode === 200) {
// plus.runtime.install(downloadResult.tempFilePath, {
// force: true
// }, function() {
// console.log('install success...');
// plus.runtime.restart();
// }, function(e) {
// console.error('install fail...');
// });
// }
// }
// });
// #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => { plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
uni.getSystemInfo({ uni.getSystemInfo({
...@@ -80,11 +64,24 @@ ...@@ -80,11 +64,24 @@
onShow: function(options) { onShow: function(options) {
console.log('App Show', options); console.log('App Show', options);
// 从家办商城跳转到cffp
// #ifdef MP-WEIXIN
// 获取当前页面栈(适用于小程序)
const pages = getCurrentPages();
if (pages.length > 0) {
const currentPage = pages[pages.length - 1];
const urlParams = currentPage.options || {};
console.log('微信小程序 URL 参数:', urlParams);
this.saveUrlParams(urlParams);
}
// #endif
if(this.dataToken){ if(this.dataToken){
// 添加iOS平台检测
const isIOS = navigator.platform.match(/(iPhone|iPod|iPad)/i);
const params = { const params = {
loginType:'5', loginType:'5',
authToken:this.dataToken.replace(/\%/g, ' ') authToken: isIOS ? this.dataToken : this.dataToken.replace(/\%/g, ' ')
// authToken:this.dataToken.replace(/\%/g, ' ')
// authToken:'zuihuibi eyJhbGciOiJIUzUxMiJ9.eyJVc2VySWQiOjEyODMsImNyZWF0ZWQiOjE3NTQ2NDk1MDA5NzIsImV4cCI6MTc1NzI0MTUwMH0.udjBlMY4FswgBU7zv9jD-zK8ANGR1KKXk_DiJEQkwhiC9DYwxAc7wAp6BWIKY_oiNr58QJqDtBAJ85bGOcCpeQ' // authToken:'zuihuibi eyJhbGciOiJIUzUxMiJ9.eyJVc2VySWQiOjEyODMsImNyZWF0ZWQiOjE3NTQ2NDk1MDA5NzIsImV4cCI6MTc1NzI0MTUwMH0.udjBlMY4FswgBU7zv9jD-zK8ANGR1KKXk_DiJEQkwhiC9DYwxAc7wAp6BWIKY_oiNr58QJqDtBAJ85bGOcCpeQ'
} }
api.loginVerification(params).then((res)=>{ api.loginVerification(params).then((res)=>{
...@@ -93,7 +90,7 @@ ...@@ -93,7 +90,7 @@
uni.setStorageSync('loginType','codelogin'); uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', res.data.userId); uni.setStorageSync('cffp_userId', res.data.userId);
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
this.checkUserStatus(); // this.checkUserStatus();
}else{ }else{
uni.showToast({ uni.showToast({
...@@ -265,17 +262,15 @@ ...@@ -265,17 +262,15 @@
// 使用uni.setStorageSync存储到本地 // 使用uni.setStorageSync存储到本地
try { try {
// #ifdef H5 //家办商城跳转登录状态下
if(params.dataToken){ if(params.dataToken){
this.dataToken = params.dataToken this.dataToken = params.dataToken
uni.setStorageSync('loginType','codelogin');
} }
// #endif //家办商城跳转未登录状态下
// #ifdef MP-WEIXIN if(params.noLogin){
if(params.dataToken){ uni.setStorageSync('loginType','visitor');
this.dataToken = uni.getStorageSync('hoservice_token')
} }
// #endif
if(params.addSystemType){ if(params.addSystemType){
uni.setStorageSync('addSystemType', params.addSystemType); uni.setStorageSync('addSystemType', params.addSystemType);
} }
......
<template>
<view class="">
111111
</view>
</template>
<script>
</script>
<style>
</style>
\ No newline at end of file
...@@ -549,7 +549,13 @@ ...@@ -549,7 +549,13 @@
"style": { "style": {
"navigationBarTitleText": "我的团队" "navigationBarTitleText": "我的团队"
} }
},{
"path": "commission/withdrawalRecord",
"style": {
"navigationBarTitleText": "我的团队"
}
} }
] ]
},{ },{
"root": "officialWebsite", "root": "officialWebsite",
......
...@@ -289,11 +289,7 @@ ...@@ -289,11 +289,7 @@
}, },
onLoad(options) { onLoad(options) {
// 从家办商城跳进来
// if(options.dataToken){
// uni.setStorageSync('uni-token',options.dataToken)
// }
if(options.sharePoster){ if(options.sharePoster){
dataHandling.pocessTracking( dataHandling.pocessTracking(
'进入', '进入',
...@@ -303,12 +299,12 @@ ...@@ -303,12 +299,12 @@
'首页', '首页',
'pages/index/index' 'pages/index/index'
) )
// https://mdev.anjibao.cn/cffp/pages/index/index?invitationCode=SOYAMU&inviteUserId=72323&sharePoster=1
let sharePosterObj = {invitationCode:options.invitationCode,inviteUserId:options.inviteUserId,sharePoster:1} let sharePosterObj = {invitationCode:options.invitationCode,inviteUserId:options.inviteUserId,sharePoster:1}
uni.setStorageSync('sharePosterObj',sharePosterObj) uni.setStorageSync('sharePosterObj',sharePosterObj)
} }
//如果用户在其他的地方快捷登录,没有返回到首页,执行此监听方法 //如果用户在其他的地方快捷登录,没有返回到首页,执行此监听方法
uni.$on('loginUpdate',()=>{ uni.$on('loginUpdate',()=>{
console.log('111111');
this.queryAreaCenterInfo(); this.queryAreaCenterInfo();
}) })
}, },
...@@ -444,6 +440,7 @@ ...@@ -444,6 +440,7 @@
}, },
init() { init() {
let loginType = uni.getStorageSync('loginType') let loginType = uni.getStorageSync('loginType')
console.log('loginType',loginType);
if(loginType == 'codelogin'){ if(loginType == 'codelogin'){
this.querySystemMessage() this.querySystemMessage()
this.queryInfo() this.queryInfo()
...@@ -451,6 +448,7 @@ ...@@ -451,6 +448,7 @@
this.initShare(); this.initShare();
this.getOneProduct() this.getOneProduct()
this.queryAreaCenterInfo() this.queryAreaCenterInfo()
return
}else { }else {
// 未登录 // 未登录
this.featureLists =[ this.featureLists =[
......
...@@ -206,8 +206,8 @@ ...@@ -206,8 +206,8 @@
children:[ children:[
{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-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},
], ],
}, },
......
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