|
@@ -307,7 +307,7 @@ function handleSelectChange(objj) {
|
|
|
$.each(returnEn, function (index, obj) {
|
|
$.each(returnEn, function (index, obj) {
|
|
|
theadStr += '<th returnEn="' + obj + '">' + returnCn[index] + '</th>';
|
|
theadStr += '<th returnEn="' + obj + '">' + returnCn[index] + '</th>';
|
|
|
});
|
|
});
|
|
|
- if (nameEn === 'watchlist' || nameEn === 'image' || nameEn === 'music' || nameEn === 'youtubeLive') {
|
|
|
|
|
|
|
+ if (nameEn === 'watchlist' || nameEn === 'image' || nameEn === 'music' || nameEn === 'youtubeLive' || nameEn === 'goldenQuotes') {
|
|
|
theadStr += '<th>操作</th>';
|
|
theadStr += '<th>操作</th>';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -643,6 +643,11 @@ function mainSearch(url, nameEn, slideDiv, typetype, needCustomFlag) {
|
|
|
str += '<td style="padding: 0px 10px 0px 10px;">';
|
|
str += '<td style="padding: 0px 10px 0px 10px;">';
|
|
|
str += '<button class="apis-quiet-div-youtubeLive-update" operationType="update" symbolName="' + dataDetail.id + '" symbolContent="' + dataDetail.remark + '">编辑</button>';
|
|
str += '<button class="apis-quiet-div-youtubeLive-update" operationType="update" symbolName="' + dataDetail.id + '" symbolContent="' + dataDetail.remark + '">编辑</button>';
|
|
|
str += '</td>';
|
|
str += '</td>';
|
|
|
|
|
+ } else if (nameEn === 'goldenQuotes') {
|
|
|
|
|
+ str += '<td style="padding: 0px 10px 0px 10px;">';
|
|
|
|
|
+ str += '<button class="apis-quiet-div-goldenQuotes-update" operationType="update" symbolName="' + dataDetail.id + '">编辑</button>';
|
|
|
|
|
+ str += '<button class="apis-quiet-div-goldenQuotes-delete" operationType="delete" symbolName="' + dataDetail.id + '">删除</button>';
|
|
|
|
|
+ str += '</td>';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
str += '</tr>';
|
|
str += '</tr>';
|
|
@@ -660,8 +665,11 @@ function mainSearch(url, nameEn, slideDiv, typetype, needCustomFlag) {
|
|
|
// $(".apis-quiet-div-music-pause").unbind("click");
|
|
// $(".apis-quiet-div-music-pause").unbind("click");
|
|
|
$(".apis-quiet-div-music-detail").unbind("click");
|
|
$(".apis-quiet-div-music-detail").unbind("click");
|
|
|
$(".apis-quiet-div-music-update").unbind("click");
|
|
$(".apis-quiet-div-music-update").unbind("click");
|
|
|
- }else if (nameEn === 'youtubeLive') {
|
|
|
|
|
|
|
+ } else if (nameEn === 'youtubeLive') {
|
|
|
$(".apis-quiet-div-music-update").unbind("click");
|
|
$(".apis-quiet-div-music-update").unbind("click");
|
|
|
|
|
+ } else if (nameEn === 'goldenQuotes') {
|
|
|
|
|
+ $(".apis-quiet-div-goldenQuotes-update").unbind("click");
|
|
|
|
|
+ $(".apis-quiet-div-goldenQuotes-delete").unbind("click");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$('#' + slideDiv).find(".contentTD").html(str);
|
|
$('#' + slideDiv).find(".contentTD").html(str);
|
|
@@ -879,6 +887,118 @@ function initContentEvent(nameEn) {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ } else if (nameEn === 'goldenQuotes') {
|
|
|
|
|
+ $(".apis-quiet-div-goldenQuotes-delete").click(function () {
|
|
|
|
|
+ var symbol = $(this).attr("symbolName");
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: "goldenQuotes/delete/" + symbol, //请求的url地址
|
|
|
|
|
+ type: "get", //请求方式
|
|
|
|
|
+ async: true, //请求是否异步,默认为异步,这也是ajax重要特性
|
|
|
|
|
+ success: function (data) {
|
|
|
|
|
+ //请求成功时处理
|
|
|
|
|
+ if (data != null && $.trim(data) != "" && data.success) {
|
|
|
|
|
+ $(".apis-quiet-div-button2").click();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ alert(data.message);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeSend: function () {
|
|
|
|
|
+ $(".quiet-loading").css("display", "block");
|
|
|
|
|
+ },
|
|
|
|
|
+ complete: function () {
|
|
|
|
|
+ $(".quiet-loading").css("display", "none");
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function (data) {
|
|
|
|
|
+ //请求出错处理
|
|
|
|
|
+ alert('error:' + data);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ $(".apis-quiet-div-goldenQuotes-update").click(function () {
|
|
|
|
|
+ if ($("#goldenQuotespreview").css("display") === 'none') {
|
|
|
|
|
+ $("#goldenQuotespreview").css("display", "block");
|
|
|
|
|
+ } else if ($("#goldenQuotespreview").css("display") === 'block') {
|
|
|
|
|
+ $("#goldenQuotespreview").css("display", "none");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $(".goldenQuotespreview-top-close").click(function () {
|
|
|
|
|
+ if ($("#goldenQuotespreview").css("display") === 'none') {
|
|
|
|
|
+ $("#goldenQuotespreview").css("display", "block");
|
|
|
|
|
+ } else if ($("#goldenQuotespreview").css("display") === 'block') {
|
|
|
|
|
+ $("#goldenQuotespreview").css("display", "none");
|
|
|
|
|
+ }
|
|
|
|
|
+ $(this).unbind("click");
|
|
|
|
|
+ $(".goldenQuotespreview-top-submit").unbind("click");
|
|
|
|
|
+ });
|
|
|
|
|
+ $(".goldenQuotespreview-top-submit").click(function () {
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: "goldenQuotes/updateOther", //请求的url地址
|
|
|
|
|
+ dataType: "json", //返回格式为json
|
|
|
|
|
+ data: {"symbol": $(".goldenQuotespreview-content").find(".goldenQuotespreview-symbol").val(), "content": $(".goldenQuotespreview-content").find("textarea").val()}, //参数值
|
|
|
|
|
+ type: "post", //请求方式
|
|
|
|
|
+ async: false, //请求是否异步,默认为异步,这也是ajax重要特性
|
|
|
|
|
+ success: function (data) {
|
|
|
|
|
+ //请求成功时处理
|
|
|
|
|
+ if (data != null && $.trim(data) != "" && data.success) {
|
|
|
|
|
+ $(".goldenQuotespreview-top-close").click();
|
|
|
|
|
+ $(".apis-quiet-div-button2").click();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log("goldenQuotespreview-top-submit success error," + data);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeSend: function () {
|
|
|
|
|
+ },
|
|
|
|
|
+ complete: function () {
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function (data) {
|
|
|
|
|
+ //请求出错处理
|
|
|
|
|
+ console.log("goldenQuotespreview-top-submit error," + data);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ var operationType = $(this).attr("operationType");
|
|
|
|
|
+ if (operationType === 'detail') {
|
|
|
|
|
+ $(".goldenQuotespreview-top-submit").css("display", "none");
|
|
|
|
|
+ } else if (operationType === 'update') {
|
|
|
|
|
+ $(".goldenQuotespreview-top-submit").css("display", "block");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var symbol = $(this).attr("symbolName");
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: "goldenQuotes/detailContent/" + symbol + "/" + operationType, //请求的url地址
|
|
|
|
|
+ type: "get", //请求方式
|
|
|
|
|
+ async: true, //请求是否异步,默认为异步,这也是ajax重要特性
|
|
|
|
|
+ success: function (data) {
|
|
|
|
|
+ //请求成功时处理
|
|
|
|
|
+ if (data != null && $.trim(data) != "" && data.success) {
|
|
|
|
|
+ data = data.data;
|
|
|
|
|
+
|
|
|
|
|
+ if (operationType === 'detail') {
|
|
|
|
|
+ $(".goldenQuotespreview-content").html(data);
|
|
|
|
|
+ } else if (operationType === 'update') {
|
|
|
|
|
+ var update4Text = '<textarea rows="4" cols="50" style="background: antiquewhite;width: 100%;height: 100%;">' + data + '</textarea>';
|
|
|
|
|
+ update4Text += '<input type="hidden" class="goldenQuotespreview-symbol" value="' + symbol + '"/>';
|
|
|
|
|
+ $(".goldenQuotespreview-content").html(update4Text);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //alert(data.message);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeSend: function () {
|
|
|
|
|
+ $(".goldenQuotespreview-content").html("");
|
|
|
|
|
+ $(".goldenQuotespreview-loading").css("display", "block");
|
|
|
|
|
+ },
|
|
|
|
|
+ complete: function () {
|
|
|
|
|
+ $(".goldenQuotespreview-loading").css("display", "none");
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function (data) {
|
|
|
|
|
+ //请求出错处理
|
|
|
|
|
+ alert('error:' + data);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
} else if (nameEn === 'music') {
|
|
} else if (nameEn === 'music') {
|
|
|
$("ul li").click(function () {
|
|
$("ul li").click(function () {
|
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -1301,7 +1421,7 @@ function insertOrUpdateGoldenQuotesSubmit(){
|
|
|
var formData = new FormData($("#popup-form")[0]);
|
|
var formData = new FormData($("#popup-form")[0]);
|
|
|
formData.append("userName", getCookie('username'));
|
|
formData.append("userName", getCookie('username'));
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
- url: "goldenQuotes/insertOrUpdateGoldenQuotes", //请求的url地址
|
|
|
|
|
|
|
+ url: "goldenQuotes/insertOrUpdate", //请求的url地址
|
|
|
dataType: "json", //返回格式为json
|
|
dataType: "json", //返回格式为json
|
|
|
data: formData, //参数值
|
|
data: formData, //参数值
|
|
|
type: "post", //请求方式
|
|
type: "post", //请求方式
|
|
@@ -1514,7 +1634,8 @@ function quietPop(url, nameEn, slideDiv, typetype) {
|
|
|
formContent += '<div class="form-item"><label for="isPinned">是否置顶:</label><input type="text" name="isPinned" placeholder="可为空,1是2否"></div>';
|
|
formContent += '<div class="form-item"><label for="isPinned">是否置顶:</label><input type="text" name="isPinned" placeholder="可为空,1是2否"></div>';
|
|
|
formContent += '<div class="form-item"><label for="pinPriority">置顶优先级:</label><input type="text" name="pinPriority" placeholder="可为空,数值越大越靠前"></div>';
|
|
formContent += '<div class="form-item"><label for="pinPriority">置顶优先级:</label><input type="text" name="pinPriority" placeholder="可为空,数值越大越靠前"></div>';
|
|
|
formContent += '<div class="form-item"><label for="tags">标签:</label><input type="text" name="tags" placeholder="可为空,多个用逗号分隔"></div>';
|
|
formContent += '<div class="form-item"><label for="tags">标签:</label><input type="text" name="tags" placeholder="可为空,多个用逗号分隔"></div>';
|
|
|
- formContent += '<div class="form-item"><label for="tags">内容:</label><textarea rows="4" cols="50" style="background: antiquewhite;width: 100%;height: 100%;" name="content"></textarea></div>';
|
|
|
|
|
|
|
+ formContent += '<div class="form-item"><label for="content">内容:</label><textarea rows="4" cols="50" style="background: antiquewhite;width: 100%;height: 100%;" name="content"></textarea></div>';
|
|
|
|
|
+ formContent += '<div class="form-item"><label for="remark">备注:</label><input type="text" name="remark" placeholder="可为空"></div>';
|
|
|
formContent += '<div class="form-item"><label for="crudType">crudType:</label><select id="apis-quiet-div-goldenQuotes-crudType" name="crudType"><option value="1">insert</option><option value="2">update</option></select></div>';
|
|
formContent += '<div class="form-item"><label for="crudType">crudType:</label><select id="apis-quiet-div-goldenQuotes-crudType" name="crudType"><option value="1">insert</option><option value="2">update</option></select></div>';
|
|
|
|
|
|
|
|
$("#form-container-2").html(formContent);
|
|
$("#form-container-2").html(formContent);
|