shish 1 rok temu
rodzic
commit
7ae67d85d8

+ 1 - 1
app-hd/controllers/CgRefundController.php

@@ -95,7 +95,7 @@ class CgRefundController extends BaseController
             $changeTime = $saleHour * 3600;
             $changeTime = $saleHour * 3600;
             $newTime = bcadd($currentTime, $changeTime);
             $newTime = bcadd($currentTime, $changeTime);
             if ($now > $newTime) {
             if ($now > $newTime) {
-                util::fail('超时订单,请联系门店售后');
+                //util::fail('超时订单,请联系门店售后');
             }
             }
         }
         }
 
 

+ 6 - 0
app-pt/controllers/WxOpenController.php

@@ -464,6 +464,12 @@ class WxOpenController extends PublicController
             }
             }
             wxUtil::applySetOrderPathInfo($merchant, $open);
             wxUtil::applySetOrderPathInfo($merchant, $open);
         }
         }
+
+        //查询小程序用户隐私保护指引
+        if ($actId == 19) {
+            wxUtil::privacySettingSelect($merchant, $isOpen);
+        }
+
     }
     }
 
 
     public function actionResult()
     public function actionResult()

+ 12 - 0
common/components/wxUtil.php

@@ -1660,6 +1660,18 @@ class wxUtil
         echo '隐私设置OK';
         echo '隐私设置OK';
     }
     }
 
 
+    public static function privacySettingSelect($merchant, $isOpen = 0)
+    {
+        $accessToken = self::getMiniProgramAccessToken($merchant, $isOpen);
+        $url = "https://api.weixin.qq.com/cgi-bin/component/getprivacysetting?access_token={$accessToken}";
+        $curl = new curl\Curl();
+        $data = [];
+        $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
+        $respond = Json::decode($result);
+        echo "<pre>";
+        print_r($respond);
+    }
+
     //收款小程序码
     //收款小程序码
     public static function generateGatheringMiniCode($merchant, $shopId, $isOpen = 0)
     public static function generateGatheringMiniCode($merchant, $shopId, $isOpen = 0)
     {
     {