Commit dac1d434 authored by clone's avatar clone

token校验

parent 1dcd11fa
......@@ -95,7 +95,7 @@ class Shop extends Basic
if (isset($params['money_start']) && isset($params['money_end'])) { //面积
$conditions['price'] = array( 'between', array( $params['money_start'], $params['money_end'] ) );
} else if (isset($params['money_start']) && !isset($params['money_end'])) { //100米以上不用传结束面积
} else if (isset($params['money_start']) && !isset($params['money_end'])) {
$conditions['price'] = array( 'egt', $params['money_start'] );
}
......
......@@ -65,8 +65,7 @@ class Basic extends Controller
} elseif (strtoupper($this->request->method()) === "POST") {
$this->params = $this->request->param() != null ? $this->request->param() : null;
}
$requestPath = $this->request->path();
$requestPath = $this->request->routeInfo()["rule"][0]."/".$this->request->routeInfo()["rule"][1];
//过滤掉不需要验证token的接口
if (!in_array(trim($requestPath), $this->filterVerify)) {
$this->tokenVerify();
......@@ -106,7 +105,6 @@ class Basic extends Controller
public function verifyUserInfo()
{
//todo 待完成
$userModel = new Users();
$userArr = $userModel->selectUser($this->userId);
if (count($userArr) > 0 && ($userArr["id"] != $this->userId || $userArr["user_phone"] != $this->phone)) {
......
<?php
namespace app\index\controller;
use app\model\BannerModel;
use think\Controller;
/**
* Created by PhpStorm.
* User : zw
......@@ -8,6 +12,68 @@ namespace app\index\controller;
* Time : 15:12
* Intro:
*/
class banner {
class banner
{
protected $bannerModel;
public function __construct()
{
// $this->bannerModel = new BannerModel();
}
public function index(){
echo 1111111111;exit;
}
/**
* 查询banner列表
* @return \think\Response
*/
public function getBannerList()
{
echo 111111111;exit;
return view("banner/banner");
/* $field = "id,title,pic_path,url,sort,is_show,create_time,update_time";
$params['is_show'] = array( "eq", 0 );
$result = $this->bannerModel
->getBannerList(1, 15, "sort desc", $field, $params);
return $this->response("200", "request success", $result);*/
}
/**
* 新增or修改数据
* @return \think\Response
*/
public function addOrSave()
{
/* $params = array(
"id" => 2,
"is_show" => 0
);
$msg = isset($params['id']) ? "修改" : "新增";
$result = $this->bannerModel->addOrUpdate($params);
if ($result['code'] == 200) {
return $this->response("200", $msg . "成功", $result["msg"]);
} else {
return $this->response("101", $msg . $result["msg"]);
}*/
}
/**
* 修改是否显示
* @return \think\Response
*/
public function upIsShow()
{
/* $params = array(
"id" => 1,
"is_show" => 1
);
$result = $this->bannerModel->upIsShow($params);
if ($result['code'] == 200) {
return $this->response("200", "update success", $result["msg"]);
} else {
return $this->response("101", "update error");
}*/
}
}
\ No newline at end of file
<?php
namespace app\index\controller\member;
/**
* Created by PhpStorm.
......@@ -7,25 +8,38 @@ namespace app\index\controller\member;
* Time: 下午1:03
*/
class Index {
public function member(){
return view('member/member',['title'=>'thinkphp']);
class Index
{
public function member()
{
return view('member/member', [ 'title' => 'thinkphp' ]);
//$this->response('100',array(),'json');
}
public function preview_list(){
public function preview_list()
{
return view('member/preview_list');
//$this->response('100',array(),'json');
}
public function entrust_list(){
public function entrust_list()
{
return view('member/entrust_list');
//$this->response('100',array(),'json');
}
public function consumer_list(){
public function consumer_list()
{
return view('member/consumer_list');
//$this->response('100',array(),'json');
}
public function diagram_list(){
public function diagram_list()
{
return view('member/diagram_list');
//$this->response('100',array(),'json');
}
public function index(){
echo 111;exit;
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -49,11 +49,12 @@ Route::group('app', [
Route::group('index', [
'member' => [ 'index/member.index/member', [ 'method' => 'get' ] ],
/* 'member' => [ 'index/member.index/member', [ 'method' => 'get' ] ],
'preview_list' => [ 'index/member.index/preview_list', [ 'method' => 'get' ] ],
'consumer_list' => [ 'index/member.index/consumer_list', [ 'method' => 'get' ] ],
'diagram_list' => [ 'index/member.index/diagram_list', [ 'method' => 'get' ] ],
'entrust_list' => [ 'index/member.index/entrust_list', [ 'method' => 'get' ] ]
'entrust_list' => [ 'index/member.index/entrust_list', [ 'method' => 'get' ] ],*/
'banner' => [ 'index/banner/index', [ 'method' => 'get' ] ],
]);
......@@ -71,9 +72,9 @@ Route::group('api', [
'appraiser' => [ 'api/broker/appraiser', [ 'method' => 'post' ] ], //评价经纪人
//get member
'logout' => ['api/member/logout',['method' => 'get']],
'inviteList/:id' => ['api/member/inviteList', ['method' => 'get']], //邀请记录
'qrCode' => ['api/member/qrCode', ['method' => 'get']], //邀请二维码
'logout' => [ 'api/member/logout', [ 'method' => 'get' ] ],
'inviteList/:id' => [ 'api/member/inviteList', [ 'method' => 'get' ] ], //邀请记录
'qrCode' => [ 'api/member/qrCode', [ 'method' => 'get' ] ], //邀请二维码
//post member
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment