| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\modules\alliance\controllers;
- use app\modules\alliance\controllers\BaseController;
- use app\modules\alliance\models\VerifyIndexForm;
- class VerifyController extends BaseController
- {
- /**
- * 卡券领取
- */
- public function actionReceive() {
- $form = new VerifyIndexForm();
- $form->attributes = get_params();
- $form->verify_card_id = get_params('id');
- return $this->asJson($form->receive());
- }
- /**
- * 我的核销卡列表
- */
- public function actionIndex()
- {
- /**
- * 有效卡数量
- * 核销卡id
- * 核销卡名称
- * 剩余次数
- * 有效期
- */
- $form = new VerifyIndexForm();
- $form->attributes = get_params();
- $form->store_id = get_store_id();
- $form->user_id = 0;
- $form->saas_id = get_saas_user_id();
- return $this->asJson($form->search());
- }
- /**
- * 核销卡使用记录页
- */
- public function actionVerifyLog(){
- $form = new VerifyIndexForm();
- $form->attributes = get_params();
- $form->store_id = get_store_id();
- $form->user_id = 0;
- $form->saas_id = get_saas_user_id();
- return $this->asJson($form->log());
- }
- /**
- * 核销卡详情页
- */
- public function actionVerifyDetail(){
- $form = new VerifyIndexForm();
- $form->attributes = get_params();
- $form->store_id = get_store_id();
- $form->user_id = 0;
- $form->saas_id = get_saas_user_id();
- $form->sale_id = get_params('sale_id');
- return $this->asJson($form->detail());
- }
- /**
- * 删除个人卡券
- */
- public function actionDel() {
- $form = new VerifyIndexForm();
- $form->attributes = get_params();
- $form->store_id = get_store_id();
- $form->user_id = 0;
- $form->saas_id = get_saas_user_id();
- $form->id = get_params('id');
- return $this->asJson($form->delVerifyCard());
- }
- /**
- * 获取核销记录
- */
- public function actionVerifyMdLog()
- {
- $form = new VerifyIndexForm();
- $form->attributes = get_params();
- $form->store_id = get_store_id();
- $form->user_id = get_user_id();
- $form->sale_id =get_params('sale_id');
- return $this->asJson($form->getVerifyLog());
- }
- }
|