Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOOD
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
whb
10 years ago
Commit
818beab1d3c1db7ba18555eafa2d940ad8aa0ec2
1 parent
6ffde510
测试bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
website/controller/Default.class.php
website/view/script/default/testmobile.php
website/controller/Default.class.php
View file @
818beab
...
...
@@ -42,6 +42,11 @@ class Controller_Default extends Controller_Abstract
}
public
function
testAction
()
{
$link
=
SITE_MAIN
.
url
(
'default/test'
);
$this
->
_view
[
'wechat'
]
=
Lib_Wechat_JSSDK
::
getSignPackage
(
$link
);
}
public
function
contactusAction
()
{
...
...
website/view/script/default/testmobile.php
0 → 100644
View file @
818beab
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
YO'HOOD | 全球潮流新品嘉年华
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"
/>
<meta
content=
"yes"
name=
"apple-mobile-web-app-capable"
/>
<meta
content=
"yes"
name=
"apple-touch-fullscreen"
/>
<meta
content=
"telephone=no"
name=
"format-detection"
/>
<meta
content=
"black"
name=
"apple-mobile-web-app-status-bar-style"
/>
</head>
<body>
test
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"http://staticzine.myoho.net/download/jquery.min.js?v=20150429"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"http://res.wx.qq.com/open/js/jweixin-1.0.0.js"
></script>
<script
type=
"text/javascript"
>
wx.config({
debug: true,
appId: "
<?php
echo
$this
->
view
->
wechat
[
'appId'
];
?>
",
timestamp:
<?php
echo
$this
->
view
->
wechat
[
'timestamp'
];
?>
,
nonceStr: "
<?php
echo
$this
->
view
->
wechat
[
'nonceStr'
];
?>
",
signature: "
<?php
echo
$this
->
view
->
wechat
[
'signature'
];
?>
"
,
jsApiList
:
[
'checkJsApi'
,
'onMenuShareTimeline'
,
'onMenuShareAppMessage'
,
'onMenuShareQQ'
,
'onMenuShareWeibo'
,
'hideMenuItems'
,
'showMenuItems'
,
'hideAllNonBaseMenuItem'
,
'showAllNonBaseMenuItem'
,
'translateVoice'
,
'startRecord'
,
'stopRecord'
,
'onRecordEnd'
,
'playVoice'
,
'pauseVoice'
,
'stopVoice'
,
'uploadVoice'
,
'downloadVoice'
,
'chooseImage'
,
'previewImage'
,
'uploadImage'
,
'downloadImage'
,
'getNetworkType'
,
'openLocation'
,
'getLocation'
,
'hideOptionMenu'
,
'showOptionMenu'
,
'closeWindow'
,
'scanQRCode'
,
'chooseWXPay'
,
'openProductSpecificView'
,
'addCard'
,
'chooseCard'
,
'openCard'
]
});
wx
.
ready
(
function
()
{
wx
.
onMenuShareAppMessage
({
title
:
'互联网之子'
,
desc
:
'在长大的过程中,我才慢慢发现,我身边的所有事,别人跟我说的所有事,那些所谓本来如此,注定如此的事,它们其实没有非得如此,事情是可以改变的。更重要的是,有些事既然错了,那就该做出改变。'
,
link
:
'http://movie.douban.com/subject/25785114/'
,
imgUrl
:
'http://demo.open.weixin.qq.com/jssdk/images/p2166127561.jpg'
,
trigger
:
function
(
res
)
{
// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容,因为客户端分享操作是一个同步操作,这时候使用ajax的回包会还没有返回
alert
(
'用户点击发送给朋友'
);
},
success
:
function
(
res
)
{
alert
(
'已分享'
);
},
cancel
:
function
(
res
)
{
alert
(
'已取消'
);
},
fail
:
function
(
res
)
{
alert
(
JSON
.
stringify
(
res
));
}
});
alert
(
'aaa'
);
});
wx
.
error
(
function
(
res
)
{
alert
(
res
.
errMsg
);
});
</script>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment