diff --git a/application/wechat/view/keys.index.html b/application/wechat/view/keys.index.html index b86165d31..31dc7adce 100644 --- a/application/wechat/view/keys.index.html +++ b/application/wechat/view/keys.index.html @@ -29,6 +29,10 @@ 预览 + {elseif $vo.type eq '文字'} + 预览 + {elseif $vo.type eq '图片'} 预览 diff --git a/application/wechat/view/review.index.html b/application/wechat/view/review.index.html index 27c5ae6c8..1f1bd2e12 100644 --- a/application/wechat/view/review.index.html +++ b/application/wechat/view/review.index.html @@ -114,7 +114,7 @@
- {date('Y-m-d',strtotime($vo['create_at']))} + {:date('Y-m-d',strtotime($vo['create_at']))} {$vo.author|default=''}
@@ -135,9 +135,8 @@ {elseif $type eq 'video'} -{* 视频显示 *}
-
{date('H:i')}
+
{:date('H:i')}
@@ -147,7 +146,7 @@ style='padding:0 .3rem 0 .3rem;min-height:1.5rem;white-space:nowrap;overflow: hidden;text-overflow:ellipsis'> {$title|default=''}
-
{date('m月d日')}
+
{:date('m月d日')}
@@ -163,9 +162,8 @@
{elseif $type eq 'news'} -{* 图文显示 *}
-
{date('H:i')}
+
{:date('H:i')}
@@ -173,7 +171,7 @@ {if !empty($articles)} {foreach $articles as $key=>$vo} {if $articles|count gt 1} - {if $key<1} + {if $key < 1}
@@ -209,7 +207,7 @@
- {date('Y年m月d日')} + {:date('Y年m月d日')}
diff --git a/extend/service/WechatService.php b/extend/service/WechatService.php index 028ba8b10..a2009ba2c 100644 --- a/extend/service/WechatService.php +++ b/extend/service/WechatService.php @@ -68,6 +68,7 @@ class WechatService { # 下载临时文件到本地 $filename = 'wechat/' . join('/', str_split($md5, 16)) . '.' . pathinfo($local_url, PATHINFO_EXTENSION); $upload = FileService::local($filename, file_get_contents($local_url)); + if (!empty($upload) && isset($upload['file']) && file_exists($upload['file'])) { # 上传图片素材 $result = $wechat->uploadForeverMedia(array('media' => "@{$upload['file']}"), $type, $is_video, $video_info);