|
|
@@ -207,6 +207,9 @@ function handleSelectChange(objj) {
|
|
|
$.each(returnEn, function (index, obj) {
|
|
|
theadStr += '<th returnEn="' + obj + '">' + returnCn[index] + '</th>';
|
|
|
});
|
|
|
+ if (nameEn === 'watchlist') {
|
|
|
+ theadStr += '<th>操作</th>';
|
|
|
+ }
|
|
|
|
|
|
$(obj).parent("div").next("div").find("span.contentSPAN").html('0');
|
|
|
$(obj).parent("div").next("div").find("tr.contentTH").html(theadStr);
|
|
|
@@ -335,6 +338,13 @@ function mainSearch(url, nameEn, slideDiv, needCustomFlag) {
|
|
|
var objContent = dataDetail.hasOwnProperty(obj) ? dataDetail[obj] : '--';
|
|
|
str += '<td' + objStyle + '>' + objContent + '</td>';
|
|
|
});
|
|
|
+
|
|
|
+ if (nameEn === 'watchlist') {
|
|
|
+ str += '<td style="padding: 0px 10px 0px 10px;">';
|
|
|
+ str += '<button class="apis-quiet-div-watchlist-detail" symbolName="' + dataDetail.symbol + '">详情</button>';
|
|
|
+ str += '</td>';
|
|
|
+ }
|
|
|
+
|
|
|
str += '</tr>';
|
|
|
}
|
|
|
|
|
|
@@ -363,4 +373,47 @@ function initContentEvent() {
|
|
|
if ($(".apis-move-div-input1").val().length === 0) {
|
|
|
$("title").html('Coin主页');
|
|
|
}
|
|
|
+
|
|
|
+ $(".apis-quiet-div-watchlist-detail").click(function () {
|
|
|
+ if ($("#bigpreview").css("display") === 'none') {
|
|
|
+ $("#bigpreview").css("display", "block");
|
|
|
+ } else if ($("#bigpreview").css("display") === 'block') {
|
|
|
+ $("#bigpreview").css("display", "none");
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#bigpreview").find(".bigpreview-close").click(function () {
|
|
|
+ if ($("#bigpreview").css("display") === 'none') {
|
|
|
+ $("#bigpreview").css("display", "block");
|
|
|
+ } else if ($("#bigpreview").css("display") === 'block') {
|
|
|
+ $("#bigpreview").css("display", "none");
|
|
|
+ }
|
|
|
+ $(this).unbind("click");
|
|
|
+ });
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ url: "coin/watchlistDetail/" + $(this).attr("symbolName"), //请求的url地址
|
|
|
+ type: "get", //请求方式
|
|
|
+ async: true, //请求是否异步,默认为异步,这也是ajax重要特性
|
|
|
+ success: function (data) {
|
|
|
+ //请求成功时处理
|
|
|
+ if (data != null && $.trim(data) != "" && data.success) {
|
|
|
+ data = data.data;
|
|
|
+ $(".bigpreview-content").html(data);
|
|
|
+ } else {
|
|
|
+ //alert(data.message);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeSend: function () {
|
|
|
+ $(".bigpreview-content").html("");
|
|
|
+ $(".bigpreview-loading").css("display", "block");
|
|
|
+ },
|
|
|
+ complete: function () {
|
|
|
+ $(".bigpreview-loading").css("display", "none");
|
|
|
+ },
|
|
|
+ error: function (data) {
|
|
|
+ //请求出错处理
|
|
|
+ alert('error:' + data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|