Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
mark
8 years ago
Commit
ca3c8601e1295b80da3c5ecac6da3b5a747ddd9a
1 parent
5fb412d9
fixed consult length
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
apps/product/models/detail-comment-api.js
config/common.js
public/js/product/detail.page.js
apps/product/models/detail-comment-api.js
View file @
ca3c860
...
...
@@ -33,4 +33,3 @@ const getShareOrderListAsync = (pid, page, size, filterId) => {
module
.
exports
=
{
getShareOrderListAsync
};
...
...
config/common.js
View file @
ca3c860
...
...
@@ -20,11 +20,11 @@ module.exports = {
// test2
singleApi
:
'http://192.168.102.27:8092/brower'
,
api
:
'http://api-test3.yohops.com:9999/'
,
service
:
'http://service-test3.yohops.com:9999/'
,
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
//api: 'http://api.yoho.cn/',
//service: 'http://service.yoho.cn/',
api
:
'http://api.yoho.cn/'
,
service
:
'http://service.yoho.cn/'
,
// api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
...
...
public/js/product/detail.page.js
View file @
ca3c860
...
...
@@ -983,7 +983,8 @@ function loadComment() {
data
:
{
productId
:
id
,
page
:
nowPage
,
filterId
:
type
filterId
:
type
,
size
:
15
}
});
}
...
...
@@ -1023,13 +1024,14 @@ function loadComment() {
});
}
totalnum
=
Math
.
ceil
(
totalnum
/
1
0
)
*
20
;
totalnum
=
Math
.
ceil
(
totalnum
/
1
5
)
*
20
;
$ul
.
empty
().
append
(
commentsTpl
({
comments
:
res
}));
baseUrl
=
'/product/detail/comment?productId='
+
id
+
'&filterId=7'
;
if
(
totalnum
>
20
){
$ul
.
append
(
setPager
({
baseUrl
:
baseUrl
,
totalRecords
:
totalnum
,
...
...
@@ -1037,6 +1039,7 @@ function loadComment() {
type
:
'ellipsis'
,
theme
:
'msg-pager'
}));
}
}
}).
always
(
function
()
{
...
...
@@ -1145,7 +1148,8 @@ function loadConsult() {
url
:
'/product/detail/consult'
,
data
:
{
productId
:
id
,
page
:
nowPage
page
:
nowPage
,
size
:
15
}
}).
then
(
function
(
data
)
{
var
res
;
...
...
@@ -1162,7 +1166,7 @@ function loadConsult() {
// 更新总数显示
$consultNum
.
text
(
res
[
0
].
total
);
totalNum
=
Math
.
ceil
(
res
[
0
].
total
/
1
0
)
*
20
;
totalNum
=
Math
.
ceil
(
res
[
0
].
total
/
1
5
)
*
20
;
$consultsUl
.
empty
().
append
(
consultsTpl
({
consults
:
res
...
...
@@ -1214,7 +1218,7 @@ function loadConsult() {
});
baseUrl
=
'/product/detail/consult?productId='
+
id
;
if
(
totalNum
>
20
){
$
(
'.consults-pager'
).
empty
().
append
(
setPager
({
baseUrl
:
baseUrl
,
...
...
@@ -1224,6 +1228,7 @@ function loadConsult() {
theme
:
'msg-pager'
})
);
}
}
}).
always
(
function
()
{
loadingConsults
=
false
;
...
...
Please
register
or
login
to post a comment