|
@@ -18,7 +18,7 @@ class Userdecorate extends Api
|
|
|
*/
|
|
|
public function decorate_list()
|
|
|
{
|
|
|
- $type = input_post('type',2); // 类型:1=座驾,2=头饰,3=尾灯,4=气泡,5=关系卡,6=联盟道具
|
|
|
+ $type = input('type',2); // 类型:1=座驾,2=头饰,3=尾灯,4=气泡
|
|
|
|
|
|
// 获取基本信息
|
|
|
$where = [];
|
|
@@ -35,7 +35,7 @@ class Userdecorate extends Api
|
|
|
* 购买并加入我的背包
|
|
|
*/
|
|
|
public function buy_one() {
|
|
|
- $did = input_post('did',''); //装扮ID
|
|
|
+ $did = input('did',''); //装扮ID
|
|
|
if (!$did) {
|
|
|
$this->error();
|
|
|
}
|
|
@@ -47,7 +47,7 @@ class Userdecorate extends Api
|
|
|
if(!$decorate) {
|
|
|
$this->error("装扮信息获取失败!");
|
|
|
}
|
|
|
- if($walletinfo['gold'] < $decorate['price']) {
|
|
|
+ if($walletinfo['jewel'] < $decorate['price']) {
|
|
|
$this->error("您的金币不足,请先充值!");
|
|
|
}
|
|
|
// 进行购买逻辑
|
|
@@ -70,7 +70,7 @@ class Userdecorate extends Api
|
|
|
$this->error('购买失败');
|
|
|
}
|
|
|
|
|
|
- $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,$decorate['price'],'-',0,'购买装扮',31,'jewel');
|
|
|
+ $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,$decorate['price'],'-',0,'购买装扮',6,'jewel');
|
|
|
if($rs['status'] === false){
|
|
|
Db::rollback();
|
|
|
$this->error($rs['msg']);
|
|
@@ -85,7 +85,7 @@ class Userdecorate extends Api
|
|
|
public function my_decorate_list()
|
|
|
{
|
|
|
$uid = $this->auth->id;
|
|
|
- $type = input_post('type',2);
|
|
|
+ $type = input('type',2);
|
|
|
|
|
|
$map = [
|
|
|
'a.end_time' => ['gt',time()],
|
|
@@ -106,8 +106,8 @@ class Userdecorate extends Api
|
|
|
|
|
|
//获得某用户的某类型正在使用的装扮
|
|
|
public function get_user_onetype_decorate(){
|
|
|
- $uid = input_post('uid');
|
|
|
- $type = input_post('type',2);
|
|
|
+ $uid = input('uid');
|
|
|
+ $type = input('type',2);
|
|
|
|
|
|
if(!$uid){
|
|
|
$this->error();
|
|
@@ -132,7 +132,7 @@ class Userdecorate extends Api
|
|
|
//设置装扮
|
|
|
public function set_user_decorate()
|
|
|
{
|
|
|
- $did = input_post('did',''); //用户装扮ID
|
|
|
+ $did = input('did',''); //用户装扮ID
|
|
|
if (!$did) {
|
|
|
$this->error();
|
|
|
}
|
|
@@ -186,7 +186,7 @@ class Userdecorate extends Api
|
|
|
//取消装扮
|
|
|
public function cancel_user_decorate()
|
|
|
{
|
|
|
- $did = input_post('did',''); //装扮ID
|
|
|
+ $did = input('did',''); //装扮ID
|
|
|
if (!$did) {
|
|
|
$this->error();
|
|
|
}
|