Coupon.php
984 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?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(){
}
}