whitefang 1 год назад
Родитель
Сommit
581519be5d

+ 1 - 1
app/adminapi/logic/property/PropertyHeadLogic.php

@@ -170,7 +170,7 @@ class PropertyHeadLogic extends BaseLogic
     public static function getWechatQrcode($params,$url)
     {
         try {
-            $mnp_page = 'pages/tabView/service';
+            $mnp_page = 'pages/tabView/main';
             $response = (new WeChatMnpService())->getUnlimitedQRCode(
                 'property_head_id='.$params['id'],
                 $mnp_page,

+ 3 - 3
app/api/controller/HomeServiceController.php

@@ -23,14 +23,14 @@ class HomeServiceController extends BaseApiController
             'title'=>'活动专题',
             'special_type'=>0,
             'status'=>1,
-            'data'=>HomeSpecialLogic::getLists(['special_type'=>0,'status'=>1],6)
+            'data'=>HomeSpecialLogic::getLists(['special_type'=>0,'status'=>1],6,$this->userInfo,$this->request->domain())
         ];
         //热销服务:special_type = 1
         $result['special_type_1'] = [
             'title'=>'热销服务',
             'special_type'=>1,
             'status'=>1,
-            'data'=>HomeSpecialLogic::getLists(['special_type'=>1,'status'=>1],6)
+            'data'=>HomeSpecialLogic::getLists(['special_type'=>1,'status'=>1],6,$this->userInfo,$this->request->domain())
         ];
 
         //当季精选:special_type = 2
@@ -38,7 +38,7 @@ class HomeServiceController extends BaseApiController
             'title'=>'当季精选',
             'special_type'=>2,
             'status'=>1,
-            'data'=>HomeSpecialLogic::getLists(['special_type'=>2,'status'=>1],6)
+            'data'=>HomeSpecialLogic::getLists(['special_type'=>2,'status'=>1],6,$this->userInfo,$this->request->domain())
         ];
 
         return $this->data($result);

+ 1 - 0
app/api/controller/PropertyController.php

@@ -30,6 +30,7 @@ class PropertyController extends BaseApiController
             'householder_name'=>'',
             'householder_mobile'=>$this->userInfo['mobile']
         ]);
+        Log::info('物业ID-11');
         $result = PropertyOrderLogic::bind($params);
         if (true === $result) {
             return $this->success('下单成功', [], 1, 1);

+ 4 - 0
app/api/lists/HomeSpecialLists.php

@@ -68,6 +68,10 @@ class HomeSpecialLists  extends BaseApiDataLists implements ListsSearchInterface
                 if($item->vue_web=='pages/preview/videoPre' || $item->vue_web=='pages/preview/imagePre' || $item->vue_web=='pages/preview/richView'){
                     $item->vue_param = 'id='.$item->id;
                 }
+                if($item->vue_web=='pages/web_view/index'){
+                    $token = !empty($this->userInfo->token)?$this->userInfo->token:'';
+                    $item->vue_param = rawurlencode('https://weixiu.kyjlkj.com/static/wxapp/H5/adver5/index.html?property_activity_id=2&token='.$token);
+                }
            })
             ->toArray();
     }

+ 15 - 1
app/api/logic/HomeSpecialLogic.php

@@ -2,6 +2,7 @@
 namespace app\api\logic;
 
 
+use app\common\model\goods\Goods;
 use app\common\model\home_service\HomeSpecial;
 use app\common\logic\BaseLogic;
 use think\facade\Db;
@@ -18,18 +19,31 @@ class HomeSpecialLogic extends BaseLogic
     /**
      * @param array $where
      * @param int $limit
+     * @param array $userInfo
      * @return array
      * @throws \think\db\exception\DataNotFoundException
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      */
-    public static function getLists(array $where, int $limit=6)
+    public static function getLists(array $where, int $limit, array $userInfo,$domain)
     {
        return HomeSpecial::where($where)
             ->field('id,cover_type,cover,title,vue_web,vue_param')
             ->order('weight desc')
             ->limit($limit)
             ->select()
+           ->each(function($item) use ($userInfo,$domain){
+               if($item->goods_id){
+                   $item->goods = Goods::where('id',$item->goods_id)->field('goods_banners,goods_name,service_total,service_fee')->findOrEmpty();
+               }
+               if($item->vue_web=='pages/preview/videoPre' || $item->vue_web=='pages/preview/imagePre' || $item->vue_web=='pages/preview/richView'){
+                   $item->vue_param = 'id='.$item->id;
+               }
+               if($item->vue_web=='pages/web_view/index'){
+                   $token = !empty($userInfo['token'])?$userInfo['token']:'';
+                   $item->vue_param = 'hrefUrl='.rawurlencode($domain.'/static/wxapp/H5/adver5/index.html?property_activity_id=14&token='.$token);
+               }
+           })
             ->toArray();
     }
 

+ 2 - 1
app/api/logic/PropertyOrderLogic.php

@@ -44,7 +44,8 @@ class PropertyOrderLogic extends BaseLogic
             if(empty($property)){
                throw new Exception('物业代理不存在');
             }
-            $order = PropertyOrder::where(['property_user_id'=>$propertyUserId,'property_head_id'=>$params['property_head_id'],'order_status'=>0])->where('work_id','<>',0)->order('id desc')->findOrEmpty();
+            $order = PropertyOrder::where(['property_user_id'=>$propertyUserId,'property_head_id'=>$params['property_head_id'],'order_status'=>0,'work_id'=>0])->order('id desc')->findOrEmpty();
+            Log::info('物业ID'.$order);
             if($order->isEmpty()){
                 PropertyOrder::create([
                     'property_head_id' => $params['property_head_id'],

+ 1 - 1
app/api/logic/ServiceOrderLogic.php

@@ -530,7 +530,7 @@ class ServiceOrderLogic extends BaseLogic
             //获取是否是活动工单
             if(!empty($order_info['service_work']['property_activity_id'])){
                 $propertyActivity = PropertyActivity::findOrEmpty($order_info['service_work']['property_activity_id']);
-                $order_info['service_work']['url_page'] = rawurlencode($params['domain'].'/static/wxapp/H5/'.$propertyActivity['url_page'].'/index.html?property_activity_id='.$propertyActivity['id'].'&token='.$params['user_info']['token']);;
+                $order_info['service_work']['url_page'] = rawurlencode($params['domain'].'/static/wxapp/H5/'.$propertyActivity['url_page'].'/index.html?property_activity_id='.$propertyActivity['id'].'&token='.$params['user_info']['token']);
             }
 
             return $order_info;