Explorar el Código

Merge branch 'develop' of yituan/opkpm into master

zhengxifeng hace 1 día
padre
commit
fbfb9a358a
Se han modificado 2 ficheros con 11 adiciones y 3 borrados
  1. 1
    1
      app/api/controller/ShopContent.php
  2. 10
    2
      app/api/logic/ShopContentLogic.php

+ 1
- 1
app/api/controller/ShopContent.php Ver fichero

32
 
32
 
33
 class ShopContent extends Api
33
 class ShopContent extends Api
34
 {
34
 {
35
-    public $like_not_need_login = ['getShopInfo', 'getShopList','getNearbyShops','smsCode','getShopConfig','getXpath','getAppService','getRunNum','getShopConfig2','subHKSYCount'];
35
+    public $like_not_need_login = ['getShopInfo', 'getShopList','getNearbyShops','smsCode','getShopConfig','getXpath','getAppService','getRunNum','getShopConfig2','getHKSYCount','subHKSYCount'];
36
 
36
 
37
     /**
37
     /**
38
      * 店铺信息
38
      * 店铺信息

+ 10
- 2
app/api/logic/ShopContentLogic.php Ver fichero

861
             return false;
861
             return false;
862
         }
862
         }
863
 
863
 
864
-        return ['count' => $shop->hksy_count, 'expire_time' => $shop->expire_time];
864
+        return ['count' => $shop->hksy_count, 'hksy_type' => $shop->hksy_type, 'expire_time' => $shop->expire_time];
865
     }
865
     }
866
 
866
 
867
     /**
867
     /**
924
 
924
 
925
         //判断类型
925
         //判断类型
926
         if((int)$shop->hksy_type === 0){
926
         if((int)$shop->hksy_type === 0){
927
+            $expire_time = $shop->expire_time;
928
+            $expire_time = strtotime($expire_time);
929
+            if (time() < $expire_time) {
930
+                self::$errCode = 0;
931
+                //未过期
932
+                return true;
933
+            }
934
+
927
             self::$errCode = 10;
935
             self::$errCode = 10;
928
-            self::$error = "商家类型是包月,不允许使用次数!";
936
+            self::$error = "包月商家,时间过期!";
929
             return false;
937
             return false;
930
         }
938
         }
931
 
939
 

Loading…
Cancelar
Guardar