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
Email Patches
Plain Diff
Browse Files
Authored by
yyq
8 years ago
Commit
4f94ce9d5974c30f41ce1099ee2b0510127bfaf1
1 parent
84d7bca2
fix
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
33 deletions
apps/3party/controllers/question.js
apps/service/views/partial/chat/chat-gm.hbs
public/build/dev-info.js
public/img/service/chat/questionnaire-ico.png
public/js/3party/question-detail.page.js
public/js/3party/question-list.page.js
public/scss/service/_chatQaList.css
apps/3party/controllers/question.js
View file @
4f94ce9
...
...
@@ -26,7 +26,7 @@ exports.check = (req, res, next) => {
if
(
!
params
.
uid
)
{
return
res
.
send
({
code
:
206
,
message
:
'请先登录!'
});
return
res
.
send
({
code
:
400
,
message
:
'请先登录!'
});
}
req
.
ctx
(
questionModel
).
getQuestionStatus
(
params
).
then
(
result
=>
{
...
...
apps/service/views/partial/chat/chat-gm.hbs
View file @
4f94ce9
...
...
@@ -29,7 +29,7 @@
<i
class=
"arr-ico iconfont"
>

</i>
</a>
<a
class=
"list clearfix"
href=
"/3party/questionnaire"
>
<i
class=
"
tel
-ico icon"
></i>
<i
class=
"
questionnaire
-ico icon"
></i>
<div>
<p
class=
"title"
>
调研中心
</p>
<p
class=
"tip"
>
一起来参与,赢取更多惊喜!
</p>
...
...
public/build/dev-info.js
View file @
4f94ce9
...
...
@@ -4,7 +4,7 @@ const path = require('path');
const
info
=
{
host
:
'127.0.0.1'
,
port
:
5001
,
publicPath
:
'http://127.0.0.1:5001'
publicPath
:
'http://127.0.0.1:5001
/
'
};
try
{
...
...
public/img/service/chat/questionnaire-ico.png
0 → 100644
View file @
4f94ce9
1.42 KB
public/js/3party/question-detail.page.js
View file @
4f94ce9
...
...
@@ -8,6 +8,8 @@ let $ = require('yoho-jquery'),
let
question
=
{
$base
:
$
(
'#qs-wrap'
),
init
:
function
()
{
let
that
=
this
;
this
.
$errTip
=
$
(
'.error-tip'
);
this
.
$item
=
$
(
'.qs-item'
,
this
.
$base
);
this
.
startTime
=
Date
.
parse
(
new
Date
())
/
1000
;
...
...
@@ -31,7 +33,7 @@ let question = {
yoho
.
invokeMethod
(
'get.pageType'
,
{
pageType
:
'questionnaire'
});
yoho
.
invokeMethod
(
'set.shareInfo'
,
th
is
.
shareInfo
);
yoho
.
invokeMethod
(
'set.shareInfo'
,
th
at
.
shareInfo
);
});
}
}
...
...
public/js/3party/question-list.page.js
View file @
4f94ce9
...
...
@@ -26,6 +26,33 @@ function getQuestionStatus(reqData, cb) {
});
}
function
jumpQuestionDetail
(
data
)
{
let
href
;
if
(
qs
&&
qs
.
uid
&&
yoho
.
isApp
)
{
href
=
DETAIL_URI
+
'/'
+
data
.
id
+
'?uid='
+
qs
.
uid
;
}
else
{
href
=
DETAIL_URI
+
'/'
+
data
.
id
;
}
if
(
yoho
&&
yoho
.
isApp
)
{
let
link
=
yoho
.
parseUrl
(
href
);
yoho
.
goH5
(
href
,
JSON
.
stringify
({
action
:
'go.h5'
,
params
:
{
islogin
:
'N'
,
type
:
14
,
updateflag
:
Date
.
now
()
+
''
,
url
:
link
.
path
,
param
:
link
.
query
}
}));
}
else
{
window
.
location
.
href
=
href
;
}
}
let
tipDialog
=
{
$base
:
$
(
'#tip-dialog'
),
init
:
function
()
{
...
...
@@ -70,7 +97,9 @@ let tipDialog = {
tipDialog
.
init
();
$
(
'#qs-list'
).
on
(
'click'
,
'li'
,
function
()
{
let
$list
=
$
(
'#qs-list'
);
$list
.
on
(
'click'
,
'li'
,
function
()
{
let
data
=
$
(
this
).
data
();
if
(
!
data
.
id
)
{
...
...
@@ -79,30 +108,7 @@ $('#qs-list').on('click', 'li', function() {
getQuestionStatus
({
uid
:
qs
.
uid
,
id
:
data
.
id
},
function
(
resData
)
{
if
(
resData
.
code
===
200
)
{
let
href
;
if
(
qs
&&
qs
.
uid
)
{
href
=
DETAIL_URI
+
'/'
+
data
.
id
+
'?uid='
+
qs
.
uid
;
}
else
{
href
=
DETAIL_URI
+
'/'
+
data
.
id
;
}
if
(
yoho
&&
yoho
.
isApp
)
{
let
link
=
yoho
.
parseUrl
(
href
);
yoho
.
goH5
(
href
,
JSON
.
stringify
({
action
:
'go.h5'
,
params
:
{
islogin
:
'N'
,
type
:
14
,
updateflag
:
Date
.
now
()
+
''
,
url
:
link
.
path
,
param
:
link
.
query
}
}));
}
else
{
window
.
location
.
href
=
href
;
}
jumpQuestionDetail
(
data
);
}
else
if
(
resData
.
code
===
206
)
{
if
(
yoho
&&
yoho
.
isApp
)
{
yoho
.
invokeMethod
(
'go.showShareAlert'
,
{
...
...
@@ -123,3 +129,13 @@ $('#qs-list').on('click', 'li', function() {
}
});
});
if
(
$list
.
children
().
length
===
1
)
{
let
data
=
$list
.
children
().
first
().
data
();
getQuestionStatus
({
uid
:
qs
.
uid
,
id
:
data
.
id
},
function
(
resData
)
{
if
(
resData
.
code
===
200
)
{
jumpQuestionDetail
(
data
);
}
});
}
...
...
public/scss/service/_chatQaList.css
View file @
4f94ce9
...
...
@@ -124,6 +124,13 @@
margin
:
30px
20px
;
}
.questionnaire-ico
{
background-image
:
url("/service/chat/questionnaire-ico.png")
;
width
:
60px
;
height
:
60px
;
margin
:
30px
20px
;
}
.arr-ico
{
line-height
:
120px
;
color
:
#e1e1e1
;
...
...
@@ -145,10 +152,6 @@
font-size
:
32px
;
}
.title-mid
{
margin-top
:
15px
;
}
.tip
{
line-height
:
35px
;
font-size
:
24px
;
...
...
Please
register
or
login
to post a comment