1
This commit is contained in:
@@ -47,6 +47,7 @@ class Customer extends HD_Controller
|
||||
$params = $this->input->get();
|
||||
$page = $params['page'] = $params['page'] ? intval($params['page']) : 1;
|
||||
$size = $params['size'] = $params['size'] ? intval($params['size']) : 20;
|
||||
|
||||
$where = $this->get_where($params);
|
||||
$count = $this->customers_model->count($where);
|
||||
$lists = [];
|
||||
@@ -430,6 +431,9 @@ class Customer extends HD_Controller
|
||||
!$params['tags'] && $params['tags'] = '';
|
||||
!$params['tagsIntention'] && $params['tagsIntention'] = '';
|
||||
!$params['tagsDefeat'] && $params['tagsDefeat'] = '';
|
||||
!$params['brand_id'] && $params['brand_id'] = 0;
|
||||
!$params['series_id'] && $params['series_id'] = 0;
|
||||
|
||||
$where = array('status>=0' => null);
|
||||
if ($_SESSION['admin_info']['biz_id']) {
|
||||
$biz_ids = implode(',', $_SESSION['admin_info']['biz_id']);
|
||||
@@ -447,8 +451,11 @@ class Customer extends HD_Controller
|
||||
if ($params['level']) {
|
||||
$where['level'] = $params['level'];
|
||||
}
|
||||
if (is_numeric($params['c_brand'])) {
|
||||
$where['c_brand'] = $params['c_brand'];
|
||||
if (is_numeric($params['brand_id'])) {
|
||||
$where['brand_id'] = $params['brand_id'];
|
||||
}
|
||||
if (is_numeric($params['series_id'])) {
|
||||
$where['series_id'] = $params['series_id'];
|
||||
}
|
||||
if ($params['of_id']) {
|
||||
$where['of_id'] = $params['of_id'];
|
||||
|
||||
@@ -149,6 +149,20 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl" style="width:1920px">
|
||||
<label class="am-para-label w100">重点关注车型:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select name="brand_id" v-model="params.brand_id">
|
||||
<option :value="v.id" v-for="(v,i) in brandAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w120">
|
||||
<select name="series_id" v-model="params.series_id">
|
||||
<option :value="v.id" v-for="(v,i) in seryAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? foreach ($searchTimeAry as $key => $value) { ?>
|
||||
<div id="show-<?= $key ?>" style="display:<?= $params[$key] ? 'block' : 'none' ?>">
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
@@ -402,12 +416,14 @@
|
||||
searchTpAry: [],
|
||||
lists: [],
|
||||
qdjl_lists: [],
|
||||
brandAry: [],
|
||||
seryAry: [],
|
||||
admins: {
|
||||
provinceAry: <?=json_encode($provinces, JSON_UNESCAPED_UNICODE)?>,
|
||||
cityAry: [],
|
||||
countyAry: [],
|
||||
bizAry: [],
|
||||
list: []
|
||||
list: [],
|
||||
},
|
||||
show_info: {
|
||||
levelAry: [],
|
||||
@@ -435,8 +451,29 @@
|
||||
vm.qdjl_lists = <?=json_encode($qdjl_lists)?>;
|
||||
vm.show_info = <?=json_encode($show_info)?>;
|
||||
vm.export_button = <?=$export_button?>;
|
||||
vm.init_brands();
|
||||
if (vm.params.series_id) {
|
||||
this.get_series()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init_brands: function () {
|
||||
var vm = this;
|
||||
$.get('/common/auto', {'type': 1, 'tp': 0}, function (response) {
|
||||
vm.brandAry = response.data;
|
||||
})
|
||||
},
|
||||
get_series: function () {
|
||||
var vm = this;
|
||||
vm.seryAry = {};
|
||||
$.get('/common/auto', {'type': 2, 'tp': 0, 'pid': vm.params.brand_id}, function (response) {
|
||||
vm.seryAry = response.data;
|
||||
// if (if_reset) {
|
||||
// vm.params.series_id = 0;
|
||||
// vm.params.car_id = 0;
|
||||
// }
|
||||
})
|
||||
},
|
||||
btnTimes: function () {
|
||||
layer.open({
|
||||
type: 1,
|
||||
@@ -630,6 +667,8 @@
|
||||
that.params.county_id_admin = '';
|
||||
that.params.of_id = '';
|
||||
that.params.of2_id = '';
|
||||
that.params.brand_id = '';
|
||||
that.params.series_id = '';
|
||||
$('#id_tags').val('');
|
||||
$('#id_tagsIntention').val('');
|
||||
$('#id_tagsDefeat').val('');
|
||||
@@ -660,6 +699,13 @@
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'params.brand_id': function (nv, ov) {
|
||||
console.log("brand_id", nv, ov)
|
||||
if (nv !== '') {
|
||||
this.get_series()
|
||||
}
|
||||
|
||||
},
|
||||
'params.province_id_admin': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
|
||||
@@ -33,7 +33,7 @@ class Sign extends Wxapp
|
||||
$lng = $this->input_param('lng');
|
||||
$biz = $this->biz_model->get(['id' => $this->get_biz_id()]);
|
||||
$distance = get_distance($lat, $lng, $biz['lat'], $biz['lng']);
|
||||
if ($distance > 1000) {
|
||||
if ($distance > 500) {
|
||||
return ['msg' => '您未在门店有效范围', 'type' => 'fail', 'fail_img' => 'https://img.liche.cn/spacestation/failed.png?t=20240607'];
|
||||
// throw new Exception('您未在门店的有效范围之内', ERR_PARAMS_ERROR);
|
||||
}
|
||||
@@ -151,7 +151,7 @@ class Sign extends Wxapp
|
||||
$biz['lat'] && $sign_data['biz_lat'] = $biz['lat'];
|
||||
$biz['lng'] && $sign_data['biz_lng'] = $biz['lng'];
|
||||
$sign_data['distance'] = $distance;
|
||||
if ($distance > 1000) {
|
||||
if ($distance > 500) {
|
||||
$sign_data['descrip'] = '不在门店范围';
|
||||
$this->sign_model->add($sign_data);
|
||||
return ['type' => 'fail', 'msg' => '您未在门店有效范围'];
|
||||
|
||||
Reference in New Issue
Block a user