Commit ea464834 authored by hujun's avatar hujun

门店列表搜索

parent 83d65abd
......@@ -105,8 +105,8 @@ class AStore extends BaseModel
$data = array();
if ($join) {
$field .= ',b.name,b.phone';
$where['b.status'] = 0;
$where['b.level'] = ['in',[20,40]];
$params['b.status'] = 0;
$params[0] = ['EXP', 'b.level = 20 or b.level = 40'];
$store_data = $this->field($field)->alias('a')->join('a_agents b','a.id=b.store_id','left')
->where($params)
->order($order_)
......@@ -148,8 +148,8 @@ class AStore extends BaseModel
*/
public function getStoreListTotal($params, $join = 0) {
if ($join) {
$where['b.status'] = 0;
$where['b.level'] = ['in',[20,40]];
$params['b.status'] = 0;
$params[0] = ['EXP', 'b.level = 20 or b.level = 40'];
$store_num = $this->alias('a')->join('a_agents b','a.id=b.store_id','left')
->where($params)
->count();
......
<script id="store_list_tpl" type="text/template">
[% if(it) { %]
[% if(it[0]) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment