Przeglądaj źródła

Merge branch 'master' of http://git.dever.cc/dever-product/churen

Your Name 3 lat temu
rodzic
commit
93378ed62d

+ 1 - 1
app/mshop/src/Buy.php

@@ -11,7 +11,7 @@ class Buy extends Core
     public function getGoods()
     {
         Dever::config('base')->buy = 1;
-        $this->data['data'] = Dever::load('shop/lib/info')->getGoods($this->shop_id, false, '1,2,3', false, 1);
+        $this->data['data'] = Dever::load('shop/lib/info')->getGoods($this->shop_id, false, '1,2,3', false, 1, -1, 2);
 
         return $this->data;
 

+ 1 - 1
app/mshop/src/Out.php

@@ -10,7 +10,7 @@ class Out extends Core
     # 获取所有商品列表
     public function getGoods()
     {
-        $this->data['data'] = Dever::load('shop/lib/info')->getGoods($this->shop_id, false, '1,2,3');
+        $this->data['data'] = Dever::load('shop/lib/info')->getGoods($this->shop_id, false, '1,2,3', false, false, -1, 2);
 
         return $this->data;
     }

+ 15 - 6
app/shop/lib/Info.php

@@ -123,7 +123,7 @@ class Info
     }
 
     # 获取店铺的商品列表
-    public function getGoods($shop, $column = false, $price_type = false, $sell_type = false, $status = false, $uid = -1)
+    public function getGoods($shop, $column = false, $price_type = false, $sell_type = false, $status = false, $uid = -1, $buy_type = 1)
     {
         $table = 'shop/goods';
         $where['shop_id'] = isset($shop['id']) ? $shop['id'] : $shop;
@@ -163,14 +163,23 @@ class Info
             foreach ($data as $k => $v) {
                 $d = $this->getGoodsInfo($where['shop_id'], $v, false, true, true, $uid);
                 if ($d) {
-                    if ($d['total'] <= 0) {
-                        if ($d['sku_type'] == 2) {
-                            $result_2[] = $d;
+                    if ($buy_type == 1) {
+                        if ($d['total'] <= 0) {
+                            if ($d['sku_type'] == 2) {
+                                $result_2[] = $d;
+                            }
+                            // $result_2[] = $d;
+                        } else {
+                            $result_1[] = $d;
                         }
-                        // $result_2[] = $d;
                     } else {
-                        $result_1[] = $d;
+                        if ($d['total'] <= 0) {
+                            $result_2[] = $d;
+                        } else {
+                            $result_1[] = $d;
+                        }
                     }
+                    
                 }
             }
 

+ 10 - 10
learn/active/database/user.php

@@ -50,7 +50,7 @@ return array
             'default'   => '',
             'desc'      => '名称',
             'match'     => 'is_string',
-            'update'    => 'text',
+            //'update'    => 'text',
             'search'    => 'fulltext',
             'list'      => true,
         ),
@@ -62,7 +62,7 @@ return array
             'default'   => '',
             'desc'      => '请输入手机号',
             'match'     => Dever::rule('mobile'),
-            'update'    => 'text',
+            //'update'    => 'text',
             //'search'    => 'fulltext',
             'list'      => true,
         ),
@@ -74,7 +74,7 @@ return array
             'default'   => '',
             'desc'      => '身份证号码',
             'match'     => Dever::rule('idcard'),
-            'update'    => 'text',
+           // 'update'    => 'text',
         ),
 
         'username'      => array
@@ -84,7 +84,7 @@ return array
             'default'   => '',
             'desc'      => '昵称',
             'match'     => 'is_string',
-            'update'    => 'text',
+            //'update'    => 'text',
             'search'    => 'fulltext',
             'list'      => true,
         ),
@@ -96,7 +96,7 @@ return array
             'default'   => '',
             'match'     => 'option',
             'desc'      => '生日',
-            'update'    => 'time',
+            //'update'    => 'time',
             'callback'  => 'maketime',
         ),
 
@@ -119,7 +119,7 @@ return array
             'default'   => '',
             'desc'      => 'pwd',
             'match'     => 'is_string',
-            'update'    => 'text',
+            //'update'    => 'text',
         ),
 
         'old_salt'      => array
@@ -129,7 +129,7 @@ return array
             'default'   => '',
             'desc'      => 'salt',
             'match'     => 'is_string',
-            'update'    => 'text',
+            //'update'    => 'text',
         ),
 
         'avatar'        => array
@@ -139,7 +139,7 @@ return array
             'default'   => '',
             'desc'      => '请选择头像',
             'match'     => 'option',
-            'update'    => 'image',
+            //'update'    => 'image',
             'key'       => '1',
             //'place'       => '150',
         ),
@@ -151,7 +151,7 @@ return array
             'default'   => '1',
             'desc'      => '请输入排序',
             'match'     => 'option',
-            'update'  => 'text',
+            //'update'  => 'text',
             'search'    => 'order',
             'list'      => true,
             'order'     => 'desc',
@@ -183,7 +183,7 @@ return array
     (
     	'insert' => false,
         'delete' => false,
-        'edit' => false,
+        //'edit' => false,
   //       'list_button' => array
 		// (
 		// 	'list1' => array('属性值设置', '"info_field_value&project=active&search_option_field_id={id}&oper_table=info_field&oper_project=active&top_table=info&search_option_actives_id={actives_id}"' , '{type} > 1'),

+ 12 - 6
learn/active/lib/Manage.php

@@ -589,13 +589,19 @@ Class Manage
                 $data['join_avatar'] = $con['avatar'];
             }
              
+             $data['buy_name'] = '';
+                $data['buy_mobile'] = '';
+                $data['buy_avatar'] = '';
             $buy_user = Dever::db('active/user')->find($data['buy_uid']);
-            $data['buy_name'] = $buy_user['name'];
-            $data['buy_mobile'] = $buy_user['mobile'];
-            $data['buy_avatar'] = '';
-            if ($buy_user['avatar']) {
-                $data['buy_avatar'] = $buy_user['avatar'];
-            } 
+            if ($buy_user) {
+                $data['buy_name'] = $buy_user['name'];
+                $data['buy_mobile'] = $buy_user['mobile'];
+                $data['buy_avatar'] = '';
+                if ($buy_user['avatar']) {
+                    $data['buy_avatar'] = $buy_user['avatar'];
+                } 
+            }
+            
             $member = Dever::load('active/lib/user')->agent($buy_user);
             $data['role_name'] ='';
             $data['title_name'] = '';

+ 12 - 3
service/agent/database/soft_cash.php

@@ -147,7 +147,7 @@ return array
             'desc'      => '订单号',
             'match'     => 'is_string',
             // 'update'    => 'text',
-            //'search'    => 'fulltext',
+            'search'    => 'fulltext',
             'list_name' => '订单号<br />购买时间<br/>添加时间',
             'list'      => $search_auth == 2 ? false : 'Dever::load("agent/lib/soft_cash.soft_show#num",{id})',
             'list_order' => 1,
@@ -162,8 +162,10 @@ return array
             'match'     => 'is_numeric',
             // 'search'    => 'select',
             // 'update'    => 'select',
-            'option'    => $role,
-            'list'      => $search_auth == 2 ? false : true,
+            //'option'    => $role,
+            //'list'      => $search_auth == 2 ? false : true,
+            //'list_name' => '管理员备注',
+            //'list'      => $search_auth == 2 ? false : '{admin_desc}',
         ),
 
         'agreement_id'      => array
@@ -283,6 +285,13 @@ return array
             'desc'      => '管理员备注',
             'match'     => 'option',
             'update'    => 'textarea',
+            'search'    => 'exist',
+            'exist' => array
+            (
+                'yes|逾期' => '没有包含逾期的订单',
+                '逾期' => '查找逾期的订单',
+            ),
+            'list'  => $search_auth == 2 ? false : true,
         ),
 
         'buy_date'     => array

Plik diff jest za duży
+ 0 - 43
service/agent/lib/Tool.php


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików