喻文俊 3 anni fa
parent
commit
6081bac980

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

@@ -118,8 +118,7 @@ export default {
         productInfo: {
             deep: true,
             handler: function(nVal) {
-                console.log(nVal)
-                this.navType = this.productInfo.collageStatus === 1 && (this.collageProduct.limitedNum > 0) ? 2 : 1
+                this.navType = this.productInfo.collageStatus === 1 ? 2 : 1
                 this.resetButtonInfo()
             }
         },
@@ -274,11 +273,13 @@ export default {
             
             // 活动价
             if (this.productInfo.activeStatus === 1 && this.productInfo.ladderList) {
-                this.productInfo.ladderList.forEach((item, index) => {
-                    if (this.count >= item.buyNum) {
-                        return item.buyPrice
-                    }
+                let buyPrice = this.productInfo.price
+                
+                // 过滤出符合的优惠价
+                const findList = this.productInfo.ladderList.forEach(item=>{
+                    if(this.count >= item.buyNum) buyPrice = item.buyPrice
                 })
+                return buyPrice
             }
             
             // 其它价格

+ 40 - 40
pages/order/create-order.vue

@@ -1,6 +1,6 @@
 <template>
     <view class="create-order">
-		<tui-skeleton v-if="isRequest" loadingType="2"></tui-skeleton>
+        <tui-skeleton v-if="isRequest" loadingType="2"></tui-skeleton>
         <!-- 收货地址 -->
         <view class="order-top"> <cm-choose-address :addressData="addressData"></cm-choose-address> </view>
         <view class="grid"></view>
@@ -101,8 +101,8 @@ export default {
     },
     data() {
         return {
-			isRequest: true,
-			
+            isRequest: true,
+
             // 收货地址
             addressData: {},
 
@@ -160,16 +160,16 @@ export default {
             const payAllPrice = this.allPrice - this.couponAmount - this.shareReducedAmount
             return payAllPrice <= 0 ? 0 : payAllPrice
         },
-		// 总优惠价格
-		discountedPrice() {
-		    return this.couponAmount + this.shareReducedAmount
-		},
-		// 提交组件状态信息
+        // 总优惠价格
+        discountedPrice() {
+            return this.couponAmount + this.shareReducedAmount
+        },
+        // 提交组件状态信息
         submitOrderInfo() {
             return {
                 allCount: this.allCount,
                 payAllPrice: this.payAllPrice,
-                discountedPrice: this.discountedPrice,
+                discountedPrice: this.discountedPrice
             }
         },
         // 优惠券,分享活动相关参数
@@ -188,11 +188,11 @@ export default {
             }
         },
         // 分享减免金额
-        shareReducedAmount(){
-            return (this.reduction && this.shareReductStatus) ? this.reduction.reducedAmount : 0
+        shareReducedAmount() {
+            return this.reduction && this.shareReductStatus ? this.reduction.reducedAmount : 0
         },
         // 分享减免组件状态信息
-        shareReductionData(){
+        shareReductionData() {
             return {
                 status: this.shareReductStatus,
                 reduction: this.reduction
@@ -200,7 +200,7 @@ export default {
         }
     },
     onLoad(options) {
-		this.isRequest = true
+        this.isRequest = true
         this.getAddressData()
         this.initOptions(options)
         this.orderPaySuccess() // 支付回调
@@ -222,39 +222,39 @@ export default {
         uni.removeStorageSync('commitCartPramsData')
     },
     // 分享朋友圈
-    onShareTimeline() {
-        this.handleShare(2)
-        // 加密
-        const state_str = encodeURIComponent(this.$crypto.encrypt(this.shareData))
-        return {
-            title: '国内外知名美容院线护肤品线上商城',
-            query: `pages/tabBar/index/index?state_str=${state_str}`,
-            imageUrl: this.$Static + 'icon-index-share.jpg'
-        }
-    },
+    // onShareTimeline() {
+    //     this.handleShare(2)
+    //     // 加密
+    //     const state_str = encodeURIComponent(this.$crypto.encrypt(this.shareData))
+    //     return {
+    //         title: '护肤上颜选,正品有好货~',
+    //         query: `/pages/tabBar/index/index?state_str=${state_str}`,
+    //         imageUrl: this.$Static + 'icon-index-share.jpg'
+    //     }
+    // },
     // 分享
     onShareAppMessage(e) {
         this.handleShare(1)
         // 加密
         const state_str = encodeURIComponent(this.$crypto.encrypt(this.shareData))
         return {
-            title: '国内外知名美容院线护肤品线上商城',
-            path: `pages/tabBar/index/index?state_str=${state_str}`,
+            title: '护肤上颜选,正品有好货~',
+            path: `/pages/tabBar/index/index?state_str=${state_str}`,
             imageUrl: this.$Static + 'icon-index-share.jpg'
         }
     },
 
     methods: {
-		// 支付回调执行函数
-		orderPaySuccess(){
-			this.$on('orderPaySuccess', ()=>{
-			    if(this.collageFlag === 1){
-			        uni.redirectTo({ url: `/pages/fight-order/fight-detail?collageId=${this.collageId}` })
-			    }else{
-			        uni.redirectTo({ url: '/pages/order/success' })
-			    }
-			})
-		},
+        // 支付回调执行函数
+        orderPaySuccess() {
+            this.$on('orderPaySuccess', () => {
+                if (this.collageFlag === 1) {
+                    uni.redirectTo({ url: `/pages/fight-order/fight-detail?collageId=${this.collageId}` })
+                } else {
+                    uni.redirectTo({ url: '/pages/order/success' })
+                }
+            })
+        },
         // 分享
         handleShare(shareType) {
             if (!this.reduction) return
@@ -276,14 +276,14 @@ export default {
             // 从商品详情进入
             if (options.type == 'prodcut') {
                 const productInfo = uni.getStorageSync('commitProductInfo')
-                this.subParams.cartType = 2  // 从商品详情提交
+                this.subParams.cartType = 2 // 从商品详情提交
                 this.params.productCount = productInfo.productCount
                 this.params.productId = productInfo.productId
                 this.params.heUserId = productInfo.heUserId || 0
-				this.params.collageFlag = this.collageFlag = productInfo.collageFlag
+                this.params.collageFlag = this.collageFlag = productInfo.collageFlag
                 this.productIds = productInfo.productId.toString()
                 this.allCount = productInfo.allCount
-                this.collageId = parseInt(productInfo.collageId) || 0 
+                this.collageId = parseInt(productInfo.collageId) || 0
             } else {
                 const cartPramsData = uni.getStorageSync('commitCartPramsData')
                 this.subParams.cartType = 1 // 从购物车提交
@@ -376,7 +376,7 @@ export default {
                     this.allPrice = data.totalPrice
                     this.fetchCouponList()
                     this.reduction = res.data.reduction
-					this.isRequest = false
+                    this.isRequest = false
                 })
                 .catch(error => {
                     this.$util.msg(error.msg, 2000)
@@ -469,7 +469,7 @@ export default {
     background: #f7f7f7;
 }
 
-.line{
+.line {
     width: 702rpx;
     height: 1rpx;
     margin: 0 auto;

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

@@ -203,7 +203,7 @@ export default {
         // 加密
         const state_str = encodeURIComponent(this.$crypto.encrypt(shareData))
         return {
-            title: '国内外知名美容院线护肤品线上商城~',
+            title: '护肤上颜选,正品有好货~',
             path: `pages/tabBar/index/index?state_str=${state_str}`,
             imageUrl: 'https://static.caimei365.com/app/mini-hehe/icon/icon-index-share.jpg'
         }