| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?php
- use common\components\stringUtil;
- ?>
- <div class="lay-til J_MenuBody" id="J_SubHead">
- <div class="header-con">
- <i class="arrow-back" onclick="history.go(-1)"><img src="/images/pay_03.png" alt=""></i>
- <h1><a href="/article/article-list?id=<?= $category->id ?>&account=<?= $_GET['account'] ?>" style="color:#595757;text-decoration:none;" ><?= $category->categoryName ?></a></h1>
- </div>
- </div>
- <div class="lay-body" id="J_MainBody">
- <div class="reg">
- <div class="reg-form">
- <?php if(!empty($relation)){ foreach($relation as $key => $val){ ?>
- <div style="color:#595757; position: relative; relative;width: 90%;height: 35px;margin: 10px 5%;background-color: #fff;border-bottom: 1px solid #dddee0;">
- <a style="color:#5A5A5A;text-decoration:none;" href="/article/article-detail?cId=<?= $_GET['id'] ?>&id=<?= $val->xhArticle->id ?>&account=<?= $_GET['account'] ?>"><?= $val->xhArticle->title ?> [<?php echo date("m-d H:i",strtotime($val->xhArticle->createTime)) ?>]</a>
- </div>
- <?php } } ?>
- </div>
- </div>
- </div>
- </div>
- <script>
- <?php if($this->context->isWeixin){?>
- //微信分享
- var shareTitle = '<?= $this->context->webTitle ?>';
- var descContent = '<?php echo stringUtil::subStringUtf8($category->description,26,'…'); ?>';
- var lineLink = '<?= Yii::$app->request->hostInfo ?>/article/article-list?id=<?= $category->id ?>&account=<?= $_GET['account'] ?>&weixinShare=yes';
- var imgUrl = '<?php if(!empty($category->cover)){ echo Yii::$app->params['imgUrl'].$category->cover; }else{ echo "/images/weixinSharelogo.jpg"; }?>';
- wx.config({
- //debug:true,
- appId: '<?= $this->context->signPackage['appId'] ?>',
- timestamp: <?= $this->context->signPackage['timestamp'] ?>,
- nonceStr: '<?= $this->context->signPackage['nonceStr'] ?>',
- signature: '<?= $this->context->signPackage['signature'] ?>',
- jsApiList: [
- 'checkJsApi',
- 'onMenuShareTimeline',
- 'onMenuShareAppMessage',
- 'onMenuShareQQ',
- 'onMenuShareWeibo',
- ]
- });
- wx.ready(function () {
- var shareData = {
- title: shareTitle,
- link: lineLink,
- imgUrl: imgUrl,
- desc:descContent,
- };
- wx.onMenuShareAppMessage(shareData);
- wx.onMenuShareTimeline({
- title: shareTitle,
- link: lineLink,
- imgUrl: imgUrl,
- desc:descContent,
- success: function () {
- //分享成功后的操作
- },
- cancel: function () {
- // 用户取消分享后执行的回调函数
- }
- });
- wx.onMenuShareQQ({
- title: shareTitle,
- link: lineLink,
- imgUrl: imgUrl,
- desc:descContent,
- success: function () {
- //分享成功后的操作
- },
- cancel: function () {
- // 用户取消分享后执行的回调函数
- }
- });
- wx.onMenuShareWeibo(shareData);
- });
- <?php } ?>
- </script>
|