...
|
...
|
@@ -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);
|
|
|
}
|
|
|
});
|
|
|
} |
...
|
...
|
|