Commit f3443f13 by zhangxw

商品名称回显拼接问题修改

1 parent 59d89c7f
...@@ -3,9 +3,17 @@ var replaceItemText = function (item) { ...@@ -3,9 +3,17 @@ var replaceItemText = function (item) {
return item.replace(reg, ' ') return item.replace(reg, ' ')
} }
var isIncludesItem = function (list, item) {
//
// console.log(list.indexOf(item))
// var flag = list.indexOf(item)
return list.indexOf(item) != -1
}
/* /*
* 导出 * 导出
*/ */
module.exports = { module.exports = {
replaceItemText: replaceItemText replaceItemText: replaceItemText,
isIncludesItem: isIncludesItem
} }
<!-- 订单补录 --> <!-- 订单补录 -->
<wxs src="index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<view class="main {{isFullSucreen?'isFullSucreen':'' }} {{showTips?'fullSucreen-tips':'' }}"> <view class="main {{isFullSucreen?'isFullSucreen':'' }} {{showTips?'fullSucreen-tips':'' }}">
<!-- <view class=" {{isFullSucreen?showTips?'fullSucreen-tips':'isFullSucreen':'',showTips }}"> --> <!-- <view class=" {{isFullSucreen?showTips?'fullSucreen-tips':'isFullSucreen':'',showTips }}"> -->
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
<view class="icon" bindtap="delGoodsList" data-index="{{index}}"> <view class="icon" bindtap="delGoodsList" data-index="{{index}}">
<image src="../../images/del.png" /> <image src="../../images/del.png" />
</view> </view>
<view class="name text-hide">{{item.goodsInfo.goodsName}}</view> <view class="name text-hide">{{filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}</view>
<view class="price-box"> <view class="price-box">
¥ ¥
<view class="price"> <view class="price">
......
var isIncludesItem = function (list, item) {
//
// console.log(list.indexOf(item))
// var flag = list.indexOf(item)
return list.indexOf(item) != -1
}
/*
* 导出
*/
module.exports = {
isIncludesItem: isIncludesItem
}
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
<view class="warranty-box"> <view class="warranty-box">
<block wx:for="{{warrantyCardList}}" wx:key="index"> <block wx:for="{{warrantyCardList}}" wx:key="index">
<view class="warranty-card"> <view class="warranty-card">
<view class="name text-hide">{{item.goodsName}}</view> <view class="name text-hide">{{filter.replaceItemText(item.goodsName)}}</view>
<view class="value"> <view class="value">
质保期 质保期
<text>{{item.warrantyPeriod}}年</text> <text>{{item.warrantyPeriod}}年</text>
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
<view class="warranty-box"> <view class="warranty-box">
<block wx:for="{{warrantyCardList}}" wx:key="index"> <block wx:for="{{warrantyCardList}}" wx:key="index">
<view class="warranty-card"> <view class="warranty-card">
<view class="name text-hide">{{item.goodsName}}</view> <view class="name text-hide">{{filter.replaceItemText(item.goodsName)}}</view>
<view class="value"> <view class="value">
质保期 质保期
<text>{{item.warrantyPeriod}}年</text> <text>{{item.warrantyPeriod}}年</text>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!