| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\modules\client\controllers\v1\alipay;
- use app\modules\client\models\v1\alipay\AuthForm;
- use yii\base\BaseObject;
- use app\models\Option;
- use app\constants\OptionSetting;
- use app\modules\admin\models\alipay\Voucher;
- use app\modules\admin\models\CouponForm;
- use \app\models\AlipayAcitvityVoucherOrder;
- class VoucherController extends BaseController
- {
- public function actionIndex() {
- $form = new Voucher();
- $form->mini_id = get_mini_id();
- $form->store_id = get_store_id();
- $form->page = post_params('page', 1);
- $userId = get_user()->alipay_open_id;
- $res = $form->listCanSendByUser($userId);
- return $this->asJson($res);
- }
- public function actionClerk() {
- $form = new \app\modules\admin\models\alipay\Ordervoucher();
- $form->mini_id = get_mini_id();
- $form->store_id = get_store_id();
- $form->user_id = get_user_id();
- $total_price = post_params('total_price', 100);
- $ov = post_params('ov', '');
- $submit = post_params('submit', 1);
- $res = $form->use($submit, $ov, $total_price);
- return $this->asJson($res);
- }
- }
|