Commit b60eac67 authored by duxinyuan's avatar duxinyuan

commit test max-length to 2000 ,useing vue watch

parent 99582c32
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
if(!doc.addEventListener) return; if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false); win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false); doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);</script><link href=./static/css/app.c0df9b2113568ec885c76ed8abb2f0f7.css rel=stylesheet></head><body><div id=app></div><script src=https://api.tonglianjituan.com/app/js/libs/vue.min.js></script><script src=https://api.tonglianjituan.com/app/js/libs/vue-router.min.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.1b35a927314506fe4a4f.js></script><script type=text/javascript src=./static/js/app.ccf2261a92c4cfa263e3.js></script></body></html> })(document, window);</script><link href=./static/css/app.facc6cc191c5416025628dc7f3409d9a.css rel=stylesheet></head><body><div id=app></div><script src=https://api.tonglianjituan.com/app/js/libs/vue.min.js></script><script src=https://api.tonglianjituan.com/app/js/libs/vue-router.min.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.e7cc7b16dfb54c1cefae.js></script><script type=text/javascript src=./static/js/app.8763fe8e6c95b1d7cbec.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -140,12 +140,24 @@ ...@@ -140,12 +140,24 @@
//获取评论列表 //获取评论列表
_this.getCommentList(); _this.getCommentList();
}, },
watch : {
"commentContent" : function(n,o){
let that = this ;
if ( n.length >2000){
console.log("no");
that.commentContent = o
} else {
console.log('yus');
that.commentContent = n
}
}
},
methods: { methods: {
commentSend() { commentSend() {
let _this = this; let _this = this;
let _len = _this.commentContent.length; let _len = _this.commentContent.length;
if(_len<50 || _len>800){ if(_len<50 || _len>1000){
layer.tipsX('评论字数需在50~800之间,当前字数为'+_len); layer.tipsX('评论字数需在50~2000之间,当前字数为'+_len);
}else{ }else{
_this.axios({ _this.axios({
method: 'POST', method: 'POST',
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
today : '' today : ''
}), }),
mounted (){ mounted (){
this.name = this.$route.query.name ;
let date = new Date(); let date = new Date();
let year = date.getFullYear() ; let year = date.getFullYear() ;
let month = date.getMonth()+1; let month = date.getMonth()+1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment