整理文档并接入 H5 体验测试链路
This commit is contained in:
29
miniprogram/pages/webview-test/webview-test.ts
Normal file
29
miniprogram/pages/webview-test/webview-test.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
type WebViewTestPageData = {
|
||||
webViewSrc: string
|
||||
webViewReady: boolean
|
||||
}
|
||||
|
||||
const WEB_VIEW_TEST_URL = 'https://oss-mbh5.colormaprun.com/gotomars/h5/content-h5-test-template.html'
|
||||
|
||||
Page<WebViewTestPageData, WechatMiniprogram.IAnyObject>({
|
||||
data: {
|
||||
webViewSrc: '',
|
||||
webViewReady: false,
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.setData({
|
||||
webViewSrc: WEB_VIEW_TEST_URL,
|
||||
webViewReady: true,
|
||||
})
|
||||
},
|
||||
|
||||
handleWebViewError() {
|
||||
wx.showModal({
|
||||
title: 'H5 打开失败',
|
||||
content: WEB_VIEW_TEST_URL,
|
||||
showCancel: false,
|
||||
confirmText: '知道了',
|
||||
})
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user