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
Plain Diff
Browse Files
Authored by
whb
10 years ago
Commit
736ec4c20381c8c94e4f4c93bcb0d1fce1484020
2 parents
ac2fc7f9
007819b5
test wechat
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
23 deletions
website/view/layout/default_layout_mobile.php
website/view/script/news/detailmobile.php
website/view/layout/default_layout_mobile.php
View file @
736ec4c
...
...
@@ -44,6 +44,7 @@
</div>
<div
class=
"overlay"
></div>
</div>
<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>
<?php
$this
->
_js
(
'index.js'
,
array
(
SITE_JS
.
'/lib/seajs.js'
...
...
website/view/script/news/detailmobile.php
View file @
736ec4c
...
...
@@ -82,27 +82,25 @@
<?php
$this
->
_endblock
();
?>
<?php
$this
->
_block
(
'js'
);
?>
<script
type=
"text/javascript"
>
seajs
.
use
([
'jquery'
,
'mobile'
],
function
(
$
,
mobile
)
{
mobile
.
detail
();
var
wechatAppId
=
$
(
".share"
).
attr
(
"wechatAppId"
),
wechatTimestamp
=
$
(
".share"
).
attr
(
"wechatTimestamp"
),
wechatNonceStr
=
$
(
".share"
).
attr
(
"wechatNonceStr"
),
wechatSignature
=
$
(
".share"
).
attr
(
"wechatSignature"
);
wx
.
config
({
debug
:
true
,
appId
:
wechatAppId
,
timestamp
:
wechatTimestamp
,
nonceStr
:
wechatNonceStr
,
signature
:
wechatSignature
,
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
()
{
var
wechatAppId
=
$
(
".share"
).
attr
(
"wechatAppId"
),
wechatTimestamp
=
$
(
".share"
).
attr
(
"wechatTimestamp"
),
wechatNonceStr
=
$
(
".share"
).
attr
(
"wechatNonceStr"
),
wechatSignature
=
$
(
".share"
).
attr
(
"wechatSignature"
);
wx
.
config
({
debug
:
true
,
appId
:
wechatAppId
,
timestamp
:
wechatTimestamp
,
nonceStr
:
wechatNonceStr
,
signature
:
wechatSignature
,
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
:
'在长大的过程中,我才慢慢发现,我身边的所有事,别人跟我说的所有事,那些所谓本来如此,注定如此的事,它们其实没有非得如此,事情是可以改变的。更重要的是,有些事既然错了,那就该做出改变。'
,
...
...
@@ -123,10 +121,13 @@
}
});
alert
(
'aaa'
);
});
});
wx
.
error
(
function
(
res
)
{
alert
(
res
.
errMsg
);
});
});
seajs
.
use
([
'jquery'
,
'mobile'
],
function
(
$
,
mobile
)
{
mobile
.
detail
();
var
shareData
=
{
title
:
$
(
'.detail-title'
).
find
(
'.title'
),
desc
:
'123123'
,
...
...
Please
register
or
login
to post a comment