bianjunhui 1 år sedan
förälder
incheckning
0e0c028b2b

+ 2 - 0
application/admin/controller/Appindex.php

@@ -81,6 +81,7 @@ class Appindex extends Backend
                         $new[$k]['pid']=$result;
                         $new[$k]['title']=$v['name'];
                         $new[$k]['link']=$v['entity_id'];
+                        $new[$k]['type']=1;
                         $new[$k]['oldPrice']=$v['price'];
                         $new[$k]['nowPrice']=number_format($v['final_price'], 2);
                         $new[$k]['sale_num']=$v['sold'];
@@ -155,6 +156,7 @@ class Appindex extends Backend
                         $new[$k]['pid']=$ids;
                         $new[$k]['title']=$v['name'];
                         $new[$k]['link']=$v['entity_id'];
+                        $new[$k]['type']=1;
                         $new[$k]['oldPrice']=$v['price'];
                         $new[$k]['nowPrice']=number_format($v['final_price'], 2);
                         $new[$k]['sale_num']=$v['sold'];

+ 4 - 4
application/api/controller/Appindex.php

@@ -19,8 +19,8 @@ class Appindex extends Api
      */
     public function getIndexOne()
     {
-        $topUrl =$this->getTopUrl();
-        $data['topUrl']=$topUrl;
+       /* $topUrl =$this->getTopUrl();
+        $data['topUrl']=$topUrl;*/
         $banner =$this->getBanner('轮播图');
         $data['banner']=$banner;
         $category =$this->getBanner('分类');
@@ -41,9 +41,9 @@ class Appindex extends Api
         }
         return $new;
     }
-    public function getTopUrl()
+    public function getTopUrl($code)
     {
-        $block =$this->getBlock('顶部链接');
+        $block =$this->getBlock($code);
         $new['title'] = $block['title'];
         $new['name'] = $block['name'];
         $new['link'] = $block['link'];

+ 1 - 1
application/common/model/Coupon.php

@@ -34,7 +34,7 @@ class Coupon Extends Model
     }
 
     public function getProduct($pid){
-        $url ='http://www.bilisar.com/rest/V1/rewrite/categories/'.$pid.'/products';
+        $url ='https://www.bilisar.com/rest/V1/rewrite/categories/'.$pid.'/products';
         $getFields = array(
             'currencyCode' => 'USB',
             'page' => 1,