21 lines
555 B
JavaScript
21 lines
555 B
JavaScript
// 获取微信小程序外链
|
|
import {tansParams} from "@/utils/ruoyi";
|
|
|
|
export function getWxSchemeUrl(path, query) {
|
|
return `${process.env.VUE_APP_WX_DEVICE_URL}&path=${path}&query=${encodeURIComponent(query)}`;
|
|
}
|
|
|
|
export function getWxIndexUrl(query) {
|
|
let url = `https://kaiguan.chuantewulian.cn/wxjump/index?action=device`;
|
|
if (query != null ) {
|
|
if (query instanceof Object) {
|
|
query = tansParams(query).slice(0, -1);
|
|
}
|
|
if (query.length > 0) {
|
|
url += `&${query}`;
|
|
}
|
|
}
|
|
console.log("wx_url", url);
|
|
return url;
|
|
}
|