Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
陈轩
8 years ago
Commit
f86f989f76cc269d8cbade48215926d7e3415605
2 parents
4b3ccf27
89949c02
Merge branch 'feature/service' of
http://git.yoho.cn/fe/yohobuywap-node
into feature/service
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
6 deletions
public/js/service/chat/index.js
public/js/service/chat/view.js
public/js/service/chat/index.js
View file @
f86f989
...
...
@@ -209,7 +209,7 @@ var chat = {
data
:
data
,
success
:
function
(
result
)
{
if
(
result
&&
result
.
code
===
200
)
{
for
(
let
item
of
result
.
data
)
{
for
(
let
item
of
result
.
data
.
reverse
()
)
{
self
.
getMessage
(
item
);
}
}
...
...
@@ -232,6 +232,7 @@ var chat = {
case
allTypes
.
ENTER
:
this
.
enterSuccess
(
message
);
resizeFooter
();
break
;
case
allTypes
.
LINK_SUCCESS
:
...
...
@@ -363,7 +364,7 @@ $('.menu-trigger').on('touchend', function() {
fileType
:
'image/*'
,
uploadScript
:
'/api/upload/image'
,
fileObjName
:
'filename'
,
fileSizeLimit
:
999999
,
fileSizeLimit
:
5000000
,
height
:
'100%'
,
width
:
'100%'
,
multi
:
false
,
...
...
public/js/service/chat/view.js
View file @
f86f989
...
...
@@ -2,6 +2,7 @@ const loading = require('../../plugin/loading'),
lazyLoad
=
require
(
'yoho-jquery-lazyload'
);
require
(
'../../common'
);
import
{
EventEmitter
,
bus
,
api
}
from
'./store'
;
...
...
@@ -61,9 +62,10 @@ LeaveMSGView.prototype.constructer = LeaveMSGView;
评价view
*/
class
RatingView
{
constructor
(
elem
)
{
constructor
(
elem
,
socket
)
{
this
.
elem
=
elem
;
this
.
init
();
this
.
socket
=
socket
;
}
init
()
{
...
...
@@ -80,8 +82,8 @@ class RatingView {
4
:
'非常满意'
,
};
let
self
=
this
.
elem
,
stars
=
self
.
find
(
'.stars i'
);
let
self
=
this
,
stars
=
self
.
elem
.
find
(
'.stars i'
);
stars
.
each
(
function
(
index
)
{
$
(
this
).
on
(
'touchstart'
,
function
()
{
...
...
@@ -89,8 +91,33 @@ class RatingView {
for
(
let
i
=
0
;
i
<=
index
;
i
++
)
{
stars
.
eq
(
i
).
addClass
(
'rated'
);
}
self
.
find
(
'.rank'
).
text
(
rank
[
index
]);
self
.
elem
.
find
(
'.rank'
).
text
(
rank
[
index
]);
});
self
.
rank
=
index
;
});
}
post
(
data
)
{
const
elem
=
this
.
elem
;
var
params
=
{
stars
:
this
.
rank
,
promoter
:
1
,
reasonMsg
:
elem
.
find
(
'.words-to-say'
).
val
(),
};
Object
.
assign
(
params
,
data
);
$
.
ajax
({
type
:
'POST'
,
url
:
'http://192.168.102.18:60101/api/evalute/saveEvalute'
,
data
:
params
,
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
}
},
error
:
function
()
{
}
});
}
...
...
Please
register
or
login
to post a comment