Commit 7f874038 authored by clone's avatar clone

前端js请求

parent d12e1cf1
<?php
//配置文件
error_reporting(E_ERROR | E_PARSE);
define('IMG_PATH','https://admin.tonglianjituan.com/houseImg/');
define('PAGESIZE', 15); //分页每页条数
return [
'jwt_key' => 'tonglian+123',
......
......@@ -48,11 +48,8 @@ class Basic extends Controller
ob_end_flush();
ob_end_clean();
ob_get_contents();*/
// CORS 跨域 Options 检测响应
$this->corsOptionsHandler();
// 输入对象
$this->request = is_null($request) ? Request::instance() : $request;
......@@ -65,7 +62,7 @@ class Basic extends Controller
$this->params = $this->request->param() != null ? $this->request->param() : null;
}
/*
if (!isset($this->params['AuthToken'])) {
echo json_encode(array( "code" => "101", "msg" => "AuthToken不能为空!", "data" => [], "type" => "json" ));
exit;
......@@ -78,7 +75,7 @@ class Basic extends Controller
$this->user_nick = $result->data->user_nick;
$this->timeStamp_ = $result->timeStamp_;
$this->verifyTime();
$this->verifyTime();*/
}
......
......@@ -3,6 +3,7 @@ namespace app\app\controller;
use app\model\HouseImgs;
use app\model\HouseInfos;
use think\Controller;
use think\Response;
class Index
......@@ -31,7 +32,7 @@ class Index
*/
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,
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";
......
......@@ -8,6 +8,8 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
define('IMG_PATH','https://admin.tonglianjituan.com/houseImg/');
return [
// +----------------------------------------------------------------------
// | 应用设置
......
......@@ -43,7 +43,7 @@ Route::rule(['/city/:name' => 'error/index'] , '' ,'GET');*/
Route::group('app', [
'index' => [ 'app/index/index', [ '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 @@
_id=theRequest.id;
realname=theRequest.housename;
$.ajax({
url: "/app.index/index/getShopDetail",
url: "/app.php/app/getShopDetails",
data: {
"id":_id,
"version":"1.0"
"id":1
},
type: "POST",
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