Coupon.php 984 字节
<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;

/**
 * 首页接口
 */
class Coupon extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];
    public function _initialize()
    {
        parent::_initialize();
        $this->auth->id = 1;//测试用
        $postParam = $this->request->param();
        $this->postParam = $postParam;
        if (empty($postParam['code'])) {
            $this->error("门店code异常");
        }
        $this->store_id = $postParam['code'];
        $store = Db::name("verification_store")->where("id", $this->store_id)->find();
        if (empty($store)) {
            $this->error("门店不存在,请退出登录后重试!");
        }
        $this->store = $store;
    }
    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }

    /**
     * 1、获取活动
     */
    public function getactivity(){

    }
}