Commit 7134f06e by zhangxw

分享车况信息页面bug修复

1 parent e41fc942
...@@ -60,7 +60,7 @@ export function createWebViewPage(sharePagePath) { ...@@ -60,7 +60,7 @@ export function createWebViewPage(sharePagePath) {
decodeUrl = this.appendParamsToUrl(decodeUrl, { decodeUrl = this.appendParamsToUrl(decodeUrl, {
openType: options.openType openType: options.openType
}) })
} }
// const baseUrl = this.getBaseUrl(decodeUrl) // const baseUrl = this.getBaseUrl(decodeUrl)
try { try {
const stored = wx.getStorageSync(WEBVIEW_H5_TOKENS_KEY) const stored = wx.getStorageSync(WEBVIEW_H5_TOKENS_KEY)
...@@ -113,6 +113,7 @@ export function createWebViewPage(sharePagePath) { ...@@ -113,6 +113,7 @@ export function createWebViewPage(sharePagePath) {
url: `${decodeUrl}?pushed=${options.pushed}&source=${options.source}&carConditionCode=${options.carConditionCode}&operator=${userInfo.name}` url: `${decodeUrl}?pushed=${options.pushed}&source=${options.source}&carConditionCode=${options.carConditionCode}&operator=${userInfo.name}`
}) })
} }
if (decodeUrl.includes('/vehicle-detail')) this.setData({shareTitle: '车况信息'})
}, },
setTime(param) { setTime(param) {
...@@ -212,7 +213,7 @@ export function createWebViewPage(sharePagePath) { ...@@ -212,7 +213,7 @@ export function createWebViewPage(sharePagePath) {
onShareAppMessage(options) { onShareAppMessage(options) {
const { url, shareTitle } = this.data const { url, shareTitle } = this.data
if (options.webviewUrl.includes('/vehicle-detail')) shareTitle = '车况信息' if (options?.webviewUrl?.includes('/vehicle-detail')) shareTitle = '车况信息'
// onShareAppMessage() { // onShareAppMessage() {
if (this.data.shareDisabled) return if (this.data.shareDisabled) return
// const { url } = this.data // const { url } = this.data
...@@ -225,7 +226,7 @@ export function createWebViewPage(sharePagePath) { ...@@ -225,7 +226,7 @@ export function createWebViewPage(sharePagePath) {
onShareTimeline() { onShareTimeline() {
const { url, shareTitle } = this.data const { url, shareTitle } = this.data
if (options.webviewUrl.includes('/vehicle-detail')) shareTitle = '车况信息' if (options?.webviewUrl?.includes('/vehicle-detail')) shareTitle = '车况信息'
if (this.data.shareDisabled) return if (this.data.shareDisabled) return
// const { url } = this.data // const { url } = this.data
const encoded = encodeURIComponent(url || '') const encoded = encodeURIComponent(url || '')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!