作者 刘朕
1 个管道 的构建 通过 耗费 22 秒

合并分支 'Branch_liuzhen' 到 'master'

Branch liuzhen



查看合并请求 !51
... ... @@ -103,9 +103,8 @@ class Store extends Backend
$params = $this->request->post("row/a");
if ($params) {
$params = $this->preExcludeFields($params);
if(!empty($params['province_ids'])){
$params['province_ids'] = ','.$params['province_ids'].',';
}
$params['property'] = implode(',',$params['property']);
$params['province_ids'] = ','.$params['province_ids'].',';
$result = false;
Db::startTrans();
try {
... ...
... ... @@ -152,9 +152,9 @@ class Viporder extends Backend
$store['address'] = $params['address'];//店铺店址
$store['lng'] = $params['lng'];//经度
$store['lat'] = $params['lat'];//纬度
$store['province_id'] = $params['province_id'];//省份
$store['city_id'] = $params['city_id'];//城市
$store['county_id'] = $params['county_id'];//区/县
// $store['province_id'] = $params['province_id'];//省份
// $store['city_id'] = $params['city_id'];//城市
// $store['county_id'] = $params['county_id'];//区/县
$store['viptype'] = $row['vip_type'];//店铺会员类型(1普通会员2超级会员)
$store['province_ids'] = $row['province_ids'];//开通会员的省份id
// $store['expiration'] = $viporder['expirationtime'];//会员到期时间
... ...
... ... @@ -180,7 +180,7 @@ class Admin extends Backend
$adminValidate = \think\Loader::validate('Admin');
$adminValidate->rule([
'username' => 'require|regex:\w{3,12}|unique:admin,username,' . $row->id,
'email' => 'require|email|unique:admin,email,' . $row->id,
// 'email' => 'require|email|unique:admin,email,' . $row->id,
'password' => 'regex:\S{32}',
]);
$result = $row->validate('Admin.edit')->save($params);
... ...
... ... @@ -34,7 +34,7 @@ class Admin extends Validate
*/
protected $scene = [
'add' => ['username', 'email', 'nickname', 'password'],
'edit' => ['username', 'email', 'nickname', 'password'],
'edit' => ['username', 'nickname', 'password'],
];
public function __construct(array $rules = [], $message = [], $field = [])
... ...
<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
{:token()}
<!--<div class="form-group">-->
<!--<label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>-->
<!--<div class="col-xs-12 col-sm-8">-->
<!--{:build_select('group[]', $groupdata, $groupids, ['class'=>'form-control selectpicker', 'multiple'=>'', 'data-rule'=>'required'])}-->
<!--</div>-->
<!--</div>-->
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_select('group[]', $groupdata, $groupids, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
</div>
</div>
<div class="form-group">
<label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
<div class="col-xs-12 col-sm-8">
... ... @@ -15,7 +15,7 @@
<div class="form-group">
<label for="username" class="control-label col-xs-12 col-sm-2">{:__('密码')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="pwd" name="row[pwd]" value="{$row.pwd|htmlentities}" data-rule="required;pwd" />
<input type="text" class="form-control" id="pwd" name="row[password]" value="{$row.pwd|htmlentities}" data-rule="required;pwd" />
</div>
</div>
<!--<div class="form-group">-->
... ...
... ... @@ -22,7 +22,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('店铺属性')}:</label>
<div class="col-xs-12 col-sm-8">
{:Form::checkboxs('row[property]', ['供货商'=>'供货商', '一级代理'=>'一级代理','厂家直销'=>'厂家直销'],['data-rule'=>'required'])}
{:Form::checkboxs('row[property]', ['供货商'=>'供货商', '一级代理'=>'一级代理','厂家直销'=>'厂家直销'],$row.property,['data-rule'=>'required'])}
</div>
</div>
<div class="form-group">
... ...
... ... @@ -111,24 +111,24 @@
<input id="c-phone" class="form-control" name="row[phone]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('省份')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-province_id" data-rule="required" data-order-by="id asc" data-params='{"custom[level]":"1"}' data-source="area/index" class="form-control selectpage" name="row[province_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('城市')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-city_id" data-rule="required" data-order-by="id asc" data-params='{"custom[level]":"2"}' data-source="area/index" class="form-control selectpage" name="row[city_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('区/县')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-county_id" data-rule="required" data-order-by="id asc" data-params='{"custom[level]":"3"}' data-source="area/index" class="form-control selectpage" name="row[county_id]" type="text" value="">
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('省份')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-province_id" data-rule="required" data-order-by="id asc" data-params='{"custom[level]":"1"}' data-source="area/index" class="form-control selectpage" name="row[province_id]" type="text" value="">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('城市')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-city_id" data-rule="required" data-order-by="id asc" data-params='{"custom[level]":"2"}' data-source="area/index" class="form-control selectpage" name="row[city_id]" type="text" value="">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('区/县')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-county_id" data-rule="required" data-order-by="id asc" data-params='{"custom[level]":"3"}' data-source="area/index" class="form-control selectpage" name="row[county_id]" type="text" value="">-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group address">
<label class="control-label col-xs-12 col-sm-2">{:__('详细地址')}:</label>
<div class="col-xs-12 col-sm-8">
... ...