Fix:2629 【商城小程序】商品评价和店铺资讯超过140字时限制输入无提示,再次输入内容,发表结果会显示再次输入内容的最后两个字/ 商品评价

This commit is contained in:
linxi
2024-11-25 11:49:16 +08:00
parent 74dbbd0a90
commit 7512d21e75
+3 -1
View File
@@ -37,7 +37,9 @@
<textarea <textarea
v-model="expect" v-model="expect"
placeholder="商品满足你的期待么?说说你的想法,分享给想买的他们吧~" placeholder="商品满足你的期待么?说说你的想法,分享给想买的他们吧~"
:maxlength="140"
/> />
<view class="v12-px-4 v12-font-24 v12-dark1-text v12-mb-3">{{ expect.length || 0 }} / 140</view>
<view class="upload-title"> <view class="upload-title">
添加视频/图片 添加视频/图片
<text class="txt"> <text class="txt">
@@ -141,7 +143,7 @@ export default {
this.picArr = uploadList this.picArr = uploadList
}, },
async submit() { async submit() {
const expect = trim(this.expect) const expect = trim(this.expect).substring(0, 140)
const product_score = this.scoreList[0].index + 1 === 0 ? "" : this.scoreList[0].index + 1 const product_score = this.scoreList[0].index + 1 === 0 ? "" : this.scoreList[0].index + 1
const service_score = this.scoreList[1].index + 1 === 0 ? "" : this.scoreList[1].index + 1 const service_score = this.scoreList[1].index + 1 === 0 ? "" : this.scoreList[1].index + 1
try { try {