shish 2 жил өмнө
parent
commit
b42cff80f7

+ 8 - 0
app-ghs/controllers/ShopController.php

@@ -31,8 +31,16 @@ class ShopController extends BaseController
     public function actionChangeWx()
     {
         $get = Yii::$app->request->get();
+        $isApple = $get['isApple'] ?? 0;
         $url = $get['url'] ?? '';
         $shop = $this->shop;
+        if (isset($shop->hasRenew) && $shop->hasRenew == 0) {
+            if ($isApple == 1) {
+                util::fail('请用小程序操作');
+            } else {
+                util::fail('请先续期一年');
+            }
+        }
         $shop->superWx = $url;
         $shop->save();
         util::complete('修改成功');