moonsflyer 3 hónapja
szülő
commit
839d195446

+ 7 - 0
app/shopapi/controller/UserAddressController.php

@@ -151,4 +151,11 @@ class UserAddressController extends BaseShopController
         $lists = UserAddressLogic::getRegion($id);
         return $this->data($lists);
     }
+	/**
+	 * 获取特定地区列表信息
+	 *
+	 * */
+	public function getSpecialAreaList(){
+		return $this->data(UserAddressLogic::getSpecialAreaLists());
+	}
 }

+ 7 - 0
app/shopapi/logic/UserAddressLogic.php

@@ -22,6 +22,7 @@ use app\common\enum\YesNoEnum;
 use app\common\logic\BaseLogic;
 use app\common\model\Region;
 use app\common\model\UserAddress;
+use app\common\model\SpecialArea;
 
 
 /**
@@ -218,4 +219,10 @@ class UserAddressLogic extends BaseLogic
         $regionLists = Region::where($where)->field('id,name')->select();
         return $regionLists;
     }
+
+	public static function getSpecialAreaLists(){
+		$where[]=['is_show','=',1];
+		$list  = SpecialArea::where($where)->order('sort desc,id desc')->select()->toArray();
+		return $list;
+	}
 }