Commit 7f874038 authored by clone's avatar clone

前端js请求

parent d12e1cf1
<?php <?php
//配置文件 //配置文件
error_reporting(E_ERROR | E_PARSE); error_reporting(E_ERROR | E_PARSE);
define('IMG_PATH','https://admin.tonglianjituan.com/houseImg/');
define('PAGESIZE', 15); //分页每页条数 define('PAGESIZE', 15); //分页每页条数
return [ return [
'jwt_key' => 'tonglian+123', 'jwt_key' => 'tonglian+123',
......
...@@ -48,11 +48,8 @@ class Basic extends Controller ...@@ -48,11 +48,8 @@ class Basic extends Controller
ob_end_flush(); ob_end_flush();
ob_end_clean(); ob_end_clean();
ob_get_contents();*/ ob_get_contents();*/
// CORS 跨域 Options 检测响应 // CORS 跨域 Options 检测响应
$this->corsOptionsHandler(); $this->corsOptionsHandler();
// 输入对象 // 输入对象
$this->request = is_null($request) ? Request::instance() : $request; $this->request = is_null($request) ? Request::instance() : $request;
...@@ -65,7 +62,7 @@ class Basic extends Controller ...@@ -65,7 +62,7 @@ class Basic extends Controller
$this->params = $this->request->param() != null ? $this->request->param() : null; $this->params = $this->request->param() != null ? $this->request->param() : null;
} }
/*
if (!isset($this->params['AuthToken'])) { if (!isset($this->params['AuthToken'])) {
echo json_encode(array( "code" => "101", "msg" => "AuthToken不能为空!", "data" => [], "type" => "json" )); echo json_encode(array( "code" => "101", "msg" => "AuthToken不能为空!", "data" => [], "type" => "json" ));
exit; exit;
...@@ -78,7 +75,7 @@ class Basic extends Controller ...@@ -78,7 +75,7 @@ class Basic extends Controller
$this->user_nick = $result->data->user_nick; $this->user_nick = $result->data->user_nick;
$this->timeStamp_ = $result->timeStamp_; $this->timeStamp_ = $result->timeStamp_;
$this->verifyTime(); $this->verifyTime();*/
} }
......
...@@ -3,6 +3,7 @@ namespace app\app\controller; ...@@ -3,6 +3,7 @@ namespace app\app\controller;
use app\model\HouseImgs; use app\model\HouseImgs;
use app\model\HouseInfos; use app\model\HouseInfos;
use think\Controller;
use think\Response; use think\Response;
class Index class Index
...@@ -31,7 +32,7 @@ class Index ...@@ -31,7 +32,7 @@ class Index
*/ */
public function getShopDetail() public function getShopDetail()
{ {
$id = $_GET["id"]; $id = $_POST["id"];
$field = "id,management_fee,title,address,city,room_area,room_area2,business_area,disc,disccircles,sales,slotting_fee,transfer_fee, $field = "id,management_fee,title,address,city,room_area,room_area2,business_area,disc,disccircles,sales,slotting_fee,transfer_fee,
yetai,room_area2,shangpu_type,is_test,sellingpoint,singn_rule,business_date,start_business_date,opentime,has_gas,traffic, yetai,room_area2,shangpu_type,is_test,sellingpoint,singn_rule,business_date,start_business_date,opentime,has_gas,traffic,
room_num_left,room_num_total,shangpu_tags,carefully_chosen,price,dish,file_path"; room_num_left,room_num_total,shangpu_tags,carefully_chosen,price,dish,file_path";
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
define('IMG_PATH','https://admin.tonglianjituan.com/houseImg/');
return [ return [
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | 应用设置 // | 应用设置
......
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
* Time : 14:45 * Time : 14:45
* Intro: * Intro:
*/ */
define("AAA",123123); define("AAA",123123);
\ No newline at end of file
...@@ -43,7 +43,7 @@ Route::rule(['/city/:name' => 'error/index'] , '' ,'GET');*/ ...@@ -43,7 +43,7 @@ Route::rule(['/city/:name' => 'error/index'] , '' ,'GET');*/
Route::group('app', [ Route::group('app', [
'index' => [ 'app/index/index', [ 'method' => 'get' ] ], 'index' => [ 'app/index/index', [ 'method' => 'get' ] ],
'share_detail' => [ 'app/index/share_detail', [ 'method' => 'get' ] ], 'share_detail' => [ 'app/index/share_detail', [ 'method' => 'get' ] ],
'getShopDetail' => [ 'app/index/getShopDetail', [ 'method' => 'get' ] ], 'getShopDetails' => [ 'app/index/getShopDetail', [ 'method' => 'get | post' ] ],
]); ]);
......
...@@ -18,10 +18,9 @@ ...@@ -18,10 +18,9 @@
_id=theRequest.id; _id=theRequest.id;
realname=theRequest.housename; realname=theRequest.housename;
$.ajax({ $.ajax({
url: "/app.index/index/getShopDetail", url: "/app.php/app/getShopDetails",
data: { data: {
"id":_id, "id":1
"version":"1.0"
}, },
type: "POST", type: "POST",
dataType: "json", dataType: "json",
......
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