Просмотр исходного кода

Merge branch 'develop' of yituan/opkpm into master

zhengxifeng 1 день назад
Родитель
Сommit
fbfb9a358a
2 измененных файлов: 11 добавлений и 3 удалений
  1. 1
    1
      app/api/controller/ShopContent.php
  2. 10
    2
      app/api/logic/ShopContentLogic.php

+ 1
- 1
app/api/controller/ShopContent.php Просмотреть файл

@@ -32,7 +32,7 @@ use app\api\logic\ShopContentLogic;
32 32
 
33 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 Просмотреть файл

@@ -861,7 +861,7 @@ class ShopContentLogic extends Logic
861 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,8 +924,16 @@ class ShopContentLogic extends Logic
924 924
 
925 925
         //判断类型
926 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 935
             self::$errCode = 10;
928
-            self::$error = "商家类型是包月,不允许使用次数!";
936
+            self::$error = "包月商家,时间过期!";
929 937
             return false;
930 938
         }
931 939
 

Загрузка…
Отмена
Сохранить