Skip to content

Commit

Permalink
🐛 fixed bugs in poster path
Browse files Browse the repository at this point in the history
  • Loading branch information
idealclover committed Feb 25, 2020
1 parent 4b09dba commit 976c712
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion UniTypecho-Plugin/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,10 @@ private function getPoster() {

$path = self::GET('path', 'null');
if ($path == 'null') {
$path = 'page/index/index';
$path = 'pages/index/index';
}
//TODO: remove in next version
$path = str_replace("/page/","/pages/",$path);
$url = sprintf('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s', $this->appId, $this->appSecret);
$info = file_get_contents($url);
$json = json_decode($info);
Expand Down
3 changes: 2 additions & 1 deletion UniTypecho/components/commentsender/wx.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@
title: "加载中",
mask: false
});
console.log(this.thumb);
if (!this.isPage) {
this.qrUrl = API.getPosterUrl('/page/index/index?cid=' + this.cid);
this.qrUrl = API.getPosterUrl('/pages/index/index?cid=' + this.cid);
} else this.qrUrl = API.getPosterUrl('/pages/index/index');
this.imgUrl = Util.isNull(this.thumb) ? "https://api.isoyu.com/bing_images.php" : this.thumb;
this.referrer = this.isLogin() ? getApp().globalData.userInfo.nickName + '分享给你' : '分享给你';
Expand Down

0 comments on commit 976c712

Please sign in to comment.