作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

修改问题文档

... ... @@ -58,6 +58,7 @@ class Profile extends Backend
if ($this->request->isPost()) {
$this->token();
$params = $this->request->post("row/a");
$name = $params['name'];
$money = $params['money'];
$freight = $params['freight'];
$phone = $params['phone'];
... ... @@ -91,7 +92,7 @@ class Profile extends Backend
Session::set("admin", $admin->toArray());
$store_id = Db::name('admin')->where(['id'=>$this->auth->id])->value('store_id');
if(!empty($store_id)){
echo Db::name('store')->where(['id'=>$store_id])->update(['money'=>$money,'freight'=>$freight,'phone'=>$phone,'address'=>$address,'lng'=>$lng,'lat'=>$lat,'content'=>$content]);
echo Db::name('store')->where(['id'=>$store_id])->update(['name'=>$name,'money'=>$money,'freight'=>$freight,'phone'=>$phone,'address'=>$address,'lng'=>$lng,'lat'=>$lat,'content'=>$content]);
}
$this->success();
}
... ...
... ... @@ -77,6 +77,10 @@
</div>
{notempty name="$admin.store_id"}
<div class="form-group">
<label class="control-label">{:__('店铺名称')}:</label>
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
</div>
<div class="form-group">
<label class="control-label">{:__('满免运费价格')}:</label>
<input id="c-money" data-rule="required" class="form-control" name="row[money]" type="text" value="{$row.money|htmlentities}">
</div>
... ...