|
@@ -53,7 +53,7 @@ class GiftController extends AdminController
|
|
|
$title = Yii::app()->request->getParam('title','');
|
|
|
$gift_num = Yii::app()->request->getParam('gift_num','');
|
|
|
$desc = Yii::app()->request->getParam('desc','');
|
|
|
- $type = Yii::app()->request->getParam('type','');
|
|
|
+ $type = (int)Yii::app()->request->getParam('type','');
|
|
|
$supplier = Yii::app()->request->getParam('supplier','');
|
|
|
if ($type == 100) {
|
|
|
CommonFn::requestAjax(false,'请选择礼包类型');exit;
|
|
@@ -71,7 +71,7 @@ class GiftController extends AdminController
|
|
|
$gift->gift_num = $gift_num;
|
|
|
$gift->desc = $desc;
|
|
|
$gift->supplier = $supplier;
|
|
|
- $gift->type = $type;
|
|
|
+ $gift->type = (int)$type;
|
|
|
$gift->save();
|
|
|
CommonFn::requestAjax(true,'保存成功');exit;
|
|
|
}
|
|
@@ -92,7 +92,7 @@ class GiftController extends AdminController
|
|
|
$gift->title = $title;
|
|
|
$gift->gift_num = $gift_num;
|
|
|
$gift->desc = $desc;
|
|
|
- $gift->type = $type;
|
|
|
+ $gift->type = (int)$type;
|
|
|
$gift->supplier = $supplier;
|
|
|
$gift->save();
|
|
|
CommonFn::requestAjax(true,'保存成功');exit;
|