Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
miniprogrem-webview
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
206fd06c
authored
Jul 25, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
77d85b63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
51 deletions
+6
-51
Application/Home/View/default/layout.tpl
+6
-51
No files found.
Application/Home/View/default/layout.tpl
View file @
206fd06c
...
@@ -116,51 +116,6 @@
...
@@ -116,51 +116,6 @@
window
.
wx
&&
wx
.
ready
(
function
()
{
window
.
wx
&&
wx
.
ready
(
function
()
{
wx
.
onMenuShareAppMessage
(
wxFriendData
);
wx
.
onMenuShareAppMessage
(
wxFriendData
);
wx
.
onMenuShareTimeline
(
wxTimelineData
);
wx
.
onMenuShareTimeline
(
wxTimelineData
);
});
</script>
<script
src=
"http://res.wx.qq.com/open/js/jweixin-1.2.0.js"
></script>
<script
type=
"text/javascript"
>
$
(
function
(){
var
returnData
=
false
;
$
.
ajax
({
type
:
"get"
,
url
:
'/index/wxconfig'
,
data
:
[],
async
:
false
,
success
:
function
(
data
,
textStatus
,
jqXHR
){
returnData
=
data
.
config
;
//console.log(returnData);
}
});
//end ajax
var
returnData
=
eval
(
'('
+
returnData
+
')'
);
console
.
log
(
returnData
);
var
appId
=
returnData
.
appId
;
var
timestamp
=
returnData
.
timestamp
;
var
nonceStr
=
returnData
.
nonceStr
;
var
signature
=
returnData
.
signature
;
wx
.
config
({
debug
:
true
,
//调试阶段建议开启
appId
:
appId
,
timestamp
:
timestamp
,
nonceStr
:
nonceStr
,
signature
:
signature
,
jsApiList
:
[
/*
* 所有要调用的 API 都要加到这个列表中
* 这里以图像接口为例
*/
"chooseImage"
,
"previewImage"
,
"uploadImage"
,
"downloadImage"
,
"scanQRCode"
]
});
wx
.
ready
(
function
()
{
//alert(3);
wx
.
checkJsApi
({
wx
.
checkJsApi
({
jsApiList
:
[
'scanQRCode'
,
'previewImage'
],
jsApiList
:
[
'scanQRCode'
,
'previewImage'
],
success
:
function
(
res
)
{
success
:
function
(
res
)
{
...
@@ -174,12 +129,12 @@ $(function(){
...
@@ -174,12 +129,12 @@ $(function(){
});
});
});
});
});
});
wx
.
error
(
function
(
res
){
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
console
.
log
(
res
);
</script>
});
});
<script
src=
"http://res.wx.qq.com/open/js/jweixin-1.2.0.js"
></script>
</script>
</body>
</body>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment