|
@@ -119,6 +119,36 @@
|
|
$(".problemPop").css("display", 'flex');
|
|
$(".problemPop").css("display", 'flex');
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
|
|
|
|
+ $('.addkeyWord input.enterOne').on('input', function() {
|
|
|
|
+ if ($(this).val().length >= 100) {
|
|
|
|
+ var s = $(this).val().slice(0,100)
|
|
|
|
+ $(this).val(s)
|
|
|
|
+
|
|
|
|
+ weui.toast('关键词不能超过100字', {
|
|
|
|
+ duration: 2000,
|
|
|
|
+ className: 'text-overflow100',
|
|
|
|
+ callback: function(){ console.log('close') }
|
|
|
|
+ });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var buttonDOM = $(this).siblings()[1].children[0];
|
|
|
|
+ if ($(this).val().length >= 1) {
|
|
|
|
+ buttonDOM.style.opacity = 1;
|
|
|
|
+ buttonDOM.removeAttribute("disabled");
|
|
|
|
+ //
|
|
|
|
+ $(this).next().find(".appended").prop("disabled", false);
|
|
|
|
+ $(this).next().find(".exclude").prop("disabled", false);
|
|
|
|
+ } else {
|
|
|
|
+ buttonDOM.style.opacity = .5;
|
|
|
|
+ buttonDOM.setAttribute("disabled", true);
|
|
|
|
+ //
|
|
|
|
+ $(this).next().find(".appended").prop("disabled", true);
|
|
|
|
+ $(this).next().find(".exclude").prop("disabled", true);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
// 添加 按钮的点击事件
|
|
// 添加 按钮的点击事件
|
|
$('.addkeyWord .btn .save').on('click', function () {
|
|
$('.addkeyWord .btn .save').on('click', function () {
|
|
var keyWord = $('.addkeyWord input.enterOne').val();
|
|
var keyWord = $('.addkeyWord input.enterOne').val();
|
|
@@ -156,9 +186,6 @@
|
|
})
|
|
})
|
|
});
|
|
});
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
if($(".enterOne").val()!==""){
|
|
if($(".enterOne").val()!==""){
|
|
$('.enter.addkeyWord .btnChoose .appended').prop("disabled", false);
|
|
$('.enter.addkeyWord .btnChoose .appended').prop("disabled", false);
|
|
$('.enter.addkeyWord .btnChoose .exclude').prop("disabled", false);
|
|
$('.enter.addkeyWord .btnChoose .exclude').prop("disabled", false);
|