58 lines
1.6 KiB
PHP
58 lines
1.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @author Any
|
|
* @description KISS
|
|
* @date 2021年10月13日
|
|
* @version 1.0.0
|
|
*
|
|
* _____LOG_____
|
|
*
|
|
*/
|
|
namespace app\modules\api\controllers\mall\integral;
|
|
|
|
use app\modules\api\behaviors\LoginBehavior;
|
|
use app\models\common\integral\mall\CommonIntegralMallActionForm;
|
|
use app\models\common\integral\mall\CommonIntegralMallGoodsListForm;
|
|
use app\models\Goods;
|
|
use app\modules\api\controllers\Controller;
|
|
use app\components\SysConst;
|
|
|
|
class DefaultController extends Controller
|
|
{
|
|
public function behaviors() {
|
|
return array_merge(parent::behaviors(),[
|
|
'login' => [
|
|
'class' => LoginBehavior::className(),
|
|
'ignore' => [
|
|
]
|
|
]
|
|
]);
|
|
}
|
|
|
|
|
|
/**
|
|
* showdoc
|
|
* @catalog 积分商城
|
|
* @title 商城首页
|
|
* @description 本接口提供积分商城首页数据
|
|
* @method get
|
|
* @url /api/mall/integral/default/index
|
|
* @param param 必选 param_type param_desc
|
|
* @return {"code":0,"msg":"ok","data":{"account_integral":0,"account_total_integral":0,"cat_list":[{"id":"8","name":"生鲜","parent_id":"0"},{"id":"7","name":"支付","parent_id":"0"}]}}
|
|
* @return_param account_integral int 账户积分
|
|
* @return_param account_total_integral int 账户累计积分
|
|
* @remark
|
|
*/
|
|
public function actionIndex()
|
|
{
|
|
$form = new CommonIntegralMallActionForm();
|
|
$form->scenario = 'index';
|
|
$form->cx_mch_id = $this->cx_mch_id;
|
|
$form->user_id = \Yii::$app->user->identity->id;
|
|
$data = $form->getIndex();
|
|
return $this->responseHandler($data);
|
|
}
|
|
}
|
|
|