dever 3 years ago
parent
commit
e11765c01b
2 changed files with 4 additions and 2 deletions
  1. 2 2
      service/agent/database/member_area.php
  2. 2 0
      service/agent/lib/Manage.php

+ 2 - 2
service/agent/database/member_area.php

@@ -22,8 +22,8 @@ return array
     # 表名
     'name' => 'member_area',
     # 显示给用户看的名称
-    'lang' => '代理区域',
-    'menu' => false,
+    'lang' => '已售区域列表',
+    'order' => 8,
     # 数据结构
     'struct' => array
     (

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

@@ -207,8 +207,10 @@ class Manage
                     if (!$area) {
                         $area_data['type'] = $order['get_type'];
                         $area_data['price'] = $order['price'];
+                        $area_data['status'] = 1;
                         Dever::db('agent/member_area')->insert($area_data);
                     } else {
+                        Dever::db('agent/member_area')->update(array('where_id' => $area['id'], 'state' => 2));
                         if ($role && $role['type'] == 2) {
                             Dever::load('area/api')->upStatus($area['area'], 1);
                         }