Browse Source

上测试

yuwenjun1997 3 years ago
parent
commit
b43e2018df

+ 3 - 10
components/views/cm-cart-expired-area/cm-cart-expired-area.vue

@@ -2,7 +2,9 @@
     <view class="cart-supplier-area">
         <view class="area-top">
             <view class="expired">失效商品{{ expiredList.length }}件</view>
-            <view class="clear" hover-class="hover-class" hover-stay-time="100">清空失效商品</view>
+            <view class="clear" hover-class="hover-class" hover-stay-time="100" @click="$emit('clear')">
+                清空失效商品
+            </view>
         </view>
         <!-- 失效商品列表 -->
         <view class="checkbox">
@@ -27,15 +29,6 @@ export default {
             type: Array,
             default: () => []
         }
-    },
-    data() {
-        return {}
-    },
-    
-    methods: {
-        checkboxChange(checked) {
-            console.log(checked)
-        }
     }
 }
 </script>

+ 16 - 3
components/views/cm-cart-product/cm-cart-product.vue

@@ -15,10 +15,15 @@
                     <view class="tag pt" v-if="productInfo.collageStatus > 0">拼团价</view>
                     <view class="tag hd" v-else-if="productInfo.activeStatus > 0">活动价</view>
                     <view class="tag other" v-else-if="productInfo.discountStatus > 0">限时特价</view>
-                    <view class="tag other" v-else-if="productInfo.couponStatus > 1">{{ productInfo.couponInfo }}</view>
-                    <view class="tag other" v-else-if="productInfo.couponStatus > 0">券后价</view>
+                    <!-- <view class="tag other" v-else-if="productInfo.couponStatus > 1">{{ productInfo.couponInfo }}</view> -->
+                    <!-- <view class="tag other" v-else-if="productInfo.couponStatus > 0">券后价</view> -->
+                </view>
+                <view class="price">
+                    <text>¥{{ productInfo.price | priceFormat }}</text>
+                    <!-- <text class="delete" v-if="productInfo.normalPrice">
+                        ¥{{ productInfo.normalPrice | priceFormat }}
+                    </text> -->
                 </view>
-                <view class="price">¥{{ productInfo.price | priceFormat }}</view>
                 <cm-number-box class="numberbox" v-model="productInfo.num" @change="change"></cm-number-box>
             </template>
         </view>
@@ -106,6 +111,14 @@ export default {
         font-size: 26rpx;
         font-weight: 600;
         color: #f83c6c;
+
+        .delete {
+            font-size: 22rpx;
+            color: #999999;
+            font-weight: normal;
+            text-decoration: line-through;
+            margin-left: 8rpx;
+        }
     }
 
     .numberbox {

+ 0 - 1
components/views/cm-search/cm-search.vue

@@ -7,7 +7,6 @@
                     type="text"
                     confirm-type="search"
                     :placeholder="placeholder"
-                    :focus="false"
                     :value="value"
                     @input="e => $emit('input', e.target.value)"
                     @focus="$emit('focus')"

+ 7 - 1
pages.json

@@ -62,7 +62,7 @@
                 "path": "activity-detail",
                 "style": {
                     "navigationBarTitleText": "活动详情",
-                    "enablePullDownRefresh": false 
+                    "enablePullDownRefresh": false
                 }
             }]
         },
@@ -240,6 +240,12 @@
                     "navigationBarTitleText": "欢迎加入呵呵商城",
                     "enablePullDownRefresh": false
                 }
+            }, {
+                "path": "web-view",
+                "style": {
+                    "navigationBarTitleText": "呵呵商城",
+                    "enablePullDownRefresh": false
+                }
             }]
         }
     ],

+ 24 - 1
pages/tabBar/cart/cart.vue

@@ -53,7 +53,7 @@
                 </view>
                 <!-- 失效商品 -->
                 <view class="supplier-area" v-if="expiredProducts.length > 0">
-                    <cm-cart-expired-area :expiredList="expiredProducts"></cm-cart-expired-area>
+                    <cm-cart-expired-area :expiredList="expiredProducts" @clear="onClearExp"></cm-cart-expired-area>
                 </view>
             </view>
 
@@ -85,6 +85,8 @@
         ></cm-coupon-popup>
         <!-- 确认弹框 -->
         <tui-modal :show="removeModal" content="确认删除选中的商品吗?" @click="onConfirmRemove"></tui-modal>
+        <!-- 清空失效商品确认 -->
+        <tui-modal :show="removeExpModal" content="确认清空失效商品?" @click="onConfirmRemoveExp"></tui-modal>
     </view>
 </template>
 
@@ -110,6 +112,7 @@ const resetData = () => ({
     checkedShopMap: {},
     isChekedAll: false,
     removeModal: false,
+    removeExpModal: false,
 
     // 商品价格
     checkedProductList: [],
@@ -179,6 +182,26 @@ export default {
             }
         },
 
+        // 清空失效商品
+        onClearExp() {
+            this.removeExpModal = true
+        },
+
+        // 确认清空失效商品
+        async onConfirmRemoveExp(e) {
+            // removeProductFromCart
+            if (!e.index) return
+            try {
+                await this.removeFromCart(this.expiredProducts.map(product => product.cartId))
+                this.resetData()
+                this.fetchCartInfo()
+            } catch (e) {
+                console.log('删除失效商品失败')
+            } finally {
+                this.removeExpModal = false
+            }
+        },
+
         // 提交订单
         onSumit() {
             if (this.checkedProductList.length <= 0) {

+ 24 - 13
pages/tabBar/home/home.vue

@@ -9,7 +9,12 @@
             </view>
         </view>
         <!-- 轮播图 -->
-        <cm-banner :list="bannerList" :current="current" @change="index => (current = index)"></cm-banner>
+        <cm-banner
+            :list="bannerList"
+            :current="current"
+            @change="index => (current = index)"
+            @click="onSwiperClick"
+        ></cm-banner>
 
         <!-- 金刚区菜单 -->
         <cm-navbar :modal="navbarList" @click="onNavbarClick"></cm-navbar>
@@ -57,7 +62,7 @@ export default {
     data() {
         return {
             isRequest: true,
-            bannerList: [],
+            bannerData: [],
             navbarList: [],
             floorInfo: {},
             floorList: [],
@@ -68,7 +73,10 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['userId', 'accessToken'])
+        ...mapGetters(['userId', 'accessToken']),
+        bannerList() {
+            return this.bannerData.map(item => item.image)
+        }
     },
     onPullDownRefresh() {
         this.initHomeInfo()
@@ -95,10 +103,7 @@ export default {
 
         // 金刚区菜单导航
         onNavbarClick(navbar) {
-            this.$setStorage('NAVBAR', {
-                type: 'navbar',
-                id: navbar.id
-            })
+            this.$setStorage('NAVBAR', { type: 'navbar', id: navbar.id })
             this.$router.navigateTo('goods/goods-list')
         },
 
@@ -120,15 +125,13 @@ export default {
 
         // 商品楼层轮播图点击事件
         onBannerClick(banner) {
-            console.log(banner)
+            if (!banner.link) return
+            this.$router.navigateTo(`others/web-view?websit=${banner.link}`)
         },
 
         // 更多商品
         onMoreProduct(floor) {
-            this.$setStorage('NAVBAR', {
-                type: 'floor',
-                id: floor.id
-            })
+            this.$setStorage('NAVBAR', { type: 'floor', id: floor.id })
             this.$router.navigateTo('goods/goods-list')
         },
 
@@ -145,11 +148,19 @@ export default {
             this.fetchCouponList()
         },
 
+        // 轮播图跳转
+        onSwiperClick(index) {
+            const link = this.bannerData[index].link
+            if (!link) return
+            this.$router.navigateTo(`others/web-view?websit=${link}`)
+        },
+
         // 获取轮播图列表
         async fetchCarousel() {
             try {
                 const resultCarousel = await fetchHomeCarousel() // 轮播图
-                this.bannerList = resultCarousel.data.map(item => item.image)
+
+                this.bannerData = resultCarousel.data
             } catch (e) {
                 console.log('获取轮播图列表失败')
             }

+ 15 - 0
pages/views/address/address-list.vue

@@ -11,6 +11,7 @@
         <!-- 收货地址列表 -->
         <template v-else>
             <view class="address" v-for="item in list" :key="item.addressId" @click="chooseAddress(item)">
+                <text v-if="item.defaultFlag == 1" class="default-tag">默认</text>
                 <view class="contact">
                     <text class="name" v-text="item.shouHuoRen"></text>
                     <text class="mobile" v-text="item.mobile"></text>
@@ -213,9 +214,23 @@ export default {
     }
 
     .address {
+        position: relative;
         padding: 24rpx;
         margin: 24rpx 0;
         background-color: #fff;
+
+        .default-tag {
+            position: absolute;
+            right: 24rpx;
+            top: 24rpx;
+            font-size: 22rpx;
+            padding: 0 24rpx;
+            line-height: 40rpx;
+            background: #f83c6c;
+            color: #fff;
+            border-radius: 20rpx;
+        }
+
         .contact {
             @include ellipsis(1);
             font-size: 30rpx;

+ 24 - 1
pages/views/cart/cart.vue

@@ -60,7 +60,7 @@
             </view>
             <!-- 失效商品 -->
             <view class="supplier-area" v-if="expiredProducts.length > 0">
-                <cm-cart-expired-area :expiredList="expiredProducts"></cm-cart-expired-area>
+                <cm-cart-expired-area :expiredList="expiredProducts" @clear="onClearExp"></cm-cart-expired-area>
             </view>
             <view style="height: 100rpx;"></view>
             <!-- 安全区域 -->
@@ -92,6 +92,8 @@
         ></cm-coupon-popup>
         <!-- 确认弹框 -->
         <tui-modal :show="removeModal" content="确认删除选中的商品吗?" @click="onConfirmRemove"></tui-modal>
+        <!-- 清空失效商品确认 -->
+        <tui-modal :show="removeExpModal" content="确认清空失效商品?" @click="onConfirmRemoveExp"></tui-modal>
     </view>
 </template>
 
@@ -128,6 +130,7 @@ const resetData = () => ({
     checkedShopMap: {},
     isChekedAll: false,
     removeModal: false,
+    removeExpModal: false,
 
     // 商品价格
     checkedProductList: [],
@@ -208,6 +211,26 @@ export default {
             }
         },
 
+        // 清空失效商品
+        onClearExp() {
+            this.removeExpModal = true
+        },
+
+        // 确认清空失效商品
+        async onConfirmRemoveExp(e) {
+            // removeProductFromCart
+            if (!e.index) return
+            try {
+                await this.removeFromCart(this.expiredProducts.map(product => product.cartId))
+                this.resetData()
+                this.fetchCartInfo()
+            } catch (e) {
+                console.log('删除失效商品失败')
+            } finally {
+                this.removeExpModal = false
+            }
+        },
+
         // 提交订单
         onSumit() {
             if (this.checkedProductList.length <= 0) {

+ 4 - 3
pages/views/goods/goods-detail.vue

@@ -246,7 +246,8 @@ export default {
             this.posterData = {
                 porductName: this.productInfo.name,
                 productPrice: this.productInfo.price,
-                productOriginPrice: this.productInfo.normalPrice,
+                productOriginPrice:
+                    this.productInfo.normalPrice === this.productInfo.price ? 0 : this.productInfo.normalPrice,
                 productImage: 'https://picsum.photos/1000/1000?random=1',
                 query: query
             }
@@ -389,9 +390,9 @@ export default {
             const obj = Object.assign({}, coupon)
             // 添加标题
             if (coupon.noThresholdFlag > 0) {
-                obj.couponTitle = `减${coupon.couponAmount}`
+                obj.couponTitle = `减${coupon.couponAmount.toFixed(2)}`
             } else {
-                obj.couponTitle = `满${coupon.touchPrice}减${coupon.couponAmount}`
+                obj.couponTitle = `满${coupon.touchPrice.toFixed(2)}减${coupon.couponAmount.toFixed(2)}`
             }
             // 添加优惠券状态
             if (obj.useStatus === 0) {

+ 104 - 5
pages/views/order/order-detail.vue

@@ -11,12 +11,44 @@
                 <order-supplier-area :shopInfo="shopInfo"></order-supplier-area>
                 <tui-divider :height="48"></tui-divider>
                 <!-- 商品统计 -->
-                <view class="total">
+                <!-- <view class="total">
                     <view class="count">共{{ shopInfo.itemCount }}件商品</view>
                     <view class="price">
                         <text class="label">商品总额:</text>
                         <text>¥{{ shopInfo.totalAmount | priceFormat }}</text>
                     </view>
+                </view> -->
+                <view class="remark">
+                    <text class="label">留言:</text>
+                    <text class="content">{{ shopInfo.note }}</text>
+                </view>
+                <tui-divider :height="48"></tui-divider>
+                <view class="description">
+                    <view class="collapse-content" v-if="isCollapse">
+                        <view class="row">
+                            <text class="label">商品总额:</text>
+                            <text class="content">¥{{ shopInfo.needPayAmount | priceFormat }}</text>
+                        </view>
+                        <view class="row">
+                            <text class="label">优惠:</text>
+                            <text class="content">¥{{ shopInfo.eachDiscount | priceFormat }}</text>
+                        </view>
+                        <view class="row">
+                            <text class="label">应付金额:</text>
+                            <text class="content">¥{{ shopInfo.realPay | priceFormat }}</text>
+                        </view>
+                        <view class="row">
+                            <text class="label">已付金额:</text>
+                            <text class="content">¥{{ shopInfo.receiptAmount | priceFormat }}</text>
+                        </view>
+                    </view>
+                    <view class="row">
+                        <text class="label active">待付金额:</text>
+                        <text class="content active">¥{{ shopInfo.restAmount | priceFormat }}</text>
+                    </view>
+                    <view class="collapse" :class="isCollapse ? 'arrowup' : 'arrowdown'" @click="onCollapse">
+                        {{ isCollapse ? '收起' : '展开' }}
+                    </view>
                 </view>
             </view>
         </view>
@@ -52,7 +84,8 @@ export default {
             discernReceiptList: [],
             orderInfo: {},
             shopOrderList: [],
-            userInfo: {}
+            userInfo: {},
+            isCollapse: false
         }
     },
     computed: {
@@ -73,6 +106,9 @@ export default {
             } catch (e) {
                 console.log(e)
             }
+        },
+        onCollapse() {
+            this.isCollapse = !this.isCollapse
         }
     }
 }
@@ -80,7 +116,7 @@ export default {
 
 <style lang="scss" scoped>
 .order-detail {
-    margin-bottom: 150rpx;
+    margin-bottom: 162rpx;
 }
 
 .order-top {
@@ -100,8 +136,7 @@ export default {
     align-items: flex-end;
     background-color: #fff;
     box-sizing: border-box;
-    padding: 0 24rpx;
-    padding-top: 12rpx;
+    padding: 12rpx 24rpx;
 }
 
 .shop-list {
@@ -131,5 +166,69 @@ export default {
             }
         }
     }
+
+    .remark {
+        font-size: 26rpx;
+        color: #333333;
+        padding: 0 24rpx;
+        margin: 8rpx 0;
+    }
+    .description {
+        overflow: hidden;
+        padding: 0 24rpx;
+        font-size: 26rpx;
+        .row {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            margin: 16rpx 0;
+            .label {
+                color: #999999;
+
+                &.active {
+                    color: #333333;
+                }
+            }
+            .content {
+                color: #333333;
+
+                &.active {
+                    color: #ff457b;
+                }
+            }
+        }
+
+        .collapse {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            width: 168rpx;
+            height: 48rpx;
+            margin: 24rpx auto 40rpx;
+            border: 1rpx solid #e1e1e1;
+            border-radius: 8rpx;
+            font-size: 24rpx;
+            color: #b2b2b2;
+            &.arrowdown,
+            &.arrowup {
+                &::after {
+                    content: '';
+                    display: block;
+                    width: 30rpx;
+                    height: 30rpx;
+                    margin-left: 6rpx;
+                    background-repeat: no-repeat;
+                    background-size: 30rpx;
+                    background-position: center;
+                    background-image: url(https://static.caimei365.com/app/mini-hehe/icon/icon-arrowdown.png);
+                }
+            }
+            &.arrowup {
+                &::after {
+                    transform: rotateZ(180deg);
+                }
+            }
+        }
+    }
 }
 </style>

+ 409 - 3
pages/views/order/order-logistics.vue

@@ -1,9 +1,415 @@
 <template>
-    <view class="order-logistics"></view>
+    <view class="container logistics clearfix">
+        <!-- 商品 -->
+        <view class="logistics-container">
+            <view class="logistics-batch" v-for="(item, index) in goodsList" :key="index">
+                <view class="order-item" v-for="(comItem, comIndex) in item.companyList" :key="comIndex">
+                    <view class="goods-title">
+                        <view class="title-logo"><image :src="comItem.shopLogo" mode=""></image></view>
+                        <view class="title-text">{{ comItem.name }}</view>
+                    </view>
+                    <view class="goods-item" v-for="(pros, prosIndex) in comItem.productsList" :key="prosIndex">
+                        <view class="goods-pros-t">
+                            <view class="pros-img"><image :src="pros.image" alt="" /></view>
+                            <view class="pros-product">
+                                <view class="producttitle">{{ pros.productName }}</view>
+                                <view class="productspec">
+                                    购买数量:
+                                    <text class="color">{{ pros.number }}</text>
+                                </view>
+                                <view class="productspec">
+                                    已发货数量:
+                                    <text class="color">{{ pros.logNumber }}</text>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+                <view class="logistics-template">
+                    <!-- 物流信息 -->
+                    <view
+                        class="logistics-content"
+                        v-if="item.logisticsData.length > 0"
+                        v-for="(logItem, loIndex) in item.logisticsData"
+                        :key="loIndex"
+                    >
+                        <view class="logistics-top"><text class="name">物流信息</text></view>
+                        <view class="logistics-warp">
+                            <view class="logistics-warp__wrapper">
+                                <view class="logistics-main">
+                                    <view class="logistics-main-top">
+                                        <view class="main-top" @click="showlogistics(index, loIndex)">
+                                            {{ logItem.expressname }}:
+                                            <text class="expressNumber">{{ logItem.expressNumber }}</text>
+                                            <text class="clipboard" @click.stop="clipboard(logItem.expressNumber)">
+                                                复制
+                                            </text>
+                                            <text
+                                                class="arrow-showMore iconfont icon-web_xiangxiazhankai"
+                                                :style="{
+                                                    transform: logItem.isOpen ? 'rotate(180deg)' : 'rotate(0)',
+                                                    transition: 'transform 0.3s ease'
+                                                }"
+                                            ></text>
+                                        </view>
+                                        <view class="main-bot">发货时间:{{ logItem.expressNewtime }}</view>
+                                    </view>
+                                    <view
+                                        v-if="logItem.expressRecord.length > 0"
+                                        v-for="(infoItem, infoIndex) in logItem.expressRecord"
+                                        :key="infoIndex"
+                                        :class="{ 'logistics-warp--hide': !logItem.isOpen }"
+                                        class="logistics-main-bot logistics-animation"
+                                        :style="{
+                                            transform: logItem.isOpen ? 'translateY(0)' : 'translateY(-50%)',
+                                            '-webkit-transform': logItem.isOpen ? 'translateY(0)' : 'translateY(-50%)'
+                                        }"
+                                    >
+                                        {{ infoItem.time }} {{ infoItem.desc }}
+                                    </view>
+                                    <view
+                                        v-if="logItem.expressRecord.length < 1"
+                                        :class="{ 'logistics-warp--hide': !logItem.isOpen }"
+                                        class="logistics-main-bot logistics-animation"
+                                        :style="{
+                                            transform: logItem.isOpen ? 'translateY(0)' : 'translateY(-50%)',
+                                            '-webkit-transform': logItem.isOpen ? 'translateY(0)' : 'translateY(-50%)'
+                                        }"
+                                    >
+                                        暂无物流信息
+                                    </view>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                    <view class="logistics-content" v-else>暂无物流信息</view>
+                </view>
+            </view>
+        </view>
+    </view>
 </template>
 
 <script>
-export default {}
+import thorui from '@/components/common/tui-clipboard/clipboard.min.js'
+import { fetchLogisticsDetail } from '@/services/api/order.js'
+export default {
+    data() {
+        return {
+            orderId: '',
+            goodsList: []
+        }
+    },
+    onLoad(option) {
+        //商品数据
+        this.orderId = option.orderId
+        this.getData()
+    },
+    methods: {
+        navToListPage(id) {
+            // this.$router.navigateTo('goods/product')
+            // this.$api.navigateTo(`/pages/goods/product?id=${id}`)
+        },
+        showlogistics(index, loIndex) {
+            let getGoodsList = this.goodsList[index],
+                isOpen = getGoodsList.logisticsData[loIndex]['isOpen']
+            this.goodsList[index].logisticsData[loIndex]['isOpen'] = !isOpen
+        },
+        clipboard(data) {
+            thorui.getClipboardData(data, res => {
+                if (res) {
+                    this.$toast('复制成功')
+                } else {
+                    this.$toast('复制失败')
+                }
+            })
+        },
+        async getData() {
+            try {
+                const { data: resData } = fetchLogisticsDetail({ orderId: this.orderId })
+                // 添加订单列表信息
+                let orderListArr = []
+                resData.forEach((item, index) => {
+                    let logisticsArr = [],
+                        companyList = [],
+                        shopOrderList = item.shopOrderList,
+                        logisticsInfos = item.logisticsInformationList
+                    // 添加物流信息
+                    if (logisticsInfos.length > 0) {
+                        logisticsInfos.forEach((loItem, loIndex) => {
+                            let newRouters = []
+                            logisticsArr.push({
+                                expressname: loItem['logisticsCompanyName'],
+                                expressNumber: loItem['nu'],
+                                expressNewtime: item.deliveryTime,
+                                isOpen: false
+                            })
+                            if (loIndex == 0) {
+                                logisticsArr[loIndex]['isOpen'] = true
+                            }
+                            if (loItem.routers) {
+                                loItem.routers.forEach((rItem, rIndex) => {
+                                    newRouters.push({
+                                        desc: rItem.desc,
+                                        time: this.$api.timestampToTime(rItem.time)
+                                    })
+                                })
+                                logisticsArr[loIndex]['expressRecord'] = [...newRouters]
+                            } else {
+                                logisticsArr[loIndex]['expressRecord'] = []
+                            }
+                        })
+                    }
+                    // 供应商信息
+                    shopOrderList.forEach((shopItem, shopIndex) => {
+                        let prosListArr = [],
+                            cmLogisticsRecords = shopItem.logisticsRecordList
+                        // 商品信息
+                        cmLogisticsRecords.forEach((prosItem, prosIndex) => {
+                            prosListArr.push({
+                                id: prosItem.organizeProductID,
+                                productName: prosItem.productName,
+                                image: prosItem.image,
+                                number: prosItem.buyNum,
+                                logNumber: prosItem.num
+                            })
+                        })
+                        companyList.push({
+                            shopLogo: shopItem.shopLogo,
+                            name: shopItem.shopName,
+                            showGoods: cmLogisticsRecords.length > 0,
+                            productsList: [...prosListArr]
+                        })
+                    })
+                    orderListArr.push({
+                        logisticsData: [...logisticsArr],
+                        companyList: [...companyList]
+                    })
+                })
+                this.goodsList = [...orderListArr]
+            } catch (e) {
+                console.log('获取物流信息失败')
+            }
+        }
+    }
+}
 </script>
 
-<style lang="scss"></style>
+<style lang="scss" scoped>
+page {
+    height: auto;
+}
+.logistics-container {
+    width: 100%;
+    height: auto;
+    float: left;
+    background: #f7f7f7;
+    border-top: 1px solid #f8f8f8;
+    .logistics-batch {
+        display: flex;
+        flex-direction: column;
+        margin-bottom: 24rpx;
+    }
+    .order-item {
+        width: 702rpx;
+        padding: 24rpx 24rpx 12rpx 24rpx;
+        height: auto;
+        float: left;
+        background: #ffffff;
+        margin-bottom: 20rpx;
+        .goods-title {
+            width: 100%;
+            height: 48rpx;
+            float: left;
+            margin-bottom: 12rpx;
+            .title-logo {
+                width: 48rpx;
+                height: 48rpx;
+                float: left;
+                border-radius: 8rpx;
+                border: 1px solid #e1e1e1;
+                image {
+                    border-radius: 8rpx;
+                    width: 48rpx;
+                    height: 48rpx;
+                }
+            }
+            .title-text {
+                float: left;
+                margin-left: 16rpx;
+                font-size: 28rpx;
+                color: #333333;
+                text-align: left;
+                line-height: 48rpx;
+                font-weight: bold;
+            }
+        }
+        .goods-item {
+            width: 100%;
+            height: auto;
+            border-bottom: 1px solid #e1e1e1;
+            &:last-child {
+                border-bottom: none;
+            }
+        }
+        .goods-pros-t {
+            display: flex;
+            align-items: center;
+            width: 100%;
+            height: 180rpx;
+            padding: 20rpx 0;
+            .pros-img {
+                width: 180rpx;
+                height: 180rpx;
+                border-radius: 10rpx;
+                margin: 0 26rpx 0 0;
+                border: 1px solid #f3f3f3;
+                image {
+                    width: 100%;
+                    height: 100%;
+                    border-radius: 10rpx;
+                }
+            }
+        }
+        .pros-product {
+            width: 468rpx;
+            height: 100%;
+            line-height: 36rpx;
+            font-size: 26rpx;
+            position: relative;
+            .producttitle {
+                width: 100%;
+                display: inline-block;
+                height: auto;
+                text-overflow: ellipsis;
+                display: -webkit-box;
+                word-break: break-all;
+                -webkit-box-orient: vertical;
+                -webkit-line-clamp: 2;
+                overflow: hidden;
+                margin-bottom: 28rpx;
+            }
+            .productspec {
+                height: 36rpx;
+                color: #999999;
+                line-height: 36rpx;
+                font-size: 26rpx;
+                .color {
+                    color: #333333;
+                }
+            }
+        }
+    }
+}
+
+.logistics-template {
+    width: 702rpx;
+    height: 100%;
+    background: #ffffff;
+    float: left;
+    padding: 24rpx 24rpx 12rpx 24rpx;
+    .logistics-content {
+        width: 100%;
+        padding: 20rpx 0;
+        height: auto;
+        .arrow-showMore {
+            position: absolute;
+            right: 24rpx;
+            z-index: 99;
+        }
+        .logistics-top {
+            width: 100%;
+            height: 40rpx;
+            line-height: 40rpx;
+            font-size: 28rpx;
+            color: #333;
+            text-align: left;
+            padding-bottom: 24rpx;
+            border-bottom: 1px solid #f8f8f8;
+            .name {
+                float: left;
+                font-weight: bold;
+            }
+            .icon-web_xiangxiazhankai {
+                transform: rotate(0deg);
+                transform-origin: center center;
+                float: right;
+                font-size: 32rpx;
+                color: #000000;
+                /* transition: transform 0.3s ease;*/
+                transition-property: transform;
+                transition-duration: 0.3s;
+                transition-timing-function: ease;
+            }
+            .icon-web_xiangxiazhankai-active {
+                transform: rotate(180deg);
+            }
+        }
+        .logistics-warp {
+            width: 100%;
+            overflow: hidden;
+            .table {
+                height: 76rpx;
+                line-height: 76rpx;
+                font-size: 26rpx;
+                color: #333;
+                text-align: left;
+            }
+            .expressNumber {
+                width: 250rpx;
+                display: inline-block;
+            }
+        }
+        .logistics-main-top {
+            width: 100%;
+            height: auto;
+            float: left;
+            padding-top: 24rpx;
+            .main-top,
+            .main-bot {
+                font-size: 28rpx;
+                color: #333;
+                line-height: 40rpx;
+                margin: 4rpx 0;
+            }
+        }
+        .logistics-main-bot {
+            width: 100%;
+            height: auto;
+            font-size: 24rpx;
+            color: #333;
+            line-height: 56rpx;
+            text-align: justify;
+            float: left;
+        }
+        .logistics-animation {
+            /* transition: transform 0.3s ease;*/
+            transition-property: transform;
+            transition-duration: 0.3s;
+            transition-timing-function: ease;
+        }
+        .logistics-warp__wrapper {
+            /* #ifndef APP-NVUE */
+            display: flex;
+            /* #endif */
+            flex-direction: column;
+        }
+        .logistics-warp--hide {
+            // padding: 0 0;
+            // height: 0px;
+            // line-height: 0px;
+            display: none;
+        }
+        .clipboard {
+            width: 80rpx;
+            height: 40rpx;
+            background: #fff8fd;
+            text-align: center;
+            font-size: 22rpx;
+            color: #ff457b;
+            border-radius: 7rpx;
+            line-height: 40rpx;
+            display: inline-block;
+        }
+    }
+}
+</style>

+ 25 - 53
pages/views/order/order-pay.vue

@@ -13,16 +13,17 @@
                                 <view class="title">{{ product.name }}</view>
                                 <view class="unit">规格:{{ product.productUnit }}</view>
                                 <view class="tags">
-                                    <template v-if="product.activeStatus">
-                                        <view class="tag type1" v-if="userId === product.heUserId">促销</view>
-                                        <view class="tag type1" v-else>自营</view>
-                                        <view
-                                            class="tag type2"
-                                            v-if="product.ladderList && product.ladderList.length > 0"
-                                        >
-                                            活动价
-                                        </view>
-                                    </template>
+                                    <!-- 促销 自营 -->
+                                    <view class="tag cx" v-if="userId === product.heUserId">促销</view>
+                                    <view class="tag cx" v-else>自营</view>
+                                    <!-- 拼团价  活动价  限时特价  券后价   -->
+                                    <view class="tag pt" v-if="isCollagePrice(product)">拼团价</view>
+                                    <view class="tag hd" v-else-if="isActivityPrice(product)">活动价</view>
+                                    <view class="tag other" v-else-if="isDiscountPrice(product)">限时特价</view>
+                                    <view class="tag other" v-else-if="product.couponStatus > 1">
+                                        {{ product.couponInfo }}
+                                    </view>
+                                    <view class="tag other" v-else-if="product.couponStatus > 0">券后价</view>
                                 </view>
                                 <view class="price">
                                     <text class="active">¥{{ product.price | priceFormat }}</text>
@@ -33,8 +34,8 @@
                     </template>
                 </view>
                 <view class="total">
-                    <text v-if="order.eachDiscount">优惠:¥{{ order.eachDiscount }}</text>
-                    <text v-if="order.receiptAmount">已付:¥{{ order.receiptAmount }}</text>
+                    <text>优惠:¥{{ order.eachDiscount | priceFormat }}</text>
+                    <text>已付:¥{{ order.receiptAmount | priceFormat }}</text>
                 </view>
                 <view class="foot" v-if="order.receiptStatus !== 3">
                     <view class="price">
@@ -135,6 +136,18 @@ export default {
                 console.log('获取订单信息失败')
                 console.log(e)
             }
+        },
+        // 活动价
+        isActivityPrice(product) {
+            return product.activeStatus > 0 || product.actProduct === '1'
+        },
+        // 拼团价
+        isCollagePrice(product) {
+            return product.collageStatus > 0 || product.actProduct === '2'
+        },
+        // 限时特价
+        isDiscountPrice(product) {
+            return product.discountStatus > 0 || product.actProduct === '3'
         }
     }
 }
@@ -208,47 +221,6 @@ export default {
                         color: #999999;
                         margin: 8rpx 0;
                     }
-                    .tags {
-                        display: flex;
-                        justify-content: flex-start;
-                        align-items: center;
-                        width: 100%;
-                        height: 30rpx;
-                        .tag {
-                            margin-right: 8rpx;
-                            font-size: 22rpx;
-                            height: 30rpx;
-                            line-height: 30rpx;
-                            text-align: center;
-
-                            &.type1 {
-                                padding: 0 8rpx;
-                                background: #f83c6c;
-                                border-radius: 4rpx;
-                                color: #fff;
-                            }
-
-                            &.type2 {
-                                width: 80rpx;
-                                color: #f83c6c;
-                                background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png) top
-                                    center no-repeat;
-                                background-size: contain;
-                            }
-                            &.type3 {
-                                width: 80rpx;
-                                background: linear-gradient(270deg, #ff457b 0%, #b03bb8 51%, #6431f2 100%);
-                                color: #fff;
-                                border-radius: 4rpx;
-                            }
-                            &.type4 {
-                                border: 1rpx solid #f83c6c;
-                                padding: 0 6rpx;
-                                color: #f83c6c;
-                                border-radius: 4rpx;
-                            }
-                        }
-                    }
                 }
                 .price {
                     font-size: 26rpx;

+ 24 - 20
pages/views/others/join-us.vue

@@ -1,7 +1,7 @@
 <template>
-    <view class="join-us"> 
+    <view class="join-us">
         <view class="ewm-container">
-            <view class="qrcode"></view>
+            <view class="qrcode"><image :src="staticUrl + 'ewm-contact.png'" mode=""></image></view>
             <view class="message">
                 <view class="row">长按识别二维码</view>
                 <view class="row">加微信获取优惠福利</view>
@@ -15,23 +15,23 @@ export default {}
 </script>
 
 <style lang="scss" scoped>
-.join-us{
+.join-us {
     @extend .cm-flex-center;
     width: 100%;
     height: 100vh;
     background: url(https://static.caimei365.com/app/mini-hehe/icon/bg-join.png) no-repeat center;
     background-size: 100% auto;
     background-color: #fff;
-    
-    .ewm-container{
+
+    .ewm-container {
         position: relative;
         width: 622rpx;
         height: 766rpx;
-        background: #FFFFFF;
+        background: #ffffff;
         border-radius: 16rpx;
-        
-        &::after{
-            content: "";
+
+        &::after {
+            content: '';
             position: absolute;
             bottom: 0;
             left: 50%;
@@ -39,30 +39,34 @@ export default {}
             display: block;
             width: 48rpx;
             height: 8rpx;
-            background: #FF457B;
+            background: #ff457b;
             border-radius: 8rpx 8rpx 0px 0px;
         }
-        
-        .qrcode{
+
+        .qrcode {
             width: 500rpx;
             height: 500rpx;
             margin: 61rpx 61rpx 0;
             background: #000;
             border-radius: 8rpx;
+
+            image {
+                width: 500rpx;
+                height: 500rpx;
+            }
         }
-        
-        .message{
+
+        .message {
             margin-top: 48rpx;
             text-align: center;
             font-size: 40rpx;
             color: #333333;
-            
-            .row{
-                
-                &:first-child{
+
+            .row {
+                &:first-child {
                     font-weight: bold;
                 }
-                &:last-child{
+                &:last-child {
                     margin-top: 8rpx;
                     font-size: 32rpx;
                     color: #666666;
@@ -70,5 +74,5 @@ export default {}
             }
         }
     }
-}    
+}
 </style>

+ 23 - 0
pages/views/others/web-view.vue

@@ -0,0 +1,23 @@
+<template>
+    <web-view class="web-view" :src="websit"></web-view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            websit: ''
+        }
+    },
+    onLoad(options) {
+        this.websit = options.websit && decodeURIComponent(options.websit)
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.web-view {
+    width: 100%;
+    height: 100%;
+}
+</style>