|
|
@@ -1288,26 +1288,20 @@ Page({
|
|
|
if (partnerId) console.log('合作伙伴 ID:', partnerId);
|
|
|
console.log('===========================================');
|
|
|
|
|
|
- const currentUser = Parse.User.current();
|
|
|
- const token = currentUser ? currentUser.getSessionToken() : null;
|
|
|
|
|
|
// 构建产品详情的 H5 URL(不要在这里编码,后面统一编码)
|
|
|
- let h5Url = `https://app.fmode.cn/dev/pobingfeng/owner/nav/products?storeId=${storeId}`;
|
|
|
+ let h5Url = `https://app.fmode.cn/dev/pobingfeng/owner/nav/products?storeId=${encodeURIComponent(storeId)}`;
|
|
|
|
|
|
// 如果有 token,添加到 URL
|
|
|
- if (token) {
|
|
|
- h5Url += `&token=${token}`;
|
|
|
- } else {
|
|
|
- // 如果没有 token,使用游客模式
|
|
|
- h5Url += `&guestMode=true`;
|
|
|
- }
|
|
|
+ // This legacy H5 already supports guestMode. Its session is independent.
|
|
|
+ h5Url += '&guestMode=true';
|
|
|
|
|
|
// 添加产品ID(不要在这里编码,避免双重编码)
|
|
|
- h5Url += `&productId=${productId}`;
|
|
|
+ h5Url += `&productId=${encodeURIComponent(productId)}`;
|
|
|
|
|
|
// 如果有合作伙伴ID,也添加到URL中
|
|
|
if (partnerId) {
|
|
|
- h5Url += `&partnerId=${partnerId}`;
|
|
|
+ h5Url += `&partnerId=${encodeURIComponent(partnerId)}`;
|
|
|
}
|
|
|
|
|
|
console.log('🌐 H5 URL:', h5Url);
|
|
|
@@ -1316,7 +1310,7 @@ Page({
|
|
|
const encodedUrl = encodeURIComponent(h5Url);
|
|
|
|
|
|
// 构建 web-view 页面路径
|
|
|
- let webViewPath = `/common-page/pages/web-view/index?path=${encodedUrl}&storeId=${storeId}`;
|
|
|
+ let webViewPath = `/common-page/pages/web-view/index?path=${encodedUrl}&storeId=${encodeURIComponent(storeId)}`;
|
|
|
|
|
|
console.log('📄 web-view 页面路径:', webViewPath.substring(0, 100) + '...');
|
|
|
console.log('===========================================');
|
|
|
@@ -1357,26 +1351,20 @@ Page({
|
|
|
if (partnerId) console.log('合作伙伴 ID:', partnerId);
|
|
|
console.log('===========================================');
|
|
|
|
|
|
- const currentUser = Parse.User.current();
|
|
|
- const token = currentUser ? currentUser.getSessionToken() : null;
|
|
|
|
|
|
// 构建案例详情的 H5 URL(不要在这里编码,后面统一编码)
|
|
|
- let h5Url = `https://app.fmode.cn/dev/pobingfeng/owner/nav/cases?storeId=${storeId}`;
|
|
|
+ let h5Url = `https://app.fmode.cn/dev/pobingfeng/owner/nav/cases?storeId=${encodeURIComponent(storeId)}`;
|
|
|
|
|
|
// 如果有 token,添加到 URL
|
|
|
- if (token) {
|
|
|
- h5Url += `&token=${token}`;
|
|
|
- } else {
|
|
|
- // 如果没有 token,使用游客模式
|
|
|
- h5Url += `&guestMode=true`;
|
|
|
- }
|
|
|
+ // This legacy H5 already supports guestMode. Its session is independent.
|
|
|
+ h5Url += '&guestMode=true';
|
|
|
|
|
|
// 添加案例ID(不要在这里编码,避免双重编码)
|
|
|
- h5Url += `&caseId=${caseId}`;
|
|
|
+ h5Url += `&caseId=${encodeURIComponent(caseId)}`;
|
|
|
|
|
|
// 如果有合作伙伴ID,也添加到URL中
|
|
|
if (partnerId) {
|
|
|
- h5Url += `&partnerId=${partnerId}`;
|
|
|
+ h5Url += `&partnerId=${encodeURIComponent(partnerId)}`;
|
|
|
}
|
|
|
|
|
|
console.log('🌐 H5 URL:', h5Url);
|
|
|
@@ -1385,7 +1373,7 @@ Page({
|
|
|
const encodedUrl = encodeURIComponent(h5Url);
|
|
|
|
|
|
// 构建 web-view 页面路径
|
|
|
- let webViewPath = `/common-page/pages/web-view/index?path=${encodedUrl}&storeId=${storeId}`;
|
|
|
+ let webViewPath = `/common-page/pages/web-view/index?path=${encodedUrl}&storeId=${encodeURIComponent(storeId)}`;
|
|
|
|
|
|
console.log('📄 web-view 页面路径:', webViewPath.substring(0, 100) + '...');
|
|
|
console.log('===========================================');
|
|
|
@@ -1428,31 +1416,25 @@ Page({
|
|
|
if (partnerId) console.log('合作伙伴 ID:', partnerId);
|
|
|
console.log('===========================================');
|
|
|
|
|
|
- const currentUser = Parse.User.current();
|
|
|
- const token = currentUser ? currentUser.getSessionToken() : null;
|
|
|
|
|
|
// 构建门店首页的 H5 URL,带上方案ID
|
|
|
- let h5Url = `https://app.fmode.cn/dev/pobingfeng/owner/nav/home?storeId=${storeId}`;
|
|
|
+ let h5Url = `https://app.fmode.cn/dev/pobingfeng/owner/nav/home?storeId=${encodeURIComponent(storeId)}`;
|
|
|
|
|
|
// 如果有 token,添加到 URL
|
|
|
- if (token) {
|
|
|
- h5Url += `&token=${token}`;
|
|
|
- } else {
|
|
|
- // 如果没有 token,使用游客模式
|
|
|
- h5Url += `&guestMode=true`;
|
|
|
- }
|
|
|
+ // This legacy H5 already supports guestMode. Its session is independent.
|
|
|
+ h5Url += '&guestMode=true';
|
|
|
|
|
|
// 添加方案ID(使用planId参数名)
|
|
|
- h5Url += `&planId=${planId}`;
|
|
|
+ h5Url += `&planId=${encodeURIComponent(planId)}`;
|
|
|
|
|
|
// 如果有分享用户ID,也添加到URL中
|
|
|
if (shareUserId) {
|
|
|
- h5Url += `&shareUserId=${shareUserId}`;
|
|
|
+ h5Url += `&shareUserId=${encodeURIComponent(shareUserId)}`;
|
|
|
}
|
|
|
|
|
|
// 如果有合作伙伴ID,也添加到URL中
|
|
|
if (partnerId) {
|
|
|
- h5Url += `&partnerId=${partnerId}`;
|
|
|
+ h5Url += `&partnerId=${encodeURIComponent(partnerId)}`;
|
|
|
}
|
|
|
|
|
|
console.log('🌐 H5 URL:', h5Url);
|
|
|
@@ -1461,7 +1443,7 @@ Page({
|
|
|
const encodedUrl = encodeURIComponent(h5Url);
|
|
|
|
|
|
// 构建 web-view 页面路径
|
|
|
- let webViewPath = `/common-page/pages/web-view/index?path=${encodedUrl}&storeId=${storeId}`;
|
|
|
+ let webViewPath = `/common-page/pages/web-view/index?path=${encodedUrl}&storeId=${encodeURIComponent(storeId)}`;
|
|
|
|
|
|
console.log('📄 web-view 页面路径:', webViewPath.substring(0, 100) + '...');
|
|
|
console.log('===========================================');
|