|
@@ -46,16 +46,28 @@
|
|
|
$gift = Gift::get(new MongoId($coupon->gift_id));
|
|
|
$data['gift'] = $gift;
|
|
|
$data['record'] = $record;
|
|
|
- CommonSMS::send('jrecord_d', array(
|
|
|
- 'name' => $name,
|
|
|
- 'year' => date('Y',$record->time),
|
|
|
- 'month' => date('m',$record->time),
|
|
|
- 'day' => date('d',$record->time),
|
|
|
- 'phone' => Yii::app()->params['xyhGiftNumber'],
|
|
|
- 'product' => $gift->title,
|
|
|
- 'date' => Yii::app()->params['xyhGiftDate'],
|
|
|
- 'mobile' => $mobile,
|
|
|
- ));
|
|
|
+ if ($gift->type == 0 ) {
|
|
|
+ CommonSMS::send('jrecord_d', array(
|
|
|
+ 'name' => $name,
|
|
|
+ 'year' => date('Y',$record->time),
|
|
|
+ 'month' => date('m',$record->time),
|
|
|
+ 'day' => date('d',$record->time),
|
|
|
+ 'phone' => Yii::app()->params['xyhGiftNumber'],
|
|
|
+ 'product' => $gift->title,
|
|
|
+ 'date' => Yii::app()->params['xyhGiftDate'],
|
|
|
+ 'mobile' => $mobile,
|
|
|
+ ));
|
|
|
+ } else if ($gift->type == 1) {
|
|
|
+ CommonSMS::send('jrecord_d1', array(
|
|
|
+ 'name' => $name,
|
|
|
+ 'year' => date('Y',$record->time),
|
|
|
+ 'month' => date('m',$record->time),
|
|
|
+ 'day' => date('d',$record->time),
|
|
|
+ 'phone' => Yii::app()->params['xyhGiftNumber'],
|
|
|
+ 'product' => $gift->title,
|
|
|
+ 'mobile' => $mobile,
|
|
|
+ ));
|
|
|
+ }
|
|
|
|
|
|
CommonFn::requestAjax(true,'生成成功',$data);exit;
|
|
|
}
|