标签:date else post upd fun evel update 直接 stat
//商城矿机设置
public function shop(){
if(!request()->isPost()){
return $this->fetch();
}else {
$mydata = input(‘post.‘);
$result = ‘0‘;
foreach ($mydata as $k=>$v){
$resulta = Db::name(‘btm_shop‘)
->where(‘id‘, $k)
->update([‘ags_level‘ => $v]);
//if结果=1直接赋值
if($resulta == 1){
$result = 1;
}
}
if($result == 1){
$data = [‘status‘=>1,‘msg‘=>‘矿机修改成功‘];
}else{
$data = [‘status‘=>0,‘msg‘=>‘矿机修改失败‘];
}
return json($data);
}
}
标签:date else post upd fun evel update 直接 stat
原文地址:https://www.cnblogs.com/vip-deng-vip/p/8830534.html