喻文俊 3 rokov pred
rodič
commit
fa8e493e00
39 zmenil súbory, kde vykonal 612 pridanie a 286 odobranie
  1. 1 6
      components/cm-module/cm-activity-info/cm-activity-info.vue
  2. 0 5
      components/cm-module/cm-cart-product/cm-cart-product.vue
  3. 2 7
      components/cm-module/cm-goods-nav/cm-goods-nav.vue
  4. 253 0
      components/cm-module/cm-header-nav/cm-header-nav.vue
  5. 1 1
      components/cm-module/cm-order-coupon-section/cm-order-coupon-section.vue
  6. 1 6
      components/cm-module/cm-order-information/cm-order-information.vue
  7. 0 6
      components/cm-module/cm-order-prodcut/cm-order-prodcut.vue
  8. 2 6
      components/cm-module/cm-order-submit-nav/cm-order-submit-nav.vue
  9. 2 7
      components/cm-module/cm-product/cm-product.vue
  10. 189 0
      components/cm-module/cm-search/cm-search.vue
  11. 4 9
      components/cm-module/createOrder/goodsList.vue
  12. 2 8
      components/cm-module/listTemplate/productList.vue
  13. 2 8
      components/cm-module/orderDetails/activipopu.vue
  14. 2 5
      components/cm-module/orderDetails/goodsList.vue
  15. 2 6
      components/cm-module/orderDetails/orderInformation.vue
  16. 1 7
      components/cm-module/productDetails/cm-activipopu.vue
  17. 4 10
      components/cm-module/productDetails/cm-price-activity.vue
  18. 4 10
      components/cm-module/productDetails/cm-price.vue
  19. 3 3
      main.js
  20. 20 13
      pages.json
  21. 4 8
      pages/goods/cart.vue
  22. 0 6
      pages/goods/goods-coupon-list-search.vue
  23. 0 6
      pages/goods/goods-coupon-list.vue
  24. 2 8
      pages/goods/search.vue
  25. 3 10
      pages/order/create-order.vue
  26. 1 7
      pages/order/error.vue
  27. 1 7
      pages/order/order-detail.vue
  28. 45 34
      pages/order/order-list.vue
  29. 36 0
      pages/order/order-search.vue
  30. 1 7
      pages/order/success.vue
  31. 6 10
      pages/tabBar/cart/index.vue
  32. 1 1
      pages/tabBar/index/index.vue
  33. 2 8
      pages/user/activity/activity.vue
  34. 3 9
      pages/user/order/create-order.vue
  35. 1 7
      pages/user/order/error.vue
  36. 3 9
      pages/user/order/order-list-retail.vue
  37. 3 9
      pages/user/order/order-list.vue
  38. 4 10
      pages/user/order/search-order.vue
  39. 1 7
      pages/user/order/success.vue

+ 1 - 6
components/cm-module/cm-activity-info/cm-activity-info.vue

@@ -7,7 +7,7 @@
                 </view>
                 <view class="ladder-item" v-for="(ladd, index) in productInfo.ladderList" :key="index">
                     <view class="ladder-item-td">{{ ladd.buyNum }}</view>
-                    <view class="ladder-item-td">{{ ladd.buyPrice | priceFormat }}</view>
+                    <view class="ladder-item-td">{{ ladd.buyPrice | formatPrice }}</view>
                 </view>
             </view>
         </template>
@@ -22,11 +22,6 @@ export default {
             default: () => {}
         }
     },
-    filters: {
-        priceFormat(price) {
-            return Number(price).toFixed(2)
-        }
-    }
 }
 </script>
 

+ 0 - 5
components/cm-module/cm-cart-product/cm-cart-product.vue

@@ -124,11 +124,6 @@ export default {
             default: ''
         }
     },
-    filters: {
-        formatPrice(val) {
-            return Number(val).toFixed(2)
-        }
-    },
     computed: {
         // 是普通商品列表
         isNormal() {

+ 2 - 7
components/cm-module/cm-goods-nav/cm-goods-nav.vue

@@ -21,7 +21,7 @@
                             <number-box :value="count" @change="countChange"></number-box>
                         </view>
                         <view class="single-price">
-                            <text>单价:¥</text> <text class="price">{{ buyRetailPrice | priceFormat }}</text>
+                            <text>单价:¥</text> <text class="price">{{ buyRetailPrice | formatPrice }}</text>
                         </view>
                     </view>
                 </view>
@@ -46,12 +46,7 @@ export default {
             default: () => {}
         }
     },
-    filters: {
-        priceFormat(price) {
-            if (!price) return ''
-            return Number(price).toFixed(2)
-        }
-    },
+
     data() {
         return {
             count: 1,

+ 253 - 0
components/cm-module/cm-header-nav/cm-header-nav.vue

@@ -0,0 +1,253 @@
+<template>
+    <view class="cm-header-nav" :style="[headerNavStyle, { backgroundColor: bgColor }]">
+        <view class="cm-header" :style="[headerStyle]">
+            <!-- 左侧按钮组 -->
+            <view class="header-left" :style="[headerLeftStyle]">
+                <view
+                    class="button-group"
+                    :class="{ border: border }"
+                    :style="[
+                        buttonCount === 1 ? buttonGroupStyleOne : buttonGroupStyleTwo,
+                        { backgroundColor: groupBgColor, borderColor: borderColor }
+                    ]"
+                >
+                    <view
+                        class="btn iconfont"
+                        v-if="groupLeftButton"
+                        :class="groupLeftButton.icon"
+                        :style="{ color: groupLeftButton.color }"
+                        @click.stop="handleLeftClick(0)"
+                    ></view>
+                    <view class="btn iconfont icon-vertical_line" v-if="buttonCount > 1"></view>
+                    <view
+                        class="btn iconfont"
+                        v-if="groupRightButton"
+                        :class="groupRightButton.icon"
+                        :style="{ color: groupRightButton.color }"
+                        @click.stop="handleLeftClick(1)"
+                    ></view>
+                </view>
+            </view>
+
+            <!-- 标题 -->
+            <view class="header-title" :class="align">
+                <text>{{ title | formatTitle }}</text>
+                <text
+                    class="btn iconfont icon-sousuo"
+                    :class="rightButton.icon"
+                    :style="{ color: rightButton.color }"
+                    v-if="rightButton"
+                    @click.stop="handleRightClick"
+                ></text>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    props: {
+        // 导航标题
+        title: {
+            type: String,
+            default: '页面标题页面标题页面标题'
+        },
+        align: {
+            type: String,
+            default: 'center'
+        },
+        // 是否显示按钮组边框
+        border: {
+            type: Boolean,
+            default: true
+        },
+        // 按钮组数据
+        leftButtonGroup: {
+            type: Array,
+            default: () => [
+                {
+                    icon: 'icon-daohangfanhui',
+                    color: '#333'
+                },
+                {
+                    icon: 'icon-fanhuishouye',
+                    color: '#333'
+                }
+            ]
+        },
+        // 标题按钮数据
+        rightButton: {
+            type: Object,
+            default: () => ({
+                icon: 'icon-sousuo',
+                color: '#333'
+            })
+        },
+        // 按钮组背景色
+        groupBgColor: {
+            type: String,
+            default: '#fff'
+        },
+        // 按钮组边框颜色
+        borderColor: {
+            type: String,
+            default: '#ccc'
+        },
+        // 导航栏背景色
+        bgColor: {
+            type: String,
+            default: '#fff'
+        }
+    },
+    filters:{
+        formatTitle(title){
+            if(!title) return '页面标题'
+            return title.substring(0,6) + '...'
+        }
+    },
+    data() {
+        return {
+            height: 0,
+            menuButtonInfo: {},
+            systemInfo: {}
+        }
+    },
+    created() {
+        this.getSystemInfo()
+    },
+    computed: {
+        groupLeftButton() {
+            return this.leftButtonGroup[0]
+        },
+        groupRightButton() {
+            return this.leftButtonGroup[1]
+        },
+        buttonCount() {
+            return this.leftButtonGroup.length
+        },
+
+        // 导航栏样式
+        headerNavStyle() {
+            const { height, top } = this.menuButtonInfo
+            return {
+                height: height + 'px',
+                paddingTop: top + 'px',
+                lineHeight: height + 'px'
+            }
+        },
+        // 导航栏可用
+        headerStyle() {
+            const { height, width, right, left } = this.menuButtonInfo
+            const { screenWidth } = this.systemInfo
+            return {
+                width: left + 'px',
+                height: height + 'px',
+                padding: `0 ${screenWidth - right}px`
+            }
+        },
+
+        // 导航左侧样式
+        headerLeftStyle() {
+            const { height, width, right } = this.menuButtonInfo
+            const { screenWidth } = this.systemInfo
+            return {
+                width: width + 'px',
+                height: height + 'px',
+                marginRight: `${screenWidth - right}px`
+            }
+        },
+
+        // 一个按钮时的样式
+        buttonGroupStyleOne() {
+            const { height, width, right } = this.menuButtonInfo
+            return {
+                width: height + 'px',
+                height: height + 'px',
+                borderRadius: height / 2 + 'px'
+            }
+        },
+        // 两个按钮时的样式
+        buttonGroupStyleTwo() {
+            const { height, width, right } = this.menuButtonInfo
+            const { screenWidth } = this.systemInfo
+            return {
+                width: width + 'px',
+                height: height + 'px',
+                borderRadius: height / 2 + 'px',
+                padding: `0 ${screenWidth - right}px`
+            }
+        }
+    },
+    methods: {
+        // 获取系统信息
+        getSystemInfo() {
+            this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+            this.systemInfo = uni.getSystemInfoSync()
+
+            console.log(this.menuButtonInfo)
+        },
+        // 按钮组点击事件
+        handleLeftClick(index) {
+            this.$emit('leftClick', { index })
+        },
+        // 标题按钮点击事件
+        handleRightClick() {
+            this.$emit('rightClick')
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.cm-header-nav {
+    width: 100%;
+    position: relative;
+    z-index: 100000;
+    background: #fff;
+
+    .cm-header {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+
+        box-sizing: border-box;
+    }
+
+    .button-group {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+
+        box-sizing: border-box;
+        background: #eee;
+
+        &.border {
+            border: 1px solid #ccc;
+        }
+
+        .btn {
+            text-align: center;
+            flex: 1;
+            &.icon-vertical_line {
+                flex: unset;
+            }
+        }
+    }
+
+    .header-title {
+        display: flex;
+        flex: 1;
+        font-size: 14px;
+        justify-content: center;
+
+        .btn {
+            margin-left: 4px;
+            height: 100%;
+        }
+
+        &.left {
+            justify-content: space-between;
+        }
+    }
+}
+</style>

+ 1 - 1
components/cm-module/cm-order-coupon-section/cm-order-coupon-section.vue

@@ -2,7 +2,7 @@
     <view class="coupon section cm-order-coupon-section" @click="$emit('click')">
         <view class="lable">优惠券</view>
         <view class="content">
-            <text class="text">-¥{{ coupon.couponAmount | formatPrice }} </text> <text class="iconfont icon-chakangengduo"></text>
+            <text class="text">-¥{{ coupon && coupon.couponAmount | formatPrice }} </text> <text class="iconfont icon-chakangengduo"></text>
         </view>
     </view>
 </template>

+ 1 - 6
components/cm-module/cm-order-information/cm-order-information.vue

@@ -48,12 +48,7 @@ export default {
             default: () => {}
         }
     },
-    filters: {
-        formatPrice(price) {
-            if (!price) return '0.00'
-            return Number(price).toFixed(2)
-        }
-    },
+ 
     methods: {
         copyOrderNum() {
             uni.setClipboardData({

+ 0 - 6
components/cm-module/cm-order-prodcut/cm-order-prodcut.vue

@@ -31,12 +31,6 @@ export default {
             type: Object,
             default:()=>{}
         }
-    },
-    filters:{
-      formatPrice(price){
-          if(!price) return ''
-          return Number(price).toFixed(2)
-      }  
     },
 	computed:{
 		userId(){

+ 2 - 6
components/cm-module/cm-order-submit-nav/cm-order-submit-nav.vue

@@ -1,5 +1,5 @@
 <template>
-    <view class="cm-order-submit-nav" :class="{offset : isIphoneX}">
+    <view class="cm-order-submit-nav">
         <view class="submit">
 			<view class="count">共{{ orderInfo.allCount }}件商品</view>
 			<view class="total">
@@ -8,7 +8,7 @@
 			</view>
 			<button class="btn" @click="$emit('commit')">提交订单</button>
 		</view>
-		<view class="reserved"></view>
+		<view class="reserved" v-if="isIphoneX"></view>
     </view>
 </template>
 
@@ -49,10 +49,6 @@ export default {
 	    padding: 0 24rpx;
 	    background: #fff;
 	
-		&.offset{
-			transform: translateY(-50rpx);
-		}
-	
 	    .count {
 	        font-size: 28rpx;
 	        color: #333333;

+ 2 - 7
components/cm-module/cm-product/cm-product.vue

@@ -17,8 +17,8 @@
             <view class="footer">
                 <!-- 价格 -->
                 <view class="price">
-                    <text>¥{{ data.price | priceFormat }}</text>
-                    <text class="delete">¥{{ data.price | priceFormat }}</text>
+                    <text>¥{{ data.price | formatPrice }}</text>
+                    <text class="delete">¥{{ data.price | formatPrice }}</text>
                 </view>
                 <!-- 加入购物车 --> 
                 <view class="add-cart iconfont icon-gouwuche" @click.stop="addCart"></view>
@@ -36,11 +36,6 @@ export default {
             default: () => {}
         }
     },
-    filters: {
-        priceFormat(val) {
-            return Number(val).toFixed(2)
-        }
-    },
     methods: {
         // 跳转商品详情
         detail() {

+ 189 - 0
components/cm-module/cm-search/cm-search.vue

@@ -0,0 +1,189 @@
+<template>
+    <view class="cm-search">
+        <view class="search-control" @click.stop="handleClick">
+            <view class="search-input">
+                <text class="search-icon iconfont icon-sousuo"></text>
+                <input
+                    type="text"
+                    confirm-type="search"
+                    :placeholder="placeholder"
+                    :value="keyword"
+                    @input="$emit('input', $event.target.value)"
+                    :focus="true"
+                />
+                <text v-if="clearable && inputValue" class="clearable iconfont icon-quxiao" @click="clearValue"></text>
+            </view>
+            <view class="search-btn" @click="handleSearch(inputValue)">搜索</view>
+        </view>
+
+        <template v-if="keywordVisible">
+            <view class="hot-keyword">
+                <view class="title"> <text>搜索历史</text> <text class="clear iconfont icon-shanchu"></text> </view>
+                <view class="keyword-list"> <view class="keyword" @click="handleSearch('测试')">测试</view> </view>
+            </view>
+            <view class="mask"></view>
+        </template>
+    </view>
+</template>
+
+<script>
+export default {
+    name: 'CmSearch',
+    model: {
+        prop: 'keyword',
+    },
+
+    props: {
+        // 占位字符
+        placeholder: {
+            type: String,
+            default: '请输入搜索关键字'
+        },
+        // 绑定值
+        keyword: {
+            type: [String, Number],
+            default: ''
+        },
+
+        clearable: {
+            type: Boolean,
+            default: true
+        },
+
+        disabled: {
+            type: Boolean,
+            default: false
+        },
+
+        keywordList: {
+            type: Array,
+            default: () => []
+        },
+
+        keywordVisible: {
+            type: Boolean,
+            default: true
+        }
+    },
+    methods: {
+        clearValue() {
+            this.inputValue = ''
+            this.$emit('change', '')
+        },
+        handleClick() {
+            if (!this.disabled) return
+            this.$emit('goSearch')
+        },
+        handleSearch() {
+            if (this.disabled) return
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.cm-search {
+    position: relative;
+
+    .hot-keyword {
+        position: relative;
+        z-index: 999;
+        width: 100%;
+        background: #fff;
+        border-top: 1px solid #f7f7f7;
+
+        box-sizing: border-box;
+        padding: 0 24rpx 32rpx;
+
+        .title {
+            position: relative;
+            font-size: 26rpx;
+            padding: 24rpx 0;
+            color: #333;
+            font-weight: bold;
+
+            .clear {
+                position: absolute;
+                font-weight: normal;
+                right: 0;
+                top: 50%;
+                transform: translateY(-50%);
+            }
+        }
+
+        .keyword {
+            display: inline-block;
+            margin-right: 18rpx;
+            font-size: 24rpx;
+            line-height: 40rpx;
+            padding: 0 16rpx;
+            border-radius: 20rpx;
+            background: #eee;
+            color: #333;
+        }
+    }
+
+    .mask {
+        position: fixed;
+        top: 0;
+        left: 0;
+        z-index: 998;
+    }
+
+    .search-control {
+        position: relative;
+        z-index: 999;
+
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        height: 90rpx;
+        background: #fff;
+
+        padding: 0 24rpx;
+
+        .search-input {
+            flex: 1;
+            height: 60rpx;
+            line-height: 60rpx;
+            display: flex;
+            align-items: center;
+            position: relative;
+            padding-left: 74rpx;
+            font-size: 26rpx;
+            border-radius: 30rpx;
+            background: #f7f7f7;
+
+            input {
+                width: 100%;
+            }
+
+            .search-icon,
+            .clearable {
+                position: absolute;
+                top: 50%;
+                transform: translateY(-50%);
+                z-index: 9;
+            }
+
+            .search-icon {
+                left: 24rpx;
+            }
+
+            .clearable {
+                right: 24rpx;
+                color: #ccc;
+            }
+        }
+
+        .search-btn {
+            text-align: center;
+            width: 60rpx;
+            height: 60rpx;
+            line-height: 60rpx;
+            margin-left: 16rpx;
+            font-size: 26rpx;
+        }
+    }
+}
+</style>

+ 4 - 9
components/cm-module/createOrder/goodsList.vue

@@ -25,7 +25,7 @@
 							</view>
 							<view class="productprice">
 								<view class="price">
-									<text>¥{{ pros.price | NumFormat}}</text>
+									<text>¥{{ pros.price | formatPrice}}</text>
 								</view>
 								<view class="count"><text class="small">x</text>{{ pros.productCount }}</view>
 							</view>
@@ -46,10 +46,10 @@
 				<view class="goods-pros-b">
 					<view class="sum-none" v-if="(item.fullReduction)>0">
 						<text class="money-sign">¥</text>
-						<text class="money">{{ ( item.shopTotalPrice +item.fullReduction ) | NumFormat }}</text>
-						<text class="money-reduced">减<text>¥{{ item.fullReduction | NumFormat}}</text></text>
+						<text class="money">{{ ( item.shopTotalPrice +item.fullReduction ) | formatPrice }}</text>
+						<text class="money-reduced">减<text>¥{{ item.fullReduction | formatPrice}}</text></text>
 					</view>
-					<view class="sum">合计:<text class="money">¥{{ item.shopTotalPrice | NumFormat }}</text></view>
+					<view class="sum">合计:<text class="money">¥{{ item.shopTotalPrice | formatPrice }}</text></view>
 				</view>
 			</view>
 		</view>	
@@ -72,11 +72,6 @@
 		created(){
 			
 		},
-		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2)
-			},
-		},	
 		watch: {
 			goodsData: {
 				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确

+ 2 - 8
components/cm-module/listTemplate/productList.vue

@@ -39,7 +39,7 @@
 							<view class="floor-item-act" v-if="item.actStatus == 1">
 								<view class="floor-tags" v-if="PromotionsFormat(item.promotion)">
 									{{ item.promotion.name}}
-									<text>:¥{{ item.retailPrice | NumFormat }}</text>
+									<text>:¥{{ item.retailPrice | formatPrice }}</text>
 								</view>
 								<view class="floor-tags" v-else>{{ item.promotion.name }}</view>
 							</view>
@@ -57,7 +57,7 @@
 								</view>
 								<view class="list-price" v-else>
 									<text class="price-larger" :class="PromotionsFormat(item.promotion) ? 'none' : ''">
-										¥{{(PromotionsFormat(item.promotion) ? item.price : item.retailPrice) | NumFormat }}
+										¥{{(PromotionsFormat(item.promotion) ? item.price : item.retailPrice) | formatPrice }}
 									</text>
 								</view>
 							</view>
@@ -146,12 +146,6 @@ export default {
 		// 获取商品列表
 		this.productList = await this.getGoodsList()		
 	},
-	filters: {
-		//处理金额
-		NumFormat: function(text) {
-			return Number(text).toFixed(2)
-		}
-	},
 	methods: {		
 		// 上拉加载更多
 		async scrolltolower() {

+ 2 - 8
components/cm-module/orderDetails/activipopu.vue

@@ -9,8 +9,8 @@
                 </view>
                 <view class="box-title" v-show="Promotion.mode == 2">
                     <text>此商品参与{{ Promotion.name }},满</text>
-                    <text class="txt">¥{{ Promotion == null ? '0.00' : Promotion.touchPrice | NumFormat }}</text
-                    >减 <text class="txt">¥{{ Promotion == null ? '0.00' : Promotion.reducedPrice | NumFormat }}</text>
+                    <text class="txt">¥{{ Promotion == null ? '0.00' : Promotion.touchPrice | formatPrice }}</text
+                    >减 <text class="txt">¥{{ Promotion == null ? '0.00' : Promotion.reducedPrice | formatPrice }}</text>
                 </view>
                 <view class="box-title" v-show="Promotion.mode == 3">
                     <text>此商品参与{{ Promotion.name }},满</text> <text class="txt">¥{{ Promotion.touchPrice }}</text
@@ -37,12 +37,6 @@ export default {
             default: false
         }
     },
-    filters: {
-        NumFormat: function(text) {
-            //处理金额
-            return Number(text).toFixed(2)
-        }
-    },
     created() {},
     computed: {
         ...mapGetters(['hasLogin', 'isWxAuthorize', 'isIphoneX'])

+ 2 - 5
components/cm-module/orderDetails/goodsList.vue

@@ -21,7 +21,7 @@
 								<text class="tag tag-02" @click.stop="clickPopupShow(pros,2)">活动价</text>
 							</view>
 							<view class="product-view">
-								<view class="view-num red">¥{{pros.price | NumFormat}}</view>
+								<view class="view-num red">¥{{pros.price | formatPrice}}</view>
 							</view>
 							<view class="product-view">
 								<view class="view-num right">x {{pros.num}}</view>
@@ -39,7 +39,7 @@
 					<view class="count">共{{item.itemCount}}件商品</view>
 					<view class="sum">
 						<view class="sum-money" :class="item.promotionFullReduction == 0 ? 'none' : ''">
-							商品总额:<text class="money">¥{{item.totalAmount | NumFormat}}</text>
+							商品总额:<text class="money">¥{{item.totalAmount | formatPrice}}</text>
 						</view>
 					</view>
 				</view>
@@ -68,9 +68,6 @@
 			this.initData = this.shopOrderData
 		},
 		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
-			},
 			formatIncludedTax(value) {
 				if (value === '1') {
 				  return '不含税 ';

+ 2 - 6
components/cm-module/orderDetails/orderInformation.vue

@@ -14,7 +14,7 @@
                 <view class="view-num">
                     <text>订单总额:</text>
                     <label class="label">
-                        ¥{{ orderData.payTotalFee ? orderData.payTotalFee : '' | NumFormat }}
+                        ¥{{ orderData.payTotalFee ? orderData.payTotalFee : '' | formatPrice }}
                     </label>
                 </view>
             </view>
@@ -22,7 +22,7 @@
                 <view class="view-num">
                     <text>优惠券:</text>
                     <label class="label">
-                        ¥{{ orderData.couponAmount ? orderData.couponAmount : '' | NumFormat }}
+                        ¥{{ orderData.couponAmount ? orderData.couponAmount : '' | formatPrice }}
                     </label>
                 </view>
             </view>
@@ -70,10 +70,6 @@ export default {
         this.initData(this.information)
     },
     filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        },
         TextFormat(status) {
             //处理金额
             let HtmlText,

+ 1 - 7
components/cm-module/productDetails/cm-activipopu.vue

@@ -10,7 +10,7 @@
                         </view>
                         <view class="ladder-item" v-for="(ladd, index) in product.ladderList" :key="index">
                             <view class="ladder-item-td">{{ ladd.buyNum }}</view>
-                            <view class="ladder-item-td">{{ ladd.buyPrice | NumFormat }}</view>
+                            <view class="ladder-item-td">{{ ladd.buyPrice | formatPrice }}</view>
                         </view>
                     </view>
                 </view>
@@ -35,12 +35,6 @@ export default {
             default: false
         }
     },
-    filters: {
-        NumFormat: function(text) {
-            //处理金额
-            return Number(text).toFixed(2)
-        }
-    },
     created() {
         console.log(this.product)
     },

+ 4 - 10
components/cm-module/productDetails/cm-price-activity.vue

@@ -23,7 +23,7 @@
                             </view>
                             <view class="ladder-item" v-for="(ladd, index) in product.ladderList" :key="index">
                                 <view class="ladder-item-td">{{ ladd.buyNum }}</view>
-                                <view class="ladder-item-td">{{ ladd.buyPrice | NumFormat }}</view>
+                                <view class="ladder-item-td">{{ ladd.buyPrice | formatPrice }}</view>
                             </view>
                         </view>
                     </view>
@@ -41,12 +41,12 @@
                             <text>购买{{ product.promotion.name }}商品,满</text>
                             <text class="txt"
                                 >¥{{
-                                    product.promotion == null ? '0.00' : product.promotion.touchPrice | NumFormat
+                                    product.promotion == null ? '0.00' : product.promotion.touchPrice | formatPrice
                                 }}</text
                             >减
                             <text class="txt"
                                 >¥{{
-                                    product.promotion == null ? '0.00' : product.promotion.reducedPrice | NumFormat
+                                    product.promotion == null ? '0.00' : product.promotion.reducedPrice | formatPrice
                                 }}</text
                             >
                         </view>
@@ -54,7 +54,7 @@
                             <text>购买{{ product.promotion.name }}商品,满</text>
                             <text class="txt"
                                 >¥{{
-                                    product.promotion == null ? '0.00' : product.promotion.touchPrice | NumFormat
+                                    product.promotion == null ? '0.00' : product.promotion.touchPrice | formatPrice
                                 }}</text
                             >赠送商品
                         </view>
@@ -119,12 +119,6 @@ export default {
             smallMoney: ''
         }
     },
-    filters: {
-        NumFormat: function(text) {
-            //处理金额
-            return Number(text).toFixed(2)
-        }
-    },
     created() {
         this.InfoData(this.product)
     },

+ 4 - 10
components/cm-module/productDetails/cm-price.vue

@@ -22,7 +22,7 @@
                             </view>
                             <view class="ladder-item" v-for="(ladd, index) in product.ladderList" :key="index">
                                 <view class="ladder-item-td">{{ ladd.buyNum }}</view>
-                                <view class="ladder-item-td">{{ ladd.buyPrice | NumFormat }}</view>
+                                <view class="ladder-item-td">{{ ladd.buyPrice | formatPrice }}</view>
                             </view>
                         </view>
                     </view>
@@ -40,12 +40,12 @@
                             <text>购买{{ product.promotion.name }}商品,满</text>
                             <text class="txt"
                                 >¥{{
-                                    product.promotion == null ? '0.00' : product.promotion.touchPrice | NumFormat
+                                    product.promotion == null ? '0.00' : product.promotion.touchPrice | formatPrice
                                 }}</text
                             >减
                             <text class="txt"
                                 >¥{{
-                                    product.promotion == null ? '0.00' : product.promotion.reducedPrice | NumFormat
+                                    product.promotion == null ? '0.00' : product.promotion.reducedPrice | formatPrice
                                 }}</text
                             >
                         </view>
@@ -53,7 +53,7 @@
                             <text>购买{{ product.promotion.name }}商品,满</text>
                             <text class="txt"
                                 >¥{{
-                                    product.promotion == null ? '0.00' : product.promotion.touchPrice | NumFormat
+                                    product.promotion == null ? '0.00' : product.promotion.touchPrice | formatPrice
                                 }}</text
                             >赠送商品
                         </view>
@@ -118,12 +118,6 @@ export default {
             smallMoney: ''
         }
     },
-    filters: {
-        NumFormat: function(text) {
-            //处理金额
-            return Number(text).toFixed(2)
-        }
-    },
     created() {
         this.InfoData(this.product)
     },

+ 3 - 3
main.js

@@ -17,9 +17,9 @@ Vue.config.productionTip = false
 // 静态文件base路径
 Vue.prototype.$Static = 'https://static.caimei365.com/app/mini-hehe/icon/'
 
-Vue.filter('formatPrice', function(price){
-	if (!price) return '0.00'
-	return Number(price).toFixed(2)
+Vue.filter('formatPrice', function(price) {
+    if (!price) return '0.00'
+    return Number(price).toFixed(2)
 })
 
 Vue.use(Crypto)

+ 20 - 13
pages.json

@@ -224,7 +224,8 @@
                 {
                     "path": "order-list",
                     "style": {
-                        "navigationBarTitleText": "订单列表"
+                        "navigationBarTitleText": "订单列表",
+                        "navigationStyle": "custom"
                     }
                 },
                 {
@@ -233,18 +234,24 @@
                         "navigationBarTitleText": "订单详情"
                     }
                 },
-				{
-				    "path": "success",
-				    "style": {
-				        "navigationBarTitleText": "支付成功"
-				    }
-				},
-				{
-				    "path": "error",
-				    "style": {
-				        "navigationBarTitleText": "支付失败"
-				    }
-				},
+                {
+                    "path": "order-search",
+                    "style": {
+                        "navigationBarTitleText": "订单搜索"
+                    }
+                },
+                {
+                    "path": "success",
+                    "style": {
+                        "navigationBarTitleText": "支付成功"
+                    }
+                },
+                {
+                    "path": "error",
+                    "style": {
+                        "navigationBarTitleText": "支付失败"
+                    }
+                },
                 {
                     "path": "order-logistics",
                     "style": {

+ 4 - 8
pages/goods/cart.vue

@@ -99,16 +99,16 @@
             <template>
                 <view class="discounted-ditail">
                     <view class="row">
-                        <text>商品总额</text> <text>¥{{ allPrice | NumFormat }}</text>
+                        <text>商品总额</text> <text>¥{{ allPrice | formatPrice }}</text>
                     </view>
                     <view class="row">
-                        <text>促销满减</text> <text class="red">-¥{{ discountedPrice | NumFormat }}</text>
+                        <text>促销满减</text> <text class="red">-¥{{ discountedPrice | formatPrice }}</text>
                     </view>
                     <view class="row" v-if="currentCouponIndex > -1 && currentCoupon">
-                        <text>优惠券</text> <text class="red">-¥{{ currentCoupon.couponAmount | NumFormat }}</text>
+                        <text>优惠券</text> <text class="red">-¥{{ currentCoupon.couponAmount | formatPrice }}</text>
                     </view>
                     <view class="row total">
-                        <text>总计</text> <text>¥{{ finallyPrice | NumFormat }}</text>
+                        <text>总计</text> <text>¥{{ finallyPrice | formatPrice }}</text>
                     </view>
                     <view class="tip"> 实际订单金额以结算页为准 </view>
                 </view>
@@ -297,10 +297,6 @@ export default {
         }
     },
     filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        },
         totalprice(val, count) {
             //单件商品的价格 × 数量
             return (val * count).toFixed(2)

+ 0 - 6
pages/goods/goods-coupon-list-search.vue

@@ -116,12 +116,6 @@ export default {
             contentModalText: '确定删除历史记录?'
         }
     },
-    filters: {
-        priceFormat: function(price) {
-            //处理金额
-            return Number(price).toFixed(2)
-        }
-    },
     computed: {
         ...mapGetters(['hasLogin', 'userInfo', 'userId', 'kindCount']),
         loadingText() {

+ 0 - 6
pages/goods/goods-coupon-list.vue

@@ -72,12 +72,6 @@ export default {
             isSticky: false
         }
     },
-    filters: {
-        //处理金额
-        PriceFormat: function(text) {
-            return Number(text).toFixed(2)
-        }
-    },
     onLoad(options) {
         this.listQuery.couponId = options.couponId
         this.listQuery.userId = this.userId

+ 2 - 8
pages/goods/search.vue

@@ -64,8 +64,8 @@
                         </view>
                         <view class="product-price">
                             <view class="price">
-                                <text>¥{{ pro.price | PriceFormat }}</text>
-                                <text class="delete">¥{{ pro.price | PriceFormat }}</text>
+                                <text>¥{{ pro.price | formatPrice }}</text>
+                                <text class="delete">¥{{ pro.price | formatPrice }}</text>
                             </view>
                             <text class="carts-add iconfont icon-gouwuche" @click.stop="handAddCarts(pro)"></text>
                         </view>
@@ -159,12 +159,6 @@ export default {
             this.InitGetSerachRecord()
         }
     },
-    filters: {
-        PriceFormat: function(text) {
-            //处理金额
-            return Number(text).toFixed(2)
-        }
-    },
     computed: {
         ...mapGetters(['hasLogin', 'userId', 'userIdentity'])
     },

+ 3 - 10
pages/order/create-order.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="create-order" :class="{'has-bottom': isIphoneX}">
+	<view class="create-order">
 		<!-- 收货地址 -->
 		<view class="order-top">
 			<cm-choose-address :addressData="addressData"></cm-choose-address>
@@ -319,13 +319,10 @@ export default {
 .create-order {
 	background: #f7f7f7;
 	min-height: 100vh;
-	padding-top: 136rpx;
+	padding-top: 134rpx;
+    padding-bottom: 100rpx;
 	box-sizing: border-box;
 	
-	&.has-bottom{
-		padding-bottom: 100rpx;
-	}
-	
 	.order-top{
 		width: 100%;
 		position: fixed;
@@ -346,10 +343,6 @@ export default {
 
 	.order-section {
 		padding: 38rpx 0;
-		margin-top: 20rpx;
-		&:first-child {
-			margin-top: 0;
-		}
 	}
 
 	.goods-list {

+ 1 - 7
pages/order/error.vue

@@ -9,7 +9,7 @@
 			</view>
 			<view class="container-money">
 				<view class="label">支付金额</view>
-				<view class="money">¥{{ orderInfo.payableAmount | NumFormat }}</view>
+				<view class="money">¥{{ orderInfo.payableAmount | formatPrice }}</view>
 			</view>
 			<view class="container-button">
 				<view class="btn btn-pay" @click="miniWxPayFor(orderInfo)">重新支付</view>
@@ -42,12 +42,6 @@ export default {
 	onLoad() {
 		this.initOrderInfo()
 	},
-	filters: {
-		NumFormat(value) {
-			//处理金额
-			return Number(value).toFixed(2)
-		}
-	},
 	computed: {
 		...mapGetters(['isIphoneX']),
 		hanldOrder() {

+ 1 - 7
pages/order/order-detail.vue

@@ -109,12 +109,6 @@ export default {
 			buttonCount: 0
 		}
 	},
-	filters: {
-		formatPrice(price) {
-			if (!price) return '0.00'
-			return Number(price).toFixed(2)
-		}
-	},
 	computed: {
 		...mapGetters(['userId', 'userIdentity', 'isIphoneX']),
 		// 当前用户是否为协销
@@ -177,7 +171,7 @@ export default {
 	}
 	
 	.detail-top {
-		height: 138rpx + 60rpx;
+		height: 134rpx + 60rpx;
 		position: fixed;
 		top: 0;
 		z-index: 999;

+ 45 - 34
pages/order/order-list.vue

@@ -1,19 +1,22 @@
 <template>
     <view class="order-list">
         <tui-skeleton v-if="isRequest" loadingType="2"></tui-skeleton>
+
+        <cm-header-nav @leftClick="handleLeftClick" @rightClick="handleRightClick"></cm-header-nav>
+
         <!-- 滑块 tabs -->
         <view class="tabs">
-			<tui-tabs
-			    :tabs="tabs"
-			    :currentTab="currentTab"
-			    @change="tabChange"
-			    :sliderWidth="48"
-			    color="#333333"
-			    selectedColor="#FF457B"
-			    sliderBgColor="#FF457B"
-			></tui-tabs>
-		</view>
-        
+            <tui-tabs
+                :tabs="tabs"
+                :currentTab="currentTab"
+                @change="tabChange"
+                :sliderWidth="48"
+                color="#333333"
+                selectedColor="#FF457B"
+                sliderBgColor="#FF457B"
+            ></tui-tabs>
+        </view>
+
         <!-- 协销筛选订单 -->
         <cm-order-filter-control
             @click="handleFilter"
@@ -131,6 +134,7 @@ import CmOrderInvalidModal from '@/components/cm-module/cm-order-invalid-modal/c
 import CmOrderFilterControl from '@/components/cm-module/cm-order-filter-control/cm-order-filter-control.vue'
 import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
 import CmEmpty from '@/components/cm-module/cm-empty/cm-empty.vue'
+import CmHeaderNav from '@/components/cm-module/cm-header-nav/cm-header-nav.vue'
 import { debounce } from '@/common/common.js'
 import orderList from './mixins/orderList.js'
 import wechatPay from './mixins/wechatPay.js'
@@ -143,7 +147,8 @@ export default {
         CmOrderInvalidModal,
         CmOrderFilterControl,
         CmLoading,
-        CmEmpty
+        CmEmpty,
+        CmHeaderNav
     },
     data() {
         return {
@@ -184,17 +189,11 @@ export default {
             screenTab: 0,
             refresh: false,
             loadmore: false, // 正在加载更多
-            isRequest: true,
-        }
-    },
-    filters: {
-        formatPrice(price) {
-            if (!price) return '0.00'
-            return Number(price).toFixed(2)
+            isRequest: true
         }
     },
     computed: {
-        ...mapGetters(['userId', 'userIdentity']), 
+        ...mapGetters(['userId', 'userIdentity']),
         // 当前用户是否为协销
         isDealer() {
             return this.userIdentity === 2
@@ -219,15 +218,27 @@ export default {
             return info
         }
     },
-	onLoad(options) {
-		this.currentTab = options.state
-		this.fetchOrderData()
-	},
+    onLoad(options) {
+        this.currentTab = options.state
+        this.fetchOrderData()
+    },
     // 下拉刷新
     onPullDownRefresh() {
         this.resetOrderList()
     },
     methods: {
+        // 导航栏点击事件
+        handleLeftClick(e) {
+            if (e.index) {
+                uni.switchTab({ url: '/pages/tabBar/index/index' })
+            } else {
+                uni.navigateBack({ delta: 1 })
+            }
+        },
+        handleRightClick() {
+            console.log('search')
+        },
+
         // 重置订单列表
         resetOrderList() {
             this.refresh = true
@@ -310,9 +321,9 @@ export default {
             this.resetOrderList()
             this.fetchOrderData()
         },
-        
+
         // 跳转详情
-        handleToDetail(orderInfo){
+        handleToDetail(orderInfo) {
             this.$api.navigateTo('/pages/order/order-detail?orderId=' + orderInfo.orderId)
         },
 
@@ -342,19 +353,19 @@ export default {
 .order-list {
     min-height: 100vh;
     background: #f7f7f7;
-	
-	.tabs{
-		position: relative;
-		z-index: 100000;
-	}
+
+    .tabs {
+        position: relative;
+        z-index: 100000;
+    }
 
     .swiper {
         &.swiper-hegiht1 {
-            height: calc(100vh - 40px);
+            height: calc(100vh - 44px);
         }
 
         &.swiper-hegiht2 {
-            height: calc(100vh - 80px);
+            height: calc(100vh - 84px);
         }
 
         .scroll-box {
@@ -414,7 +425,7 @@ export default {
                 width: 56rpx;
                 height: 56rpx;
                 border-radius: 4rpx;
-                border: 1px solid #F7F7F7;
+                border: 1px solid #f7f7f7;
                 box-sizing: border-box;
             }
 

+ 36 - 0
pages/order/order-search.vue

@@ -0,0 +1,36 @@
+<template>
+    <view class="order-search"> 
+        <cm-search v-model="keyword"></cm-search>
+    </view>
+</template>
+
+<script>
+import CmSearch from '@/components/cm-module/cm-search/cm-search.vue'    
+export default {
+    components:{
+        CmSearch
+    },
+    data() {
+        return {
+            keyword: ''
+        }
+    },
+    watch:{
+        keyword(nVal){
+            console.log(nVal)
+        }
+    },
+    methods:{
+        handleSearch(){
+            
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.order-search{
+    min-height: 100vh;
+    background: #F7F7F7;
+}    
+</style>

+ 1 - 7
pages/order/success.vue

@@ -9,7 +9,7 @@
 			</view>
 			<view class="container-money">
 				<view class="label">支付金额</view>
-				<view class="money">¥{{ orderInfo.payableAmount | NumFormat }}</view>
+				<view class="money">¥{{ orderInfo.payableAmount | formatPrice }}</view>
 			</view>
 			<view class="container-button">
 				<view class="btn btn-pay" @click="goHome">继续购买</view>
@@ -42,12 +42,6 @@ export default {
 	onLoad() {
 		this.initOrderInfo()
 	},
-	filters: {
-		NumFormat(value) {
-			//处理金额
-			return Number(value).toFixed(2)
-		}
-	},
 	computed: {
 		...mapGetters(['isIphoneX']),
 		hanldOrder() {

+ 6 - 10
pages/tabBar/cart/index.vue

@@ -48,14 +48,14 @@
                         <view class="row">
                             <text>总价:</text> 
                             <text class="total-price">
-                                <text>¥{{ allPrice | NumFormat }}</text>
+                                <text>¥{{ allPrice | formatPrice }}</text>
                                 <text class="delete">¥9999.99</text>
                             </text>
                         </view>
                         <!-- TODO -->
                         <view class="row" v-if="currentCouponIndex > -1 && currentCoupon">
                             <text>共减</text>
-                            <text class="discounted-price">¥{{ currentCoupon.couponAmount | NumFormat }}</text>
+                            <text class="discounted-price">¥{{ currentCoupon.couponAmount | formatPrice }}</text>
                             <text @click="showDiscountedDetail">优惠明细</text>
                             <text
                                 class="iconfont"
@@ -98,18 +98,18 @@
             <template>
                 <view class="discounted-ditail">
                     <view class="row">
-                        <text>商品总额</text> <text>¥{{ allPrice | NumFormat }}</text>
+                        <text>商品总额</text> <text>¥{{ allPrice | formatPrice }}</text>
                     </view>
                     <view class="row">
-                        <text>促销满减</text> <text class="red">-¥{{ discountedPrice | NumFormat }}</text>
+                        <text>促销满减</text> <text class="red">-¥{{ discountedPrice | formatPrice }}</text>
                     </view>
                     <view class="row" v-if="currentCouponIndex > -1 && currentCoupon">
-                        <text>优惠券</text> <text class="red">-¥{{ currentCoupon.couponAmount | NumFormat }}</text>
+                        <text>优惠券</text> <text class="red">-¥{{ currentCoupon.couponAmount | formatPrice }}</text>
                     </view>
                     <view class="row total">
                         <text>总计</text> 
                         <text class="price"> 
-                            <text>¥{{ finallyPrice | NumFormat }}</text>
+                            <text>¥{{ finallyPrice | formatPrice }}</text>
                             <text class="delete">9999.99</text>
                         </text>
                     </view>
@@ -259,10 +259,6 @@ export default {
         }
     },
     filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        },
         totalprice(val, count) {
             //单件商品的价格 × 数量
             return (val * count).toFixed(2)

+ 1 - 1
pages/tabBar/index/index.vue

@@ -208,7 +208,7 @@ export default {
 .home {
     background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-index-bg.png) no-repeat top center;
     background-size: 750rpx auto;
-    background-position-y: -50rpx;
+    background-position-y: -220rpx;
 }
 .swiper-content {
     &.top {

+ 2 - 8
pages/user/activity/activity.vue

@@ -20,8 +20,8 @@
                     </view>
                     <view class="product-list-pri">
                         <view class="price">
-                            <text>¥{{ pro.price | priceFormat }}</text>
-                            <text class="delete">¥{{ pro.price | priceFormat }}</text>
+                            <text>¥{{ pro.price | formatPrice }}</text>
+                            <text class="delete">¥{{ pro.price | formatPrice }}</text>
                         </view>
                         <view class="carts" @click.stop="handAddCarts(pro)">
                             <view class="carts-add"> <text class="iconfont icon-gouwuche"></text> </view>
@@ -78,12 +78,6 @@ export default {
         this.activityName = option.name
         this.getProductActivityDetails()
     },
-    filters: {
-        //处理金额
-        priceFormat: function(text) {
-            return Number(text).toFixed(2)
-        }
-    },
     computed: {
         ...mapGetters(['hasLogin', 'userId', 'kindCount']),
         loadingText() {

+ 3 - 9
pages/user/order/create-order.vue

@@ -10,7 +10,7 @@
             <view class="select-coupon" @click="couponVisible = true" v-if="receiveCouponList.length > 0">
                 <view class="left-title">优惠券</view>
                 <view class="right-content">
-                    <view class="coupon-amount">-¥{{ couponAmount | NumFormat }}</view>
+                    <view class="coupon-amount">-¥{{ couponAmount | formatPrice }}</view>
                     <view class="iconfont icon-chakangengduo"></view>
                 </view>
             </view>
@@ -51,9 +51,9 @@
                     </view>
                     <view class="footer-price">
                         <view class="sum" :class="totalFullReduction == 0 ? 'none' : ''">
-                            <view class="price">总价:¥{{ payAllPrice | NumFormat }}</view>
+                            <view class="price">总价:¥{{ payAllPrice | formatPrice }}</view>
                             <view class="discount" v-if="discountedPrice > 0"
-                                >共减 ¥{{ discountedPrice | NumFormat }}</view
+                                >共减 ¥{{ discountedPrice | formatPrice }}</view
                             >
                         </view>
                     </view>
@@ -163,12 +163,6 @@ export default {
             }
         }
     },
-    filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        }
-    },
     methods: {
         // 获取可用优惠券
         fetchCouponList() {

+ 1 - 7
pages/user/order/error.vue

@@ -17,7 +17,7 @@
             </view>
             <view class="container-money">
                 <view class="label">支付金额</view>
-                <view class="money">¥{{ orderInfo.payableAmount | NumFormat }}</view>
+                <view class="money">¥{{ orderInfo.payableAmount | formatPrice }}</view>
             </view>
             <view class="container-button">
                 <view class="btn btn-pay" @click="miniWxPayFor(orderInfo)">重新支付</view>
@@ -63,12 +63,6 @@ export default {
     onLoad() {
         this.initOrderInfo()
     },
-    filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        }
-    },
     computed: {
         ...mapGetters(['isIphoneX']),
         hanldOrder() {

+ 3 - 9
pages/user/order/order-list-retail.vue

@@ -104,7 +104,7 @@
                                                 </view>
                                                 <view class="productprice">
                                                     <view class="price"
-                                                        ><text>¥{{ pros.price | NumFormat }}</text></view
+                                                        ><text>¥{{ pros.price | formatPrice }}</text></view
                                                     >
                                                     <view class="count"
                                                         ><text class="small">x</text>{{ pros.num }}</view
@@ -121,11 +121,11 @@
                                             class="money"
                                             v-if="order.status == 31 || order.status == 32 || order.status == 33"
                                         >
-                                            已支付:<text class="color">¥{{ order.receiptAmount | NumFormat }}</text>
+                                            已支付:<text class="color">¥{{ order.receiptAmount | formatPrice }}</text>
                                         </view>
                                         <view class="money" v-else>
                                             待付总额:<text class="color"
-                                                >¥{{ order.pendingPayments | NumFormat }}</text
+                                                >¥{{ order.pendingPayments | formatPrice }}</text
                                             >
                                         </view>
                                     </view>
@@ -272,12 +272,6 @@ export default {
     computed: {
         ...mapGetters(['userId'])
     },
-    filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        }
-    },
     onPageScroll(e) {
         this.scrollTop = e.scrollTop
     },

+ 3 - 9
pages/user/order/order-list.vue

@@ -90,7 +90,7 @@
                                                 </view>
                                                 <view class="productprice">
                                                     <view class="price"
-                                                        ><text>¥{{ pros.price | NumFormat }}</text></view
+                                                        ><text>¥{{ pros.price | formatPrice }}</text></view
                                                     >
                                                     <view class="count"
                                                         ><text class="small">x</text>{{ pros.num }}</view
@@ -107,11 +107,11 @@
                                             class="money"
                                             v-if="order.status == 31 || order.status == 32 || order.status == 33"
                                         >
-                                            已支付:<text class="color">¥{{ order.receiptAmount | NumFormat }}</text>
+                                            已支付:<text class="color">¥{{ order.receiptAmount | formatPrice }}</text>
                                         </view>
                                         <view class="money" v-else>
                                             待付总额:<text class="color"
-                                                >¥{{ order.pendingPayments | NumFormat }}</text
+                                                >¥{{ order.pendingPayments | formatPrice }}</text
                                             >
                                         </view>
                                     </view>
@@ -274,12 +274,6 @@ export default {
             }
         })
     },
-    filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        }
-    },
     onPageScroll(e) {
         this.scrollTop = e.scrollTop
     },

+ 4 - 10
pages/user/order/search-order.vue

@@ -105,7 +105,7 @@
                                                     class="price tui-skeleton-fillet"
                                                     :class="PromotionsFormat(pros.productPromotion) ? 'disabled' : ''"
                                                 >
-                                                    <text>¥{{ pros.price | NumFormat }}</text>
+                                                    <text>¥{{ pros.price | formatPrice }}</text>
                                                 </view>
                                                 <view class="count tui-skeleton-fillet">
                                                     <text class="small">x</text>{{ pros.num }}
@@ -123,7 +123,7 @@
                                                         :¥{{
                                                             pros.productPromotion == null
                                                                 ? '0.00'
-                                                                : pros.productPromotion.touchPrice | NumFormat
+                                                                : pros.productPromotion.touchPrice | formatPrice
                                                         }}
                                                     </text>
                                                 </view>
@@ -137,12 +137,12 @@
                             </block>
                             <view class="order-footer">
                                 <view class="order-footer-top" v-if="order.discountFee != 0"
-                                    >经理折扣:¥{{ order.discountFee | NumFormat }}</view
+                                    >经理折扣:¥{{ order.discountFee | formatPrice }}</view
                                 >
                                 <view class="order-footer-bot">
                                     <view class="count tui-skeleton-fillet">共{{ order.productCount }}件商品</view>
                                     <view class="money tui-skeleton-fillet"
-                                        >待付总额:¥{{ order.pendingPayments | NumFormat }}</view
+                                        >待付总额:¥{{ order.pendingPayments | formatPrice }}</view
                                     >
                                 </view>
                             </view>
@@ -270,12 +270,6 @@ export default {
             this.InitGetSerachRecord(this.userId)
         })
     },
-    filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        }
-    },
     methods: {
         subMitSearch() {
             if (this.searchInputVal == '') {

+ 1 - 7
pages/user/order/success.vue

@@ -17,7 +17,7 @@
             </view>
             <view class="container-money">
                 <view class="label">支付金额</view>
-                <view class="money">¥{{ orderInfo.payableAmount | NumFormat }}</view>
+                <view class="money">¥{{ orderInfo.payableAmount | formatPrice }}</view>
             </view>
             <view class="container-button">
                 <view class="btn btn-pay" @click="goHome">继续购买</view>
@@ -63,12 +63,6 @@ export default {
     onLoad() {
         this.initOrderInfo()
     },
-    filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        }
-    },
     computed: {
         ...mapGetters(['isIphoneX']),
         hanldOrder() {