Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
zhiliang-light-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a3892636
authored
2019-08-15 16:53:18 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
cee15072
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
src/app.json
src/pages/webview/webview.js
src/pages/webview/webview.wxml
src/app.json
View file @
a389263
...
...
@@ -20,6 +20,7 @@
"pages/sign-in-record/sign-in-record"
,
"pages/rank/rank"
,
"pages/rank-gift/rank-gift"
,
"pages/webview/webview"
,
"pages/example/example"
,
"pages/more/more"
],
...
...
src/pages/webview/webview.js
View file @
a389263
...
...
@@ -4,7 +4,7 @@ Page({
isShow
:
false
,
// 控制组件显示隐藏
url
:
''
},
onLoad
:
function
(
options
=
{})
{
onLoad
(
options
=
{})
{
let
url
=
options
.
url
;
if
(
url
)
{
this
.
setData
({
...
...
@@ -17,5 +17,9 @@ Page({
title
:
'none'
,
});
}
},
onBindMessage
(
e
)
{
console
.
log
(
"webview message:"
,
e
);
}
})
...
...
src/pages/webview/webview.wxml
View file @
a389263
...
...
@@ -4,4 +4,4 @@
<view class="text">加载中...</view>
</view>
</view>
<web-view
wx:if="{{isShow}}" src="{{url}}" bindload="loadSucc"
/>
<web-view
wx:if="{{isShow}}" src="{{url}}" bindload="loadSucc" bindmessage="onBindMessage"
/>
...
...
Please
register
or
sign in
to post a comment