|
@@ -202,10 +202,15 @@
|
|
|
<view class="list-details-title clearfix">
|
|
|
<text class="mclap-tag" v-if="pros.beautyActFlag == 1">美博会</text>
|
|
|
<view class="mclap" :class="pros.beautyActFlag == 1 ? 'indent' : ''">
|
|
|
- <view v-for="item in highLight(isInterceptHtmlFn(pros.name),listQuery.keyword)" :key="item" style="float:left;">
|
|
|
- <text v-if="item.type==1" decode="true" space="true" style='color: #ff5b00;'>{{ myReplace(item.text) }} </text>
|
|
|
- <text v-else decode="true" space="true">{{myReplace(item.text)}}</text>
|
|
|
- </view>
|
|
|
+ <text v-for="(item, itemIndex) in pros.name"
|
|
|
+ :key="itemIndex"
|
|
|
+ :style="{ color : item.type === 1 ? '#ff5b00' : '#333333' }">
|
|
|
+ {{ item.text }}
|
|
|
+ </text>
|
|
|
+ <!-- <view v-for="(item, itemIndex) in pros.name" :key="itemIndex" style="float:left;">
|
|
|
+ <text v-if="item.type ==1" style='color: #ff5b00;'>{{ item.text }} </text>
|
|
|
+ <text v-else>{{ item.text }}</text>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
<text class="list-details-specs">规格:{{ pros.unit }}</text>
|
|
@@ -754,10 +759,18 @@ export default {
|
|
|
if (loadMore) {
|
|
|
this.listData = [...this.listData, ...dataList]
|
|
|
this.getProductPrice()
|
|
|
+
|
|
|
} else {
|
|
|
this.listData = [...dataList]
|
|
|
this.getProductPrice()
|
|
|
}
|
|
|
+ this.listData = this.listData.map(pros => {
|
|
|
+ console.log('111111111',pros.name)
|
|
|
+ pros.name = this.handeleCeptText(this.isInterceptHtmlFn(pros.name),this.listQuery.keyword)
|
|
|
+ console.log('222222222',pros.name)
|
|
|
+ return pros
|
|
|
+ })
|
|
|
+ console.log('listData',this.listData)
|
|
|
// 防上拉暴滑
|
|
|
this.pullFlag = false
|
|
|
setTimeout(() => {
|
|
@@ -971,10 +984,6 @@ export default {
|
|
|
this.isFocus = true
|
|
|
}
|
|
|
},
|
|
|
- isInterceptHtmlFn(text) {
|
|
|
- let name = this.$reg.interceptHtmlFn(text)
|
|
|
- return name
|
|
|
- },
|
|
|
navToDetailPage(id) {
|
|
|
this.isModallayer = true
|
|
|
this.$api.navigateTo(`/pages/goods/product?id=${id}`)
|