修复已知问题

This commit is contained in:
2024-10-10 21:04:39 +08:00
parent 1b430ef7a0
commit 1d8f8e8a7d
8 changed files with 182 additions and 66 deletions
+11 -1
View File
@@ -66,9 +66,15 @@ export function openUrl(url: string, params?: any): void {
* @param id 128
* @param d 项目数据
* 拼接规则: {域名}{path}?spm=c.{用户ID}.{租户ID}.{栏目ID}.{商品ID}.{timestamp}&token={token}
* @param onlyUrl
* @return https:///websoft.top/product/detail/128.html?spm=c.5.3057.10005.undefined&token=DDkr1PpE9DouIVMjLEMt9733QsgG7oNV
*/
export function openSpmUrl(path?: string, d?: any, id = 0): void {
export function openSpmUrl(
path?: string,
d?: any,
id = 0,
onlyUrl?: boolean
): any {
// const domain = getSiteDomain();
const domain = localStorage.getItem('Domain');
const spm = ref<string>('');
@@ -104,6 +110,10 @@ export function openSpmUrl(path?: string, d?: any, id = 0): void {
return;
}
if (onlyUrl == true) {
return `https://${domain}${path}${spm.value}`;
}
// TODO 开发环境
if (import.meta.env.DEV) {
console.log('开发环境');