Commit b8b17b87 by yuzhenWang

修复家办商城跳转bug

parent 4f69162c
......@@ -20,23 +20,7 @@
}
// 处理外部链接参数
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
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
uni.getSystemInfo({
......@@ -80,11 +64,24 @@
onShow: function(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){
// 添加iOS平台检测
const isIOS = navigator.platform.match(/(iPhone|iPod|iPad)/i);
const params = {
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'
}
api.loginVerification(params).then((res)=>{
......@@ -93,7 +90,7 @@
uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', res.data.userId);
uni.setStorageSync('uni-token', res.data['token']);
this.checkUserStatus();
// this.checkUserStatus();
}else{
uni.showToast({
......@@ -265,17 +262,15 @@
// 使用uni.setStorageSync存储到本地
try {
// #ifdef H5
//家办商城跳转登录状态下
if(params.dataToken){
this.dataToken = params.dataToken
uni.setStorageSync('loginType','codelogin');
}
// #endif
// #ifdef MP-WEIXIN
if(params.dataToken){
this.dataToken = uni.getStorageSync('hoservice_token')
//家办商城跳转未登录状态下
if(params.noLogin){
uni.setStorageSync('loginType','visitor');
}
// #endif
if(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 @@
"style": {
"navigationBarTitleText": "我的团队"
}
},{
"path": "commission/withdrawalRecord",
"style": {
"navigationBarTitleText": "我的团队"
}
}
]
},{
"root": "officialWebsite",
......
......@@ -289,11 +289,7 @@
},
onLoad(options) {
// 从家办商城跳进来
// if(options.dataToken){
// uni.setStorageSync('uni-token',options.dataToken)
// }
if(options.sharePoster){
dataHandling.pocessTracking(
'进入',
......@@ -303,12 +299,12 @@
'首页',
'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}
uni.setStorageSync('sharePosterObj',sharePosterObj)
}
//如果用户在其他的地方快捷登录,没有返回到首页,执行此监听方法
uni.$on('loginUpdate',()=>{
console.log('111111');
this.queryAreaCenterInfo();
})
},
......@@ -444,6 +440,7 @@
},
init() {
let loginType = uni.getStorageSync('loginType')
console.log('loginType',loginType);
if(loginType == 'codelogin'){
this.querySystemMessage()
this.queryInfo()
......@@ -451,6 +448,7 @@
this.initShare();
this.getOneProduct()
this.queryAreaCenterInfo()
return
}else {
// 未登录
this.featureLists =[
......
......@@ -206,8 +206,8 @@
children:[
{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},
{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:'/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},
],
},
......
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