作者 sgj
1 个管道 的构建 失败 耗费 0 秒

志愿者修改

... ... @@ -587,6 +587,7 @@ class SecondController extends RestBaseController
public function goodsList(){
$goodModel=new GoodsModel();
$map['is_online']=1;
$map['delete_time']=null;
$goods=$goodModel->where($map)->order('id desc')->paginate(10,true);
$list=$goods->items();
foreach ($list as $k=>$v){
... ...
... ... @@ -115,4 +115,16 @@ class GoodController extends AdminBaseController
}
}
public function online(){
$id=input('id');
$update['is_online']=input('status');
$result=db('goods')->where('id',$id)->update($update);
if ($result){
$this->success('操作成功!');
}else{
$this->error('操作失败!');
}
}
}
\ No newline at end of file
... ...
... ... @@ -117,6 +117,28 @@ onclick="imagePreviewDialog(this.src);">
</tr>
<tr>
<th><b>销量</b></th>
</tr>
<tr>
<td>
<input class="form-control" type="number" name="seal_num"
value="">
</td>
</tr>
<tr>
<th><b>库存</b></th>
</tr>
<tr>
<td>
<input class="form-control" type="number" name="num"
value="">
</td>
</tr>
</table>
</div>
... ...
... ... @@ -138,6 +138,26 @@ onclick="imagePreviewDialog(this.src);">
</td>
</tr>
<tr>
<th><b>销量</b></th>
</tr>
<tr>
<td>
<input class="form-control" type="number" name="seal_num"
value="{$data.seal_num}">
</td>
</tr>
<tr>
<th><b>库存</b></th>
</tr>
<tr>
<td>
<input class="form-control" type="number" name="num"
value="{$data.num}">
</td>
</tr>
</table>
... ...