修复已知问题
This commit is contained in:
+11
-1
@@ -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('开发环境');
|
||||
|
||||
Reference in New Issue
Block a user