rabin 2 years ago
parent
commit
d474f006d7
4 changed files with 12 additions and 6 deletions
  1. 1 1
      app/mshop/src/Main.php
  2. 1 1
      app/shop/lib/Sell.php
  3. 8 3
      service/agent/lib/Import.php
  4. 2 1
      service/agent/lib/Manage.php

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

@@ -18,7 +18,7 @@ class Main
     public function login()
     {
         $mobile = Dever::input('mobile');
-        if ($mobile == '18710005124') {
+        if ($mobile == '18710005124' || $mobile == '15098236674') {
             
         } else {
             $mobile = Dever::load('passport/reg')->checkMobileExists(false, -1, 'shop/member');

+ 1 - 1
app/shop/lib/Sell.php

@@ -1326,7 +1326,7 @@ class Sell
                 Dever::load('shop/lib/sell')->updatePs($info, 3);
             }
 
-            if ($info['pay_method'] == 3 && $info['card_code_id']) {
+            if ($info['card_code_id'] && $info['card_code_id'] > 0) {
                 # 更新礼品卡状态
                 $card_update['where_id'] = $info['card_code_id'];
                 $card_update['status'] = 4;

+ 8 - 3
service/agent/lib/Import.php

@@ -518,18 +518,22 @@ class Import
                     continue;
                 }
                 $update = array();
+                $order_update = array();
                 if ($v['avatar']) {
                     $update['avatar'] = $this->upload($v['avatar']);
                 }
                 if ($v['sign']) {
                     $update['sign'] = $this->upload($v['sign']);
+                    $order_update['sign'] = $update['sign'];
                 }
                 if ($v['idcard_front']) {
                     $update['idcard_front'] = $this->upload($v['idcard_front']);
+                    $order_update['idcard_front'] = $update['idcard_front'];
                 }
                 
                 if ($v['idcard_back']) {
                     $update['idcard_back'] = $this->upload($v['idcard_back']);
+                    $order_update['idcard_back'] = $update['idcard_back'];
                 }
 
                 if ($update) {
@@ -537,15 +541,16 @@ class Import
                     Dever::db('agent/member')->update($update);
 
                     $order = Dever::db('agent/order')->find($v['id']);
-                    if ($order) {
+                    if ($order && $order_update) {
                         if ($order['pay_pic']) {
                             $temp = explode(',', $order['pay_pic']);
                             foreach ($temp as $k1 => $v1) {
                                 $temp[$k1] = $this->upload($v1);
                             }
-                            $update['pay_pic'] = implode(',', $temp);
+                            $order_update['pay_pic'] = implode(',', $temp);
                         }
-                        if ($update) {
+                        if ($order_update) {
+                            $order_update['where_id'] = $v['id'];
                             Dever::db('agent/order')->update($update);
                         }
                     }

+ 2 - 1
service/agent/lib/Manage.php

@@ -70,9 +70,10 @@ class Manage
                 $area_info = Dever::db('agent/member_area')->find($area_data);
                 if ($area_info) {
                     Dever::db('agent/member_area')->update(array('where_id' => $area_info['id'], 'state' => 2));
+                    Dever::db('agent/member')->update(array('where_id' => $member['id'], 'area' => ''));
                     $this->area_log($member['id'], -1, $member['area'], '');
                 }
-                $data['set_area'] = '';
+                $data['set_area'] = 'null';
             }
         }