|
@@ -43,9 +43,9 @@ $(function(){
|
|
|
$('.addkeyWord .btn .save-btn').on('click', function(){
|
|
|
var keyWord = $('.addkeyWord input.enterOne').val()
|
|
|
keyWord = keyWord.replace(/\s/g,"");
|
|
|
- if (keyWord.length >= 50) {
|
|
|
- var s = keyWord.slice(0,49);
|
|
|
- $('.addkeyWord input.enterOne').val(s);
|
|
|
+ if (keyWord.length > 50) {
|
|
|
+ // var s = keyWord.slice(0,49);
|
|
|
+ // $('.addkeyWord input.enterOne').val(s);
|
|
|
|
|
|
weui.toast('采购单位不能超过50字', {
|
|
|
duration: 2000,
|
|
@@ -121,9 +121,9 @@ $(function(){
|
|
|
}
|
|
|
});
|
|
|
return
|
|
|
- }else if($(this).parent().find("span").text().length >= 50){
|
|
|
- var s = $(this).parent().find("span").text().slice(0,49);
|
|
|
- $(this).parent().find("span").text(s);
|
|
|
+ }else if($(this).parent().find("span").text().length > 50){
|
|
|
+ // var s = $(this).parent().find("span").text().slice(0,49);
|
|
|
+ // $(this).parent().find("span").text(s);
|
|
|
weui.toast('采购单位不能超过50字', {
|
|
|
duration: 2000,
|
|
|
className: 'text-overflow100',
|
|
@@ -148,22 +148,6 @@ $(function(){
|
|
|
return this.replace(/(^\s*)|(\s*$)/g, ' ');
|
|
|
}
|
|
|
|
|
|
- //附加词个数
|
|
|
- $('.modify span').keydown(function(){
|
|
|
- var olength = $(this).text().replace(/\s+/g,'').length;
|
|
|
- // console.log(olength)
|
|
|
- if(olength >= 50){
|
|
|
- $('.fontLength').show();
|
|
|
- var s = $(this).text().slice(0,49)
|
|
|
- $(this).text(s)
|
|
|
- weui.toast('采购单位不能超过50字', {
|
|
|
- duration: 2000,
|
|
|
- className: 'text-overflow100',
|
|
|
- callback: function(){ console.log('close') }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
$(".close").on("click", function () {
|
|
|
history.back();
|
|
|
})
|