|
|
@@ -38,7 +38,7 @@
|
|
|
<div><h4>企业简介</h4></div>
|
|
|
<p class="intro-content" v-if="storeInfo.enterprise.description">
|
|
|
<span class="info" v-text="getIntro(storeInfo.enterprise.description)"></span>
|
|
|
- <span class="look" @click="dialogVisible = true" v-if="showMore">查看更多 <img src="/images/store/home/angle-right.png" style="margin-top:2px;"></span>
|
|
|
+ <span class="look" @click="dialogVisible = true" v-if="showMore">查看更多 <img src="/images/store/home/angle-right.png" style="margin-top:-2px;"></span>
|
|
|
</p>
|
|
|
<p v-else class="empty-introduce">暂无简介</p>
|
|
|
</div>
|
|
|
@@ -148,14 +148,12 @@
|
|
|
methods: {
|
|
|
// 店铺简介
|
|
|
getIntro (text) {
|
|
|
- let len = text.replace(/[\u0391-\uFFE5]/g, 'aa').length
|
|
|
- if (len > 0) {
|
|
|
- if (len > 490) {
|
|
|
- this.showMore = true
|
|
|
- text = text.slice(0, 490) + '...'
|
|
|
- } else {
|
|
|
- this.showMore = false
|
|
|
- }
|
|
|
+ let realLength = this.baseUtils.getRealLen(text)
|
|
|
+ if (realLength > 500) {
|
|
|
+ this.showMore = true
|
|
|
+ text = this.baseUtils.cutOutString(text, 500) + '...'
|
|
|
+ } else {
|
|
|
+ this.showMore = false
|
|
|
}
|
|
|
return text
|
|
|
},
|
|
|
@@ -398,7 +396,7 @@
|
|
|
span{
|
|
|
float: right;
|
|
|
margin-top: 10px;
|
|
|
- padding-right: 5px;
|
|
|
+ padding-right: 10px;
|
|
|
font-size: 12px;
|
|
|
color: #3c7df5;
|
|
|
cursor: pointer;
|
|
|
@@ -408,7 +406,7 @@
|
|
|
}
|
|
|
}
|
|
|
p {
|
|
|
- margin: -7px 0px 0px 15px;
|
|
|
+ margin: -7px 0px 0px 9px;
|
|
|
text-indent: 2em;
|
|
|
width: 200px;
|
|
|
line-height: 19px;
|