shish 5 yıl önce
ebeveyn
işleme
5fa41d4799

+ 24 - 20
app-mall/controllers/MainController.php

@@ -5,28 +5,32 @@ namespace mall\controllers;
 use bizMall\ad\services\AdService;
 use bizMall\goods\services\CategoryService;
 use bizMall\goods\services\GoodsCategoryService;
-use Yii;
-use yii\web\Controller;
 use common\components\util;
 
 class MainController extends BaseController
 {
-	
-	//首页 ssh 2019.12.2
-	public function actionIndex()
-	{
-		$where = ['merchantId' => $this->sjId, 'type' => 0, 'status' => 1, 'delStatus' => 0];
-		$adRespond = AdService::getAdList($where);
-		$ad = [];
-		if (isset($adRespond['list']) && !empty($adRespond['list'])) {
-			foreach ($adRespond['list'] as $single) {
-				$ad[] = ['adImg' => $single['adImgUrl'], 'url' => ''];
-			}
-		}
-		$category = CategoryService::getTopThreeCategory($this->sjId);
-		$categoryList = !empty($category) ? GoodsCategoryService::getAppointCategoryList($category) : [];
-		$data = ['ad' => $ad, 'category' => $categoryList, 'columnStyle' => rand(1, 2)];
-		util::success($data);
-	}
-	
+
+    //首页 ssh 2019.12.2
+    public function actionIndex()
+    {
+        $where = ['merchantId' => $this->sjId, 'type' => 0, 'status' => 1, 'delStatus' => 0];
+        $adRespond = AdService::getAdList($where);
+        $ad = [];
+        if (isset($adRespond['list']) && !empty($adRespond['list'])) {
+            foreach ($adRespond['list'] as $single) {
+                $ad[] = ['adImg' => $single['adImgUrl'], 'url' => ''];
+            }
+        }
+        $category = CategoryService::getTopThreeCategory($this->sjId);
+        $categoryList = !empty($category) ? GoodsCategoryService::getAppointCategoryList($category) : [];
+        $sj = $this->sj;
+        $data = [
+            'ad' => $ad,
+            'category' => $categoryList,
+            'columnStyle' => rand(1, 2),
+            'sj' => $sj
+        ];
+        util::success($data);
+    }
+
 }

+ 4 - 4
app-mall/controllers/OrderController.php

@@ -24,8 +24,6 @@ use common\components\util;
 class OrderController extends BaseController
 {
 
-    public $guestAccess = ['order-relate', 'fast-pay'];
-
     //商城下单操作 ssh 2019.12.3
     public function actionCreateOrder()
     {
@@ -145,8 +143,8 @@ class OrderController extends BaseController
     public function actionOrderRelate()
     {
         $regionTree = RegionService::tree();
-        $shop = ShopService::getDefaultShop($this->sj);
-        $freight = MerchantExtendService::getFreight($this->sjExtend);
+        $shop = $this->shop;
+        $freight = ['first' => 5, 'add' => 2];
         $mapKey = 'OFWBZ-2NTHP-EHNDD-LKWQY-GANM7-PXBJH';
         $out = ['freight' => $freight, 'shop' => $shop, 'region' => $regionTree, 'txMapKey' => $mapKey, 'merchant' => $this->sj];
         util::success($out);
@@ -352,6 +350,8 @@ class OrderController extends BaseController
             $jsApiParameters = $tools->GetJsApiParameters($wxOrder, $sjExtend);
             $newParams = json_decode($jsApiParameters, true);
             $newParams['orderId'] = $orderId;
+            $newParams['orderSn'] = $orderSn;
+            $newParams['totalPrice'] = $actPrice;
             util::success($newParams);
 
         } elseif ($payWay == 1) {

+ 5 - 4
app-mall/controllers/UserController.php

@@ -8,6 +8,7 @@ use bizMall\message\services\SmsService;
 use bizMall\user\classes\UserClass;
 use bizMall\user\services\UserAssetService;
 use bizMall\user\services\UserService;
+use common\components\imgUtil;
 use common\components\stringUtil;
 use Yii;
 use common\components\util;
@@ -174,8 +175,8 @@ class UserController extends BaseController
     //用户基本信息和资产 ssh 2019.12.19
     public function actionMyProfile()
     {
-        $user = $this->custom;
-        $growth = $user['growth'] ?? 0;
+        $custom = $this->custom;
+        $growth = $custom['growth'] ?? 0;
         $extend = $this->sjExtend;
         $grade = MerchantExtendService::getGradeList($extend, 'asc');
         //下个等级的积分
@@ -187,8 +188,8 @@ class UserController extends BaseController
                 break;
             }
         }
-        $user['userAsset']['nextLevelGrowth'] = $nextLevelGrowth;
-        util::success($user);
+        $custom['userAsset']['nextLevelGrowth'] = $nextLevelGrowth;
+        util::success($custom);
     }
 
     //登陆客户的信息 ssh 2020.3.12

+ 4 - 0
update.bat

@@ -0,0 +1,4 @@
+@echo off
+git checkout .
+git pull
+exit