| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- /**
- * CouponController.php
- * todo 文件描述
- * Created on 2024/12/4 下午2:24
- * @author: hankaige
- */
- namespace app\modules\client\controllers\v1\cashier;
- use app\modules\client\models\v1\cashier\CouponFrom;
- class CouponController extends BaseController
- {
- public function actionGetCouponList(): \yii\web\response
- {
- $form = new CouponFrom();
- $form->store_id = $this->store_id;
- $form->scenario = $form::COUPON_LIST;
- $form->attributes = get_params();
- return $this->asJson($form->couponList());
- }
- public function actionSendCoupon(): \yii\web\response
- {
- $form = new CouponFrom();
- $form->store_id = $this->store_id;
- $form->md_id = $this->md_id;
- $form->scenario = $form::COUPON_SEND;
- $form->attributes = post_params();
- return $this->asJson($form->sendCoupon());
- }
- }
|