Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
a4b8aa8b
Commit
a4b8aa8b
authored
Dec 24, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分页和bug
parent
00a1a03a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
40 additions
and
30 deletions
+40
-30
AttentionShop.php
application/api/controller/AttentionShop.php
+12
-7
Shop.php
application/api/controller/Shop.php
+4
-3
TradeLog.php
application/api/controller/TradeLog.php
+5
-4
Basic.php
application/api/extend/Basic.php
+1
-1
footer_tpl.html
application/index/view/global/footer_tpl.html
+2
-2
AttentionModel.php
application/model/AttentionModel.php
+10
-8
Evaluate.php
application/model/Evaluate.php
+1
-1
main.js
public/resource/js/main.js
+2
-2
transfer.js
public/resource/js/transfer.js
+3
-1
zw.pagination.js
public/resource/lib/js/zw.pagination.js
+0
-1
No files found.
application/api/controller/AttentionShop.php
View file @
a4b8aa8b
...
@@ -34,16 +34,21 @@ class AttentionShop extends Basic
...
@@ -34,16 +34,21 @@ class AttentionShop extends Basic
public
function
addOrUpdateAttention
()
public
function
addOrUpdateAttention
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*
$params = array(
/*
$params = array(
// "id" => 2,
// "id" => 2,
"user_id" => 3
,
"user_id" => 4
,
"house_id" => 2,
"house_id" => 2,
// "is_del" => 0
// "is_del" => 0
);*/
);*/
$msg
=
isset
(
$params
[
'id'
])
?
"修改"
:
"新增"
;
$msg
=
isset
(
$params
[
'id'
])
?
"修改"
:
"新增"
;
$result
=
$this
->
attentionModel
->
addOrUpdateAttentionShop
(
$params
);
$result
=
$this
->
attentionModel
->
addOrUpdateAttentionShop
(
$params
);
if
(
$result
[
'code'
]
==
200
)
{
if
(
$result
[
'code'
]
==
200
)
{
return
$this
->
response
(
"200"
,
$msg
.
"成功"
,
$result
[
"msg"
]);
$arr
=
array
(
"isAdd"
=>
isset
(
$params
[
'id'
])
?
false
:
true
,
"id"
=>
$result
[
"msg"
]
);
return
$this
->
response
(
"200"
,
$msg
.
"成功"
,
$arr
);
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
$msg
.
$result
[
"msg"
]);
return
$this
->
response
(
"101"
,
$msg
.
$result
[
"msg"
]);
}
}
...
...
application/api/controller/Shop.php
View file @
a4b8aa8b
...
@@ -197,7 +197,10 @@ class Shop extends Basic
...
@@ -197,7 +197,10 @@ class Shop extends Basic
$cityList
=
$this
->
db
->
getCityList
(
$field
,
$param
,
$group_
);
$cityList
=
$this
->
db
->
getCityList
(
$field
,
$param
,
$group_
);
foreach
(
$cityList
as
$k
=>
$v
)
{
foreach
(
$cityList
as
$k
=>
$v
)
{
$cityArr
[]
=
$v
[
"city"
];
if
(
!
empty
(
$v
[
"city"
]))
{
$cityArr
[]
=
$v
[
"city"
];
}
}
}
$cityArr
=
array_unique
(
$cityArr
);
$cityArr
=
array_unique
(
$cityArr
);
$i
=
0
;
$i
=
0
;
...
@@ -233,7 +236,6 @@ class Shop extends Basic
...
@@ -233,7 +236,6 @@ class Shop extends Basic
}
}
}
}
}
}
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
}
}
}
\ No newline at end of file
application/api/controller/TradeLog.php
View file @
a4b8aa8b
...
@@ -39,12 +39,13 @@ class TradeLog extends Basic
...
@@ -39,12 +39,13 @@ class TradeLog extends Basic
public
function
getTradeList
()
public
function
getTradeList
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$param
=
array
(
/* $params
= array(
"user_id" => "1",
"user_id" => "1",
"phone" => "158****6165",
"phone" => "158****6165",
"pageNo" => 1,
"pageNo" => 1,
"pageSize" => 15,
"pageSize" => 15,
);
);*/
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
...
@@ -52,7 +53,7 @@ class TradeLog extends Basic
...
@@ -52,7 +53,7 @@ class TradeLog extends Basic
$field
=
"a.id,a.tradecode,a.singntime,b.phpone,b.house_id,b.agent_id"
;
$field
=
"a.id,a.tradecode,a.singntime,b.phpone,b.house_id,b.agent_id"
;
$result
=
$this
->
journalAccountsMode
->
getJournalAccountsList
(
$pageNo
,
$pageSize
,
$order_
,
$field
,
$param
);
$result
=
$this
->
journalAccountsMode
->
getJournalAccountsList
(
$pageNo
,
$pageSize
,
$order_
,
$field
,
$param
s
);
if
(
count
(
$result
)
<=
0
)
{
if
(
count
(
$result
)
<=
0
)
{
return
$this
->
response
(
"200"
,
"请求数据为空"
);
return
$this
->
response
(
"200"
,
"请求数据为空"
);
}
}
...
@@ -64,7 +65,7 @@ class TradeLog extends Basic
...
@@ -64,7 +65,7 @@ class TradeLog extends Basic
$imgParam
[
"house_id"
]
=
$val
[
"house_id"
];
$imgParam
[
"house_id"
]
=
$val
[
"house_id"
];
$imgParam
[
"imgtype"
]
=
1
;
//默认主图
$imgParam
[
"imgtype"
]
=
1
;
//默认主图
$result
[
$key
][
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$imgParam
,
1
);
$result
[
$key
][
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$imgParam
,
1
);
$evaluateResult
=
$this
->
evaluateMode
->
getIsEvaluate
(
20
,
$val
[
"
house_id"
],
$param
[
"user_id"
]);
$evaluateResult
=
$this
->
evaluateMode
->
getIsEvaluate
(
20
,
$val
[
"
id"
],
$params
[
"user_id"
]);
$result
[
$key
][
"is_evaluate"
]
=
count
(
$evaluateResult
)
>
0
?
1
:
0
;
$result
[
$key
][
"is_evaluate"
]
=
count
(
$evaluateResult
)
>
0
?
1
:
0
;
}
}
return
$this
->
response
(
"200"
,
"request"
,
$result
);
return
$this
->
response
(
"200"
,
"request"
,
$result
);
...
...
application/api/extend/Basic.php
View file @
a4b8aa8b
...
@@ -79,7 +79,7 @@ class Basic extends Controller
...
@@ -79,7 +79,7 @@ class Basic extends Controller
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
//过滤掉不需要验证token的接口
//过滤掉不需要验证token的接口
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
$this
->
tokenVerify
();
//
$this->tokenVerify();
}
}
}
}
...
...
application/index/view/global/footer_tpl.html
View file @
a4b8aa8b
<script
src=
'/resource/lib/js/require.min.js'
data-main=
'/resource/js/main?version=1'
charset=
'utf-8'
></script>
<script
src=
'/resource/lib/js/require.min.js'
data-main=
'/resource/js/main?version=1111122'
charset=
'utf-8'
></script>
\ No newline at end of file
\ No newline at end of file
application/model/AttentionModel.php
View file @
a4b8aa8b
...
@@ -55,19 +55,21 @@ class AttentionModel extends Model
...
@@ -55,19 +55,21 @@ class AttentionModel extends Model
if
(
count
(
$res
)
>
0
)
{
if
(
count
(
$res
)
>
0
)
{
$saveWhere
[
"id"
]
=
$res
[
0
][
"id"
];
$saveWhere
[
"id"
]
=
$res
[
0
][
"id"
];
$arr
[
"is_del"
]
=
0
;
$arr
[
"is_del"
]
=
0
;
}
else
{
$id
=
$res
[
0
][
"id"
];
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
}
else
{
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
}
}
}
}
Db
::
startTrans
();
Db
::
startTrans
();
try
{
try
{
if
(
isset
(
$saveWhere
[
"id"
])){
if
(
isset
(
$saveWhere
[
"id"
]))
{
$id
=
$this
->
save
(
$arr
,
$saveWhere
);
$this
->
save
(
$arr
,
$saveWhere
);
}
else
{
}
else
{
$id
=
$this
->
save
(
$arr
);
$this
->
save
(
$arr
);
$id
=
$this
->
id
;
}
}
$id
=
isset
(
$id
)
?
$id
:
$params
[
"id"
];
Db
::
commit
();
Db
::
commit
();
return
[
"code"
=>
"200"
,
"msg"
=>
$id
];
return
[
"code"
=>
"200"
,
"msg"
=>
$id
];
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
...
...
application/model/Evaluate.php
View file @
a4b8aa8b
...
@@ -79,7 +79,7 @@ class Evaluate extends Model
...
@@ -79,7 +79,7 @@ class Evaluate extends Model
* @param $userId
* @param $userId
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
*/
*/
public
function
getIsEvaluate
(
$source
=
20
,
$recordId
,
$userId
){
public
function
getIsEvaluate
(
$source
,
$recordId
,
$userId
){
$params
[
"source"
]
=
$source
;
$params
[
"source"
]
=
$source
;
$params
[
"record_id"
]
=
$recordId
;
$params
[
"record_id"
]
=
$recordId
;
$params
[
"user_id"
]
=
$userId
;
$params
[
"user_id"
]
=
$userId
;
...
...
public/resource/js/main.js
View file @
a4b8aa8b
...
@@ -36,7 +36,7 @@ require.config ({
...
@@ -36,7 +36,7 @@ require.config ({
'exports'
:
'datetimepicker'
'exports'
:
'datetimepicker'
},
},
'pagination'
:
{
'pagination'
:
{
'exports'
:
'
pagination
'
'exports'
:
'
jquery
'
}
}
},
},
'map'
:
{
'map'
:
{
...
@@ -48,4 +48,4 @@ require.config ({
...
@@ -48,4 +48,4 @@ require.config ({
}
}
});
});
require
([
'require'
,
'jquery'
,
'doT'
,
'app/public'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
,
"paginationStart"
]);
require
([
'require'
,
'jquery'
,
'doT'
,
'app/public'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
]);
public/resource/js/transfer.js
View file @
a4b8aa8b
define
([
'doT'
,
'text!temp/transfer_template_tpl.html'
,
'css!style/home.css'
],
function
(
doT
,
template
)
{
define
([
'doT'
,
'text!temp/transfer_template_tpl.html'
,
'css!style/home.css'
,
'paginationStart'
],
function
(
doT
,
template
)
{
user
=
{
user
=
{
pageNo
:
1
,
/*第几页*/
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
pageSize
:
10
,
/*每页显示多少条*/
...
@@ -110,6 +110,8 @@ define (['doT', 'text!temp/transfer_template_tpl.html', 'css!style/home.css'], f
...
@@ -110,6 +110,8 @@ define (['doT', 'text!temp/transfer_template_tpl.html', 'css!style/home.css'], f
user.getList (el.num.current);
user.getList (el.num.current);
}
}
});*/
});*/
pagination_pages
=
Math
.
ceil
(
data
.
data
.
total
/
user
.
pageSize
);
pagination_totals
=
data
.
data
.
total
;
addpage
(
user
.
getList
);
addpage
(
user
.
getList
);
}
}
});
});
...
...
public/resource/lib/js/zw.pagination.js
View file @
a4b8aa8b
...
@@ -7,7 +7,6 @@ var pagination_totals = 0; //总条数
...
@@ -7,7 +7,6 @@ var pagination_totals = 0; //总条数
var
pagination_pagesize
=
15
;
//每页显示多少条
var
pagination_pagesize
=
15
;
//每页显示多少条
function
addpage
(
methodName
)
{
function
addpage
(
methodName
)
{
alert
(
111111111
);
if
(
pagination_page_no
>
pagination_pages
)
pagination_page_no
=
pagination_pages
;
if
(
pagination_page_no
>
pagination_pages
)
pagination_page_no
=
pagination_pages
;
$
(
'.pageinfo'
).
pagination
({
$
(
'.pageinfo'
).
pagination
({
pages
:
pagination_pages
,
//总页数
pages
:
pagination_pages
,
//总页数
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment