Commit dd21b3d9 by 李伟康

修复

1 parent bae41163
import { preReleaseAppId } from '~/config' import { preReleaseAppId } from '~/config'
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease'] const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
let index = 1 let index = 2
/** /**
* *
......
...@@ -35,6 +35,7 @@ Page({ ...@@ -35,6 +35,7 @@ Page({
const { const {
options options
} = this } = this
console.log(this.options)
if (options.isLogin) this.getRedEnvelopeH5() if (options.isLogin) this.getRedEnvelopeH5()
else this.jumpLoading() //直接打开时跳转、防止sessionId失效 else this.jumpLoading() //直接打开时跳转、防止sessionId失效
}, },
...@@ -51,7 +52,10 @@ Page({ ...@@ -51,7 +52,10 @@ Page({
source, source,
linkId linkId
} = this.options } = this.options
if(!activityId) activityId = id if (!activityId) {
activityId = id
this.options.activityId = id
}
if (!userInfo.nickName) return this.getNickNameAndHeadUrl() if (!userInfo.nickName) return this.getNickNameAndHeadUrl()
try { try {
const { const {
...@@ -164,9 +168,10 @@ Page({ ...@@ -164,9 +168,10 @@ Page({
this.setData({ this.setData({
isJump: true, isJump: true,
show: false, show: false,
// url: `${domain}/scrm-wx-red-packet/#/redEnvelope?activityId=${activityId}&merchantId=${merchantId}&sessionId=${sessionId}&userInfo=${user}` //测试、预发布、生产
url: `${domain}/dj-scrm-wx-work-main-lwk/#/?${this.linkQuery}` //开发环境
}) })
let url = `${domain}/scrm-wx-red-packet/#/redEnvelope?${this.linkQuery}` //测试、预发布、生产
// url: `${domain}/dj-scrm-wx-work-main-lwk/#/?${this.linkQuery}` //开发环境
wx.p.router.redirectToH5(url)
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
......
<web-view src="{{url}}" />
<!-- 红包会员弹窗 --> <!-- 红包会员弹窗 -->
<block wx:if="{{show}}"> <block wx:if="{{show}}">
<view class="member-dialog"> <view class="member-dialog">
......
...@@ -27,5 +27,5 @@ ...@@ -27,5 +27,5 @@
"ignore": [], "ignore": [],
"include": [] "include": []
}, },
"appid": "wxb818f6bc908c52fc" "appid": "wx39a574d259fe58a0"
} }
\ No newline at end of file \ No newline at end of file
...@@ -17,6 +17,18 @@ class Router { ...@@ -17,6 +17,18 @@ class Router {
}); });
}); });
} }
/**关闭当前页面跳转H5 */
redirectToH5(url, notIntercept) {
if (notIntercept) wx.redirectTo({
url: `/pages/webView/webView?url=${encodeURIComponent(url)}`,
})
else this.intercept(url).then((response) => {
if (response) return;
wx.redirectTo({
url: `/pages/webView/webView?url=${encodeURIComponent(url)}`,
});
});
}
/** /**
* 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面 || * 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面 ||
* 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 $router.back() 可以返回到原页面。小程序中页面栈最多十层 * 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 $router.back() 可以返回到原页面。小程序中页面栈最多十层
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!