细节优化、分类读取优化
parent
87396f68ac
commit
fa5da47f46
|
|
@ -314,6 +314,9 @@ class Common extends BaseController
|
||||||
// 页面语言
|
// 页面语言
|
||||||
$assign['lang_data'] = SystemService::PageViewLangData();
|
$assign['lang_data'] = SystemService::PageViewLangData();
|
||||||
|
|
||||||
|
// 省市联动是否必选选择
|
||||||
|
$assign['is_force_region_choice'] = 1;
|
||||||
|
|
||||||
// 模板赋值
|
// 模板赋值
|
||||||
MyViewAssign($assign);
|
MyViewAssign($assign);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="am-form-group">
|
<div class="am-form-group">
|
||||||
<label>官网地址<span class="am-form-group-label-tips">带http://或https://</span></label>
|
<label>官网地址<span class="am-form-group-label-tips">选填</span></label>
|
||||||
<input type="url" placeholder="官网地址" name="website_url" data-validation-message="官网地址格式有误" class="am-radius" {{if !empty($data['website_url'])}} value="{{$data.website_url}}"{{/if}} />
|
<input type="url" placeholder="官网地址、以http://或https://开头" name="website_url" data-validation-message="官网地址格式有误" class="am-radius" {{if !empty($data['website_url'])}} value="{{$data.website_url}}"{{/if}} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="am-form-group">
|
<div class="am-form-group">
|
||||||
|
|
|
||||||
|
|
@ -80,13 +80,13 @@
|
||||||
<select name="category_id" class="am-radius chosen-select" multiple="multiple" minchecked="1" data-placeholder="请选择..." data-validation-message="请至少选择一个商品分类" data-base-template-url="{{:MyUrl('admin/goods/basetemplate')}}" required>
|
<select name="category_id" class="am-radius chosen-select" multiple="multiple" minchecked="1" data-placeholder="请选择..." data-validation-message="请至少选择一个商品分类" data-base-template-url="{{:MyUrl('admin/goods/basetemplate')}}" required>
|
||||||
{{if !empty($goods_category_list)}}
|
{{if !empty($goods_category_list)}}
|
||||||
{{foreach $goods_category_list as $v}}
|
{{foreach $goods_category_list as $v}}
|
||||||
<option value="{{$v.id}}" {{if !empty($data['category_ids']) and in_array($v['id'], $data['category_ids'])}}selected{{/if}}>一级 - {{$v.name}}</option>
|
<option value="{{$v.id}}" {{if !empty($data['category_ids']) and in_array($v['id'], $data['category_ids'])}}selected{{/if}}>{{$v.name}}</option>
|
||||||
{{if !empty($v['items'])}}
|
{{if !empty($v['items'])}}
|
||||||
{{foreach $v.items as $vs}}
|
{{foreach $v.items as $vs}}
|
||||||
<option style="padding-left: 30px;" value="{{$vs.id}}" {{if !empty($data['category_ids']) and in_array($vs['id'], $data['category_ids'])}}selected{{/if}}>二级-{{$vs.name}}</option>
|
<option style="padding-left: 20px;" value="{{$vs.id}}" {{if !empty($data['category_ids']) and in_array($vs['id'], $data['category_ids'])}}selected{{/if}}>{{if empty($vs['items'])}}├{{else /}}└{{/if}}² {{$vs.name}}</option>
|
||||||
{{if !empty($vs['items'])}}
|
{{if !empty($vs['items'])}}
|
||||||
{{foreach $vs.items as $vss}}
|
{{foreach $vs.items as $kss=>$vss}}
|
||||||
<option style="padding-left: 60px;" value="{{$vss.id}}" {{if !empty($data['category_ids']) and in_array($vss['id'], $data['category_ids'])}}selected{{/if}}>三级-{{$vss.name}}</option>
|
<option style="padding-left: 40px;" value="{{$vss.id}}" {{if !empty($data['category_ids']) and in_array($vss['id'], $data['category_ids'])}}selected{{/if}}>{{if $kss eq count($vs['items'])-1}}└{{else /}}├{{/if}}³ {{$vss.name}}</option>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
@ -356,7 +356,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="am-panel-bd business-form-group">
|
<div class="am-panel-bd business-form-group">
|
||||||
<div class="am-margin-horizontal-sm">
|
<div class="am-margin-horizontal-sm">
|
||||||
<textarea class="am-radius am-validate" name="content_web" maxlength="105000" id="editor-tag" data-validation-message="电脑端详情内容最多 105000 个字符" style="width: 100%;">{{if !empty($data['content_web'])}}{{$data.content_web}}{{/if}}</textarea>
|
<textarea class="am-radius" name="content_web" maxlength="105000" id="editor-tag" data-validation-message="电脑端详情内容最多 105000 个字符">{{if !empty($data['content_web'])}}{{$data.content_web}}{{/if}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,8 @@
|
||||||
<i class="am-icon-gavel"></i>
|
<i class="am-icon-gavel"></i>
|
||||||
<span>回复</span>
|
<span>回复</span>
|
||||||
{{else /}}
|
{{else /}}
|
||||||
{{if $module_data['is_show'] eq 0}}
|
<i class="am-icon-pencil"></i>
|
||||||
<i class="am-icon-pencil"></i>
|
<span>修改</span>
|
||||||
<span>修改</span>
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/goodscomments/delete')}}" data-id="{{$module_data.id}}" data-key="ids">
|
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/goodscomments/delete')}}" data-id="{{$module_data.id}}" data-key="ids">
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
<option value="{{$v.id}}" {{if !empty($module_data['params']) and !empty($module_data['params'][$module_data['form_name_key']]) and is_array($module_data['params'][$module_data['form_name_key']]) and in_array($v['id'], $module_data['params'][$module_data['form_name_key']])}}selected{{/if}}>{{$v.name}}</option>
|
<option value="{{$v.id}}" {{if !empty($module_data['params']) and !empty($module_data['params'][$module_data['form_name_key']]) and is_array($module_data['params'][$module_data['form_name_key']]) and in_array($v['id'], $module_data['params'][$module_data['form_name_key']])}}selected{{/if}}>{{$v.name}}</option>
|
||||||
{{if !empty($v['items'])}}
|
{{if !empty($v['items'])}}
|
||||||
{{foreach $v.items as $vs}}
|
{{foreach $v.items as $vs}}
|
||||||
<option style="padding-left: 15px;" value="{{$vs.id}}" {{if !empty($module_data['params']) and !empty($module_data['params'][$module_data['form_name_key']]) and is_array($module_data['params'][$module_data['form_name_key']]) and in_array($vs['id'], $module_data['params'][$module_data['form_name_key']])}}selected{{/if}}>{{$vs.name}}</option>
|
<option style="padding-left: 15px;" value="{{$vs.id}}" {{if !empty($module_data['params']) and !empty($module_data['params'][$module_data['form_name_key']]) and is_array($module_data['params'][$module_data['form_name_key']]) and in_array($vs['id'], $module_data['params'][$module_data['form_name_key']])}}selected{{/if}}>{{if empty($vs['items'])}}├{{else /}}└{{/if}}² {{$vs.name}}</option>
|
||||||
{{if !empty($vs['items'])}}
|
{{if !empty($vs['items'])}}
|
||||||
{{foreach $vs.items as $vss}}
|
{{foreach $vs.items as $kss=>$vss}}
|
||||||
<option style="padding-left: 30px;" value="{{$vss.id}}" {{if !empty($module_data['params']) and !empty($module_data['params'][$module_data['form_name_key']]) and is_array($module_data['params'][$module_data['form_name_key']]) and in_array($vss['id'], $module_data['params'][$module_data['form_name_key']])}}selected{{/if}}>{{$vss.name}}</option>
|
<option style="padding-left: 30px;" value="{{$vss.id}}" {{if !empty($module_data['params']) and !empty($module_data['params'][$module_data['form_name_key']]) and is_array($module_data['params'][$module_data['form_name_key']]) and in_array($vss['id'], $module_data['params'][$module_data['form_name_key']])}}selected{{/if}}>{{if $kss eq count($vs['items'])-1}}└{{else /}}├{{/if}}³ {{$vss.name}}</option>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="am-form-group region-linkage" data-url="{{:MyUrl('admin/region/node')}}">
|
<div class="am-form-group region-linkage" data-url="{{:MyUrl('admin/region/index')}}">
|
||||||
<label class="block">省市区<span class="am-form-group-label-tips-must">必选</span></label>
|
<label class="block">省市区{{if isset($is_force_region_choice) and $is_force_region_choice eq 1}}<span class="am-form-group-label-tips-must">必选</span>{{else /}}<span class="am-form-group-label-tips">可选</span>{{/if}}</label>
|
||||||
<select name="province" data-next="city" class="am-radius chosen-select" data-placeholder="省份" data-validation-message="请选择省份" data-value="{{if isset($data['province'])}}{{$data.province}}{{else /}}0{{/if}}" required>
|
<select name="province" data-next="city" class="am-radius chosen-select" data-placeholder="省份" data-validation-message="请选择省份" data-value="{{if isset($data['province'])}}{{$data.province}}{{else /}}0{{/if}}" {{if isset($is_force_region_choice) and $is_force_region_choice eq 1}}required{{/if}}>
|
||||||
<option value="">省份</option>
|
<option value="">省份</option>
|
||||||
</select>
|
</select>
|
||||||
<select name="city" data-next="county" class="am-radius chosen-select" data-placeholder="城市" data-validation-message="请选择城市" data-value="{{if isset($data['city'])}}{{$data.city}}{{else /}}0{{/if}}" required>
|
<select name="city" data-next="county" class="am-radius chosen-select" data-placeholder="城市" data-validation-message="请选择城市" data-value="{{if isset($data['city'])}}{{$data.city}}{{else /}}0{{/if}}" {{if isset($is_force_region_choice) and $is_force_region_choice eq 1}}required{{/if}}>
|
||||||
<option value="">城市</option>
|
<option value="">城市</option>
|
||||||
</select>
|
</select>
|
||||||
<select name="county" class="am-radius chosen-select" data-placeholder="区/县" data-validation-message="请选择区/县" data-value="{{if isset($data['county'])}}{{$data.county}}{{else /}}0{{/if}}">
|
<select name="county" class="am-radius chosen-select" data-placeholder="区/县" data-validation-message="请选择区/县" data-value="{{if isset($data['county'])}}{{$data.county}}{{else /}}0{{/if}}">
|
||||||
|
|
|
||||||
|
|
@ -225,13 +225,13 @@
|
||||||
<select class="am-radius chosen-select" name="value" data-placeholder="请选择..." data-validation-message="商品分类选择有误" required>
|
<select class="am-radius chosen-select" name="value" data-placeholder="请选择..." data-validation-message="商品分类选择有误" required>
|
||||||
<option value="">请选择...</option>
|
<option value="">请选择...</option>
|
||||||
{{foreach $goods_category_list as $v}}
|
{{foreach $goods_category_list as $v}}
|
||||||
<option value="{{$v.id}}" {{if !empty($data['category_ids']) and in_array($v['id'], $data['category_ids'])}}selected{{/if}}>一级 - {{$v.name}}</option>
|
<option value="{{$v.id}}" {{if !empty($data['category_ids']) and in_array($v['id'], $data['category_ids'])}}selected{{/if}}>{{$v.name}}</option>
|
||||||
{{if !empty($v['items'])}}
|
{{if !empty($v['items'])}}
|
||||||
{{foreach $v.items as $vs}}
|
{{foreach $v.items as $vs}}
|
||||||
<option style="padding-left: 30px;" value="{{$vs.id}}" {{if !empty($data['category_ids']) and in_array($vs['id'], $data['category_ids'])}}selected{{/if}}>二级 - {{$vs.name}}</option>
|
<option style="padding-left: 20px;" value="{{$vs.id}}" {{if !empty($data['category_ids']) and in_array($vs['id'], $data['category_ids'])}}selected{{/if}}>{{if empty($vs['items'])}}├{{else /}}└{{/if}}² {{$vs.name}}</option>
|
||||||
{{if !empty($vs['items'])}}
|
{{if !empty($vs['items'])}}
|
||||||
{{foreach $vs.items as $vss}}
|
{{foreach $vs.items as $kss=>$vss}}
|
||||||
<option style="padding-left: 60px;" value="{{$vss.id}}" {{if !empty($data['category_ids']) and in_array($vss['id'], $data['category_ids'])}}selected{{/if}}>三级 - {{$vss.name}}</option>
|
<option style="padding-left: 40px;" value="{{$vss.id}}" {{if !empty($data['category_ids']) and in_array($vss['id'], $data['category_ids'])}}selected{{/if}}>{{if $kss eq count($vs['items'])-1}}└{{else /}}├{{/if}}³ {{$vss.name}}</option>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
||||||
|
|
@ -223,13 +223,13 @@
|
||||||
<option value="">商品分类...</option>
|
<option value="">商品分类...</option>
|
||||||
{{if !empty($goods_category_list)}}
|
{{if !empty($goods_category_list)}}
|
||||||
{{foreach $goods_category_list as $v}}
|
{{foreach $goods_category_list as $v}}
|
||||||
<option value="{{$v.id}}">一级 - {{$v.name}}</option>
|
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||||
{{if !empty($v['items'])}}
|
{{if !empty($v['items'])}}
|
||||||
{{foreach $v.items as $vs}}
|
{{foreach $v.items as $vs}}
|
||||||
<option style="padding-left: 15px;" value="{{$vs.id}}">二级 - {{$vs.name}}</option>
|
<option style="padding-left: 15px;" value="{{$vs.id}}">{{if empty($vs['items'])}}├{{else /}}└{{/if}}² {{$vs.name}}</option>
|
||||||
{{if !empty($vs['items'])}}
|
{{if !empty($vs['items'])}}
|
||||||
{{foreach $vs.items as $vss}}
|
{{foreach $vs.items as $kss=>$vss}}
|
||||||
<option style="padding-left: 30px;" value="{{$vss.id}}">三级 - {{$vss.name}}</option>
|
<option style="padding-left: 30px;" value="{{$vss.id}}">{{if $kss eq count($vs['items'])-1}}└{{else /}}├{{/if}}³ {{$vss.name}}</option>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@
|
||||||
<option value="">商品分类...</option>
|
<option value="">商品分类...</option>
|
||||||
{{if !empty($goods_category_list)}}
|
{{if !empty($goods_category_list)}}
|
||||||
{{foreach $goods_category_list as $v}}
|
{{foreach $goods_category_list as $v}}
|
||||||
<option value="{{$v.id}}">一级 - {{$v.name}}</option>
|
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||||
{{if !empty($v['items'])}}
|
{{if !empty($v['items'])}}
|
||||||
{{foreach $v.items as $vs}}
|
{{foreach $v.items as $vs}}
|
||||||
<option style="padding-left: 15px;" value="{{$vs.id}}">二级 - {{$vs.name}}</option>
|
<option style="padding-left: 15px;" value="{{$vs.id}}">{{if empty($vs['items'])}}├{{else /}}└{{/if}}² {{$vs.name}}</option>
|
||||||
{{if !empty($vs['items'])}}
|
{{if !empty($vs['items'])}}
|
||||||
{{foreach $vs.items as $vss}}
|
{{foreach $vs.items as $kss=>$vss}}
|
||||||
<option style="padding-left: 30px;" value="{{$vss.id}}">三级 - {{$vss.name}}</option>
|
<option style="padding-left: 30px;" value="{{$vss.id}}">{{if $kss eq count($vs['items'])-1}}└{{else /}}├{{/if}}³ {{$vss.name}}</option>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
||||||
|
|
@ -2926,10 +2926,6 @@ function ParamsChecked($data, $params)
|
||||||
{
|
{
|
||||||
return '长度规则值未定义['.$v['key_name'].']';
|
return '长度规则值未定义['.$v['key_name'].']';
|
||||||
}
|
}
|
||||||
if(!is_string($v['checked_data']))
|
|
||||||
{
|
|
||||||
return '内部调用参数配置有误['.$v['key_name'].']';
|
|
||||||
}
|
|
||||||
if(!isset($data[$v['key_name']]))
|
if(!isset($data[$v['key_name']]))
|
||||||
{
|
{
|
||||||
return $v['error_msg'];
|
return $v['error_msg'];
|
||||||
|
|
|
||||||
|
|
@ -393,6 +393,9 @@ class Common extends BaseController
|
||||||
// 页面语言
|
// 页面语言
|
||||||
$assign['lang_data'] = SystemService::PageViewLangData();
|
$assign['lang_data'] = SystemService::PageViewLangData();
|
||||||
|
|
||||||
|
// 省市联动是否必选选择
|
||||||
|
$assign['is_force_region_choice'] = 1;
|
||||||
|
|
||||||
// 模板赋值
|
// 模板赋值
|
||||||
MyViewAssign($assign);
|
MyViewAssign($assign);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="am-form-group region-linkage" data-url="{{:MyUrl('index/region/index')}}">
|
<div class="am-form-group region-linkage" data-url="{{:MyUrl('index/region/index')}}">
|
||||||
<label class="block">省市区<span class="am-form-group-label-tips-must">必选</span></label>
|
<label class="block">省市区{{if isset($is_force_region_choice) and $is_force_region_choice eq 1}}<span class="am-form-group-label-tips-must">必选</span>{{else /}}<span class="am-form-group-label-tips">可选</span>{{/if}}</label>
|
||||||
<select name="province" data-next="city" class="am-radius chosen-select" data-placeholder="省份" data-validation-message="请选择省份" data-value="{{if isset($data['province'])}}{{$data.province}}{{else /}}0{{/if}}" required>
|
<select name="province" data-next="city" class="am-radius chosen-select" data-placeholder="省份" data-validation-message="请选择省份" data-value="{{if isset($data['province'])}}{{$data.province}}{{else /}}0{{/if}}" {{if isset($is_force_region_choice) and $is_force_region_choice eq 1}}required{{/if}}>
|
||||||
<option value="">省份</option>
|
<option value="">省份</option>
|
||||||
</select>
|
</select>
|
||||||
<select name="city" data-next="county" class="am-radius chosen-select" data-placeholder="城市" data-validation-message="请选择城市" data-value="{{if isset($data['city'])}}{{$data.city}}{{else /}}0{{/if}}" required>
|
<select name="city" data-next="county" class="am-radius chosen-select" data-placeholder="城市" data-validation-message="请选择城市" data-value="{{if isset($data['city'])}}{{$data.city}}{{else /}}0{{/if}}" {{if isset($is_force_region_choice) and $is_force_region_choice eq 1}}required{{/if}}>
|
||||||
<option value="">城市</option>
|
<option value="">城市</option>
|
||||||
</select>
|
</select>
|
||||||
<select name="county" class="am-radius chosen-select" data-placeholder="区/县" data-validation-message="请选择区/县" data-value="{{if isset($data['county'])}}{{$data.county}}{{else /}}0{{/if}}">
|
<select name="county" class="am-radius chosen-select" data-placeholder="区/县" data-validation-message="请选择区/县" data-value="{{if isset($data['county'])}}{{$data.county}}{{else /}}0{{/if}}">
|
||||||
|
|
|
||||||
|
|
@ -670,7 +670,7 @@ class AdminService
|
||||||
// 手机号码是否存在
|
// 手机号码是否存在
|
||||||
if(!self::IsExistAccounts($params['accounts'], 'mobile'))
|
if(!self::IsExistAccounts($params['accounts'], 'mobile'))
|
||||||
{
|
{
|
||||||
return DataReturn('手机号码不存在', -3);
|
return DataReturn('手机号码不存在、请先注册!', -3);
|
||||||
}
|
}
|
||||||
$field = 'mobile';
|
$field = 'mobile';
|
||||||
break;
|
break;
|
||||||
|
|
@ -686,7 +686,7 @@ class AdminService
|
||||||
// 电子邮箱是否存在
|
// 电子邮箱是否存在
|
||||||
if(!self::IsExistAccounts($params['accounts'], 'email'))
|
if(!self::IsExistAccounts($params['accounts'], 'email'))
|
||||||
{
|
{
|
||||||
return DataReturn('电子邮箱不存在', -3);
|
return DataReturn('电子邮箱不存在、请先注册!', -3);
|
||||||
}
|
}
|
||||||
$field = 'email';
|
$field = 'email';
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ class BrandService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数处理
|
// 数据处理
|
||||||
foreach($data as &$v)
|
foreach($data as &$v)
|
||||||
{
|
{
|
||||||
// 分类名称
|
// 分类名称
|
||||||
|
|
@ -251,9 +251,10 @@ class BrandService
|
||||||
'error_msg' => '官网地址格式有误',
|
'error_msg' => '官网地址格式有误',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'checked_type' => 'length',
|
'checked_type' => 'max',
|
||||||
'key_name' => 'sort',
|
'key_name' => 'sort',
|
||||||
'checked_data' => '3',
|
'checked_data' => 255,
|
||||||
|
'is_checked' => 1,
|
||||||
'error_msg' => '顺序 0~255 之间的数值',
|
'error_msg' => '顺序 0~255 之间的数值',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -112,26 +112,49 @@ class GoodsService
|
||||||
unset($where_base[array_search('pid', $temp_column)]);
|
unset($where_base[array_search('pid', $temp_column)]);
|
||||||
sort($where_base);
|
sort($where_base);
|
||||||
}
|
}
|
||||||
foreach($data as &$v)
|
|
||||||
|
// 获取所有二级
|
||||||
|
$two_group = [];
|
||||||
|
$params['where'] = array_merge($where_base, [['pid', 'in', array_column($data, 'id')]]);
|
||||||
|
$two = self::GoodsCategoryList($params);
|
||||||
|
if(!empty($two))
|
||||||
{
|
{
|
||||||
$params['where'] = array_merge($where_base, [['pid', '=', $v['id']]]);
|
// 二级分组
|
||||||
$v['items'] = self::GoodsCategoryList($params);
|
foreach($two as $tv)
|
||||||
if(!empty($v['items']))
|
|
||||||
{
|
{
|
||||||
// 一次性查出所有二级下的三级、再做归类、避免sql连接超多
|
if(!array_key_exists($tv['pid'], $two_group))
|
||||||
$params['where'] = array_merge($where_base, [['pid', 'in', array_column($v['items'], 'id')]]);
|
{
|
||||||
$itemss = self::GoodsCategoryList($params);
|
$two_group[$tv['pid']] = [];
|
||||||
if(!empty($itemss))
|
}
|
||||||
|
$two_group[$tv['pid']][] = $tv;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所有三级
|
||||||
|
$three_group = [];
|
||||||
|
$params['where'] = array_merge($where_base, [['pid', 'in', array_column($two, 'id')]]);
|
||||||
|
$three = self::GoodsCategoryList($params);
|
||||||
|
if(!empty($three))
|
||||||
|
{
|
||||||
|
// 三级分组
|
||||||
|
foreach($three as $tv)
|
||||||
|
{
|
||||||
|
if(!array_key_exists($tv['pid'], $three_group))
|
||||||
|
{
|
||||||
|
$three_group[$tv['pid']] = [];
|
||||||
|
}
|
||||||
|
$three_group[$tv['pid']][] = $tv;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据组合
|
||||||
|
foreach($data as &$v)
|
||||||
|
{
|
||||||
|
$v['items'] = (empty($two_group) || !array_key_exists($v['id'], $two_group)) ? [] : $two_group[$v['id']];
|
||||||
|
if(!empty($v['items']))
|
||||||
{
|
{
|
||||||
foreach($v['items'] as &$vs)
|
foreach($v['items'] as &$vs)
|
||||||
{
|
{
|
||||||
foreach($itemss as $vss)
|
$vs['items'] = (empty($three_group) || !array_key_exists($vs['id'], $three_group)) ? [] : $three_group[$vs['id']];
|
||||||
{
|
|
||||||
if($vs['id'] == $vss['pid'])
|
|
||||||
{
|
|
||||||
$vs['items'][] = $vss;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1286,7 +1286,7 @@ class UserService
|
||||||
// 手机号码是否不存在
|
// 手机号码是否不存在
|
||||||
if(!self::IsExistAccounts($params['accounts'], 'mobile'))
|
if(!self::IsExistAccounts($params['accounts'], 'mobile'))
|
||||||
{
|
{
|
||||||
return DataReturn('手机号码不存在', -3);
|
return DataReturn('手机号码不存在、请先注册!', -3);
|
||||||
}
|
}
|
||||||
$field = 'mobile';
|
$field = 'mobile';
|
||||||
break;
|
break;
|
||||||
|
|
@ -1302,7 +1302,7 @@ class UserService
|
||||||
// 电子邮箱是否不存在
|
// 电子邮箱是否不存在
|
||||||
if(!self::IsExistAccounts($params['accounts'], 'email'))
|
if(!self::IsExistAccounts($params['accounts'], 'email'))
|
||||||
{
|
{
|
||||||
return DataReturn('电子邮箱不存在', -3);
|
return DataReturn('电子邮箱不存在、请先注册!', -3);
|
||||||
}
|
}
|
||||||
$field = 'email';
|
$field = 'email';
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -448,10 +448,6 @@ ul {margin-top:0;}
|
||||||
* 公共
|
* 公共
|
||||||
*/
|
*/
|
||||||
.am-container {padding-left:0px;padding-right:0px ;}
|
.am-container {padding-left:0px;padding-right:0px ;}
|
||||||
@media only screen and (min-width: 641px) {
|
|
||||||
#tree tr .submit { display: none; }
|
|
||||||
#tree tr:hover .submit { display: block !important; }
|
|
||||||
}
|
|
||||||
@media only screen and (min-width: 1025px) {
|
@media only screen and (min-width: 1025px) {
|
||||||
.am-container { max-width: 1000px;}
|
.am-container { max-width: 1000px;}
|
||||||
}
|
}
|
||||||
|
|
@ -551,20 +547,6 @@ table.am-table .am-btn-danger:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 分类列表优化
|
|
||||||
*/
|
|
||||||
#tree table.am-table td {
|
|
||||||
line-height: 30px;
|
|
||||||
padding: 0.4rem 0.7rem;
|
|
||||||
}
|
|
||||||
#tree table.am-table td button.am-btn {
|
|
||||||
vertical-align: unset;
|
|
||||||
}
|
|
||||||
#tree table.am-table tr.tree-change-item td {
|
|
||||||
border: 1px dashed #FF9800;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 警告框下表单最后一个去掉虚线
|
* 警告框下表单最后一个去掉虚线
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -173,8 +173,8 @@ $(function()
|
||||||
$(this).attr('value', $(this).val());
|
$(this).attr('value', $(this).val());
|
||||||
});
|
});
|
||||||
$parent.after($parent.prop('outerHTML'));
|
$parent.after($parent.prop('outerHTML'));
|
||||||
$spec_table.find('tbody tr:last').attr('class', 'line-'+index+' line-not-first');
|
$parent.next().attr('class', 'line-'+index+' line-not-first');
|
||||||
$spec_table.find('tbody tr:last').attr('data-line-tag', '.line-'+index);
|
$parent.next().attr('data-line-tag', '.line-'+index);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 规格行移除
|
// 规格行移除
|
||||||
|
|
|
||||||
|
|
@ -100,8 +100,12 @@ form.am-form .am-form-group,
|
||||||
padding: 15px 20% 20px 5px;
|
padding: 15px 20% 20px 5px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
.plug-file-upload-view,
|
||||||
form.am-form .am-form-group-refreshing,
|
form.am-form .am-form-group-refreshing,
|
||||||
.plug-file-upload-view {
|
form.am-form-pure .am-form-group,
|
||||||
|
form.am-form-pure .plug-file-upload-view,
|
||||||
|
form.am-form-pure .business-form-group,
|
||||||
|
form.am-form-pure .business-form-block {
|
||||||
border-bottom: 0 !important;
|
border-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
@media only screen and (min-width: 641px) {
|
@media only screen and (min-width: 641px) {
|
||||||
|
|
@ -708,7 +712,8 @@ button.colorpicker-submit img {
|
||||||
height: auto;
|
height: auto;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
}
|
}
|
||||||
.am-table-scrollable-horizontal .am-table .chosen-container .chosen-drop {
|
.am-table-scrollable-horizontal .am-table .chosen-container .chosen-drop,
|
||||||
|
.am-table-scrollable-horizontal .am-table .am-dropdown-content {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
.am-table-scrollable-horizontal .am-table tr th {
|
.am-table-scrollable-horizontal .am-table tr th {
|
||||||
|
|
@ -893,8 +898,8 @@ button.colorpicker-submit img {
|
||||||
*/
|
*/
|
||||||
.form-inside-dl-content dt,
|
.form-inside-dl-content dt,
|
||||||
.form-inside-dl-content dd {
|
.form-inside-dl-content dd {
|
||||||
line-height: 18px;
|
line-height: 14px;
|
||||||
min-height: 30px;
|
min-height: 24px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
@ -1037,11 +1042,11 @@ form .am-tab-panel .am-form-group:last-child {
|
||||||
* 仓库信息
|
* 仓库信息
|
||||||
*/
|
*/
|
||||||
.warehouse-item-container * {
|
.warehouse-item-container * {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.warehouse-item-container .warehouse-icon {
|
.warehouse-item-container .warehouse-icon {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1052,4 +1057,23 @@ form .am-tab-panel .am-form-group:last-child {
|
||||||
}
|
}
|
||||||
.platform-list-value-container > div.am-input-group button {
|
.platform-list-value-container > div.am-input-group button {
|
||||||
width: 110px;
|
width: 110px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类列表
|
||||||
|
*/
|
||||||
|
#tree table.am-table td {
|
||||||
|
line-height: 32px;
|
||||||
|
padding: 0.4rem 0.7rem;
|
||||||
|
}
|
||||||
|
#tree table.am-table td button.am-btn {
|
||||||
|
vertical-align: unset;
|
||||||
|
}
|
||||||
|
@media only screen and (min-width: 641px) {
|
||||||
|
#tree tr .submit {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#tree tr:hover .submit {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -735,7 +735,7 @@ function TreeItemHtmlHandle(item, pid, level, is_delete_all)
|
||||||
var rank = parseInt($('#tree').attr('data-rank')) || 0;
|
var rank = parseInt($('#tree').attr('data-rank')) || 0;
|
||||||
var delete_url = $('#tree').data('del-url');
|
var delete_url = $('#tree').data('del-url');
|
||||||
var class_name = $('#data-list-'+pid).attr('class') || '';
|
var class_name = $('#data-list-'+pid).attr('class') || '';
|
||||||
class_name = class_name.replace('tree-change-item', '').replace('am-active', '');
|
class_name = class_name.replace('am-active', '');
|
||||||
var popup_tag = $('#tree').data('popup-tag') || ''+popup_tag+'';
|
var popup_tag = $('#tree').data('popup-tag') || ''+popup_tag+'';
|
||||||
|
|
||||||
// 数据 start
|
// 数据 start
|
||||||
|
|
@ -3233,7 +3233,7 @@ $(function()
|
||||||
// 是否限制数量
|
// 是否限制数量
|
||||||
if(max_number > 0 && $tag.find('li').length >= max_number)
|
if(max_number > 0 && $tag.find('li').length >= max_number)
|
||||||
{
|
{
|
||||||
var temp_msg = upload_video_max_tips || '最多上传{value}个视频';
|
var temp_msg = window['lang_upload_video_max_tips'] || '最多上传{value}个视频';
|
||||||
Prompt(temp_msg.replace('{value}', max_number));
|
Prompt(temp_msg.replace('{value}', max_number));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -3282,7 +3282,7 @@ $(function()
|
||||||
// 是否限制数量
|
// 是否限制数量
|
||||||
if(max_number > 0 && $tag.find('li').length >= max_number)
|
if(max_number > 0 && $tag.find('li').length >= max_number)
|
||||||
{
|
{
|
||||||
var temp_msg = upload_annex_max_tips || '最多上传{value}个附件';
|
var temp_msg = window['lang_upload_annex_max_tips'] || '最多上传{value}个附件';
|
||||||
Prompt(temp_msg.replace('{value}', max_number));
|
Prompt(temp_msg.replace('{value}', max_number));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9062,7 +9062,6 @@ TODO:
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
width: 270px;
|
width: 270px;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
border-radius: 0;
|
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
/*@media @large-up {
|
/*@media @large-up {
|
||||||
width: @modal-lg;
|
width: @modal-lg;
|
||||||
|
|
@ -9159,7 +9158,6 @@ TODO:
|
||||||
border-left: 1px solid #dedede;
|
border-left: 1px solid #dedede;
|
||||||
}
|
}
|
||||||
.am-modal-no-btn .am-modal-dialog {
|
.am-modal-no-btn .am-modal-dialog {
|
||||||
border-radius: 0;
|
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
.am-modal-no-btn .am-modal-bd {
|
.am-modal-no-btn .am-modal-bd {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue