zhengjinyi 1 год назад
Родитель
Сommit
1a46941e9d

+ 7 - 2
pages/search/mixins/searchMixins.js

@@ -17,7 +17,11 @@ const searchMixins = {
             }
             return ''
         },
-        highLight(content, key, res) {
+        isInterceptHtmlFn(text) {
+            let name = this.$reg.interceptHtmlFn(text)
+            return name
+        },
+        handeleCeptText(content, key, res) {
             if (res == undefined) {
                 res = []
             }
@@ -39,7 +43,7 @@ const searchMixins = {
                         text: y
                     })
                     content = content.substring(index + keyLen, content.length)
-                    this.highLight(content, key, res)
+                    this.handeleCeptText(content, key, res)
                 } else {
                     res.push({
                         type: 2,
@@ -52,6 +56,7 @@ const searchMixins = {
                     text: content
                 })
             }
+            console.log('res',res)
             return res
         },
         myReplace(content) {

+ 17 - 8
pages/search/search.vue

@@ -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}`)

+ 5 - 5
pages/seller/cart/components/immediatelyList.vue

@@ -254,7 +254,7 @@
 			:skuProduct="handleProsData"
 			@handleUnitConfirm="hanldeSupporUnitConfirm"
 			@skuClick="handleSkuClick"
-		></cmUnitSupporPopup>
+		/>
 		<!-- 可拖动悬浮按钮 -->
 		<cm-drag
 			v-if="!showSkeleton"
@@ -264,10 +264,9 @@
 			@btnClick="btnClick"
 			@btnTouchstart="btnTouchstart"
 			@btnTouchend="btnTouchend"
-		>
-		</cm-drag>
+		/>
 		<!-- 透明模态层 -->
-		<modal-layer v-if="isModallayer"></modal-layer>
+		<modal-layer v-if="isModallayer" />
 	</view>
 </template>
 
@@ -423,6 +422,7 @@ export default {
 							this.isShowEmptyText = '暂无相关商品'
 						}
 					}
+					this.showSkeleton = false
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)
@@ -510,7 +510,6 @@ export default {
 							this.combinationProduct = [...this.combinationProduct, ...responseData.results]
 						} else {
 							this.combinationProduct = [...responseData.results]
-
 							this.showSkeleton = false
 						}
 						// 防上拉暴滑
@@ -527,6 +526,7 @@ export default {
 						}
 					} else {
 						this.isShowEmpty = true
+						this.showSkeleton = false
 						this.isShowEmptyText = '暂无相关商品'
 					}
 				})

+ 6 - 4
pages/seller/remarks/add-record.vue

@@ -637,10 +637,12 @@ export default {
 			})
 			console.log('trendsLabelsList', trendsLabelsList)
 			// 标签必须有一项
-			if (!this.firstLabelList.length && !trendsLabelsList.length && !staticLabelsList.length) {
-				  this.modal = true
-				  this.contentModalText = '标签必须选择或者填写一项' 
-				  return
+			if(this.remarksParams.communicationSituation !== 1){
+				if (!this.firstLabelList.length && !trendsLabelsList.length && !staticLabelsList.length) {
+					  this.modal = true
+					  this.contentModalText = '标签必须选择或者填写一项' 
+					  return
+				}
 			}
 			if(this.firstLabelList.length > 0){
 				this.remarksParams.remarks = JSON.stringify(this.firstLabelList)

+ 6 - 4
pages/seller/remarks/add.vue

@@ -704,10 +704,12 @@ export default {
 			})
 			console.log('trendsLabelsList', trendsLabelsList)
 			// 标签必须有一项
-			if (!this.firstLabelList.length && !trendsLabelsList.length && !staticLabelsList.length) {
-				  this.modal = true
-				  this.contentModalText = '标签必须选择或者填写一项' 
-				  return
+			if(this.remarksParams.communicationSituation !== 1){
+				if (!this.firstLabelList.length && !trendsLabelsList.length && !staticLabelsList.length) {
+					  this.modal = true
+					  this.contentModalText = '标签必须选择或者填写一项' 
+					  return
+				}
 			}
 			if(this.firstLabelList.length > 0){
 				this.remarksParams.remarks = JSON.stringify(this.firstLabelList)

+ 1 - 1
services/config.env.js

@@ -6,7 +6,7 @@ if(process.env.NODE_ENV === 'development'){
     // URL_CONFIG = 'http://192.168.2.102:18002' //志国联调地址
     // URL_CONFIG = 'http://192.168.2.103:18002'    //陈凯联调地址
     URL_CONFIG = 'https://core-b.caimei365.com'
-    // URL_CONFIG = 'https://core.caimei365.com'   
+    // URL_CONFIG = 'https://core.caimei365.com'    
 }else{
     // 生产环境
     // URL_CONFIG = 'https://core-b.caimei365.com'