dever 4 anni fa
parent
commit
7d5527acab
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 2 2
      app/collection/lib/Core.php
  2. 2 2
      app/collection/src/Api.php

+ 2 - 2
app/collection/lib/Core.php

@@ -182,7 +182,7 @@ class Core
     }
 
     #获取短域名
-    public function getUrl($url, $param)
+    public function getUrl($url, $param = array())
     {
         if (Dever::project('short')) {
             # 转成短域名
@@ -190,7 +190,7 @@ class Core
                 $param['code'] .= '|collection/lib/common.encode';
             }
             $url = Dever::load('short/lib/handle')->get(1, $url, $param);
-        } else {
+        } elseif ($param) {
             $url .= http_build_query($param);
         }
         return $url;

+ 2 - 2
app/collection/src/Api.php

@@ -213,7 +213,7 @@ class Api extends Core
         $data['code'] = $this->getInfoCode();
 
         # 获取合集分享信息
-        $data['share'] = $this->getInfoShare($data['info']);
+        $data['share'] = $this->getInfoShare($data['info'], $data['code']);
 
         $data['share_user'] = array();
         if ($this->uid && $this->uid > 0 && $this->share_uid && $this->share_uid > 0) {
@@ -240,7 +240,7 @@ class Api extends Core
         return $data;
     }
 
-    private function getInfoShare($info)
+    private function getInfoShare($info, $code = false)
     {
         if ($this->uid && $this->uid > 0) {
             $data['title'] = $info['share_title'] ? $info['share_title'] : '{username}邀请你看{name}';