|
@@ -37,7 +37,7 @@ class Goldprice extends BaseController
|
|
|
if($type==""){
|
|
|
return error_show(1002,"参数type不能为空");
|
|
|
}
|
|
|
- $price = isset($this->post['price']) && $this->post['price'] !=="" ? intval($this->post['price']):"";
|
|
|
+ $price = isset($this->post['price']) && $this->post['price'] !=="" ? floatval($this->post['price']):"";
|
|
|
if($price==""){
|
|
|
return error_show(1002,"参数price不能为空");
|
|
|
}
|
|
@@ -133,7 +133,7 @@ class Goldprice extends BaseController
|
|
|
return error_show(1002,"参数status无效");
|
|
|
}
|
|
|
$info['status']=$status;
|
|
|
- $msg = $status==0?"启用":"禁用";
|
|
|
+ $msg = $status==1?"启用":"禁用";
|
|
|
$update = Db::name("gold_price1")->save($info);
|
|
|
return $update? error_show(0,"{$msg}成功"):error_show(1004,"{$msg}失败");
|
|
|
}
|
|
@@ -150,7 +150,7 @@ class Goldprice extends BaseController
|
|
|
if($type==""){
|
|
|
return error_show(1002,"参数type不能为空");
|
|
|
}
|
|
|
- $price = isset($this->post['price']) && $this->post['price'] !=="" ? intval($this->post['price']):"";
|
|
|
+ $price = isset($this->post['price']) && $this->post['price'] !=="" ? floatval($this->post['price']):"";
|
|
|
if($price==""){
|
|
|
return error_show(1002,"参数price不能为空");
|
|
|
}
|