|
@@ -33,11 +33,11 @@ $(function(){
|
|
|
// 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
|
|
|
$('.addkeyWord input.enterOne').on('input', function() {
|
|
|
var buttonDOM = $(this).siblings()[1].children[0];
|
|
|
- if ($(this).val().length >= 100) {
|
|
|
- var s = $(this).val().slice(0,99);
|
|
|
+ if ($(this).val().length >= 20) {
|
|
|
+ var s = $(this).val().slice(0,19);
|
|
|
$(this).val(s)
|
|
|
|
|
|
- weui.toast('关键词不能超过100字', {
|
|
|
+ weui.toast('关键词不能超过20字', {
|
|
|
duration: 2000,
|
|
|
className: 'text-overflow100',
|
|
|
callback: function(){ console.log('close') }
|
|
@@ -184,10 +184,10 @@ $(function(){
|
|
|
}
|
|
|
});
|
|
|
return
|
|
|
- }else if($(this).parent().find("span").text().length >= 100){
|
|
|
- var s = $(this).parent().find("span").text().slice(0,99);
|
|
|
+ }else if($(this).parent().find("span").text().length >= 20){
|
|
|
+ var s = $(this).parent().find("span").text().slice(0,19);
|
|
|
$(this).parent().find("span").text(s);
|
|
|
- weui.toast('关键词不能超过100字', {
|
|
|
+ weui.toast('关键词不能超过20字', {
|
|
|
duration: 2000,
|
|
|
className: 'text-overflow100',
|
|
|
callback: function(){}
|
|
@@ -214,11 +214,11 @@ $(function(){
|
|
|
$('.modify span').keydown(function(){
|
|
|
var olength = $(this).text().replace(/\s+/g,'').length;
|
|
|
// console.log(olength)
|
|
|
- if(olength >= 100){
|
|
|
+ if(olength >= 20){
|
|
|
$('.fontLength').show();
|
|
|
- var s = $(this).text().slice(0,100)
|
|
|
+ var s = $(this).text().slice(0,19)
|
|
|
$(this).text(s)
|
|
|
- weui.toast('关键词不能超过100字', {
|
|
|
+ weui.toast('关键词不能超过20字', {
|
|
|
duration: 2000,
|
|
|
className: 'text-overflow100',
|
|
|
callback: function(){
|