|
@@ -15,7 +15,7 @@ export const navToPage = (function() {
|
|
|
// #ifdef H5
|
|
|
if (isWeixin()) {
|
|
|
wx.miniProgram.getEnv(res => {
|
|
|
- if (res.miniprogram) {
|
|
|
+ if (res.miniprogram && uni.getStorageSync('miniProgram') == "jsm_env") {
|
|
|
var i = 0;
|
|
|
(function goTo() {
|
|
|
if (gopageid) {
|
|
@@ -65,6 +65,7 @@ export function webViewHref(url, pam = {}) {
|
|
|
var pamstr = Object.entries(pam).map(item => {
|
|
|
return item.join("=")
|
|
|
}).join("&");
|
|
|
+ // #ifdef H5
|
|
|
if (!!~url.indexOf("?")) {
|
|
|
return process.env.VUE_APP_HREF + url +
|
|
|
`${pamstr?"&"+pamstr:""}&x-token=${store.state.user.token||''}&openId=${store.state.user.openId||''}&userId=${store.state.user.userId}&username=${store.state.user.name||''}&useravatar=${store.state.user.avatar||''}`
|
|
@@ -72,4 +73,14 @@ export function webViewHref(url, pam = {}) {
|
|
|
return process.env.VUE_APP_HREF + url +
|
|
|
`?${pamstr?pamstr+"&":""}x-token=${store.state.user.token||''}&openId=${store.state.user.openId||''}&userId=${store.state.user.userId}&username=${store.state.user.name||''}&useravatar=${store.state.user.avatar||''}`
|
|
|
}
|
|
|
+ // #endif
|
|
|
+ // #ifndef H5
|
|
|
+ if (!!~url.indexOf("?")) {
|
|
|
+ return process.env.VUE_APP_HREF + url +
|
|
|
+ `${pamstr?"&"+pamstr:""}&x-token=${store.state.user.token||''}&openId=${store.state.user.openId||''}&userId=${store.state.user.userId}&username=${store.state.user.name||''}&useravatar=${store.state.user.avatar||''}&miniProgram=jsm_env`
|
|
|
+ } else {
|
|
|
+ return process.env.VUE_APP_HREF + url +
|
|
|
+ `?${pamstr?pamstr+"&":""}x-token=${store.state.user.token||''}&openId=${store.state.user.openId||''}&userId=${store.state.user.userId}&username=${store.state.user.name||''}&useravatar=${store.state.user.avatar||''}&miniProgram=jsm_env`
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
}
|