Quellcode durchsuchen

项目结构梳理

yuwenjun1997 vor 3 Jahren
Ursprung
Commit
e3de300acc

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

@@ -135,7 +135,7 @@ export default {
         },
         // 按钮点击
         handleBtnClick() {
-            if (!this.hasLogin) return this.$api.navigateTo('/pages/login/login')
+            if (!this.hasLogin) return this.$api.navigateTo('/pages/authorize/login')
             const clickFns = {
                 0: this.receiveCoupon, // 领取优惠券
                 1: this.useCoupon // 使用优惠券

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

@@ -227,7 +227,7 @@ export default {
         
         // 跳转到创建订单
         toCreateOrder() {
-            this.$api.navigateTo('/pages/order/create-order?type=prodcut')
+            this.$api.navigateTo('/pages/order/order-create?type=prodcut')
         },
         // 跳转首页
         toHome() {
@@ -239,7 +239,7 @@ export default {
         },
         // 去登陆
         toLogin() {
-            uni.navigateTo({ url: '/pages/login/login' })
+            uni.navigateTo({ url: '/pages/authorize/login' })
         },
         // 去购物车
         toCart() {

+ 1 - 1
components/cm-module/productDetails/cm-price-activity.vue

@@ -173,7 +173,7 @@ export default {
             this.$api.navigateTo('/pages/login/apply')
         },
         loginClick() {
-            this.$api.navigateTo('/pages/login/login')
+            this.$api.navigateTo('/pages/authorize/login')
         },
         goGoodActiveFn(id) {
             this.$parent.popupShow = false

+ 1 - 1
components/cm-module/productDetails/cm-price.vue

@@ -172,7 +172,7 @@ export default {
             this.$api.navigateTo('/pages/login/apply')
         },
         loginClick() {
-            this.$api.navigateTo('/pages/login/login')
+            this.$api.navigateTo('/pages/authorize/login')
         },
         goGoodActiveFn(id) {
             this.$parent.popupShow = false

+ 0 - 79
mixins/wechatPay.js

@@ -1,79 +0,0 @@
-import authorize from '@/common/authorize.js'
-
-// 调用微信支付
-function wxRequestPayment(payment) {
-    return new Promise((resolve, reject) => {
-        uni.requestPayment({
-            timeStamp: payment.timeStamp,
-            nonceStr: payment.nonceStr,
-            package: payment.package,
-            signType: payment.signType,
-            paySign: payment.paySign,
-            success: () => {
-                resolve(true)
-            },
-            fail: () => {
-                reject({ msg: 'error' })
-            }
-        })
-    })
-}
-
-// 微信支付
-const wechatPay = {
-    data() {
-        return {
-            loadingText: '请稍等...',
-            isSubLoading: false,
-        }
-    },
-    methods: {
-        // 验证微信支付是否可用
-        miniWxPayFor(data) {
-            this.isSubLoading = true
-            this.PayService.PayOrderOnLineSwitch().then(response => {
-                if (response.data === 1) {
-                    this.weChatMiniWxPay(data)
-                } else {
-                    this.isSubLoading = false
-                    this.$api.navigateTo(`/pages/user/order/order-payment?money=${data.payableAmount}`)
-                }
-            })
-        },
-        // 获取微信支付payment
-        async weChatMiniWxPay(data) {
-            if (this.loadingText) this.loadingText = '等待支付中'
-            try {
-                // 获取微信code
-                const wechatCode = await authorize.getCode('weixin')
-                // 微信支付请求 返回支付信息
-                const response = await this.PayService.WeChatMiniWxPay({
-                    payAmount: data.payableAmount * 100,
-                    payWay: 'WEIXIN',
-                    code: wechatCode,
-                    orderId: data.orderId
-                })
-                // 处理支付信息 调用微信支付
-                const payment = JSON.parse(response.data.data.payInfo)
-                const payFlag = await wxRequestPayment(payment)
-                // 支付成功重定向
-                uni.setStorageSync('orderInfo', this.hanldOrder.order)
-                if (payFlag) {
-                    uni.redirectTo({ url: '/pages/user/order/success' })
-                } else {
-                    uni.redirectTo({ url: '/pages/user/order/error' })
-                }
-            } catch (error) {
-                // 微信支付失败
-                if (error.msg === 'error') {
-                    uni.setStorageSync('orderInfo', this.hanldOrder.order)
-                    uni.redirectTo({ url: '/pages/user/order/error' })
-                } else this.$util.msg(error.msg, 2000)
-            } finally {
-                this.isSubLoading = false
-            }
-        }
-    }
-}
-
-export default wechatPay

+ 8 - 64
pages.json

@@ -9,7 +9,6 @@
 				"backgroundColor": "#F952B7",
 				"navigationBarBackgroundColor": "#F952B7",
 				"navigationBarTextStyle": "white"
-
 			}
 		},
 		{
@@ -33,7 +32,7 @@
 			}
 		},
 		{
-			"path": "pages/login/login",
+			"path": "pages/authorize/login",
 			"style": {
 				"navigationBarTitleText": "登录"
 			}
@@ -105,67 +104,6 @@
 						"onReachBottomDistance": 50
 					}
 				},
-				{
-					"path": "order/create-order",
-					"style": {
-						"navigationBarTitleText": "确认订单"
-					}
-				},
-				{
-					"path": "order/success",
-					"style": {
-						"navigationBarTitleText": "支付结果",
-						"navigationStyle": "custom"
-					}
-				},
-				{
-					"path": "order/error",
-					"style": {
-						"navigationBarTitleText": "支付结果",
-						"navigationStyle": "custom"
-					}
-				},
-				{
-					"path": "order/order-list",
-					"style": {
-						"navigationBarTitleText": "我的订单",
-						"navigationStyle": "custom"
-					}
-				},
-				{
-					"path": "order/order-list-retail",
-					"style": {
-						"navigationBarTitleText": "我的订单",
-						"navigationStyle": "custom"
-					}
-				},
-				{
-					"path": "order/order-details",
-					"style": {
-						"navigationBarTitleText": "订单详情",
-						"navigationStyle": "custom"
-
-					}
-				},
-				{
-					"path": "order/order-payment",
-					"style": {
-						"navigationBarTitleText": "收银台",
-						"navigationStyle": "custom"
-					}
-				},
-				{
-					"path": "order/search-order",
-					"style": {
-						"navigationBarTitleText": "订单搜索"
-					}
-				},
-				{
-					"path": "order/order-logistics",
-					"style": {
-						"navigationBarTitleText": "物流信息"
-					}
-				},
 				{
 					"path": "activity/activity",
 					"style": {
@@ -216,7 +154,7 @@
 		{
 			"root": "pages/order",
 			"pages": [{
-					"path": "create-order",
+					"path": "order-create",
 					"style": {
 						"navigationBarTitleText": "创建订单"
 					}
@@ -252,6 +190,12 @@
 						"navigationBarTitleText": "支付失败"
 					}
 				},
+				{
+					"path": "order-payment",
+					"style": {
+						"navigationBarTitleText": "收银台"
+					}
+				},
 				{
 					"path": "order-logistics",
 					"style": {

+ 1 - 1
pages/authorize/authorize.vue

@@ -106,7 +106,7 @@ export default {
                             self.$api.switchTabTo('/pages/tabBar/index/index')
                             break
                         case '1':
-                            self.$api.navigateTo('/pages/login/login')
+                            self.$api.navigateTo('/pages/authorize/login')
                             break
                         default:
                             setTimeout(() => {

+ 0 - 0
pages/login/login.vue → pages/authorize/login.vue


+ 2 - 2
pages/fight-order/fight-share-entry.vue

@@ -182,7 +182,7 @@ export default {
                         this.initiatorId
                     }`
                 )
-                this.$api.navigateTo('/pages/login/login')
+                this.$api.navigateTo('/pages/authorize/login')
                 return
             }
 
@@ -215,7 +215,7 @@ export default {
                 collageId: this.collageId
             }
             uni.setStorageSync('commitProductInfo', productStp)
-            uni.redirectTo({ url: '/pages/order/create-order?type=prodcut' })
+            uni.redirectTo({ url: '/pages/order/order-create?type=prodcut' })
             this.countVisible = false
         },
 

+ 3 - 2
pages/goods/cart.vue

@@ -348,7 +348,7 @@ export default {
         if (this.hasLogin) {
             this.initData()
         } else {
-            this.$api.redirectTo('/pages/login/login')
+            this.$api.redirectTo('/pages/authorize/login')
         }
     },
     onPageScroll(e) {
@@ -542,7 +542,8 @@ export default {
                 productIds: this.productIds.join(','),
                 productCount: ''
             }
-            this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({ data: cartPramsData })}`)
+            uni.setStorageSync('commitCartPramsData', cartPramsData)
+            this.$api.navigateTo('/pages/order/order-create')
         },
         hideModal() {
             this.modal = false

+ 1 - 1
pages/order/mixins/wechatPay.js

@@ -36,7 +36,7 @@ const wechatPay = {
                     this.weChatMiniWxPay(data)
                 } else {
                     this.isSubLoading = false
-                    this.$api.navigateTo(`/pages/user/order/order-payment?money=${data.payableAmount}`)
+                    this.$api.navigateTo(`/pages/order/order-payment?money=${data.payableAmount}`)
                 }
             })
         },

+ 1 - 1
pages/order/create-order.vue → pages/order/order-create.vue

@@ -431,7 +431,7 @@ export default {
                     this.collageId = data.collageId
                     if (parseFloat(data.payableAmount) === 0) {
                         uni.setStorageSync('orderInfo', this.hanldOrder.order)
-                        uni.redirectTo({ url: '/pages/user/order/success' })
+                        uni.redirectTo({ url: '/pages/order/success' })
                     } else {
                         this.miniWxPayFor(data)
                     }

+ 1 - 1
pages/user/order/order-payment.vue → pages/order/order-payment.vue

@@ -292,7 +292,7 @@ export default {
                 if (res) {
                     this.$util.msg('复制成功', 2000, true, 'success')
                     setTimeout(() => {
-                        this.$api.navigateTo(`/pages/user/order/order-details?state=0&orderId=${this.orderId}`)
+                        this.$api.navigateTo(`/pages/order/order-details?state=0&orderId=${this.orderId}`)
                     }, 2000)
                 } else {
                     this.$util.msg('复制失败', 2000, true, 'none')

+ 2 - 2
pages/tabBar/cart/index.vue

@@ -297,7 +297,7 @@ export default {
         if (this.hasLogin) {
             this.initData()
         } else {
-            this.$api.redirectTo('/pages/login/login')
+            this.$api.redirectTo('/pages/authorize/login')
         }
     },
     onLoad() {
@@ -498,7 +498,7 @@ export default {
                 productCount: ''
             }
 			uni.setStorageSync('commitCartPramsData', cartPramsData)
-            this.$api.navigateTo('/pages/order/create-order')
+            this.$api.navigateTo('/pages/order/order-create')
         },
         hideModal() {
             this.modal = false

+ 4 - 4
pages/tabBar/user/index.vue

@@ -12,7 +12,7 @@
                         mode="widthFix"
                     ></image>
                     <image class="user_default" v-else :src="userInfo.headImgUrl" mode="widthFix"></image>
-                    <view class="user-login" v-if="!hasLogin && isRequest" @click="navigator('/pages/login/login')"
+                    <view class="user-login" v-if="!hasLogin && isRequest" @click="navigator('/pages/authorize/login')"
                         >登录</view
                     >
                     <view class="user-text" v-else> {{ userIdentity == 1 ? userInfo.nickName : userInfo.name }} </view>
@@ -171,7 +171,7 @@ export default {
             console.log(e.detail.query)
         },
         OrderNavigator(state) {
-            if (!this.hasLogin) return this.$api.navigateTo('/pages/login/login')
+            if (!this.hasLogin) return this.$api.navigateTo('/pages/authorize/login')
             // 栏目跳转
             this.$api.navigateTo(`/pages/order/order-list?state=${state}`)
         },
@@ -179,7 +179,7 @@ export default {
             if (this.hasLogin) {
                 this.$api.navigateTo(url)
             } else {
-                this.$api.navigateTo('/pages/login/login')
+                this.$api.navigateTo('/pages/authorize/login')
             }
         },
         stopPullDownRefresh(time){
@@ -193,7 +193,7 @@ export default {
         if (this.hasLogin) {
             this.GetUserInfoPersonal()
         } else {
-            this.$api.navigateTo('/pages/login/login')
+            this.$api.navigateTo('/pages/authorize/login')
             uni.stopPullDownRefresh()
         }
     }

+ 0 - 565
pages/user/order/create-order.vue

@@ -1,565 +0,0 @@
-<template>
-    <view class="container order clearfix" :style="{ paddingBottom: isIphoneX ? '170rpx' : '134rpx' }">
-        <tui-skeleton v-if="isRequest" loadingType="2"></tui-skeleton>
-        <template v-else>
-            <!-- 地址选择 v-if="isAddress" -->
-            <choice-address ref="choiceAddress" :addressData="addressData"></choice-address>
-            <!-- 商品 -->
-            <goodsList ref="goods" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></goodsList>
-            <!-- 选择优惠券 -->
-            <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 | formatPrice }}</view>
-                    <view class="iconfont icon-chakangengduo"></view>
-                </view>
-            </view>
-            <!-- 分享减免 TODO-->
-            <view class="share-reduce">
-                <template v-if="false">
-                    <view class="left-title high">金额满100元,分享可立减10元</view>
-                    <view class="right-content"> <view class="share-btn">点击分享</view> </view>
-                </template>
-                <template v-else>
-                    <view class="left-title">分享减免</view>
-                    <view class="right-content">
-                        <view class="reduce-amount">-¥200.00</view> <view class="iconfont icon-chakangengduo"></view>
-                    </view>
-                </template>
-            </view>
-
-            <!-- 优惠券列表 -->
-            <cm-coupon-list
-                title="优惠券"
-                listType="use"
-                :visible="couponVisible"
-                @close="closeCouponList"
-                :chooseAble="true"
-                :showStatus="false"
-                :couponList="receiveCouponList"
-                @chooseCoupon="chooseCoupon"
-                @confirm="closeCouponList"
-                :currentId="currentCouponId"
-            ></cm-coupon-list>
-            <!-- 运费 -->
-            <seller-freight ref="freight" :freightDatas="freightData"> </seller-freight>
-            <!-- 底部 -->
-            <view class="footer" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
-                <view class="footer-le">
-                    <view class="footer-count">
-                        <text>共{{ allCount }}件商品</text>
-                    </view>
-                    <view class="footer-price">
-                        <view class="sum" :class="totalFullReduction == 0 ? 'none' : ''">
-                            <view class="price">总价:¥{{ payAllPrice | formatPrice }}</view>
-                            <view class="discount" v-if="discountedPrice > 0"
-                                >共减 ¥{{ discountedPrice | formatPrice }}</view
-                            >
-                        </view>
-                    </view>
-                </view>
-                <view class="footer-submit" @click.stop="orderSubmitMit">
-                    <view class="btn" :class="isSubLoading ? 'disabled' : ''">提交订单</view>
-                </view>
-            </view>
-        </template>
-        <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
-    </view>
-</template>
-
-<script>
-import authorize from '@/common/authorize.js'
-import choiceAddress from '@/components/cm-module/createOrder/address'
-import goodsList from '@/components/cm-module/createOrder/goodsList'
-import sellerFreight from '@/components/cm-module/createOrder/sellerFreight'
-import CmCouponList from '@/components/cm-module/cm-coupon-list/cm-coupon-list'
-import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
-import { allProdoceUseCheck, someProductUseCheck, couponSort, setCouponUniqueId } from '@/common/couponUtil.js'
-import { mapGetters } from 'vuex'
-import wechatPay from '@/mixins/wechatPay.js'
-export default {
-    components: {
-        choiceAddress,
-        goodsList,
-        sellerFreight,
-        CmCouponList,
-        CmLoading
-    },
-    // 混入
-    mixins: [wechatPay],
-    data() {
-        return {
-            couponVisible: false,
-            productIds: '', //获取上一级页面商品信息
-            productCount: '', //获取上一级页面商品数量
-            allCount: 1, //订单提交总数量
-            totalFullReduction: 0, //满减金额
-            allPrice: 0.0, //订单总金额
-            townId: '', //区ID
-            isRequest: true, //是否加载完成渲染子组件
-            isAddress: false, //是否加载完成地址
-            addressData: {}, //初始化地址信息
-            goodsData: [], //初始化商品信息
-            freightData: {}, //邮费数据
-            productList: [],
-            params: {
-                userId: 0
-            },
-            subParams: {
-                userId: 0,
-                orderInfo: [], //提交的商品信息
-                addressId: 0,
-                cartType: 0,
-                payInfo: {
-                    orderShouldPayFee: 0
-                }
-            },
-            orderInfo: '',
-            receiveCouponList: [],
-            currentCouponId: -1,
-            currentCoupon: null,
-            loadingText: '正在创建订单',
-            canUseCouponList: [],
-            notUseCouponList: []
-        }
-    },
-    onLoad(option) {
-        //商品数据
-        let data = JSON.parse(option.data)
-        this.allCount = data.data.allCount
-        if (option.type == 'prodcut') {
-            this.subParams.cartType = 2
-            this.params.productCount = data.data.productCount
-            this.params.productId = data.data.productId
-            this.params.heUserId = data.data.heUserId ? data.data.heUserId : 0
-            this.productIds = data.data.productId.toString()
-        } else {
-            this.subParams.cartType = 1
-            this.params.cartIds = data.data.cartIds
-            this.productIds = data.data.productIds
-        }
-        this.params.userId = this.userId
-        this.subParams.userId = this.userId
-        this.getInitCrearOrder(this.params)
-    },
-    computed: {
-        ...mapGetters(['userId', 'isIphoneX']),
-        // 选中的优惠券的金额
-        couponAmount() {
-            return this.currentCoupon ? this.currentCoupon.couponAmount : 0
-        },
-        // 优惠价格
-        discountedPrice() {
-            return this.couponAmount
-        },
-        // 支付金额
-        payAllPrice() {
-            const payAllPrice = this.allPrice - this.couponAmount
-            return payAllPrice < 0 ? 0 : payAllPrice
-        },
-        hanldOrder() {
-            return {
-                order: this.orderInfo
-            }
-        }
-    },
-    methods: {
-        // 获取可用优惠券
-        fetchCouponList() {
-            this.CouponService.GetCouponByProductIds({ userId: this.userId, productIds: this.productIds }).then(res => {
-                this.receiveCouponList = setCouponUniqueId(res.data.receiveCouponList) // 去掉重复的优惠券
-                this.filterCouponList()
-            })
-        },
-        // 对优惠券进行分类排序
-        filterCouponList() {
-            this.goodsData.forEach(shop => this.productList.push(...shop.productList.map(prod => prod)))
-            this.canUseCouponList = [] // 可以使用的优惠券
-            this.notUseCouponList = [] // 需要凑单使用的优惠券
-            this.receiveCouponList.forEach(coupon => {
-                if (
-                    coupon.noThresholdFlag === 1 ||
-                    (coupon.productType === 1 && allProdoceUseCheck(this.productList, coupon)) ||
-                    (coupon.productType === 2 && someProductUseCheck(this.productList, coupon))
-                ) {
-                    coupon.canSelect = true
-                    this.canUseCouponList.push(coupon)
-                } else {
-                    coupon.canSelect = false
-                    this.notUseCouponList.push(coupon)
-                }
-            })
-            // 金额高的排前面
-            this.receiveCouponList = [...couponSort(this.canUseCouponList), ...couponSort(this.notUseCouponList)]
-            // 当有可用优惠券时 默认选取第一个最优惠的
-            if (this.canUseCouponList.length > 0) {
-                this.currentCouponId = this.receiveCouponList[0].uniqueId
-                this.currentCoupon = this.receiveCouponList[0]
-            }
-            // 显示界面
-            this.isRequest = false
-        },
-        // 处理优惠券列表
-        resetCouponList() {
-            // 2将当前选中的优惠券从列表中删除
-            // 3将当前选中的优惠券放入最前面
-            // 4返回最新的优惠券列表
-            // 查找选中优惠券的索引
-            const index = this.canUseCouponList.findIndex(coupon => coupon.uniqueId === this.currentCouponId)
-            // 从列表中删除
-            const currentCoupon = this.canUseCouponList.splice(index, 1)
-            // 重新排序 将选中的优惠券放到最前面
-            this.canUseCouponList = [...currentCoupon, ...couponSort(this.canUseCouponList)]
-            // 重新生成receiveCouponList
-            this.receiveCouponList = [...this.canUseCouponList, ...this.notUseCouponList]
-        },
-        // 确认选中
-        closeCouponList() {
-            this.couponVisible = false
-            this.resetCouponList()
-        },
-        // 选中优惠券
-        chooseCoupon(coupon) {
-            if (coupon.couponId > -1) {
-                this.currentCoupon = coupon
-                this.currentCouponId = coupon.uniqueId
-            } else {
-                this.currentCoupon = null
-                this.currentCouponId = -1
-            }
-            // this.couponVisible = false
-        },
-        //确认订单初始化信息
-        getInitCrearOrder(params) {
-            this.OrderService.QueryOrderConfirm(params)
-                .then(response => {
-                    let data = response.data
-                    this.goodsData = data.shopList
-                    this.allPrice = data.totalPrice
-
-                    this.fetchCouponList()
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        //获取地址信息
-        getAddressData() {
-            this.UserService.QueryAddressList({ pageNum: 1, pageSize: 1, userId: this.userId }).then(response => {
-                this.isAddress = true
-                this.addressData = {}
-                if (response.data.list != '') {
-                    this.subParams.addressId = response.data.list[0].addressId
-                    this.townId = response.data.list[0].townId
-                    this.addressData = response.data.list[0]
-                } else {
-                    this.addressData = this.addressData
-                }
-            })
-        },
-        handChangeInputGoodsList(data) {
-            //对应供应商的留言信息
-            this.goodsData = data
-        },
-        orderSubmitMit() {
-            //提交订单
-            if (this.isSubLoading) return
-            if (this.subParams.addressId == '') return this.$util.msg('请先添加收货地址~', 2000)
-            // 选中的优惠券id
-            this.subParams.couponId = this.currentCouponId === -1 ? '' : this.currentCoupon.couponId
-            this.subParams.couponShareId = this.currentCoupon ? this.currentCoupon.couponShareId : null
-            this.subParams.payInfo.orderShouldPayFee = this.payAllPrice
-            // 处理商品信息及留言
-            this.subParams.orderInfo = this.goodsData.map(el => {
-                let productInfo = []
-                el.productList.forEach(pros => {
-                    productInfo.push({
-                        productId: pros.productId,
-                        productNum: pros.productCount,
-                        heUserId: pros.heUserId
-                    })
-                })
-                return { shopId: el.shopId, note: el.note ? el.note : '', productInfo: productInfo }
-            })
-            this.isSubLoading = true
-            this.loadingText = '正在创建订单...'
-            this.OrderService.CreatedOrderSubmit(this.subParams)
-                .then(response => {
-                    const data = response.data
-                    this.orderInfo = response.data
-                    if (parseFloat(data.payableAmount) === 0) {
-                        uni.setStorageSync('orderInfo', this.hanldOrder.order)
-                        uni.redirectTo({ url: '/pages/user/order/success' })
-                    } else {
-                        this.miniWxPayFor(data)
-                    }
-                })
-                .catch(error => {
-                    this.isSubLoading = false
-                    this.$util.msg(error.msg, 2000)
-                    this.isSubLoading = false
-                })
-        }
-    },
-    onShow() {
-        let pages = getCurrentPages()
-        let currPage = pages[pages.length - 1]
-        if (currPage.data.select == 'select') {
-            this.isAddress = true
-            let SelectData = uni.getStorageSync('selectAddress')
-            this.subParams.addressId = SelectData.addressId
-            this.addressData = SelectData
-        } else {
-            this.getAddressData()
-        }
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-page {
-    height: auto;
-    background: #f7f7f7;
-}
-.container {
-    height: initial;
-}
-.btn-hover {
-    background: #ffffff;
-}
-.animation {
-    /* transition: transform 0.3s ease;*/
-    transition-property: transform;
-    transition-duration: 0.3s;
-    transition-timing-function: ease;
-}
-.invoice-freight {
-    width: 702rpx;
-    padding: 0 24rpx;
-    height: 86rpx;
-    line-height: 86rpx;
-    font-size: $font-size-28;
-    color: $text-color;
-    background: #ffffff;
-    float: left;
-    font-weight: bold;
-    .freight-left {
-        float: left;
-        .icon-yunfeishuoming {
-            height: 100%;
-            padding: 0 15rpx;
-            color: $color-system;
-            font-weight: normal;
-        }
-    }
-    .freight-right {
-        float: right;
-        color: #2a81ff;
-    }
-}
-
-.select-coupon,
-.share-reduce {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    padding: 0 24rpx;
-    margin: 24rpx 0;
-    height: 90rpx;
-    background: #fff;
-    .left-title {
-        font-weight: bold;
-        color: #333333;
-        font-size: 28rpx;
-        .high{
-            color: #ff457b;
-        }
-    }
-    .right-content {
-        display: flex;
-        justify-content: flex-start;
-        align-items: center;
-        .coupon-amount,
-        .reduce-amount,
-        .share-btn {
-            font-size: 28rpx;
-            color: #ff457b;
-            margin-right: 12rpx;
-        }
-        .iconfont {
-            font-size: 28rpx;
-            color: #b2b2b2;
-        }
-    }
-}
-
-.invoice-balance {
-    width: 702rpx;
-    height: auto;
-    padding: 0 24rpx;
-    background: #ffffff;
-    float: left;
-    margin-top: 24rpx;
-    margin-bottom: 24rpx;
-    .balabce-t {
-        width: 100%;
-        height: 86rpx;
-        line-height: 86rpx;
-        font-size: $font-size-28;
-        color: $text-color;
-        float: left;
-        .balabce-t-le {
-            float: left;
-            font-weight: bold;
-        }
-        .balabce-t-ri {
-            float: right;
-            display: flex;
-            align-items: center;
-            .money {
-                display: flex;
-                float: left;
-            }
-            .checkbox-box {
-                display: flex;
-                width: 60rpx;
-                float: left;
-                height: 100%;
-                font-size: $font-size-24;
-                .checkbox {
-                    width: 40rpx;
-                    text-align: right;
-                    box-sizing: border-box;
-                    text-align: center;
-                    text-decoration: none;
-                    border-radius: 0;
-                    -webkit-tap-highlight-color: transparent;
-                    overflow: hidden;
-                    color: $color-system;
-                    padding: 5rpx;
-                }
-            }
-        }
-    }
-    .balabce-b {
-        width: 100%;
-        float: left;
-        overflow: hidden;
-        .balabce-b-text {
-            width: 100%;
-            line-height: 58rpx;
-            font-size: $font-size-24;
-            color: #ff457b;
-            text-align: right;
-            float: right;
-        }
-        &.balabce-b--hide {
-            padding: 0 0;
-            height: 0px;
-            line-height: 0px;
-        }
-    }
-}
-.footer {
-    position: fixed;
-    left: 0;
-    bottom: 0;
-    z-index: 995;
-    display: flex;
-    align-items: center;
-    width: 100%;
-    height: 110rpx;
-    justify-content: space-between;
-    font-size: $font-size-28;
-    background-color: #ffffff;
-    z-index: 998;
-    color: $text-color;
-    border-top: 1px solid #f7f7f7;
-    .footer-le {
-        width: 570rpx;
-        height: 100%;
-        float: left;
-    }
-    .footer-count {
-        float: left;
-        padding-left: 24rpx;
-        line-height: 110rpx;
-        width: 170rpx;
-        box-sizing: border-box;
-        font-size: $font-size-26;
-    }
-    .footer-price {
-        float: right;
-        text-align: right;
-        color: $text-color;
-        padding-right: 20rpx;
-        box-sizing: border-box;
-        width: 370rpx;
-        padding-left: 24rpx;
-        .sum {
-            display: flex;
-            justify-content: center;
-            flex-direction: column;
-            align-items: flex-start;
-            width: 100%;
-            height: 110rpx;
-            .price {
-                font-size: $font-size-32;
-                color: $color-system;
-            }
-            .discount {
-                // margin-top: 32rpx;
-                font-size: $font-size-24;
-                color: #ff457b;
-            }
-        }
-    }
-    .footer-submit {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        width: 210rpx;
-        height: 100%;
-        box-sizing: border-box;
-        padding: 15rpx 5rpx;
-        .btn {
-            width: 100%;
-            height: 100%;
-            color: #ffffff;
-            background: $btn-confirm;
-            font-size: $font-size-26;
-            text-align: center;
-            line-height: 80rpx;
-            border-radius: 40rpx;
-            &.disabled {
-                background: #e4e8eb;
-                color: #999999;
-            }
-        }
-    }
-}
-.Rebate {
-    width: 702rpx;
-    height: auto;
-    padding: 0 24rpx;
-    background: #ffffff;
-    float: left;
-    margin-bottom: 24rpx;
-    margin-bottom: 24rpx;
-    line-height: 86rpx;
-    .rebate-title {
-        float: left;
-        font-weight: bold;
-        color: #333333;
-        font-size: $font-size-28;
-    }
-    .iconfont {
-        float: right;
-        color: #b2b2b2;
-        font-size: 40rpx;
-        &.icon-yixuanze {
-            color: $color-system;
-        }
-    }
-}
-</style>

+ 0 - 181
pages/user/order/error.vue

@@ -1,181 +0,0 @@
-<template>
-    <view class="container cashier">
-        <header-pay
-            :systeminfo="systeminfo"
-            :navbar-data="nvabarData"
-            :headerBtnPosi="headerBtnPosi"
-            :isBackType="true"
-            :path="'/pages/user/cart/cart'"
-        >
-        </header-pay>
-        <view class="container-cash clearfix" :style="{ marginTop: CustomBar + 'px' }">
-            <view class="container-wrapper">
-                <view class="cash-icon"> <image :src="StaticUrl + 'icon-pay-fail.png'" mode=""></image> </view>
-                <view class="cash-text">
-                    <text>{{ successText }}</text>
-                </view>
-            </view>
-            <view class="container-money">
-                <view class="label">支付金额</view>
-                <view class="money">¥{{ orderInfo.payableAmount | formatPrice }}</view>
-            </view>
-            <view class="container-button">
-                <view class="btn btn-pay" @click="miniWxPayFor(orderInfo)">重新支付</view>
-                <view class="btn btn-open" @click="searchOrder">查看订单</view>
-            </view>
-        </view>
-        <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
-    </view>
-</template>
-
-<script>
-import HeaderPay from '@/components/cm-module/headerNavbar/header-pay'
-import authorize from '@/common/authorize.js'
-import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
-import wechatPay from '@/mixins/wechatPay.js'
-import { mapGetters } from 'vuex'
-export default {
-    components: {
-        HeaderPay,
-        CmLoading
-    },
-    // 混入支付
-    mixins: [wechatPay],
-    data() {
-        return {
-            StaticUrl: this.$Static,
-            CustomBar: this.CustomBar, // 顶部导航栏高度
-            orderId: '',
-            nvabarData: {
-                //顶部自定义导航
-                haveBack: false,
-                showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
-                showSearch: 0,
-                title: '支付结果', // 导航栏 中间的标题
-                textLeft: this.$store.getters.isIphone
-            },
-            headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
-            systeminfo: this.setSysteminfo(), //获取设备信息
-            successText: '订单支付失败',
-            orderInfo: {}
-        }
-    },
-    onLoad() {
-        this.initOrderInfo()
-    },
-    computed: {
-        ...mapGetters(['isIphoneX']),
-        hanldOrder() {
-            return {
-                order: this.orderInfo
-            }
-        }
-    },
-    methods: {
-        initOrderInfo() {
-            this.orderInfo = uni.getStorageSync('orderInfo')
-            uni.removeStorageSync('orderInfo')
-        },
-        setHeaderBtnPosi() {
-            // 获得胶囊按钮位置信息
-            let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
-            return headerBtnPosi
-        },
-        setSysteminfo() {
-            let systeminfo
-            uni.getSystemInfo({
-                // 获取设备信息
-                success: res => {
-                    systeminfo = res
-                }
-            })
-            return systeminfo
-        },
-        // 查看订单
-        searchOrder() {
-            this.$api.redirectTo('/pages/user/order/order-details?type=confim&orderId=' + this.orderInfo.orderId)
-        }
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-page {
-    background-color: #f7f7f7;
-    height: auto !important;
-}
-.container-cash {
-    width: 100%;
-    .container-wrapper {
-        width: 100%;
-        margin: 0 auto;
-        margin-top: 120rpx;
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        background-color: #ffffff;
-        .cash-icon {
-            width: 210rpx;
-            height: 210rpx;
-            margin-top: 112rpx;
-            image {
-                width: 210rpx;
-                height: 210rpx;
-            }
-        }
-        .cash-text {
-            font-size: $font-size-28;
-            color: #666666;
-            line-height: 104rpx;
-            font-weight: bold;
-        }
-    }
-    .container-money {
-        width: 100%;
-        height: 90rpx;
-        float: left;
-        line-height: 90rpx;
-        font-size: $font-size-28;
-        box-sizing: border-box;
-        padding: 0 24rpx;
-        margin-top: 20rpx;
-        background-color: #ffffff;
-        .label {
-            float: left;
-            color: #333333;
-        }
-        .money {
-            float: right;
-            color: #666666;
-        }
-    }
-    .container-button {
-        width: 100%;
-        height: auto;
-        float: left;
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        margin-top: 160rpx;
-        .btn {
-            width: 600rpx;
-            height: 90rpx;
-            border-radius: 45rpx;
-            line-height: 90rpx;
-            text-align: center;
-            font-size: $font-size-26;
-            color: #ffffff;
-            box-sizing: border-box;
-            border: 1px solid $color-system;
-            margin-bottom: 24rpx;
-            &.btn-open {
-                color: $color-system;
-            }
-            &.btn-pay {
-                border-color: $color-system;
-                background: $btn-confirm;
-            }
-        }
-    }
-}
-</style>

+ 0 - 625
pages/user/order/order-details.vue

@@ -1,625 +0,0 @@
-<template>
-    <view class="container details clearfix" :style="{ paddingBottom: isIphoneX ? 130 + 68 + 'rpx' : '130rpx' }">
-        <!-- 自定义返回 -->
-        <header-order
-            :systeminfo="systeminfo"
-            :navbar-data="nvabarData"
-            :headerBtnPosi="headerBtnPosi"
-            :isShare="isOrderShare"
-        >
-        </header-order>
-        <view class="container-details" :style="{ paddingTop: navbarHeight + 'px' }">
-            <view class="status-text">
-                <view class="view-type">{{ information.status | TextFormat }}</view>
-            </view>
-            <!-- 地址选择 -->
-            <order-address ref="orderAddress" v-if="isRequest" :addressData="addressData"></order-address>
-            <!-- 商品 -->
-            <goods-list
-                ref="goods"
-                v-if="isRequest"
-                :shopOrderData="shopOrderData"
-                :information="information"
-                @popupClick="hanldePopupFn"
-            ></goods-list>
-            <!-- 订单信息 -->
-            <order-information ref="information" v-if="isRequest" :information="information"></order-information>
-            <!-- 底部button -->
-            <order-button
-                ref="orderButton"
-                v-if="isRequest"
-                :status="btnStatus"
-                :shareCode="shareCode"
-                :order="orderInfo"
-                @buttonConfirm="handButtonConfirm"
-            >
-            </order-button>
-        </view>
-        <!-- 操作弹窗 -->
-        <tui-modal
-            :show="modal"
-            @click="handleClick"
-            @cancel="hideMobel(1)"
-            :content="contentModalText"
-            color="#333"
-            :size="32"
-            shape="circle"
-            :maskClosable="false"
-        ></tui-modal>
-        <!-- 再次购买订单商品全部下架弹窗 -->
-        <tui-modal
-            :show="modal2"
-            @click="handleClick2"
-            @cancel="hideMobel(2)"
-            shape="circle"
-            content="订单内商品已全部下架,不能购买!"
-            :button="button"
-        ></tui-modal>
-        <!-- 再次购买部分商品失效弹窗 -->
-        <tui-modal :show="modal3" @cancel="hideMobel(3)" :custom="true">
-            <view class="tui-modal-custom">
-                <view class="tui-modal-custom-text">
-                    <view class="title">以下商品已失效,不能进行购买;是否先将其他商品加入购物车?</view>
-                    <scroll-view scroll-y class="tui-modal-custom-list">
-                        <view class="custom-list" v-for="(invalid, index) in invalidList" :key="index">
-                            <view class="custom-list-image"><image :src="invalid.productImage" mode=""></image></view>
-                            <view class="custom-list-name">{{ invalid.name }}</view>
-                        </view>
-                    </scroll-view>
-                </view>
-                <view class="tui-modal-button">
-                    <button class="modal-button cancel" @click="hideMobel(3)">我再想想</button>
-                    <button class="modal-button confirm" @click="handleClick3">加入购物车</button>
-                </view>
-            </view>
-        </tui-modal>
-        <!-- 促销活动弹窗 -->
-        <activi-popup :Promotion="handlerPros" :popupShow="popupShow"></activi-popup>
-        <!-- 加载中 -->
-        <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
-    </view>
-</template>
-
-<script>
-import authorize from '@/common/authorize.js'
-import HeaderOrder from '@/components/cm-module/headerNavbar/header-order' //自定义导航
-import orderAddress from '@/components/cm-module/orderDetails/orderAddress' //地址信息
-import goodsList from '@/components/cm-module/orderDetails/goodsList' //商品列表
-import orderInformation from '@/components/cm-module/orderDetails/orderInformation' //订单信息
-import transfeRecord from '@/components/cm-module/orderDetails/transfeRecord' //转账信息
-import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord' //支付记录
-import refundRecord from '@/components/cm-module/orderDetails/refundRecord' //退款记录
-import orderButton from '@/components/cm-module/orderDetails/orderButton' //底部按钮
-import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
-import wechatPay from '@/mixins/wechatPay.js'
-export default {
-    components: {
-        HeaderOrder,
-        orderInformation,
-        orderAddress,
-        goodsList,
-        CmLoading,
-        transfeRecord,
-        paymentRecord,
-        refundRecord,
-        orderButton
-    },
-    // 混入
-    mixins: [wechatPay],
-    data() {
-        return {
-            state: 0,
-            orderId: '',
-            shareCode: '', //分享码
-            shareType: '', //分享登录页过来记录的状态
-            cellPhone: '', //客服电话
-            payStatus: 0,
-            btnStatus: 0, //按钮组件状态
-            onlinePayFlag: '',
-            isRequest: false, //是否加载完成渲染子组件
-            isOrderShare: false,
-            isConfim: false,
-            modelType: 0,
-            orderInfo: {},
-            alertOrderInfo: {},
-            addressData: {}, //地址信息初始化
-            information: {}, //订单信息初始化
-            shopOrderData: {}, //商品信息初始化
-            orderInvoice: {}, //发票信息初始化
-            returnedPurchaseList: {}, //退款信息初始化
-            discernReceiptList: {}, //支付信息初始化
-            receiptAmount: 0, //支付金额
-            returnedPurchaseFee: 0, //退款金额
-            navbarHeight: '',
-            headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
-            systeminfo: this.setSysteminfo(), //获取设备信息
-            isIphoneX: this.$store.getters.isIphoneX,
-            CustomBar: this.CustomBar, // 顶部导航栏高度
-            popupShow: false,
-            handlerPros: {},
-            nvabarData: {
-                //顶部自定义导航
-                showCapsule: 1, // 是否显示左上角图标   1表示显示    0表示不显示
-                title: '订单详情' // 导航栏 中间的标题
-            },
-            clauseData: {},
-            orderSubmitType: false, //自主订单
-            userId: 0,
-            modal: false,
-            modal2: false,
-            modal3: false,
-            OperationType: '',
-            contentModalText: '',
-            button: [
-                {
-                    text: '确定',
-                    type: 'danger'
-                }
-            ],
-            invalidList: [],
-        }
-    },
-    onLoad(option) {
-        console.log(option)
-        this.$api.getStorage().then(resolve => {
-            this.userId = resolve.userId ? resolve.userId : 0
-        })
-        this.shareType = option.type
-        this.orderId = option.orderId
-        if (this.shareType === 'share') {
-            this.state = 0
-            this.isOrderShare = true
-        } else if (option.type === 'confim' || option.type === 'search') {
-            this.state = 0
-            this.isConfim = true
-        } else {
-            this.state = option.state
-        }
-        this.getHeaderTopHeight()
-        this.GetOrderDetaileData()
-    },
-    filters: {
-        TextFormat(status) {
-            //处理金额
-            let HtmlText,
-                typeTextObject = {
-                    4: '交易完成',
-                    5: '订单完成',
-                    6: '已关闭',
-                    7: '交易全退',
-                    77: '交易全退',
-                    11: '待付款待发货',
-                    12: '待付款部分发货',
-                    13: '待付款已发货',
-                    21: '部分付款待发货',
-                    22: '部分付款部分发货',
-                    23: '部分付款已发货',
-                    31: '已付款待发货',
-                    32: '已付款部分发货',
-                    33: '已付款已发货',
-                    111: '待付款待发货'
-                }
-            Object.keys(typeTextObject).forEach(key => {
-                if (key == status) {
-                    HtmlText = typeTextObject[key]
-                }
-            })
-            return HtmlText
-        }
-    },
-    methods: {
-        openclauseConten(id) {
-            this.$api.navigateTo(`/pages/service/sellconten?clauseId=${id}`)
-        },
-        GetOrderDetaileData() {
-            //初始化页面数据@参数:订单ID
-            this.OrderService.QueryOrderDetails({ orderId: this.orderId })
-                .then(response => {
-                    let resData = response.data
-                    this.isRequest = true
-                    this.orderInfo = resData.order
-                    this.userId = resData.order.userId
-                    this.shareCode = resData.shareCode
-                    this.addressData = resData.userInfo
-                    this.information = resData.order
-                    this.btnStatus = resData.order.status
-                    this.payStatus = resData.order.payStatus
-                    this.payableAmount = resData.order.payableAmount
-                    this.shopOrderData = resData.shopOrderList
-                    this.orderInvoice = resData.orderInvoice
-                    this.onlinePayFlag = resData.order.onlinePayFlag
-                    this.returnedPurchaseList = resData.returnedPurchaseList
-                    this.discernReceiptList = resData.discernReceiptList
-                    this.receiptAmount = resData.order.receiptAmount
-                    this.returnedPurchaseFee = resData.order.returnedPurchaseFee
-                    this.clauseData = resData.clause
-                    if (
-                        this.information.orderSubmitType == 0 ||
-                        this.information.orderSubmitType == 1 ||
-                        this.information.orderSubmitType == 2
-                    ) {
-                        this.orderSubmitType = true
-                    } else {
-                        this.orderSubmitType = false
-                    }
-                })
-                .catch(error => {
-                    this.$util.modal('提示', '订单查询失败,请稍后重试~', '确定', '', false, () => {
-                        this.$api.switchTabTo('/pages/tabBar/index/index')
-                    })
-                })
-        },
-        handButtonConfirm(data) {
-            //获取点击
-            console.log(data)
-            this.hanldOrder = data
-            this.btnoRderID = data.orderId
-            this.OperationType = data.type
-            this.handShowAlert(data)
-        },
-        handShowAlert(data) {
-            //执行
-            switch (data.type) {
-                case 'cancel':
-                    this.modal = true
-                    this.contentModalText = '确认取消该订单吗?'
-                    break
-                case 'delete':
-                    this.modal = true
-                    this.contentModalText = '确认删除该订单吗?'
-                    break
-                case 'confirm':
-                    this.modal = true
-                    this.contentModalText = '是否确认收货?'
-                    break
-                case 'query':
-                    this.isModalLayer = true
-                    this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-                    break
-                case 'again':
-                    this.handBuyAgainInfo()
-                    break
-                case 'pay':
-                    this.miniWxPayFor(data.order)
-                    break
-            }
-        },
-        handleClick(e) {
-            //用户操作订单
-            let index = e.index
-            if (index == 1) {
-                switch (this.OperationType) {
-                    case 'delete':
-                        this.handOrderDetele(this.orderId)
-                        break
-                    case 'cancel':
-                        this.handCenceConfirm(this.orderId)
-                        break
-                    case 'confirm':
-                        this.handOrderConfirm(this.orderId)
-                        break
-                }
-            }
-            this.modal = false
-        },
-        handleClick2() {
-            this.modal2 = false
-        },
-        handleClick3() {
-            this.handShoppingAgainCart()
-            this.modal3 = false
-        },
-        hideMobel(index) {
-            switch (index) {
-                case 1:
-                    this.modal = false
-                    break
-                case 2:
-                    this.modal2 = false
-                    break
-                case 3:
-                    this.modal3 = false
-                    break
-            }
-        },
-        handBuyAgainInfo() {
-            //再次购买初始化查询订单商品信息
-            this.OrderService.GetOrderBuyAgain({
-                orderId: this.orderId
-            })
-                .then(response => {
-                    this.handShoppingAgainCart()
-                })
-                .catch(error => {
-                    console.log(error.data)
-                    if (error.data && error.data.length > 0) {
-                        this.modal3 = true
-                        this.invalidList = error.data
-                    } else {
-                        this.modal2 = true
-                    }
-                })
-        },
-        handShoppingAgainCart() {
-            //一键加入购物车
-            this.ProductService.ShoppingAgainCart({
-                orderId: this.orderId
-            })
-                .then(response => {
-                    this.ProductService.QueryShoppingQuantity({ userId: this.userId })
-                        .then(response => {
-                            this.$api.switchTabTo('/pages/tabBar/cart/index')
-                        })
-                        .catch(error => {
-                            console.log('查询购物车数量错误信息', error)
-                        })
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handOrderConfirm(id) {
-            //确认收货
-            this.OrderService.ConfirmReceipt({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDetaileData(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handOrderDetele(id) {
-            //删除订单
-            this.OrderService.DeleteOrder({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        uni.navigateBack({
-                            delta: 1
-                        })
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handCenceConfirm(id) {
-            //取消订单
-            this.OrderService.CancelOrder({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDetaileData(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        hanldePopupFn(data) {
-            //监听活动内容
-            this.popupShow = true
-            this.handlerPros = data
-        },
-        getHeaderTopHeight() {
-            let statusBarHeight = this.systeminfo.statusBarHeight // 状态栏高度
-            let headerPosi = this.headerBtnPosi
-            let btnPosi = {
-                // 胶囊实际位置,坐标信息不是左上角原点
-                height: headerPosi.height,
-                width: headerPosi.width,
-                // 胶囊top - 状态栏高度
-                top: headerPosi.top - statusBarHeight,
-                // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
-                bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
-                // 屏幕宽度 - 胶囊right
-                right: this.systeminfo.screenWidth - headerPosi.right
-            }
-            this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
-        },
-        setHeaderBtnPosi() {
-            // 获得胶囊按钮位置信息
-            let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
-            return headerBtnPosi
-        },
-        setSysteminfo() {
-            let systeminfo
-            uni.getSystemInfo({
-                // 获取设备信息
-                success: res => {
-                    systeminfo = res
-                }
-            })
-            return systeminfo
-        }
-    },
-    onShow() {}
-}
-</script>
-
-<style lang="scss">
-page {
-    height: auto;
-    background: #f7f7f7;
-}
-.details {
-    padding-bottom: 130rpx;
-}
-.btn-hover {
-    background: #ffffff;
-}
-.animation {
-    /* transition: transform 0.3s ease;*/
-    transition-property: transform;
-    transition-duration: 0.3s;
-    transition-timing-function: ease;
-}
-.invoice-balance {
-    width: 702rpx;
-    height: auto;
-    padding: 0 24rpx;
-    background: #ffffff;
-    float: left;
-    margin-top: 24rpx;
-    margin-bottom: 24rpx;
-    .balabce-t {
-        width: 100%;
-        height: 86rpx;
-        line-height: 86rpx;
-        font-size: $font-size-28;
-        color: $text-color;
-        float: left;
-        .balabce-t-le {
-            float: left;
-            font-weight: bold;
-        }
-        .balabce-t-ri {
-            float: right;
-            display: flex;
-            align-items: center;
-            .money {
-                display: flex;
-                float: left;
-            }
-            .checkbox-box {
-                display: flex;
-                width: 60rpx;
-                float: left;
-                height: 100%;
-                font-size: $font-size-24;
-                .checkbox {
-                    width: 40rpx;
-                    text-align: right;
-                    box-sizing: border-box;
-                    text-align: center;
-                    text-decoration: none;
-                    border-radius: 0;
-                    -webkit-tap-highlight-color: transparent;
-                    overflow: hidden;
-                }
-            }
-        }
-    }
-    .balabce-b {
-        width: 100%;
-        float: left;
-        overflow: hidden;
-        .balabce-b-text {
-            width: 100%;
-            line-height: 58rpx;
-            font-size: $font-size-24;
-            color: #ff457b;
-            text-align: right;
-            float: right;
-        }
-        &.balabce-b--hide {
-            padding: 0 0;
-            height: 0px;
-            line-height: 0px;
-        }
-    }
-}
-.clause {
-    float: right;
-    font-size: 24rpx;
-    color: #999999;
-    margin-top: 60rpx;
-    margin-right: 24rpx;
-    &.noclick {
-        pointer-events: none;
-    }
-    .text {
-        color: #1890f9;
-        &.color-bg {
-            color: #333333;
-        }
-    }
-}
-.status-text {
-    overflow: hidden;
-    padding: 0 24rpx;
-    background: #fff;
-    font-size: $font-size-26;
-    .view-type {
-        float: left;
-        color: $color-system;
-    }
-}
-.tui-modal-custom-text {
-    min-height: 300rpx;
-    margin-bottom: 30rpx;
-    .title {
-        width: 100%;
-        height: auto;
-        font-size: $font-size-30;
-        text-align: justify;
-        color: #333333;
-        line-height: 40rpx;
-        margin-bottom: 30rpx;
-    }
-    .tui-modal-custom-list {
-        width: 100%;
-        height: 350rpx;
-        overflow: hidden;
-        .custom-list {
-            width: 100%;
-            height: 117rpx;
-            box-sizing: border-box;
-            float: left;
-            padding: 15rpx 0;
-            .custom-list-image {
-                width: 86rpx;
-                height: 86rpx;
-                float: left;
-                border-radius: 6rpx;
-                box-sizing: border-box;
-                border: 1px solid #e1e1e1;
-                image {
-                    width: 84rpx;
-                    height: 84rpx;
-                    border-radius: 6rpx;
-                    display: block;
-                }
-            }
-            .custom-list-name {
-                width: 400rpx;
-                height: 86rpx;
-                float: right;
-                line-height: 43rpx;
-                font-size: $font-size-26;
-                color: #666666;
-                text-overflow: ellipsis;
-                overflow: hidden;
-                display: -webkit-box;
-                -webkit-line-clamp: 2;
-                line-clamp: 2;
-                -webkit-box-orient: vertical;
-            }
-        }
-    }
-}
-.tui-modal-button {
-    width: 100%;
-    height: 72rpx;
-    display: flex;
-    .modal-button {
-        width: 200rpx;
-        height: 72rpx;
-        line-height: 72rpx;
-        border-radius: 36rpx;
-        box-sizing: border-box;
-        &.cancel {
-            border: 1px solid #b2b2b2;
-            background: #ffffff;
-            color: #333333;
-        }
-        &.confirm {
-            background: $btn-confirm;
-            color: #ffffff;
-        }
-    }
-}
-</style>

+ 0 - 1066
pages/user/order/order-list-retail.vue

@@ -1,1066 +0,0 @@
-<template>
-    <view class="container" :style="{ paddingTop: navbarHeight + 82 + 'px' }">
-        <tui-skeleton v-if="skeletonShow" loadingType="2"></tui-skeleton>
-        <!-- 自定义返回 -->
-        <header-order
-            :systeminfo="systeminfo"
-            :navbar-data="nvabarData"
-            :headerBtnPosi="headerBtnPosi"
-            :isDelete="isDelete"
-            :isUsertype="1"
-            @goSearchPath="handlSearchPath"
-        >
-        </header-order>
-        <view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
-            <scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
-                <view
-                    v-for="(item, index) in orderTabBar"
-                    :key="index"
-                    class="tab-bar-item"
-                    :class="[currentTab == index ? 'active' : '']"
-                    :data-current="index"
-                    @tap.stop="onClickTab"
-                >
-                    <text class="tab-bar-title">{{ item.text }}</text> <text class="line"></text>
-                </view>
-            </scroll-view>
-            <view class="tab-screen">
-                <view
-                    v-for="(item, index) in screenTabBar"
-                    :key="index"
-                    class="tab-screen-item"
-                    :class="[screenTab == index ? 'active' : '']"
-                    :data-current="index"
-                    @tap.stop="onClickScreenTab(index)"
-                    >{{ item.text }}</view
-                >
-            </view>
-        </view>
-        <swiper
-            class="tab-content"
-            :current="currentTab"
-            duration="80"
-            @animationfinish="onChange"
-            :style="{ height: winHeight + 'px' }"
-        >
-            <swiper-item v-for="(tabItem, index) in orderTabBar" :key="index">
-                <scroll-view
-                    scroll-y
-                    class="scoll-y"
-                    @scrolltolower="scrolltolower"
-                    :style="{ height: winHeight + 'px' }"
-                >
-                    <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
-                        <!-- 空白页 -->
-                        <empty
-                            v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
-                            :typeIndex="currentTab"
-                            :navbarHeight="navbarHeight"
-                        ></empty>
-                        <!-- 列表 -->
-                        <view v-else class="tui-order-content">
-                            <view
-                                class="tui-order-item"
-                                v-for="(order, orderIndex) in tabItem.orderList"
-                                :key="orderIndex"
-                            >
-                                <view class="order-title">
-                                    <view class="order-title-t">
-                                        <text class="bage-text"
-                                            ><text class="text">订单编号:</text>{{ order.orderNo }}</text
-                                        >
-                                    </view>
-                                    <view class="order-title-b">
-                                        <view class="order-title-btxt"
-                                            ><text class="text">下单时间:</text>{{ order.orderTime }}</view
-                                        >
-                                        <view class="order-title-tip">{{ StateExpFormat(order.status) }}</view>
-                                    </view>
-                                </view>
-                                <block v-for="(shop, sindex) in order.shopOrderList" :key="sindex">
-                                    <view class="goods-title">
-                                        <view class="title-logo"><image :src="shop.shopLogo" mode=""></image></view>
-                                        <view class="title-text">{{ shop.shopName }}</view>
-                                    </view>
-                                    <view
-                                        class="goods-item"
-                                        v-for="(pros, prosIndex) in shop.orderProductList"
-                                        :key="prosIndex"
-                                        @click.stop="detail(order.orderId)"
-                                    >
-                                        <view class="goods-pros-t">
-                                            <view class="pros-img"> <image :src="pros.productImage" alt="" /> </view>
-                                            <view class="pros-product clearfix">
-                                                <view class="producttitle">{{ pros.name }}</view>
-                                                <view class="productspec" v-if="pros.productCategory != 2"
-                                                    >规格:{{ pros.productUnit }}</view
-                                                >
-                                                <view class="floor-item-act" v-if="pros.ladderPriceFlag === '1'">
-                                                    <text class="tag tag-01" v-if="!pros.heUserId">自营</text>
-                                                    <text class="tag tag-01" v-else>促销</text>
-                                                    <text class="tag tag-02" @click.stop="clickPopupShow(pros, 2)"
-                                                        >活动价</text
-                                                    >
-                                                </view>
-                                                <view class="productprice">
-                                                    <view class="price"
-                                                        ><text>¥{{ pros.price | formatPrice }}</text></view
-                                                    >
-                                                    <view class="count"
-                                                        ><text class="small">x</text>{{ pros.num }}</view
-                                                    >
-                                                </view>
-                                            </view>
-                                        </view>
-                                    </view>
-                                </block>
-                                <view class="order-footer">
-                                    <view class="order-footer-bot">
-                                        <view class="count">共{{ order.productCount }}件商品</view>
-                                        <view
-                                            class="money"
-                                            v-if="order.status == 31 || order.status == 32 || order.status == 33"
-                                        >
-                                            已支付:<text class="color">¥{{ order.receiptAmount | formatPrice }}</text>
-                                        </view>
-                                        <view class="money" v-else>
-                                            待付总额:<text class="color"
-                                                >¥{{ order.pendingPayments | formatPrice }}</text
-                                            >
-                                        </view>
-                                    </view>
-                                </view>
-                                <!-- 底部button -->
-                                <order-button
-                                    v-if="order.userId == userId"
-                                    ref="orderButton"
-                                    :status="order.status"
-                                    :order="order"
-                                    @buttonConfirm="handButtonConfirm"
-                                >
-                                </order-button>
-                            </view>
-                            <!--加载loadding-->
-                            <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-                            <tui-nomore
-                                :visible="!pullUpOn"
-                                :backgroundColor="'#ffffff'"
-                                :text="nomoreText"
-                            ></tui-nomore>
-                            <!--加载loadding-->
-                        </view>
-                    </view>
-                </scroll-view>
-            </swiper-item>
-        </swiper>
-        <!-- 操作弹窗 -->
-        <tui-modal
-            :show="modal"
-            @click="handleClick"
-            @cancel="hideMobel(1)"
-            :content="contentModalText"
-            color="#333"
-            :size="32"
-            shape="circle"
-            :maskClosable="false"
-        ></tui-modal>
-        <!-- 再次购买订单商品全部下架弹窗 -->
-        <tui-modal
-            :show="modal2"
-            @click="handleClick2"
-            @cancel="hideMobel(2)"
-            shape="circle"
-            content="订单内商品已全部下架,不能购买!"
-            :button="button"
-        ></tui-modal>
-        <!-- 再次购买部分商品失效弹窗 -->
-        <tui-modal :show="modal3" @cancel="hideMobel(3)" :custom="true">
-            <view class="tui-modal-custom">
-                <view class="tui-modal-custom-text">
-                    <view class="title">以下商品已失效,不能进行购买;是否先将其他商品加入购物车?</view>
-                    <scroll-view scroll-y class="tui-modal-custom-list">
-                        <view class="custom-list" v-for="(invalid, index) in invalidList" :key="index">
-                            <view class="custom-list-image"><image :src="invalid.productImage" mode=""></image></view>
-                            <view class="custom-list-name">{{ invalid.name }}</view>
-                        </view>
-                    </scroll-view>
-                </view>
-                <view class="tui-modal-button">
-                    <button class="modal-button cancel" @click="hideMobel(3)">我再想想</button>
-                    <button class="modal-button confirm" @click="handleClick3">加入购物车</button>
-                </view>
-            </view>
-        </tui-modal>
-        <!-- 透明模态层 -->
-        <modal-layer v-if="isModalLayer"></modal-layer>
-        <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
-    </view>
-</template>
-
-<script>
-import authorize from '@/common/authorize.js'
-import HeaderOrder from '@/components/cm-module/headerNavbar/header-order' //自定义导航
-import orderButton from '@/components/cm-module/orderDetails/orderListButton' //按钮
-import modalLayer from '@/components/cm-module/modal-layer/modal-layer'
-import empty from '@/components/cm-module/empty/empty'
-import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
-import { mapGetters } from 'vuex'
-import wechatPay from '@/mixins/wechatPay.js'
-
-export default {
-    components: {
-        HeaderOrder,
-        empty,
-        orderButton,
-        modalLayer,
-        CmLoading
-    },
-    mixins: [wechatPay],
-    data() {
-        return {
-            CustomBar: this.CustomBar, // 顶部导航栏高度
-            orderTabBar: [
-                { state: 0, text: '全部', orderList: [] },
-                { state: 1, text: '待付款', orderList: [] },
-                { state: 2, text: '待发货', orderList: [] },
-                { state: 3, text: '已发货', orderList: [] },
-                { state: 4, text: '退货/款', orderList: [] }
-            ],
-            screenTabBar: [{ type: 0, text: '全部订单' }, { type: 1, text: '用户订单' }, { type: 2, text: '自身订单' }],
-            headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
-            systeminfo: this.setSysteminfo(), //获取设备信息
-            nvabarData: {
-                //顶部自定义导航
-                showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
-                showSearch: 1,
-                title: '我的订单' // 导航栏 中间的标题
-            },
-            winHeight: '', //窗口高度
-            currentTab: 0, //预设当前项的值
-            screenTab: 0, //筛选预设当前项的值
-            scrollLeft: 0, //tab标题的滚动条位置
-            btnoRderID: 0, //点击按钮传入的的订单ID
-            pageNum: 1, //页数
-            pageSize: 10, //条数
-            scrollTop: 0,
-            skeletonShow: true,
-            isDelete: false,
-            isClickChange: false,
-            isModalLayer: false,
-            loadding: false,
-            pullUpOn: true,
-            hasNextPage: false,
-            pullFlag: true,
-            navbarHeight: '',
-            nomoreText: '上拉显示更多',
-            isOnloadFlag: false,
-            modal: false,
-            modal2: false,
-            modal3: false,
-            OperationType: '',
-            contentModalText: '',
-            button: [
-                {
-                    text: '确定',
-                    type: 'danger'
-                }
-            ],
-            invalidList: [],
-            hanldOrder: {}
-        }
-    },
-    computed: {
-        ...mapGetters(['userId'])
-    },
-    onPageScroll(e) {
-        this.scrollTop = e.scrollTop
-    },
-    onLoad(e) {
-        let self = this
-        if (e.type === 'detele') {
-            self.isDelete = true
-        }
-        self.currentTab = e.state
-        self.isOnloadFlag = true
-        self.getHeaderTopHeight() //设置自定义导航高度
-        //  高度自适应
-        uni.getSystemInfo({
-            success: function(res) {
-                let calc = res.windowHeight
-                self.winHeight = calc - self.CustomBar
-            }
-        })
-    },
-    onShow() {
-        this.isModalLayer = false
-        this.GetOrderDatainit(this.currentTab)
-        // console.log(this.orderTabBar)
-    },
-    methods: {
-        // 滚动切换标签样式
-        onChange: function(e) {
-            let index = e.target.current || e.detail.current
-            if (this.isClickChange) {
-                this.currentTab = index
-                this.isClickChange = false
-                return
-            }
-            this.isClickChange = false
-            this.currentTab = index
-            this.checkCor()
-            this.pageNum = 1
-            this.pullUpOn = true //切换时隐藏
-            this.loadding = false //切换时隐藏
-            this.nomoreText = ''
-            if (!this.isOnloadFlag) {
-                this.GetOrderDatainit(this.currentTab, 'tabChange')
-            }
-        },
-        // 点击标题切换当前页时改变样式
-        onClickTab: function(e) {
-            let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
-            if (this.currentTab === tabIndex) {
-                return false
-            } else {
-                this.isClickChange = true
-                this.currentTab = tabIndex
-                this.pageNum = 1
-                this.pullUpOn = true //切换时隐藏
-                this.loadding = false //切换时隐藏
-                this.GetOrderDatainit(this.currentTab)
-            }
-        },
-        onClickScreenTab(index) {
-            this.screenTab = index
-            this.pageNum = 1
-            this.pullUpOn = true //切换时隐藏
-            this.loadding = false //切换时隐藏
-            this.nomoreText = ''
-            this.GetOrderDatainit(this.currentTab)
-        },
-        //判断当前滚动超过一屏时,设置tab标题滚动条。
-        checkCor: function() {
-            if (this.currentTab > 3) {
-                //这里距离按实际计算
-                this.scrollLeft = 300
-            } else {
-                this.scrollLeft = 0
-            }
-        },
-        GetOrderDatainit(index, source) {
-            /**
-             * @订单初始化加载  仅加载第一页码
-             * @param:orderState(订单状态:0全部,1待付款,2待发货,3已发货,4退货款)
-             * @param:userId(用户ID)
-             * @param:pageNum(页码数)
-             * @param:pageSize(每页条数)
-             * @param:organizeID(全局变量组织ID)
-             */
-            let orderItem = this.orderTabBar[index]
-            let state = orderItem.state
-            if (source === 'tabChange' && orderItem.loaded === true) {
-                //tab切换只有第一次需要加载数据
-                return
-            }
-            this.OrderService.QueryOrderDealerList({
-                orderState: index,
-                orderType: this.screenTab,
-                userId: this.userId,
-                pageNum: 1,
-                pageSize: this.pageSize
-            })
-                .then(response => {
-                    let data = response.data
-                    //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-                    let orderList = data.list.filter(item => {
-                        //添加不同状态下订单的表现形式
-                        item = Object.assign(item, this.StateExpFormat(item.state))
-                        return item
-                    })
-                    orderItem.orderList = []
-                    orderList.forEach(item => {
-                        orderItem.orderList.push(item)
-                    })
-                    this.$set(orderItem, 'loaded', true)
-                    this.hasNextPage = data.hasNextPage
-                    if (this.hasNextPage) {
-                        this.pullUpOn = false
-                        this.nomoreText = '上拉显示更多'
-                    } else {
-                        if (orderItem.orderList.length < 2) {
-                            this.pullUpOn = true
-                        } else {
-                            this.pullUpOn = false
-                            this.nomoreText = '已至底部'
-                        }
-                    }
-                    this.skeletonShow = false
-                    this.isOnloadFlag = false
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        getOnReachBottomData(index) {
-            //上拉加载
-            this.pageNum += 1
-            this.OrderService.QueryOrderDealerList({
-                orderState: index,
-                orderType: this.screenTab,
-                userId: this.userId,
-                pageNum: this.pageNum,
-                pageSize: this.pageSize
-            })
-                .then(response => {
-                    let orderItem = this.orderTabBar[index]
-                    let data = response.data
-                    this.hasNextPage = data.hasNextPage
-                    orderItem.orderList = orderItem.orderList.concat(data.list)
-                    this.pullFlag = false // 防上拉暴滑
-                    setTimeout(() => {
-                        this.pullFlag = true
-                    }, 500)
-                    if (this.hasNextPage) {
-                        this.pullUpOn = false
-                        this.nomoreText = '上拉显示更多'
-                    } else {
-                        this.loadding = false
-                        this.pullUpOn = false
-                        this.nomoreText = '已至底部'
-                    }
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        scrolltolower() {
-            if (this.hasNextPage) {
-                this.loadding = true
-                this.pullUpOn = true
-                this.getOnReachBottomData(this.currentTab)
-            }
-        },
-        detail(id) {
-            //订单详情跳转
-            this.isModalLayer = true
-            this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderId=${id}`)
-        },
-        handButtonConfirm(data) {
-            //获取点击
-            this.hanldOrder = data
-            this.btnoRderID = data.orderId
-            this.OperationType = data.type
-            this.orderInfo = data.order
-            this.handShowAlert(data)
-        },
-        handShowAlert(data) {
-            //执行
-            switch (data.type) {
-                case 'cancel':
-                    this.modal = true
-                    this.contentModalText = '确认取消该订单吗?'
-                    break
-                case 'delete':
-                    this.modal = true
-                    this.contentModalText = '确认删除该订单吗?'
-                    break
-                case 'confirm':
-                    this.modal = true
-                    this.contentModalText = '是否确认收货?'
-                    break
-                case 'query':
-                    this.isModalLayer = true
-                    this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-                    break
-                case 'again':
-                    this.handBuyAgainInfo()
-                    break
-                case 'pay':
-                    this.miniWxPayFor(data.order)
-                    break
-            }
-        },
-        handleClick(e) {
-            //用户操作订单
-            let index = e.index
-            if (index == 1) {
-                switch (this.OperationType) {
-                    case 'delete':
-                        this.handOrderDetele(this.btnoRderID)
-                        break
-                    case 'cancel':
-                        this.handCenceConfirm(this.btnoRderID)
-                        break
-                    case 'confirm':
-                        this.handOrderConfirm(this.btnoRderID)
-                        break
-                }
-            }
-            this.modal = false
-        },
-        handleClick2() {
-            this.modal2 = false
-        },
-        handleClick3() {
-            this.handShoppingAgainCart()
-            this.modal3 = false
-        },
-        hideMobel(index) {
-            switch (index) {
-                case 1:
-                    this.modal = false
-                    break
-                case 2:
-                    this.modal2 = false
-                    break
-                case 3:
-                    this.modal3 = false
-                    break
-            }
-        },
-        handBuyAgainInfo() {
-            //再次购买初始化查询订单商品信息
-            this.OrderService.GetOrderBuyAgain({
-                orderId: this.btnoRderID
-            })
-                .then(response => {
-                    this.handShoppingAgainCart()
-                })
-                .catch(error => {
-                    if (error.data && error.data.length > 0) {
-                        this.modal3 = true
-                        this.invalidList = error.data
-                    } else {
-                        this.modal2 = true
-                    }
-                })
-        },
-        handShoppingAgainCart() {
-            //一键加入购物车
-            this.ProductService.ShoppingAgainCart({
-                orderId: this.btnoRderID
-            })
-                .then(response => {
-                    this.ProductService.QueryShoppingQuantity({ userId: this.userId })
-                        .then(response => {
-                            this.$api.switchTabTo('/pages/tabBar/cart/index')
-                        })
-                        .catch(error => {
-                            console.log('查询购物车数量错误信息', error)
-                        })
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handOrderConfirm(id) {
-            //确认收货
-            this.OrderService.ConfirmReceipt({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDatainit(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handOrderDetele(id) {
-            //删除订单
-            this.OrderService.DeleteOrder({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDatainit(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handCenceConfirm(id) {
-            //取消订单
-            this.OrderService.CancelOrder({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDatainit(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handlSearchPath() {
-            this.$api.navigateTo('/pages/user/order/search-order')
-        },
-        getHeaderTopHeight() {
-            // 状态栏高度
-            let statusBarHeight = this.systeminfo.statusBarHeight
-            let headerPosi = this.headerBtnPosi
-            let btnPosi = {
-                // 胶囊实际位置,坐标信息不是左上角原点
-                height: headerPosi.height,
-                width: headerPosi.width,
-                // 胶囊top - 状态栏高度
-                top: headerPosi.top - statusBarHeight,
-                // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
-                bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
-                // 屏幕宽度 - 胶囊right
-                right: this.systeminfo.screenWidth - headerPosi.right
-            }
-            this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
-        },
-        setHeaderBtnPosi() {
-            // 获得胶囊按钮位置信息
-            let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
-            return headerBtnPosi
-        },
-        setSysteminfo() {
-            let systeminfo
-            uni.getSystemInfo({
-                // 获取设备信息
-                success: res => {
-                    systeminfo = res
-                }
-            })
-            return systeminfo
-        },
-        StateExpFormat(state) {
-            //订单状态文字和颜色
-            var HtmlStateText = '',
-                stateTextObject = {
-                    4: '交易完成',
-                    5: '订单完成',
-                    6: '已关闭',
-                    7: '交易全退',
-                    77: '交易全退',
-                    11: '待付款待发货',
-                    12: '待付款部分发货',
-                    13: '待付款已发货',
-                    21: '部分付款待发货',
-                    22: '部分付款部分发货',
-                    23: '部分付款已发货',
-                    31: '已付款待发货',
-                    32: '已付款部分发货',
-                    33: '已付款已发货',
-                    111: '待付款待发货'
-                }
-            Object.keys(stateTextObject).forEach(function(key) {
-                if (key == state) {
-                    HtmlStateText = stateTextObject[key]
-                }
-            })
-            return HtmlStateText
-        }
-    }
-}
-</script>
-
-<style lang="scss">
-page {
-    background-color: #ffffff;
-}
-/*tabbar start*/
-::-webkit-scrollbar {
-    width: 0;
-    height: 0;
-    color: transparent;
-}
-.order-section-top {
-    width: 100%;
-    position: fixed;
-    top: 0;
-    left: 0;
-    z-index: 99;
-    background: #ffffff;
-    .tab-screen {
-        height: 48rpx;
-        width: 702rpx;
-        padding: 20rpx 24rpx 30rpx 24rpx;
-        .tab-screen-item {
-            height: 48rpx;
-            border-radius: 24rpx;
-            background: #f7f7f7;
-            margin-right: 48rpx;
-            line-height: 48rpx;
-            font-size: $font-size-26;
-            color: #333333;
-            text-align: center;
-            padding: 0 24rpx;
-            float: left;
-            &.active {
-                color: $color-system;
-                background-color: #fff3f7;
-            }
-            &:last-child {
-                margin-right: 0;
-            }
-        }
-    }
-}
-.tab-view::before {
-    content: '';
-    position: absolute;
-    border-bottom: 1rpx solid #eaeef1;
-    -webkit-transform: scaleY(0.5);
-    transform: scaleY(0.5);
-    bottom: 0;
-    right: 0;
-    left: 0;
-}
-.tab-view {
-    width: 100%;
-    height: 80rpx;
-    overflow: hidden;
-    box-sizing: border-box;
-    background: #fff;
-    white-space: nowrap;
-}
-.tab-bar-item {
-    padding: 0;
-    height: 80rpx;
-    min-width: 80rpx;
-    line-height: 80rpx;
-    margin: 0 28rpx;
-    display: inline-block;
-    text-align: center;
-    box-sizing: border-box;
-    position: relative;
-    .tab-bar-title {
-        height: 80rpx;
-        line-height: 80rpx;
-        font-size: $font-size-28;
-        color: $text-color;
-    }
-    .line {
-        width: 40rpx;
-        height: 4rpx;
-        border-radius: 2rpx;
-        position: absolute;
-        bottom: 8rpx;
-        left: 50%;
-        margin-left: -20rpx;
-        background-color: #ffffff;
-    }
-    &.active {
-        .line {
-            background-color: $color-system;
-        }
-        .tab-bar-title {
-            color: $color-system !important;
-        }
-    }
-}
-.container {
-    padding-bottom: env(safe-area-inset-bottom);
-    height: auto;
-    position: relative;
-}
-.tui-order-content {
-    width: 100%;
-    height: auto;
-}
-.tui-order-list {
-    width: 100%;
-    position: relative;
-}
-.tui-order-item {
-    display: flex;
-    flex-direction: column;
-    width: 702rpx;
-    padding: 20rpx 24rpx 0 24rpx;
-    background: #fff;
-    border-bottom: 20rpx solid #f7f7f7;
-}
-.order-title {
-    width: 100%;
-    height: auto;
-    padding-bottom: 20rpx;
-    border-bottom: 1px solid #e1e1e1;
-    .order-title-t {
-        width: 100%;
-        height: 48rpx;
-        float: left;
-        line-height: 48rpx;
-        position: relative;
-        .bage-icon {
-            width: 50rpx;
-            height: 50rpx;
-            display: block;
-            position: absolute;
-            right: 0;
-            top: 9rpx;
-        }
-        .bage-text {
-            display: inline-block;
-            font-size: $font-size-28;
-            line-height: 48rpx;
-            text-align: left;
-            color: $text-color;
-            .text {
-                color: #999999;
-            }
-        }
-    }
-    .order-title-b {
-        width: 100%;
-        height: 48rpx;
-        float: left;
-        margin-top: 8rpx;
-        .order-title-btxt {
-            float: left;
-            font-size: $font-size-28;
-            line-height: 48rpx;
-            color: $text-color;
-            text-align: left;
-            .text {
-                color: #999999;
-            }
-        }
-        .order-title-tip {
-            float: right;
-            font-size: $font-size-28;
-            line-height: 48rpx;
-            text-align: right;
-            color: #ff457b;
-        }
-    }
-}
-.goods-title {
-    width: 100%;
-    height: 56rpx;
-    float: left;
-    margin-top: 10rpx;
-    .title-logo {
-        width: 56rpx;
-        height: 56rpx;
-        float: left;
-        border-radius: 8rpx;
-        border: 1px solid #e1e1e1;
-        margin-right: 8rpx;
-        image {
-            border-radius: 8rpx;
-            width: 56rpx;
-            height: 56rpx;
-        }
-    }
-    .title-text {
-        width: 400rpx;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        float: left;
-        font-size: $font-size-28;
-        color: $text-color;
-        text-align: left;
-        line-height: 56rpx;
-        font-weight: bold;
-    }
-}
-.goods-item {
-    width: 100%;
-    height: auto;
-}
-.goods-pros-t {
-    width: 100%;
-    height: auto;
-    padding: 24rpx 0;
-    .pros-img {
-        float: left;
-        width: 210rpx;
-        height: 100%;
-        border-radius: 10rpx;
-        margin: 0 26rpx 0 0;
-        position: relative;
-        image {
-            width: 210rpx;
-            height: 210rpx;
-            border-radius: 10rpx;
-            border: 1px solid #f3f3f3;
-        }
-    }
-}
-.pros-product {
-    width: 460rpx;
-    height: 100%;
-    line-height: 36rpx;
-    font-size: $font-size-26;
-    position: relative;
-    float: left;
-    .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: 8rpx;
-    }
-    .productspec {
-        height: 36rpx;
-        color: #999999;
-        margin: 10rpx 0 0 0;
-    }
-    .productprice {
-        height: 48rpx;
-        width: 100%;
-        float: left;
-        margin-top: 10rpx;
-        .price {
-            line-height: 48rpx;
-            font-size: $font-size-28;
-            width: 48%;
-            color: $color-system;
-            float: left;
-            font-weight: bold;
-            &.disabled {
-                color: #999999;
-                text-decoration: line-through;
-            }
-        }
-        .count {
-            height: 100%;
-            float: right;
-            position: relative;
-            .small {
-                color: #666666;
-            }
-        }
-    }
-    .floor-item-act {
-        width: 100%;
-        height: 30rpx;
-        margin-top: 8rpx;
-        float: left;
-        .tag {
-            display: inline-block;
-            height: 32rpx;
-            font-size: 22rpx;
-            line-height: 30rpx;
-            text-align: center;
-            color: #f83c6c;
-            float: left;
-            margin-right: 10rpx;
-            &.tag-02 {
-                width: 80rpx;
-                background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png) top center no-repeat;
-                background-size: contain;
-            }
-            &.tag-01 {
-                width: 56rpx;
-                color: #fff;
-                background-color: #f83c6c;
-                border-radius: 4rpx;
-            }
-        }
-    }
-}
-.order-footer {
-    width: 100%;
-    height: 78rpx;
-    float: left;
-    margin-top: 20rpx;
-    .order-footer-bot {
-        width: 100%;
-        float: left;
-        height: 48rpx;
-        line-height: 48rpx;
-        font-size: $font-size-28;
-        color: $text-color;
-        .count {
-            width: 50%;
-            float: left;
-            text-align: left;
-            font-weight: bold;
-        }
-        .money {
-            width: 50%;
-            float: right;
-            text-align: right;
-            .color {
-                color: $color-system;
-                font-weight: bold;
-            }
-        }
-    }
-}
-.tui-modal-custom-text {
-    min-height: 300rpx;
-    margin-bottom: 30rpx;
-    .title {
-        width: 100%;
-        height: auto;
-        font-size: $font-size-30;
-        text-align: justify;
-        color: #333333;
-        line-height: 40rpx;
-        margin-bottom: 30rpx;
-    }
-    .tui-modal-custom-list {
-        width: 100%;
-        height: 350rpx;
-        overflow: hidden;
-        .custom-list {
-            width: 100%;
-            height: 117rpx;
-            box-sizing: border-box;
-            float: left;
-            padding: 15rpx 0;
-            .custom-list-image {
-                width: 86rpx;
-                height: 86rpx;
-                float: left;
-                border-radius: 6rpx;
-                box-sizing: border-box;
-                border: 1px solid #e1e1e1;
-                image {
-                    width: 84rpx;
-                    height: 84rpx;
-                    border-radius: 6rpx;
-                    display: block;
-                }
-            }
-            .custom-list-name {
-                width: 400rpx;
-                height: 86rpx;
-                float: right;
-                line-height: 43rpx;
-                font-size: $font-size-26;
-                color: #666666;
-                text-overflow: ellipsis;
-                overflow: hidden;
-                display: -webkit-box;
-                -webkit-line-clamp: 2;
-                line-clamp: 2;
-                -webkit-box-orient: vertical;
-            }
-        }
-    }
-}
-.tui-modal-button {
-    width: 100%;
-    height: 72rpx;
-    display: flex;
-    .modal-button {
-        width: 200rpx;
-        height: 72rpx;
-        line-height: 72rpx;
-        border-radius: 36rpx;
-        box-sizing: border-box;
-        &.cancel {
-            border: 1px solid #b2b2b2;
-            background: #ffffff;
-            color: #333333;
-        }
-        &.confirm {
-            background: $btn-confirm;
-            color: #ffffff;
-        }
-    }
-}
-</style>

+ 0 - 1034
pages/user/order/order-list.vue

@@ -1,1034 +0,0 @@
-<template>
-    <view class="container" :style="{ paddingTop: navbarHeight + 'px' }">
-        <tui-skeleton
-            v-if="skeletonShow"
-            backgroundColor="#fafafa"
-            borderRadius="10rpx"
-            :isLoading="false"
-            :loadingType="2"
-        ></tui-skeleton>
-        <!-- 自定义返回 -->
-        <header-order
-            :systeminfo="systeminfo"
-            :navbar-data="nvabarData"
-            :headerBtnPosi="headerBtnPosi"
-            :isDelete="isDelete"
-            @goSearchPath="handlSearchPath"
-        ></header-order>
-        <view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
-            <scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
-                <view
-                    v-for="(item, index) in orderTabBar"
-                    :key="index"
-                    class="tab-bar-item"
-                    :class="[currentTab == index ? 'active' : '']"
-                    :data-current="index"
-                    @tap.stop="onClickTab"
-                >
-                    <text class="tab-bar-title">{{ item.text }}</text> <text class="line"></text>
-                </view>
-            </scroll-view>
-        </view>
-        <swiper
-            class="tab-content"
-            :current="currentTab"
-            duration="80"
-            @animationfinish="onChange"
-            :style="{ height: winHeight + 'px' }"
-        >
-            <swiper-item v-for="(tabItem, index) in orderTabBar" :key="index">
-                <scroll-view scroll-y class="scoll-y" @scrolltolower="scrolltolower">
-                    <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
-                        <!-- 空白页 -->
-                        <empty
-                            v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
-                            :typeIndex="currentTab"
-                            :navbarHeight="navbarHeight"
-                        ></empty>
-                        <!-- 列表 -->
-                        <view v-else class="tui-order-content">
-                            <view
-                                class="tui-order-item"
-                                v-for="(order, orderIndex) in tabItem.orderList"
-                                :key="orderIndex"
-                            >
-                                <view class="order-title">
-                                    <view class="order-title-t">
-                                        <text class="bage-text"
-                                            ><text class="text">订单编号:</text>{{ order.orderNo }}</text
-                                        >
-                                    </view>
-                                    <view class="order-title-b">
-                                        <view class="order-title-btxt"
-                                            ><text class="text">下单时间:</text>{{ order.orderTime }}</view
-                                        >
-                                        <view class="order-title-tip">{{ StateExpFormat(order.status) }}</view>
-                                    </view>
-                                </view>
-                                <block v-for="(shop, sindex) in order.shopOrderList" :key="sindex">
-                                    <view class="goods-title">
-                                        <view class="title-logo"><image :src="shop.shopLogo" mode=""></image></view>
-                                        <view class="title-text">{{ shop.shopName }}</view>
-                                    </view>
-                                    <view
-                                        class="goods-item"
-                                        v-for="(pros, prosIndex) in shop.orderProductList"
-                                        :key="prosIndex"
-                                        @click.stop="detail(order.orderId)"
-                                    >
-                                        <view class="goods-pros-t">
-                                            <view class="pros-img"> <image :src="pros.productImage" alt="" /> </view>
-                                            <view class="pros-product clearfix">
-                                                <view class="producttitle">{{ pros.name }}</view>
-                                                <view class="productspec" v-if="pros.productCategory != 2"
-                                                    >规格:{{ pros.productUnit }}</view
-                                                >
-                                                <view class="floor-item-act" v-if="pros.ladderPriceFlag == 1">
-                                                    <view class="tag" @click.stop="clickPopupShow(pros, 2)"
-                                                        >活动价</view
-                                                    >
-                                                </view>
-                                                <view class="productprice">
-                                                    <view class="price"
-                                                        ><text>¥{{ pros.price | formatPrice }}</text></view
-                                                    >
-                                                    <view class="count"
-                                                        ><text class="small">x</text>{{ pros.num }}</view
-                                                    >
-                                                </view>
-                                            </view>
-                                        </view>
-                                    </view>
-                                </block>
-                                <view class="order-footer">
-                                    <view class="order-footer-bot">
-                                        <view class="count">共{{ order.productCount }}件商品</view>
-                                        <view
-                                            class="money"
-                                            v-if="order.status == 31 || order.status == 32 || order.status == 33"
-                                        >
-                                            已支付:<text class="color">¥{{ order.receiptAmount | formatPrice }}</text>
-                                        </view>
-                                        <view class="money" v-else>
-                                            待付总额:<text class="color"
-                                                >¥{{ order.pendingPayments | formatPrice }}</text
-                                            >
-                                        </view>
-                                    </view>
-                                </view>
-                                <!-- 底部button -->
-                                <order-button
-                                    ref="orderButton"
-                                    :status="order.status"
-                                    :order="order"
-                                    @buttonConfirm="handButtonConfirm"
-                                >
-                                </order-button>
-                            </view>
-                            <!--加载loadding-->
-                            <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-                            <tui-nomore
-                                :visible="!pullUpOn"
-                                :backgroundColor="'#F7F7F7'"
-                                :text="nomoreText"
-                            ></tui-nomore>
-                            <!--加载loadding-->
-                        </view>
-                    </view>
-                </scroll-view>
-            </swiper-item>
-        </swiper>
-        <!-- 操作弹窗 -->
-        <tui-modal
-            :show="modal"
-            @click="handleClick"
-            @cancel="hideMobel(1)"
-            :content="contentModalText"
-            color="#333"
-            :size="32"
-            shape="circle"
-            :maskClosable="false"
-        ></tui-modal>
-        <!-- 再次购买订单商品全部下架弹窗 -->
-        <tui-modal
-            :show="modal2"
-            @click="handleClick2"
-            @cancel="hideMobel(2)"
-            shape="circle"
-            content="订单内商品已全部下架,不能购买!"
-            :button="button"
-        ></tui-modal>
-        <!-- 再次购买部分商品失效弹窗 -->
-        <tui-modal :show="modal3" @cancel="hideMobel(3)" :custom="true">
-            <view class="tui-modal-custom">
-                <view class="tui-modal-custom-text">
-                    <view class="title">以下商品已失效,不能进行购买;是否先将其他商品加入购物车?</view>
-                    <scroll-view scroll-y class="tui-modal-custom-list">
-                        <view class="custom-list" v-for="(invalid, index) in invalidList" :key="index">
-                            <view class="custom-list-image"><image :src="invalid.productImage" mode=""></image></view>
-                            <view class="custom-list-name">{{ invalid.name }}</view>
-                        </view>
-                    </scroll-view>
-                </view>
-                <view class="tui-modal-button">
-                    <button class="modal-button cancel" @click="hideMobel(3)">我再想想</button>
-                    <button class="modal-button confirm" @click="handleClick3">加入购物车</button>
-                </view>
-            </view>
-        </tui-modal>
-        <!-- 透明模态层 -->
-        <modal-layer v-if="isModalLayer"></modal-layer>
-        <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
-    </view>
-</template>
-
-<script>
-import HeaderOrder from '@/components/cm-module/headerNavbar/header-order' //自定义导航
-import orderButton from '@/components/cm-module/orderDetails/orderListButton' //按钮
-import modalLayer from '@/components/cm-module/modal-layer/modal-layer'
-import empty from '@/components/cm-module/empty/empty'
-import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
-import wechatPay from '@/mixins/wechatPay.js'
-import { mapGetters } from 'vuex'
-export default {
-    components: {
-        HeaderOrder,
-        empty,
-        orderButton,
-        modalLayer,
-        CmLoading
-    },
-    // 混入
-    mixins: [wechatPay],
-    data() {
-        return {
-            CustomBar: this.CustomBar, // 顶部导航栏高度
-            orderTabBar: [
-                { state: 0, text: '全部', orderList: [] },
-                { state: 1, text: '待付款', orderList: [] },
-                { state: 2, text: '待发货', orderList: [] },
-                { state: 3, text: '已发货', orderList: [] },
-                { state: 4, text: '退货/款', orderList: [] }
-            ],
-            headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
-            systeminfo: this.setSysteminfo(), //获取设备信息
-            nvabarData: {
-                //顶部自定义导航
-                showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
-                showSearch: 1,
-                title: '我的订单' // 导航栏 中间的标题
-            },
-            winHeight: '', //窗口高度
-            currentTab: 0, //预设当前项的值
-            scrollLeft: 0, //tab标题的滚动条位置
-            orderData: [],
-            btnoRderID: 0, //点击按钮传入的的订单ID
-            pageNum: 1, //页数
-            pageSize: 10, //条数
-            scrollTop: 0,
-            skeletonShow: true,
-            isDelete: false,
-            isClickChange: false,
-            isModalLayer: false,
-            isPayModel: false,
-            loadding: false,
-            pullUpOn: true,
-            hasNextPage: false,
-            pullFlag: true,
-            navbarHeight: '',
-            payModelData: {},
-            hanldOrderData: {},
-            modelType: 0,
-            nomoreText: '上拉显示更多',
-            isOnloadFlag: false,
-            modal: false,
-            modal2: false,
-            modal3: false,
-            OperationType: '',
-            contentModalText: '',
-            button: [
-                {
-                    text: '确定',
-                    type: 'danger'
-                }
-            ],
-            invalidList: []
-        }
-    },
-    computed: {
-        ...mapGetters(['userId'])
-    },
-    onLoad(e) {
-        let self = this
-        if (e.type === 'detele') {
-            self.isDelete = true
-        }
-        self.currentTab = e.state
-        self.isOnloadFlag = true
-        self.getHeaderTopHeight() //设置自定义导航高度
-        //  高度自适应
-        uni.getSystemInfo({
-            success: function(res) {
-                let calc = res.windowHeight
-                self.winHeight = calc - self.CustomBar
-            }
-        })
-    },
-    onPageScroll(e) {
-        this.scrollTop = e.scrollTop
-    },
-    onShow() {
-        this.isModalLayer = false
-        this.GetOrderDatainit(this.currentTab)
-        // console.log(this.orderTabBar)
-    },
-    methods: {
-        // 滚动切换标签样式
-        onChange: function(e) {
-            let index = e.target.current || e.detail.current
-            if (this.isClickChange) {
-                this.currentTab = index
-                this.isClickChange = false
-                return
-            }
-            this.isClickChange = false
-            this.currentTab = index
-            this.checkCor()
-            this.pageNum = 1
-            this.pullUpOn = true //切换时隐藏
-            this.loadding = false //切换时隐藏
-            this.nomoreText = ''
-            if (!this.isOnloadFlag) {
-                this.GetOrderDatainit(this.currentTab, 'tabChange')
-            }
-        },
-        // 点击标题切换当前页时改变样式
-        onClickTab: function(e) {
-            let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
-            if (this.currentTab === tabIndex) {
-                return false
-            } else {
-                this.isClickChange = true
-                this.currentTab = tabIndex
-                this.pageNum = 1
-                this.pullUpOn = true //切换时隐藏
-                this.loadding = false //切换时隐藏
-                this.GetOrderDatainit(this.currentTab)
-            }
-        },
-        //判断当前滚动超过一屏时,设置tab标题滚动条。
-        checkCor: function() {
-            if (this.currentTab > 3) {
-                //这里距离按实际计算
-                this.scrollLeft = 300
-            } else {
-                this.scrollLeft = 0
-            }
-        },
-        GetOrderDatainit(index, source) {
-            /**
-             * @订单初始化加载  仅加载第一页码
-             * @param:orderState(订单状态:0全部,1待付款,2待发货,3已发货,4退货款)
-             * @param:userId(用户ID)
-             * @param:pageNum(页码数)
-             * @param:pageSize(每页条数)
-             * @param:organizeID(全局变量组织ID)
-             */
-            setTimeout(() => {
-                this.skeletonShow = false
-                this.isOnloadFlag = false
-            }, 1500)
-            let orderItem = this.orderTabBar[index]
-            let state = orderItem.state
-            if (source === 'tabChange' && orderItem.loaded === true) {
-                //tab切换只有第一次需要加载数据
-                return
-            }
-            setTimeout(() => {
-                this.OrderService.QueryOrderList({
-                    orderState: index,
-                    userId: this.userId,
-                    pageNum: 1,
-                    pageSize: this.pageSize
-                })
-                    .then(response => {
-                        let data = response.data
-                        //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-                        let orderList = data.list.filter(item => {
-                            //添加不同状态下订单的表现形式
-                            item = Object.assign(item, this.StateExpFormat(item.state))
-                            return item
-                        })
-                        orderItem.orderList = []
-                        orderList.forEach(item => {
-                            orderItem.orderList.push(item)
-                        })
-                        this.$set(orderItem, 'loaded', true)
-                        this.hasNextPage = data.hasNextPage
-                        if (this.hasNextPage) {
-                            this.pullUpOn = false
-                            this.nomoreText = '上拉显示更多'
-                        } else {
-                            if (orderItem.orderList.length < 2) {
-                                this.pullUpOn = true
-                            } else {
-                                this.pullUpOn = false
-                                this.nomoreText = '已至底部'
-                            }
-                        }
-                    })
-                    .catch(error => {
-                        this.$util.msg(error.msg, 2000)
-                    })
-            }, 600)
-        },
-        getOnReachBottomData(index) {
-            //上拉加载
-            this.pageNum += 1
-            this.OrderService.QueryOrderList({
-                orderState: index,
-                userId: this.userId,
-                pageNum: this.pageNum,
-                pageSize: this.pageSize
-            })
-                .then(response => {
-                    let orderItem = this.orderTabBar[index]
-                    let data = response.data
-                    this.hasNextPage = data.hasNextPage
-                    orderItem.orderList = orderItem.orderList.concat(data.list)
-                    this.pullFlag = false // 防上拉暴滑
-                    setTimeout(() => {
-                        this.pullFlag = true
-                    }, 500)
-                    if (this.hasNextPage) {
-                        this.pullUpOn = false
-                        this.nomoreText = '上拉显示更多'
-                    } else {
-                        this.loadding = false
-                        this.pullUpOn = false
-                        this.nomoreText = '已至底部'
-                    }
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        scrolltolower() {
-            if (this.hasNextPage) {
-                this.loadding = true
-                this.pullUpOn = true
-                this.getOnReachBottomData(this.currentTab)
-            }
-        },
-        detail(id) {
-            //订单详情跳转
-            this.isModalLayer = true
-            this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderId=${id}`)
-        },
-        handButtonConfirm(data) {
-            //获取点击
-            this.hanldOrder = data
-            this.btnoRderID = data.orderId
-            this.OperationType = data.type
-            this.handShowAlert(data)
-        },
-        handShowAlert(data) {
-            //执行
-            switch (data.type) {
-                case 'cancel':
-                    this.modal = true
-                    this.contentModalText = '确认取消该订单吗?'
-                    break
-                case 'delete':
-                    this.modal = true
-                    this.contentModalText = '确认删除该订单吗?'
-                    break
-                case 'confirm':
-                    this.modal = true
-                    this.contentModalText = '是否确认收货?'
-                    break
-                case 'query':
-                    this.isModalLayer = true
-                    this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-                    break
-                case 'again':
-                    this.handBuyAgainInfo()
-                    break
-                case 'pay':
-                    this.miniWxPayFor(data.order)
-                    break
-            }
-        },
-        handleClick(e) {
-            //用户操作订单
-            let index = e.index
-            if (index == 1) {
-                switch (this.OperationType) {
-                    case 'delete':
-                        this.handOrderDetele(this.btnoRderID)
-                        break
-                    case 'cancel':
-                        this.handCenceConfirm(this.btnoRderID)
-                        break
-                    case 'confirm':
-                        this.handOrderConfirm(this.btnoRderID)
-                        break
-                }
-            }
-            this.modal = false
-        },
-        handleClick2() {
-            this.modal2 = false
-        },
-        handleClick3() {
-            this.handShoppingAgainCart()
-            this.modal3 = false
-        },
-        hideMobel(index) {
-            switch (index) {
-                case 1:
-                    this.modal = false
-                    break
-                case 2:
-                    this.modal2 = false
-                    break
-                case 3:
-                    this.modal3 = false
-                    break
-            }
-        },
-        handBuyAgainInfo() {
-            //再次购买初始化查询订单商品信息
-            this.OrderService.GetOrderBuyAgain({
-                orderId: this.btnoRderID
-            })
-                .then(response => {
-                    this.handShoppingAgainCart()
-                })
-                .catch(error => {
-                    if (error.data && error.data.length > 0) {
-                        this.modal3 = true
-                        this.invalidList = error.data
-                    } else {
-                        this.modal2 = true
-                    }
-                })
-        },
-        handShoppingAgainCart() {
-            //一键加入购物车
-            this.ProductService.ShoppingAgainCart({
-                orderId: this.btnoRderID
-            })
-                .then(response => {
-                    this.ProductService.QueryShoppingQuantity({ userId: this.userId })
-                        .then(response => {
-                            this.$api.switchTabTo('/pages/tabBar/cart/index')
-                        })
-                        .catch(error => {
-                            console.log('查询购物车数量错误信息', error)
-                        })
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handOrderConfirm(id) {
-            //确认收货
-            this.OrderService.ConfirmReceipt({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDatainit(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handOrderDetele(id) {
-            //删除订单
-            this.OrderService.DeleteOrder({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDatainit(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handCenceConfirm(id) {
-            //取消订单
-            this.OrderService.CancelOrder({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDatainit(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handlSearchPath() {
-            this.$api.navigateTo('/pages/user/order/search-order')
-        },
-        orderPriceToFixed(n) {
-            let price = ''
-            price = n.toFixed(2)
-            return price
-        },
-        getHeaderTopHeight() {
-            // 状态栏高度
-            let statusBarHeight = this.systeminfo.statusBarHeight
-            let headerPosi = this.headerBtnPosi
-            let btnPosi = {
-                // 胶囊实际位置,坐标信息不是左上角原点
-                height: headerPosi.height,
-                width: headerPosi.width,
-                // 胶囊top - 状态栏高度
-                top: headerPosi.top - statusBarHeight,
-                // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
-                bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
-                // 屏幕宽度 - 胶囊right
-                right: this.systeminfo.screenWidth - headerPosi.right
-            }
-            this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
-        },
-        setHeaderBtnPosi() {
-            // 获得胶囊按钮位置信息
-            let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
-            return headerBtnPosi
-        },
-        setSysteminfo() {
-            let systeminfo
-            uni.getSystemInfo({
-                // 获取设备信息
-                success: res => {
-                    systeminfo = res
-                }
-            })
-            return systeminfo
-        },
-        PromotionsFormat(promo) {
-            //促销活动类型数据处理
-            if (promo != null) {
-                if (promo.type == 1 && promo.mode == 1) {
-                    return true
-                } else {
-                    return false
-                }
-            }
-            return false
-        },
-        StateExpFormat(state) {
-            //订单状态文字和颜色
-            var HtmlStateText = '',
-                stateTextObject = {
-                    4: '交易完成',
-                    5: '订单完成',
-                    6: '已关闭',
-                    7: '交易全退',
-                    77: '交易全退',
-                    11: '待付款待发货',
-                    12: '待付款部分发货',
-                    13: '待付款已发货',
-                    21: '部分付款待发货',
-                    22: '部分付款部分发货',
-                    23: '部分付款已发货',
-                    31: '已付款待发货',
-                    32: '已付款部分发货',
-                    33: '已付款已发货',
-                    111: '待付款待发货'
-                }
-            Object.keys(stateTextObject).forEach(function(key) {
-                if (key == state) {
-                    HtmlStateText = stateTextObject[key]
-                }
-            })
-            return HtmlStateText
-        }
-    }
-}
-</script>
-
-<style lang="scss">
-/*tabbar start*/
-::-webkit-scrollbar {
-    width: 0;
-    height: 0;
-    color: transparent;
-}
-.order-section-top {
-    width: 100%;
-    position: fixed;
-    top: 0;
-    left: 0;
-    z-index: 99;
-    background: #ffffff;
-}
-.tab-view::before {
-    content: '';
-    position: absolute;
-    border-bottom: 1rpx solid #eaeef1;
-    -webkit-transform: scaleY(0.5);
-    transform: scaleY(0.5);
-    bottom: 0;
-    right: 0;
-    left: 0;
-}
-.tab-view {
-    width: 100%;
-    height: 80rpx;
-    overflow: hidden;
-    box-sizing: border-box;
-    background: #fff;
-    white-space: nowrap;
-    border-top: 1px solid #f7f7f7;
-}
-.tab-bar-item {
-    padding: 0;
-    height: 80rpx;
-    min-width: 90rpx;
-    line-height: 80rpx;
-    margin: 0 28rpx;
-    display: inline-block;
-    text-align: center;
-    box-sizing: border-box;
-    position: relative;
-    .tab-bar-title {
-        height: 80rpx;
-        line-height: 80rpx;
-        font-size: $font-size-28;
-        color: $text-color;
-    }
-    .line {
-        width: 40rpx;
-        height: 4rpx;
-        border-radius: 2rpx;
-        position: absolute;
-        bottom: 8rpx;
-        left: 50%;
-        margin-left: -20rpx;
-        background-color: #ffffff;
-    }
-    &.active {
-        .line {
-            background-color: $color-system;
-        }
-        .tab-bar-title {
-            color: $color-system !important;
-        }
-    }
-}
-/*tabbar end*/
-.scoll-y {
-    height: 100%;
-}
-page {
-    background: #f7f7f7;
-}
-.container {
-    padding-bottom: env(safe-area-inset-bottom);
-    height: auto;
-    position: relative;
-}
-.tui-order-content {
-    width: 100%;
-    height: auto;
-}
-.tui-order-list {
-    margin-top: 90rpx;
-    width: 100%;
-    position: relative;
-}
-.tui-order-item {
-    display: flex;
-    flex-direction: column;
-    width: 702rpx;
-    padding: 20rpx 24rpx 0 24rpx;
-    background: #fff;
-    border-bottom: 20rpx solid #f7f7f7;
-}
-.order-title {
-    width: 100%;
-    height: auto;
-    padding-bottom: 20rpx;
-    border-bottom: 1px solid #e1e1e1;
-    .order-title-t {
-        width: 100%;
-        height: 48rpx;
-        float: left;
-        line-height: 48rpx;
-        position: relative;
-        .bage-icon {
-            width: 50rpx;
-            height: 50rpx;
-            display: block;
-            position: absolute;
-            right: 0;
-            top: 9rpx;
-        }
-        .bage-text {
-            display: inline-block;
-            font-size: $font-size-28;
-            line-height: 48rpx;
-            text-align: left;
-            color: $text-color;
-            .text {
-                color: #999999;
-            }
-        }
-    }
-    .order-title-b {
-        width: 100%;
-        height: 48rpx;
-        float: left;
-        margin-top: 8rpx;
-        .order-title-btxt {
-            float: left;
-            font-size: $font-size-28;
-            line-height: 48rpx;
-            color: $text-color;
-            text-align: left;
-            .text {
-                color: #999999;
-            }
-        }
-        .order-title-tip {
-            float: right;
-            font-size: $font-size-28;
-            line-height: 48rpx;
-            text-align: right;
-            color: #ff457b;
-        }
-    }
-}
-.goods-title {
-    width: 100%;
-    height: 56rpx;
-    float: left;
-    margin-top: 10rpx;
-    .title-logo {
-        width: 56rpx;
-        height: 56rpx;
-        float: left;
-        border-radius: 8rpx;
-        border: 1px solid #e1e1e1;
-        margin-right: 8rpx;
-        image {
-            border-radius: 8rpx;
-            width: 56rpx;
-            height: 56rpx;
-        }
-    }
-    .title-text {
-        width: 400rpx;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        float: left;
-        font-size: $font-size-28;
-        color: $text-color;
-        text-align: left;
-        line-height: 56rpx;
-        font-weight: bold;
-    }
-}
-.goods-item {
-    width: 100%;
-    height: auto;
-}
-.goods-pros-t {
-    width: 100%;
-    height: auto;
-    padding: 24rpx 0;
-    .pros-img {
-        float: left;
-        width: 210rpx;
-        height: 100%;
-        border-radius: 10rpx;
-        margin: 0 26rpx 0 0;
-        position: relative;
-        image {
-            width: 210rpx;
-            height: 210rpx;
-            border-radius: 10rpx;
-            border: 1px solid #f3f3f3;
-        }
-    }
-}
-.pros-product {
-    width: 460rpx;
-    height: 100%;
-    line-height: 36rpx;
-    font-size: $font-size-26;
-    position: relative;
-    float: left;
-    .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: 8rpx;
-    }
-    .productspec {
-        height: 36rpx;
-        color: #999999;
-        margin: 10rpx 0 0 0;
-    }
-    .productprice {
-        height: 48rpx;
-        width: 100%;
-        float: left;
-        margin-top: 10rpx;
-        .price {
-            line-height: 48rpx;
-            font-size: $font-size-28;
-            width: 48%;
-            color: $color-system;
-            float: left;
-            font-weight: bold;
-            &.disabled {
-                color: #999999;
-                text-decoration: line-through;
-            }
-        }
-        .count {
-            height: 100%;
-            float: right;
-            position: relative;
-            .small {
-                color: #666666;
-            }
-        }
-    }
-    .floor-item-act {
-        width: 100%;
-        height: 30rpx;
-        margin-top: 8rpx;
-        float: left;
-        .tag {
-            display: inline-block;
-            width: 80rpx;
-            height: 30rpx;
-            background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png) top center no-repeat;
-            background-size: contain;
-            font-size: 22rpx;
-            line-height: 30rpx;
-            text-align: center;
-            color: #f83c6c;
-            float: left;
-        }
-    }
-}
-.order-footer {
-    width: 100%;
-    height: 78rpx;
-    float: left;
-    margin-top: 20rpx;
-    .order-footer-bot {
-        width: 100%;
-        float: left;
-        height: 48rpx;
-        line-height: 48rpx;
-        font-size: $font-size-28;
-        color: $text-color;
-        .count {
-            width: 50%;
-            float: left;
-            text-align: left;
-            font-weight: bold;
-        }
-        .money {
-            width: 50%;
-            float: right;
-            text-align: right;
-            .color {
-                color: $color-system;
-                font-weight: bold;
-            }
-        }
-    }
-}
-.tui-modal-custom-text {
-    min-height: 300rpx;
-    margin-bottom: 30rpx;
-    .title {
-        width: 100%;
-        height: auto;
-        font-size: $font-size-30;
-        text-align: justify;
-        color: #333333;
-        line-height: 40rpx;
-        margin-bottom: 30rpx;
-    }
-    .tui-modal-custom-list {
-        width: 100%;
-        height: 350rpx;
-        overflow: hidden;
-        .custom-list {
-            width: 100%;
-            height: 117rpx;
-            box-sizing: border-box;
-            float: left;
-            padding: 15rpx 0;
-            .custom-list-image {
-                width: 86rpx;
-                height: 86rpx;
-                float: left;
-                border-radius: 6rpx;
-                box-sizing: border-box;
-                border: 1px solid #e1e1e1;
-                image {
-                    width: 84rpx;
-                    height: 84rpx;
-                    border-radius: 6rpx;
-                    display: block;
-                }
-            }
-            .custom-list-name {
-                width: 400rpx;
-                height: 86rpx;
-                float: right;
-                line-height: 43rpx;
-                font-size: $font-size-26;
-                color: #666666;
-                text-overflow: ellipsis;
-                overflow: hidden;
-                display: -webkit-box;
-                -webkit-line-clamp: 2;
-                line-clamp: 2;
-                -webkit-box-orient: vertical;
-            }
-        }
-    }
-}
-.tui-modal-button {
-    width: 100%;
-    height: 72rpx;
-    display: flex;
-    .modal-button {
-        width: 200rpx;
-        height: 72rpx;
-        line-height: 72rpx;
-        border-radius: 36rpx;
-        box-sizing: border-box;
-        &.cancel {
-            border: 1px solid #b2b2b2;
-            background: #ffffff;
-            color: #333333;
-        }
-        &.confirm {
-            background: $btn-confirm;
-            color: #ffffff;
-        }
-    }
-}
-</style>

+ 0 - 422
pages/user/order/order-logistics.vue

@@ -1,422 +0,0 @@
-<template>
-    <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="(loItem, 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)">
-                                            {{ loItem.expressname }}:<text class="expressNumber">{{
-                                                loItem.expressNumber
-                                            }}</text>
-                                            <text class="clipboard" @click.stop="clipboard(loItem.expressNumber)"
-                                                >复制</text
-                                            >
-                                            <text
-                                                class="arrow-showMore iconfont icon-web_xiangxiazhankai"
-                                                :style="{
-                                                    transform: loItem.isOpen ? 'rotate(180deg)' : 'rotate(0)',
-                                                    transition: 'transform 0.3s ease'
-                                                }"
-                                            ></text>
-                                        </view>
-                                        <view class="main-bot"> 发货时间:{{ loItem.expressNewtime }} </view>
-                                    </view>
-                                    <view
-                                        v-if="loItem.expressRecord.length > 0"
-                                        v-for="(infoItem, infoIndex) in loItem.expressRecord"
-                                        :key="infoIndex"
-                                        :class="{ 'logistics-warp--hide': !loItem.isOpen }"
-                                        class="logistics-main-bot logistics-animation"
-                                        :style="{
-                                            transform: loItem.isOpen ? 'translateY(0)' : 'translateY(-50%)',
-                                            '-webkit-transform': loItem.isOpen ? 'translateY(0)' : 'translateY(-50%)'
-                                        }"
-                                    >
-                                        {{ infoItem.time }} {{ infoItem.desc }}
-                                    </view>
-                                    <view
-                                        v-if="loItem.expressRecord.length < 1"
-                                        :class="{ 'logistics-warp--hide': !loItem.isOpen }"
-                                        class="logistics-main-bot logistics-animation"
-                                        :style="{
-                                            transform: loItem.isOpen ? 'translateY(0)' : 'translateY(-50%)',
-                                            '-webkit-transform': loItem.isOpen ? 'translateY(0)' : 'translateY(-50%)'
-                                        }"
-                                    >
-                                        暂无物流信息
-                                    </view>
-                                </view>
-                            </view>
-                        </view>
-                    </view>
-                    <view class="logistics-content" v-else> 暂无物流信息 </view>
-                </view>
-            </view>
-        </view>
-        <!-- 物流信息 -->
-        <!-- <logistics-record ref="logistics"></logistics-record> -->
-    </view>
-</template>
-
-<script>
-import thorui from '@/components/clipboard/clipboard.thorui.js'
-export default {
-    components: {
-        // logisticsRecord,
-    },
-    data() {
-        return {
-            orderId: '',
-            goodsList: []
-        }
-    },
-    onLoad(option) {
-        //商品数据
-        this.orderId = option.orderId
-        this.getData()
-    },
-    methods: {
-        navToListPage(id) {
-            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) {
-            console.log(data)
-            thorui.getClipboardData(data, res => {
-                if (res) {
-                    this.$util.msg('复制成功', 2000, true, 'success')
-                } else {
-                    this.$util.msg('复制失败', 2000, true, 'none')
-                }
-            })
-        },
-        getData() {
-            this.OrderService.QueryLogistics({
-                orderId: this.orderId
-            })
-                .then(response => {
-                    const resData = response.data
-                    // 添加订单列表信息
-                    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(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        }
-    }
-}
-</script>
-
-<style lang="scss">
-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: $font-size-28;
-                color: $text-color;
-                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: $font-size-26;
-            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: $font-size-26;
-                .color {
-                    color: $text-color;
-                }
-            }
-        }
-    }
-}
-
-.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: $font-size-28;
-            color: $text-color;
-            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: $font-size-32;
-                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: $font-size-26;
-                color: $text-color;
-                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: $font-size-28;
-                color: $text-color;
-                line-height: 40rpx;
-                margin: 4rpx 0;
-            }
-        }
-        .logistics-main-bot {
-            width: 100%;
-            height: auto;
-            font-size: $font-size-24;
-            color: $text-color;
-            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: $font-size-22;
-            color: #ff457b;
-            border-radius: 7rpx;
-            line-height: 40rpx;
-            display: inline-block;
-        }
-    }
-}
-</style>

+ 0 - 1139
pages/user/order/search-order.vue

@@ -1,1139 +0,0 @@
-<template>
-    <view class="search-container">
-        <!-- <or-search :theme="themeClass" @getSearchText="getSearchText"></or-search> -->
-        <view class="search-main">
-            <view class="search">
-                <view class="search-input">
-                    <text class="iconfont icon-sousuo"></text>
-                    <input
-                        maxlength="20"
-                        focus
-                        type="text"
-                        value=""
-                        confirm-type="search"
-                        @focus="onFocus"
-                        @input="onShowClose"
-                        @confirm="subMitSearch()"
-                        placeholder="请输入商品关键词"
-                        v-model.trim="searchInputVal"
-                    />
-                    <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
-                </view>
-                <view class="search-btn" @click="subMitSearch()">搜索</view>
-            </view>
-        </view>
-        <view class="search-container-history" v-if="!isShowWrapper">
-            <view :class="'s-' + themeClass" v-if="serachRecordList.length > 0">
-                <view class="header"> 搜索历史<text class="iconfont icon-shanchu" @click="confirmDetele"></text> </view>
-                <view class="list">
-                    <view v-for="(item, index) in serachRecordList" :key="index" @click="keywordsClick(item)">{{
-                        item
-                    }}</view>
-                </view>
-            </view>
-        </view>
-        <view
-            class=" order-container"
-            v-if="isShowWrapper"
-            :style="{ overflow: 'auto', height: showSkeleton ? windowHeight + 'px' : 'auto' }"
-        >
-            <scroll-view
-                class="tui-skeleton"
-                :style="{ height: scrollHeight + 'px' }"
-                @scrolltolower="scrolltolower"
-                scroll-y
-            >
-                <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
-                    <!-- 空白页 -->
-                    <empty v-if="isShowEmpty" :navbarHeight="navbarHeight"></empty>
-                    <!-- 列表 -->
-                    <view v-else class="tui-order-content">
-                        <view
-                            class="tui-order-item"
-                            v-for="(order, orderIndex) in orderList"
-                            :key="orderIndex"
-                            @click.stop="detail(order.orderId)"
-                        >
-                            <view class="order-title">
-                                <view class="order-title-t">
-                                    <text class="bage-text tui-skeleton-fillet"
-                                        ><text class="text">订单编号:</text>{{ order.orderNo }}</text
-                                    >
-                                </view>
-                                <view class="order-title-b">
-                                    <view class="order-title-btxt tui-skeleton-fillet"
-                                        ><text class="text">下单时间:</text>{{ order.orderTime }}</view
-                                    >
-                                    <view class="order-title-tip tui-skeleton-fillet">{{
-                                        StateExpFormat(order.status)
-                                    }}</view>
-                                </view>
-                            </view>
-                            <block v-for="(shop, index) in order.shopOrderList" :key="index">
-                                <view class="goods-title">
-                                    <view class="title-logo"><image :src="shop.shopLogo" mode=""></image></view>
-                                    <view class="title-text tui-skeleton-fillet">{{ shop.shopName }}</view>
-                                </view>
-                                <view
-                                    class="goods-item"
-                                    v-for="(pros, prosIndex) in shop.orderProductList"
-                                    :key="prosIndex"
-                                >
-                                    <view class="goods-pros-t">
-                                        <view class="pros-img tui-skeleton-fillet">
-                                            <image :src="pros.productImage" alt="" />
-                                            <text class="tips" v-if="pros.productType == 2 || pros.productType == 1"
-                                                >赠品</text
-                                            >
-                                        </view>
-                                        <view class="pros-product">
-                                            <view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
-                                            <view
-                                                class="productspec tui-skeleton-fillet"
-                                                v-if="pros.productCategory != 2"
-                                                >规格:{{ pros.productUnit }}</view
-                                            >
-                                            <view class="productprice">
-                                                <view
-                                                    class="price "
-                                                    v-if="pros.productType == 2 || pros.productType == 1"
-                                                >
-                                                    <text>¥0.00</text>
-                                                </view>
-                                                <view
-                                                    v-else
-                                                    class="price tui-skeleton-fillet"
-                                                    :class="PromotionsFormat(pros.productPromotion) ? 'disabled' : ''"
-                                                >
-                                                    <text>¥{{ pros.price | formatPrice }}</text>
-                                                </view>
-                                                <view class="count tui-skeleton-fillet">
-                                                    <text class="small">x</text>{{ pros.num }}
-                                                </view>
-                                            </view>
-                                            <view class="floor-item-act" v-if="pros.productPromotion != null">
-                                                <view v-if="PromotionsFormat(pros.productPromotion)" class="floor-tags">
-                                                    {{ pros.productPromotion.name }}
-                                                    <text
-                                                        v-if="
-                                                            pros.productPromotion != null &&
-                                                                pros.productPromotion.type != 3
-                                                        "
-                                                    >
-                                                        :¥{{
-                                                            pros.productPromotion == null
-                                                                ? '0.00'
-                                                                : pros.productPromotion.touchPrice | formatPrice
-                                                        }}
-                                                    </text>
-                                                </view>
-                                                <view v-else-if="pros.productPromotion.type != 3" class="floor-tags">{{
-                                                    pros.productPromotion.name
-                                                }}</view>
-                                            </view>
-                                        </view>
-                                    </view>
-                                </view>
-                            </block>
-                            <view class="order-footer">
-                                <view class="order-footer-top" v-if="order.discountFee != 0"
-                                    >经理折扣:¥{{ 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 | formatPrice }}</view
-                                    >
-                                </view>
-                            </view>
-                            <!-- 底部button -->
-                            <order-button
-                                v-if="order.userId == userId"
-                                ref="orderButton"
-                                :status="order.status"
-                                :order="order"
-                                @buttonConfirm="handButtonConfirm"
-                            >
-                            </order-button>
-                        </view>
-                        <!--加载loadding-->
-                        <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-                        <tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText"></tui-nomore>
-                        <!--加载loadding-->
-                    </view>
-                </view>
-            </scroll-view>
-        </view>
-        <!-- 操作弹窗 -->
-        <tui-modal
-            :show="modal"
-            @click="handleClick"
-            @cancel="hideMobel(1)"
-            :content="contentModalText"
-            color="#333"
-            :size="32"
-            shape="circle"
-            :maskClosable="false"
-        ></tui-modal>
-        <!-- 再次购买订单商品全部下架弹窗 -->
-        <tui-modal
-            :show="modal2"
-            @click="handleClick2"
-            @cancel="hideMobel(2)"
-            shape="circle"
-            content="订单内商品已全部下架,不能购买!"
-            :button="button"
-        ></tui-modal>
-        <!-- 再次购买部分商品失效弹窗 -->
-        <tui-modal :show="modal3" @cancel="hideMobel(3)" :custom="true">
-            <view class="tui-modal-custom">
-                <view class="tui-modal-custom-text">
-                    <view class="title">以下商品已失效,不能进行购买;是否先将其他商品加入购物车?</view>
-                    <scroll-view scroll-y class="tui-modal-custom-list">
-                        <view class="custom-list" v-for="(invalid, index) in invalidList" :key="index">
-                            <view class="custom-list-image"><image :src="invalid.productImage" mode=""></image></view>
-                            <view class="custom-list-name">{{ invalid.name }}</view>
-                        </view>
-                    </scroll-view>
-                </view>
-                <view class="tui-modal-button">
-                    <button class="modal-button cancel" @click="hideMobel(3)">我再想想</button>
-                    <button class="modal-button confirm" @click="handleClick3">加入购物车</button>
-                </view>
-            </view>
-        </tui-modal>
-        <!-- 透明模态层 -->
-        <modal-layer v-if="isModalLayer"></modal-layer>
-        <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
-    </view>
-</template>
-
-<script>
-import orderButton from '@/components/cm-module/orderDetails/orderListButton' //按钮
-import modalLayer from '@/components/cm-module/modal-layer/modal-layer'
-import empty from '@/components/cm-module/empty/empty'
-import authorize from '@/common/authorize.js'
-import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
-import wechatPay from '@/mixins/wechatPay.js'
-export default {
-    components: {
-        orderButton,
-        empty,
-        CmLoading
-    },
-    // 混入
-    mixins: [wechatPay],
-    data() {
-        return {
-            themeClass: 'block',
-            searchInputVal: '',
-            isShowClose: false, //是否显示清空输入框图标
-            isSearchHistory: false, //是都显示搜索历史
-            serachRecordList: [],
-            isShowWrapper: false,
-            isShowEmpty: false,
-            windowHeight: '',
-            showSkeleton: true,
-            userId: 0,
-            orderList: [],
-            btnoRderID: 0, //点击按钮传入的的订单ID
-            pageNum: 1, //页数
-            pageSize: 10, //条数
-            scrollTop: 0,
-            deteleType: '',
-            skeletonShow: true,
-            isModalLayer: false,
-            loadding: false,
-            pullUpOn: true,
-            hasNextPage: false,
-            pullFlag: true,
-            navbarHeight: '',
-            nomoreText: '上拉显示更多',
-            scrollHeight: '',
-            modal: false,
-            modal2: false,
-            modal3: false,
-            OperationType: '',
-            contentModalText: '',
-            button: [
-                {
-                    text: '确定',
-                    type: 'danger'
-                }
-            ],
-            invalidList: [],
-        }
-    },
-    onLoad() {
-        this.$api.getStorage().then(resolve => {
-            this.userId = resolve.userId
-            this.InitGetSerachRecord(this.userId)
-        })
-    },
-    methods: {
-        subMitSearch() {
-            if (this.searchInputVal == '') {
-                this.$util.msg('请输入商品关键词', 2000)
-            } else {
-                this.commodityList = []
-                this.GetOrderDatainit()
-            }
-        },
-        InitGetSerachRecord() {
-            this.OrderService.SearchOrderHistory({ userId: this.userId })
-                .then(response => {
-                    this.serachRecordList = response.data
-                    if (this.serachRecordList.length > 0) {
-                        this.isSearchHistory = true
-                    } else {
-                        this.isSearchHistory = false
-                    }
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        onShowClose() {
-            //输入框失去焦点时触发
-            this.inputEmpty(this.searchInputVal)
-        },
-        onFocus() {
-            //输入框获取焦点时触发
-            this.inputEmpty(this.searchInputVal)
-            this.InitGetSerachRecord()
-        },
-        delInputText() {
-            //清除输入框内容
-            this.searchInputVal = ''
-            this.isShowClose = false
-            this.isShowWrapper = false
-            this.inputEmpty(this.searchInputVal)
-            this.InitGetSerachRecord()
-        },
-        keywordsClick(item) {
-            //关键词搜索与历史搜索
-            this.searchInputVal = item
-            this.isShowClose = true
-            this.subMitSearch()
-        },
-        confirmDetele() {
-            //清空历史记录
-            this.modal = true
-            this.contentModalText = '确定删除历史记录?'
-            this.OperationType = 'history'
-        },
-        inputEmpty(val) {
-            this.isShowWrapper = false
-            if (val != '') {
-                this.isShowClose = true
-            } else {
-                this.isShowClose = false
-            }
-        },
-        GetOrderDatainit(index, source) {
-            /**
-             * @订单初始化加载  仅加载第一页码
-             * @param:searchWord(搜索关键词)
-             * @param:userId(用户ID)
-             * @param:pageNum(页码数)
-             * @param:pageSize(每页条数)
-             * @param:userId(全局变量组织ID)
-             */
-
-            this.OrderService.QueryOrderDealerList({
-                orderState: 0,
-                orderType: 0,
-                searchWord: this.searchInputVal,
-                userId: this.userId,
-                pageNum: 1,
-                pageSize: this.pageSize
-            })
-                .then(response => {
-                    this.isShowWrapper = true
-                    this.showSkeleton = true
-                    const _responseData = response.data.list
-                    if (_responseData && _responseData.length > 0) {
-                        let filrerData = _responseData.filter(item => {
-                            //添加不同状态下订单的表现形式
-                            item = Object.assign(item, this.StateExpFormat(item.state))
-                            return item
-                        })
-                        this.orderList = []
-                        filrerData.forEach(item => {
-                            this.orderList.push(item)
-                        })
-                        this.hasNextPage = response.data.hasNextPage
-                        if (this.hasNextPage) {
-                            this.pullUpOn = false
-                            this.nomoreText = '上拉显示更多'
-                        } else {
-                            if (this.orderList.length < 2) {
-                                this.pullUpOn = true
-                            } else {
-                                this.pullUpOn = false
-                                this.nomoreText = '已至底部'
-                            }
-                        }
-                        this.isShowEmpty = false
-                    } else {
-                        this.isShowEmpty = true
-                    }
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        getOnReachBottomData(index) {
-            //上拉加载
-            this.pageNum += 1
-            this.OrderService.QueryOrderDealerList({
-                orderState: 0,
-                orderType: 0,
-                searchWord: this.searchInputVal,
-                userId: this.userId,
-                pageNum: this.pageNum,
-                pageSize: this.pageSize
-            })
-                .then(response => {
-                    let resData = response.data.list
-                    this.hasNextPage = response.data.hasNextPage
-                    this.orderList = this.orderList.concat(resData)
-                    this.pullFlag = false // 防上拉暴滑
-                    setTimeout(() => {
-                        this.pullFlag = true
-                    }, 500)
-                    if (this.hasNextPage) {
-                        this.pullUpOn = false
-                        this.nomoreText = '上拉显示更多'
-                    } else {
-                        this.loadding = false
-                        this.pullUpOn = false
-                        this.nomoreText = '已至底部'
-                    }
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        scrolltolower() {
-            if (this.hasNextPage) {
-                this.loadding = true
-                this.pullUpOn = true
-                this.showSkeleton = false
-                this.getOnReachBottomData()
-            }
-        },
-        detail(id) {
-            //订单详情跳转
-            this.isModalLayer = true
-            this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderId=${id}`)
-        },
-        handButtonConfirm(data) {
-            //获取点击
-            this.hanldOrder = data
-            this.btnoRderID = data.orderId
-            this.OperationType = data.type
-            this.handShowAlert(data)
-        },
-        handShowAlert(data) {
-            //执行
-            switch (data.type) {
-                case 'cancel':
-                    this.modal = true
-                    this.contentModalText = '确认取消该订单吗?'
-                    break
-                case 'delete':
-                    this.modal = true
-                    this.contentModalText = '确认删除该订单吗?'
-                    break
-                case 'confirm':
-                    this.modal = true
-                    this.contentModalText = '是否确认收货?'
-                    break
-                case 'query':
-                    this.isModalLayer = true
-                    this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-                    break
-                case 'again':
-                    this.handBuyAgainInfo()
-                    break
-                case 'pay':
-                    this.miniWxPayFor(data.order)
-                    break
-            }
-        },
-        handleClick(e) {
-            //用户操作订单
-            let index = e.index
-            if (index == 1) {
-                switch (this.OperationType) {
-                    case 'delete':
-                        this.handOrderDetele(this.btnoRderID)
-                        break
-                    case 'cancel':
-                        this.handCenceConfirm(this.btnoRderID)
-                        break
-                    case 'confirm':
-                        this.handOrderConfirm(this.btnoRderID)
-                        break
-                }
-            }
-            this.modal = false
-        },
-        handleClick2() {
-            this.modal2 = false
-        },
-        handleClick3() {
-            this.handShoppingAgainCart()
-            this.modal3 = false
-        },
-        hideMobel(index) {
-            switch (index) {
-                case 1:
-                    this.modal = false
-                    break
-                case 2:
-                    this.modal2 = false
-                    break
-                case 3:
-                    this.modal3 = false
-                    break
-            }
-        },
-        handBuyAgainInfo() {
-            //再次购买初始化查询订单商品信息
-            this.OrderService.GetOrderBuyAgain({
-                orderId: this.btnoRderID
-            })
-                .then(response => {
-                    this.handShoppingAgainCart()
-                })
-                .catch(error => {
-                    if (error.data && error.data.length > 0) {
-                        this.modal3 = true
-                        this.invalidList = error.data
-                    } else {
-                        this.modal2 = true
-                    }
-                })
-        },
-        handShoppingAgainCart() {
-            //一键加入购物车
-            this.ProductService.ShoppingAgainCart({
-                orderId: this.btnoRderID
-            })
-                .then(response => {
-                    this.ProductService.QueryShoppingQuantity({ userId: this.userId })
-                        .then(response => {
-                            this.$api.switchTabTo('/pages/tabBar/cart/index')
-                        })
-                        .catch(error => {
-                            console.log('查询购物车数量错误信息', error)
-                        })
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handOrderConfirm(id) {
-            //确认收货
-            this.OrderService.ConfirmReceipt({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDatainit(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handOrderDetele(id) {
-            //删除订单
-            this.OrderService.DeleteOrder({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDatainit(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handCenceConfirm(id) {
-            //取消订单
-            this.OrderService.CancelOrder({ orderId: id })
-                .then(response => {
-                    this.$util.msg(response.msg, 2000, true, 'success')
-                    setTimeout(() => {
-                        this.GetOrderDatainit(this.currentTab)
-                    }, 2000)
-                })
-                .catch(error => {
-                    this.$util.msg(error.msg, 2000)
-                })
-        },
-        handlSearchPath() {
-            this.$api.navigateTo('/pages/user/order/search-order')
-        },
-        setScrollHeight() {
-            const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
-            this.windowHeight = windowHeight - 1
-            this.scrollHeight = windowHeight - 1
-        },
-        PromotionsFormat(promo) {
-            //促销活动类型数据处理
-            if (promo != null) {
-                if (promo.type == 1 && promo.mode == 1) {
-                    return true
-                } else {
-                    return false
-                }
-            }
-            return false
-        },
-        StateExpFormat(state) {
-            //订单状态文字和颜色
-            var HtmlStateText = '',
-                stateTextObject = {
-                    0: '待确认',
-                    4: '交易完成',
-                    5: '订单完成',
-                    6: '已关闭',
-                    7: '交易全退',
-                    77: '交易全退',
-                    11: '待付款待发货',
-                    12: '待付款部分发货',
-                    13: '待付款已发货',
-                    21: '部分付款待发货',
-                    22: '部分付款部分发货',
-                    23: '部分付款已发货',
-                    31: '已付款待发货',
-                    32: '已付款部分发货',
-                    33: '已付款已发货',
-                    111: '待付款待发货'
-                }
-            Object.keys(stateTextObject).forEach(function(key) {
-                if (key == state) {
-                    HtmlStateText = stateTextObject[key]
-                }
-            })
-            return HtmlStateText
-        }
-    },
-    onPageScroll(e) {
-        this.scrollTop = e.scrollTop
-    },
-    onShow() {
-        this.setScrollHeight()
-    }
-}
-</script>
-
-<style lang="scss">
-@import '@/uni.scss';
-page {
-    background-color: #f7f7f7 !important;
-}
-.search {
-    width: 702rpx;
-    height: 70rpx;
-    padding: 12rpx 24rpx;
-    border-bottom: 1px solid #f0f0f0;
-    position: fixed;
-    top: 0;
-    left: 0;
-    background: #ffffff;
-    z-index: 1001;
-    .search-input {
-        width: 448rpx;
-        height: 70rpx;
-        padding: 0 68rpx;
-        line-height: 70rpx;
-        border-radius: 40rpx;
-        position: relative;
-        background: #f0f0f0;
-        float: left;
-        .icon-sousuo {
-            font-size: 36rpx;
-            color: #8a8a8a;
-            position: absolute;
-            left: 24rpx;
-            z-index: 10;
-        }
-        .icon-shanchu1 {
-            font-size: 36rpx;
-            color: #8a8a8a;
-            position: absolute;
-            right: 24rpx;
-            top: 0;
-            padding: 0 10rpx;
-            z-index: 10;
-        }
-        input {
-            width: 448rpx;
-            height: 70rpx;
-            background-color: #f0f0f0;
-            font-size: 26rpx;
-        }
-    }
-    .search-btn {
-        width: 118rpx;
-        height: 70rpx;
-        line-height: 70rpx;
-        color: $color-system;
-        font-size: 30rpx;
-        text-align: center;
-        float: left;
-    }
-    .voice-icon {
-        width: 36rpx;
-        height: 36rpx;
-        padding: 16rpx 20rpx 16rpx 0;
-        position: absolute;
-        left: 16rpx;
-        top: 4rpx;
-        z-index: 10;
-    }
-}
-.search-container {
-    padding-top: 106rpx;
-}
-.s-block {
-    background: #ffffff;
-    .header {
-        font-size: 32rpx;
-        padding: 40rpx 24rpx 22rpx 24rpx;
-        line-height: 42rpx;
-        font-size: 30rpx;
-        font-weight: bold;
-        position: relative;
-        .icon-shanchu {
-            font-size: 36rpx;
-            color: #333333;
-            float: right;
-            padding: 0 10rpx;
-            z-index: 10;
-            font-weight: normal;
-        }
-    }
-    .list {
-        display: flex;
-        flex-wrap: wrap;
-        padding-bottom: 40rpx;
-        view {
-            color: #8a8a8a;
-            font-size: 24rpx;
-            box-sizing: border-box;
-            text-align: center;
-            height: 48rpx;
-            line-height: 48rpx;
-            border-radius: 24rpx;
-            margin: 12rpx;
-            padding: 0 30rpx;
-            overflow: hidden;
-            white-space: nowrap;
-            text-overflow: ellipsis;
-            background-color: #f3f3f3;
-        }
-    }
-}
-.s-circle {
-    margin-top: 30rpx;
-    .header {
-        font-size: 32rpx;
-        padding: 30rpx;
-        border-bottom: 2rpx solid #f9f9f9;
-        position: relative;
-        image {
-            width: 36rpx;
-            height: 36rpx;
-            padding: 10rpx;
-            position: absolute;
-            right: 40rpx;
-            top: 24rpx;
-        }
-    }
-    .list {
-        display: flex;
-        flex-wrap: wrap;
-        padding: 0 30rpx 20rpx;
-        view {
-            padding: 8rpx 30rpx;
-            margin: 20rpx 30rpx 0 0;
-            font-size: 28rpx;
-            color: #8a8a8a;
-            background-color: #f7f7f7;
-            box-sizing: border-box;
-            text-align: center;
-            border-radius: 20rpx;
-        }
-    }
-}
-.wanted-block {
-    margin-top: 30rpx;
-    .header {
-        font-size: 32rpx;
-        padding: 30rpx;
-    }
-    .list {
-        display: flex;
-        flex-wrap: wrap;
-        view {
-            width: 50%;
-            color: #8a8a8a;
-            font-size: 28rpx;
-            box-sizing: border-box;
-            text-align: center;
-            padding: 20rpx 0;
-            border-top: 2rpx solid #fff;
-            border-left: 2rpx solid #fff;
-            background-color: #f7f7f7;
-            overflow: hidden;
-            white-space: nowrap;
-            text-overflow: ellipsis;
-        }
-    }
-}
-.wanted-circle {
-    margin-top: 30rpx;
-    .header {
-        font-size: 32rpx;
-        padding: 30rpx;
-    }
-    .list {
-        display: flex;
-        flex-wrap: wrap;
-        padding: 0 30rpx 20rpx;
-        view {
-            padding: 8rpx 30rpx;
-            margin: 20rpx 30rpx 0 0;
-            font-size: 28rpx;
-            color: #8a8a8a;
-            background-color: #f7f7f7;
-            box-sizing: border-box;
-            text-align: center;
-            border-radius: 20rpx;
-        }
-    }
-}
-.order-container {
-    scroll-view {
-        height: 100%;
-        overflow: scroll;
-    }
-}
-.container {
-    padding-bottom: env(safe-area-inset-bottom);
-    height: auto;
-    position: relative;
-}
-.tui-order-content {
-    width: 100%;
-    height: auto;
-}
-.tui-order-list {
-    width: 100%;
-    position: relative;
-}
-.tui-order-item {
-    display: flex;
-    flex-direction: column;
-    width: 702rpx;
-    padding: 20rpx 24rpx 0 24rpx;
-    background: #fff;
-    border-bottom: 20rpx solid #f7f7f7;
-}
-.order-title {
-    width: 100%;
-    height: auto;
-    padding-bottom: 20rpx;
-    .order-title-t {
-        width: 100%;
-        height: 48rpx;
-        float: left;
-        line-height: 48rpx;
-        position: relative;
-        .bage-text {
-            display: inline-block;
-            font-size: $font-size-28;
-            line-height: 48rpx;
-            text-align: left;
-            color: $color-system;
-            .text {
-                color: #999999;
-            }
-        }
-    }
-    .order-title-b {
-        width: 100%;
-        height: 48rpx;
-        float: left;
-        margin-top: 8rpx;
-        .order-title-btxt {
-            float: left;
-            font-size: $font-size-28;
-            line-height: 48rpx;
-            color: #999999;
-            text-align: left;
-            .text {
-                color: #999999;
-            }
-        }
-        .order-title-tip {
-            float: right;
-            font-size: $font-size-28;
-            line-height: 48rpx;
-            text-align: right;
-            color: #ff457b;
-        }
-    }
-}
-.goods-title {
-    width: 100%;
-    height: 56rpx;
-    float: left;
-    margin-top: 10rpx;
-    .title-logo {
-        width: 56rpx;
-        height: 56rpx;
-        float: left;
-        border-radius: 8rpx;
-        border: 1px solid #e1e1e1;
-        margin-right: 8rpx;
-        image {
-            border-radius: 8rpx;
-            width: 56rpx;
-            height: 56rpx;
-        }
-    }
-    .title-text {
-        width: 400rpx;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        float: left;
-        font-size: $font-size-28;
-        color: $text-color;
-        text-align: left;
-        line-height: 56rpx;
-        font-weight: bold;
-    }
-}
-.goods-item {
-    width: 100%;
-    height: auto;
-}
-.goods-pros-t {
-    display: flex;
-    align-items: center;
-    width: 100%;
-    height: 217rpx;
-    padding: 24rpx 0;
-    .pros-img {
-        float: left;
-        width: 210rpx;
-        height: 100%;
-        border-radius: 10rpx;
-        margin: 0 26rpx 0 0;
-        position: relative;
-        .tips {
-            display: inline-block;
-            width: 80rpx;
-            height: 40rpx;
-            background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
-            line-height: 40rpx;
-            text-align: center;
-            font-size: $font-size-24;
-            color: #ffffff;
-            border-radius: 10rpx 0 10rpx 0;
-            position: absolute;
-            top: 0;
-            left: 0;
-        }
-        image {
-            width: 210rpx;
-            height: 210rpx;
-            border-radius: 10rpx;
-            border: 1px solid #f3f3f3;
-        }
-    }
-}
-.pros-product {
-    width: 468rpx;
-    height: 100%;
-    line-height: 36rpx;
-    font-size: $font-size-26;
-    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: 8rpx;
-    }
-    .productspec {
-        height: 36rpx;
-        color: #999999;
-    }
-    .productprice {
-        height: 48rpx;
-        position: absolute;
-        width: 100%;
-        bottom: 0;
-        .price {
-            line-height: 48rpx;
-            font-size: $font-size-28;
-            width: 48%;
-            color: #ff457b;
-            float: left;
-            font-weight: bold;
-            &.disabled {
-                color: #999999;
-                text-decoration: line-through;
-            }
-        }
-        .count {
-            height: 100%;
-            float: right;
-            position: relative;
-            .small {
-                color: #666666;
-            }
-        }
-    }
-    .floor-item-act {
-        width: 100%;
-        height: 56rpx;
-        text-align: center;
-        box-sizing: border-box;
-        float: left;
-        padding: 0 0 10rpx 0;
-        .floor-tags {
-            height: 28rpx;
-            border-radius: 6rpx;
-            background-color: #ffffff;
-            line-height: 28rpx;
-            color: #ff457b;
-            text-align: center;
-            display: inline-block;
-            padding: 0 5rpx;
-            font-size: $font-size-20;
-            border: 1px solid #ff457b;
-            float: left;
-        }
-    }
-}
-.order-footer {
-    width: 100%;
-    height: 78rpx;
-    float: left;
-    .order-footer-top {
-        width: 100%;
-        height: 34rpx;
-        line-height: 34rpx;
-        font-size: $font-size-24;
-        color: #999999;
-        text-align: right;
-    }
-    .order-footer-bot {
-        width: 100%;
-        float: left;
-        height: 48rpx;
-        line-height: 48rpx;
-        font-size: $font-size-28;
-        font-weight: bold;
-        color: $text-color;
-        .count {
-            width: 50%;
-            float: left;
-            text-align: left;
-        }
-        .money {
-            width: 50%;
-            float: right;
-            text-align: right;
-        }
-    }
-}
-.tui-modal-custom-text {
-    min-height: 300rpx;
-    margin-bottom: 30rpx;
-    .title {
-        width: 100%;
-        height: auto;
-        font-size: $font-size-30;
-        text-align: justify;
-        color: #333333;
-        line-height: 40rpx;
-        margin-bottom: 30rpx;
-    }
-    .tui-modal-custom-list {
-        width: 100%;
-        height: 350rpx;
-        overflow: hidden;
-        .custom-list {
-            width: 100%;
-            height: 117rpx;
-            box-sizing: border-box;
-            float: left;
-            padding: 15rpx 0;
-            .custom-list-image {
-                width: 86rpx;
-                height: 86rpx;
-                float: left;
-                border-radius: 6rpx;
-                box-sizing: border-box;
-                border: 1px solid #e1e1e1;
-                image {
-                    width: 84rpx;
-                    height: 84rpx;
-                    border-radius: 6rpx;
-                    display: block;
-                }
-            }
-            .custom-list-name {
-                width: 400rpx;
-                height: 86rpx;
-                float: right;
-                line-height: 43rpx;
-                font-size: $font-size-26;
-                color: #666666;
-                text-overflow: ellipsis;
-                overflow: hidden;
-                display: -webkit-box;
-                -webkit-line-clamp: 2;
-                line-clamp: 2;
-                -webkit-box-orient: vertical;
-            }
-        }
-    }
-}
-.tui-modal-button {
-    width: 100%;
-    height: 72rpx;
-    display: flex;
-    .modal-button {
-        width: 200rpx;
-        height: 72rpx;
-        line-height: 72rpx;
-        border-radius: 36rpx;
-        box-sizing: border-box;
-        &.cancel {
-            border: 1px solid #b2b2b2;
-            background: #ffffff;
-            color: #333333;
-        }
-        &.confirm {
-            background: $btn-confirm;
-            color: #ffffff;
-        }
-    }
-}
-</style>

+ 0 - 185
pages/user/order/success.vue

@@ -1,185 +0,0 @@
-<template>
-    <view class="container cashier">
-        <header-pay
-            :systeminfo="systeminfo"
-            :navbar-data="nvabarData"
-            :headerBtnPosi="headerBtnPosi"
-            :isBackType="true"
-            :path="'/pages/user/cart/cart'"
-        >
-        </header-pay>
-        <view class="container-cash clearfix" :style="{ marginTop: CustomBar + 'px' }">
-            <view class="container-wrapper">
-                <view class="cash-icon"> <image :src="StaticUrl + 'icon-pay-success.png'" mode=""></image> </view>
-                <view class="cash-text">
-                    <text>{{ successText }}</text>
-                </view>
-            </view>
-            <view class="container-money">
-                <view class="label">支付金额</view>
-                <view class="money">¥{{ orderInfo.payableAmount | formatPrice }}</view>
-            </view>
-            <view class="container-button">
-                <view class="btn btn-pay" @click="goHome">继续购买</view>
-                <view class="btn btn-open" @click="searchOrder">查看订单</view>
-            </view>
-        </view>
-        <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
-    </view>
-</template>
-
-<script>
-import HeaderPay from '@/components/cm-module/headerNavbar/header-pay'
-import authorize from '@/common/authorize.js'
-import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
-import wechatPay from '@/mixins/wechatPay.js'
-import { mapGetters } from 'vuex'
-export default {
-    components: {
-        HeaderPay,
-        CmLoading
-    },
-    // 混入支付
-    mixins: [wechatPay],
-    data() {
-        return {
-            StaticUrl: this.$Static,
-            CustomBar: this.CustomBar, // 顶部导航栏高度
-            orderId: '',
-            nvabarData: {
-                //顶部自定义导航
-                haveBack: false,
-                showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
-                showSearch: 0,
-                title: '支付结果', // 导航栏 中间的标题
-                textLeft: this.$store.getters.isIphone
-            },
-            headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
-            systeminfo: this.setSysteminfo(), //获取设备信息
-            successText: '订单支付成功',
-            orderInfo: {}
-        }
-    },
-    onLoad() {
-        this.initOrderInfo()
-    },
-    computed: {
-        ...mapGetters(['isIphoneX']),
-        hanldOrder() {
-            return {
-                order: this.orderInfo
-            }
-        }
-    },
-    methods: {
-        initOrderInfo() {
-            this.orderInfo = uni.getStorageSync('orderInfo')
-            uni.removeStorageSync('orderInfo')
-        },
-        setHeaderBtnPosi() {
-            // 获得胶囊按钮位置信息
-            let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
-            return headerBtnPosi
-        },
-        setSysteminfo() {
-            let systeminfo
-            uni.getSystemInfo({
-                // 获取设备信息
-                success: res => {
-                    systeminfo = res
-                }
-            })
-            return systeminfo
-        },
-        // 回到首页
-        goHome() {
-            uni.reLaunch({ url: '/pages/tabBar/index/index' })
-        },
-        // 查看订单
-        searchOrder() {
-            this.$api.redirectTo('/pages/user/order/order-details?type=confim&orderId=' + this.orderInfo.orderId)
-        }
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-page {
-    background-color: #f7f7f7;
-    height: auto !important;
-}
-.container-cash {
-    width: 100%;
-    .container-wrapper {
-        width: 100%;
-        margin: 0 auto;
-        margin-top: 120rpx;
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        background-color: #ffffff;
-        .cash-icon {
-            width: 210rpx;
-            height: 210rpx;
-            margin-top: 112rpx;
-            image {
-                width: 210rpx;
-                height: 210rpx;
-            }
-        }
-        .cash-text {
-            font-size: $font-size-28;
-            color: #666666;
-            line-height: 104rpx;
-            font-weight: bold;
-        }
-    }
-    .container-money {
-        width: 100%;
-        height: 90rpx;
-        float: left;
-        line-height: 90rpx;
-        font-size: $font-size-28;
-        box-sizing: border-box;
-        padding: 0 24rpx;
-        margin-top: 20rpx;
-        background-color: #ffffff;
-        .label {
-            float: left;
-            color: #333333;
-        }
-        .money {
-            float: right;
-            color: #666666;
-        }
-    }
-    .container-button {
-        width: 100%;
-        height: auto;
-        float: left;
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        margin-top: 160rpx;
-        .btn {
-            width: 600rpx;
-            height: 90rpx;
-            border-radius: 45rpx;
-            line-height: 90rpx;
-            text-align: center;
-            font-size: $font-size-26;
-            color: #ffffff;
-            box-sizing: border-box;
-            border: 1px solid $color-system;
-            margin-bottom: 24rpx;
-            &.btn-open {
-                color: $color-system;
-            }
-            &.btn-pay {
-                border-color: $color-system;
-                background: $btn-confirm;
-            }
-        }
-    }
-}
-</style>

+ 1 - 1
store/modules/cart.js

@@ -189,7 +189,7 @@ const actions = {
     },
     // 添加购物车
     addToCart({ dispatch, rootGetters }, { productId, productCount = 1, heUserId = 0 }) {
-        if (!rootGetters.hasLogin) return navigateTo('/pages/login/login')
+        if (!rootGetters.hasLogin) return navigateTo('/pages/authorize/login')
         productService.shoppingAddCart({
             productId,
             userId: rootGetters.userId,