From 72e77c37e35f753572ce2bee03cbd757254fc496 Mon Sep 17 00:00:00 2001 From: lcc <805383944@qq.com> Date: Sun, 19 Jan 2025 16:54:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E5=A2=9E=E5=8A=A0=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/controllers/biz/store/Store.php | 4 +++- admin/views/biz/store/edit.php | 27 +++++++++++++++++++-------- common/models/biz/Biz_model.php | 9 ++++----- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/admin/controllers/biz/store/Store.php b/admin/controllers/biz/store/Store.php index fb8a2c83..e1858ced 100644 --- a/admin/controllers/biz/store/Store.php +++ b/admin/controllers/biz/store/Store.php @@ -64,7 +64,7 @@ class Store extends HD_Controller $c_time[0] && $where["c_time >="] = strtotime($c_time[0] . ' 00:00:00'); $c_time[1] && $where["c_time <="] = strtotime($c_time[1] . ' 23:59:59'); } - + $typeAry = $this->biz_model->type_ary(); $biz_lists = $this->biz_model->select($where, 'id desc', $page, $pagesize); $count = $this->biz_model->count($where); $bizlists = []; @@ -74,6 +74,7 @@ class Store extends HD_Controller } $this->data['params'] = $params; $this->data['lists'] = $bizlists; + $this->data['typeAry'] = $typeAry; $this->data['_title'] = '门店列表'; $this->data['pager'] = array('count' => ceil($count / $pagesize), 'curr' => $page, 'totle' => $count); $this->show_view('biz/store/lists', true); @@ -82,6 +83,7 @@ class Store extends HD_Controller public function get() { $id = intval($this->input->get('id')); + $this->data['typeAry'] = $this->biz_model->type_ary(); $this->data['provinces'] = $this->province_ary(); if ($id) { $biz = $this->biz_model->get(array('id' => $id, 'status>-1' => null)); diff --git a/admin/views/biz/store/edit.php b/admin/views/biz/store/edit.php index c119879f..93d39650 100644 --- a/admin/views/biz/store/edit.php +++ b/admin/views/biz/store/edit.php @@ -206,7 +206,8 @@
- + @@ -219,12 +220,14 @@
经度 -
纬度 -
@@ -254,6 +257,15 @@
+
+ +
+ +
+
@@ -352,16 +364,15 @@ el: '#vue-app', data: { cate_id: , - info:, + info: , + typeAry: , }, mounted: function () { }, - methods: { - }, + methods: {}, created: function () { }, - watch: { - } + watch: {} }); /** diff --git a/common/models/biz/Biz_model.php b/common/models/biz/Biz_model.php index 0668f521..089f9255 100644 --- a/common/models/biz/Biz_model.php +++ b/common/models/biz/Biz_model.php @@ -6,7 +6,7 @@ * Time: 13:47 */ -defined('BASEPATH') OR exit('No direct script access allowed'); +defined('BASEPATH') or exit('No direct script access allowed'); class Biz_model extends HD_Model { @@ -63,8 +63,7 @@ class Biz_model extends HD_Model */ function type_ary($key = null) { - $map = array('1' => '品牌店', '2' => '合伙店', '3' => '代理店', '4' => '合作店', '5' => '异业店'); - //$map = array('1' => '品牌店', '2' => '合伙店', '3' => '代理店'); + $map = array('1' => '空间站', '2' => '车卖场', '3' => '准车卖场', '4' => '二网', '5' => '4类'); if (!is_null($key)) { return $map[$key]; } @@ -84,8 +83,8 @@ class Biz_model extends HD_Model $lng = (float)$lng; $where = "status=1 and lat>0 and lng>0"; $typeAry = $this->type_ary(); - $type_ids = implode(',',array_keys($typeAry)); - $where = $where." and type in ($type_ids)"; + $type_ids = implode(',', array_keys($typeAry)); + $where = $where . " and type in ($type_ids)"; if ($page) { $offset = ($page - 1) * $size;