Browse Source

订单整改

yuwenjun1997 3 years ago
parent
commit
69bb09555d

+ 0 - 1
components/cm-module/cm-choose-address/cm-choose-address.vue

@@ -87,7 +87,6 @@
 		width: 100%;
 		height: auto;
 		background: #FFFFFF;
-		border-top: 1px solid #F8F8F8;
         overflow: hidden;
 		image{
 			float: left;

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

@@ -218,9 +218,8 @@ export default {
                 productCount: this.count,
                 heUserId: this.productInfo.heUserId
             }
-            this.$api.navigateTo(
-                `/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({ data: productStp })}`
-            )
+			uni.setStorageSync('commitProductInfo', productStp)
+            this.$api.navigateTo('/pages/order/create-order?type=prodcut')
             this.countVisible = false
         },
         // 拼团购买

+ 12 - 3
components/cm-module/cm-order-coupon-section/cm-order-coupon-section.vue

@@ -1,13 +1,22 @@
 <template>
-    <view class="coupon section cm-order-coupon-section">
+    <view class="coupon section cm-order-coupon-section" @click="$emit('click')">
         <view class="lable">优惠券</view>
         <view class="content">
-            <text class="text">-¥30.00 </text> <text class="iconfont icon-chakangengduo"></text>
+            <text class="text">-¥{{ coupon.couponAmount | formatPrice }} </text> <text class="iconfont icon-chakangengduo"></text>
         </view>
     </view>
 </template>
 
-<script></script>
+<script>
+	export default{
+		props:{
+			coupon:{
+				type: Object,
+				default:()=>{}
+			}
+		}
+	}
+</script>
 
 <style lang="scss" scoped>
 .section {

+ 13 - 8
components/cm-module/cm-order-prodcut/cm-order-prodcut.vue

@@ -1,14 +1,14 @@
 <template>
     <view class="cm-order-prodcut">
-        <image :src="goodsData.productImage" class="cover"></image>
+        <image :src="goodsData.productImage || goodsData.mainImage" class="cover"></image>
         <view class="content">
-            <view class="title">{{ goodsData.name}}</view>
-            <view class="unit">规格:{{ goodsData.productUnit }}</view>
+            <view class="title">{{ goodsData.name || goodsData.productName }}</view>
+            <view class="unit">规格:{{ goodsData.productUnit || goodsData.unit }}</view>
             <view class="tags">
-                <view class="tag type1">促销</view>
-                <view class="tag type1">自营</view>
+                <view class="tag type1" v-if="userId === goodsData.heUserId">促销</view>
+                <view class="tag type1" v-else>自营</view>
                 <view class="tag type3">拼团价</view> 
-                <view class="tag type2">活动价</view>
+                <view class="tag type2" v-if="goodsData.ladderList.length > 0">活动价</view>
                 <view class="tag type2">优惠券</view>
             </view>
             <view class="price"> 
@@ -16,11 +16,11 @@
                 <text class="delete">单买价:¥400.00</text> 
             </view>
         </view>
-        <text class="count" v-if="countVisible">×{{ goodsData.num }}</text>
+        <text class="count" v-if="countVisible">×{{ goodsData.num || goodsData.productCount }}</text>
     </view>
 </template>
 
-<script>
+<script>	
 export default {
     props:{
         countVisible: {
@@ -38,6 +38,11 @@ export default {
           return Number(price).toFixed(2)
       }  
     },
+	computed:{
+		userId(){
+			return this.$store.getters.userId
+		}
+	},
     data() {
         return {}
     }

+ 88 - 60
components/cm-module/cm-order-submit-nav/cm-order-submit-nav.vue

@@ -1,67 +1,95 @@
 <template>
-    <view class="cm-order-submit-nav submit">
-        <view class="count">共1件商品</view>
-        <view class="total">
-            <view class="price"> <text class="label">总计:</text> <text>¥200.00</text> </view>
-            <view class="reduce"> <text class="label">共减:</text> <text>¥20.00</text> </view>
-        </view>
-        <button class="btn">提交订单</button>
+    <view class="cm-order-submit-nav" :class="{offset : isIphoneX}">
+        <view class="submit">
+			<view class="count">共{{ orderInfo.allCount }}件商品</view>
+			<view class="total">
+			    <view class="price"> <text class="label">总计:</text> <text>¥{{orderInfo.payAllPrice | formatPrice}}</text> </view>
+			    <view class="reduce" v-if="orderInfo.discountedPrice"> <text class="label">共减:</text> <text>¥{{orderInfo.discountedPrice | formatPrice}}</text> </view>
+			</view>
+			<button class="btn" @click="$emit('commit')">提交订单</button>
+		</view>
+		<view class="reserved"></view>
     </view>
 </template>
 
-<script></script>
+<script>
+export default {
+	props:{
+		orderInfo:{
+			type: Object,
+			default:()=>{}
+		}
+	},
+	computed:{
+		isIphoneX(){
+			return this.$store.getters.isIphoneX
+		}
+	}
+}	
+</script>
 
 <style lang="scss" scoped>
-.submit {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    box-sizing: border-box;
-    position: fixed;
-    width: 100%;
-    height: 100rpx;
-    bottom: 0;
-    left: 0;
-
-    padding: 0 24rpx;
-    background: #fff;
-
-    .count {
-        font-size: 28rpx;
-        color: #333333;
-    }
-    .total {
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-        align-items: flex-start;
-
-        margin: 0 24rpx;
-
-        .price {
-            font-size: 26rpx;
-            color: #ff457b;
-
-            .label {
-                color: #333333;
-            }
-        }
-        .reduce {
-            margin-top: 4rpx;
-            font-size: 24rpx;
-            color: #ff457b;
-        }
-    }
-    .btn {
-        width: 210rpx;
-        height: 80rpx;
-        background: linear-gradient(90deg, #fa55bf 0%, #f83c6c 100%);
-        opacity: 1;
-        color: #fff;
-        line-height: 80rpx;
-        text-align: center;
-        border-radius: 40rpx;
-        margin: 0;
-    }
-}
+	
+.cm-order-submit-nav{
+	width: 100%;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	.reserved{
+		background: #fff;
+	}
+	.submit {
+	    display: flex;
+	    justify-content: space-between;
+	    align-items: center;
+	    box-sizing: border-box;
+	    
+	    height: 100rpx;
+		
+	    padding: 0 24rpx;
+	    background: #fff;
+	
+		&.offset{
+			transform: translateY(-50rpx);
+		}
+	
+	    .count {
+	        font-size: 28rpx;
+	        color: #333333;
+	    }
+	    .total {
+	        display: flex;
+	        flex-direction: column;
+	        justify-content: center;
+	        align-items: flex-start;
+	
+	        margin: 0 24rpx;
+	
+	        .price {
+	            font-size: 26rpx;
+	            color: #ff457b;
+	
+	            .label {
+	                color: #333333;
+	            }
+	        }
+	        .reduce {
+	            margin-top: 4rpx;
+	            font-size: 24rpx;
+	            color: #ff457b;
+	        }
+	    }
+	    .btn {
+	        width: 210rpx;
+	        height: 80rpx;
+	        background: linear-gradient(90deg, #fa55bf 0%, #f83c6c 100%);
+	        opacity: 1;
+	        color: #fff;
+	        line-height: 80rpx;
+	        text-align: center;
+	        border-radius: 40rpx;
+	        margin: 0;
+	    }
+	}
+}	
 </style>

+ 5 - 0
main.js

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

+ 12 - 0
pages.json

@@ -233,6 +233,18 @@
                         "navigationBarTitleText": "订单详情"
                     }
                 },
+				{
+				    "path": "success",
+				    "style": {
+				        "navigationBarTitleText": "支付成功"
+				    }
+				},
+				{
+				    "path": "error",
+				    "style": {
+				        "navigationBarTitleText": "支付失败"
+				    }
+				},
                 {
                     "path": "order-logistics",
                     "style": {

+ 387 - 118
pages/order/create-order.vue

@@ -1,39 +1,67 @@
 <template>
-    <view class="create-order">
-        <!-- 收货地址 -->
-        <cm-choose-address :addressData="addressData"></cm-choose-address>
-        <view class="grid"></view>
-        <!-- 订单列表 -->
-        <view class="order-list">
-            <view class="order-section">
-                <!-- 供应商 -->
-                <view class="origin">
-                    <image class="cover" src="https://picsum.photos/100/100?random=1"></image>
-                    <view class="name">华熙生物</view>
-                </view>
-                <!-- 商品列表 -->
-                <view class="goods-list">
-                    <!-- 商品信息 -->
-                    <view class="order-goods"><cm-order-prodcut></cm-order-prodcut></view>
-                    <view class="order-goods"><cm-order-prodcut></cm-order-prodcut></view>
-                </view>
-                <!-- 合计 -->
-                <view class="total-price"> <text>合计:</text> <text class="price">¥900.00</text> </view>
-                <!-- 留言 -->
-                <view class="remark">
-                    <view class="label">留言:</view> <input class="control" type="text" placeholder="请输入内容" />
-                </view>
-            </view>
-        </view>
-        <view class="grid"></view>
-        <!-- 优惠券 -->
-        <cm-order-coupon-section></cm-order-coupon-section>
-        <view class="grid"></view>
-        <!-- 运费 -->
-        <cm-order-freight-section></cm-order-freight-section>
-        <!-- 提交导航 -->
-        <cm-order-submit-nav></cm-order-submit-nav>
-    </view>
+	<view class="create-order" :class="{'has-bottom': isIphoneX}">
+		<!-- 收货地址 -->
+		<view class="order-top">
+			<cm-choose-address :addressData="addressData"></cm-choose-address>
+		</view>
+		<view class="grid"></view>
+		<!-- 订单列表 -->
+		<view class="order-list">
+			<view class="order-section" v-for="(shopInfo, shopInfoIndex) in goodsData" :key="shopInfoIndex">
+				<!-- 供应商 -->
+				<view class="origin">
+					<image class="cover" :src="shopInfo.logo"></image>
+					<view class="name">{{ shopInfo.name }}</view>
+				</view>
+				<!-- 商品列表 -->
+				<view class="goods-list">
+					<!-- 商品信息 -->
+					<view class="order-goods" v-for="goods in shopInfo.productList" :key="goods.productId">
+						<cm-order-prodcut :goods-data="goods"></cm-order-prodcut>
+					</view>
+				</view>
+				<!-- 合计 -->
+				<view class="total-price">
+					<text>合计:</text>
+					<text class="price">¥{{ shopInfo.shopTotalPrice | formatPrice }}</text>
+				</view>
+				<!-- 留言 -->
+				<view class="remark">
+					<view class="label">留言:</view>
+					<input class="control" type="text" v-model="shopInfo.note" placeholder="请输入内容" />
+				</view>
+			</view>
+		</view>
+		<view class="grid"></view>
+		<!-- 优惠券 -->
+		<cm-order-coupon-section
+			@click="couponVisible = true"
+			:coupon="currentCoupon"
+			v-if="receiveCouponList.length > 0"
+		></cm-order-coupon-section>
+		<view class="grid"></view>
+		<!-- 运费 -->
+		<cm-order-freight-section></cm-order-freight-section>
+		<view class="grid"></view>
+		<!-- 提交导航 -->
+		<cm-order-submit-nav :orderInfo="submitOrderInfo" @commit="orderSubmit"></cm-order-submit-nav>
+
+		<!-- 优惠券列表 -->
+		<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>
+		<cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
+		<view class="reserved" v-if="isIphoneX"></view>
+	</view>
 </template>
 
 <script>
@@ -42,107 +70,348 @@ import CmOrderProdcut from '@/components/cm-module/cm-order-prodcut/cm-order-pro
 import CmOrderSubmitNav from '@/components/cm-module/cm-order-submit-nav/cm-order-submit-nav.vue'
 import CmOrderCouponSection from '@/components/cm-module/cm-order-coupon-section/cm-order-coupon-section.vue'
 import CmOrderFreightSection from '@/components/cm-module/cm-order-freight-section/cm-order-freight-section.vue'
+import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
+import CmCouponList from '@/components/cm-module/cm-coupon-list/cm-coupon-list'
+
+import { allProdoceUseCheck, someProductUseCheck, couponSort, setCouponUniqueId } from '@/common/couponUtil.js'
+import { mapGetters } from 'vuex'
+import wechatPay from './mixins/wechatPay.js'
 
 export default {
-    components: {
-        CmOrderProdcut,
-        CmChooseAddress,
-        CmOrderSubmitNav,
-        CmOrderCouponSection,
-        CmOrderFreightSection
-    },
-    data() {
-        return {
-            addressData: {}
-        }
-    }
+	// 混入
+	mixins: [wechatPay],
+	components: {
+		CmOrderProdcut,
+		CmChooseAddress,
+		CmOrderSubmitNav,
+		CmOrderCouponSection,
+		CmOrderFreightSection,
+		CmCouponList,
+		CmLoading
+	},
+	data() {
+		return {
+			// 收货地址
+			addressData: {},
+
+			productIds: '',
+			params: {},
+			subParams: {
+				userId: 0,
+				orderInfo: [], //提交的商品信息
+				addressId: 0,
+				cartType: 0,
+				payInfo: {
+					orderShouldPayFee: 0
+				}
+			},
+			goodsData: [], // 供应商下的商品
+			allPrice: 0,
+			productList: [], // 商品列表
+			allCount: 0,
+			hanldOrder: {},
+			
+			// 优惠券
+			couponVisible: false,
+			receiveCouponList: [],
+			currentCouponId: -1,
+			currentCoupon: {},
+			canUseCouponList: [],
+			notUseCouponList: [],
+			
+		}
+	},
+	computed: {
+		...mapGetters(['userId', 'isIphoneX']),
+		// 选中的优惠券的金额
+		couponAmount() {
+			return this.currentCouponId > -1 ? this.currentCoupon.couponAmount : 0
+		},
+		// 优惠价格
+		discountedPrice() {
+			return this.couponAmount
+		},
+		// 支付金额
+		payAllPrice() {
+			const payAllPrice = this.allPrice - this.couponAmount
+			return payAllPrice <= 0 ? 0 : payAllPrice
+		},
+		submitOrderInfo(){
+			return {
+				allCount: this.allCount,
+				payAllPrice: this.payAllPrice,
+				discountedPrice: this.discountedPrice
+			}
+		}
+	},
+	onLoad(options) {
+		this.getAddressData()
+		this.initOptions(options)
+	},
+	beforeDestroy() {
+		uni.removeStorageSync('commitProductInfo')
+		uni.removeStorageSync('commitCartPramsData')
+	},
+	methods: {
+		// 初始化参数信息
+		initOptions(options) {
+			// 从商品详情进入
+			if (options.type == 'prodcut') {
+				const productInfo = uni.getStorageSync('commitProductInfo')
+				this.params.productCount = productInfo.productCount
+				this.params.productId = productInfo.productId
+				this.params.heUserId = productInfo.heUserId || 0
+				this.productIds = productInfo.productId.toString()
+				this.allCount = productInfo.allCount
+			} else {
+				const cartPramsData = uni.getStorageSync('commitCartPramsData')
+				this.params.cartIds = cartPramsData.cartIds
+				this.productIds = cartPramsData.productIds
+				this.allCount = cartPramsData.allCount
+			}
+
+			this.params.userId = this.userId
+			this.subParams.userId = this.userId
+			this.getInitCrearOrder(this.params)
+		},
+
+		// 获取可用优惠券
+		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() {
+			// 1将当前选中的优惠券从列表中删除
+			// 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(res => {
+					let data = res.data
+					this.goodsData = this.bindRemark(data.shopList)
+					console.log(this.goodsData)
+					this.allPrice = data.totalPrice
+					this.fetchCouponList()
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		// 为共供应商绑定留言信息
+		bindRemark(shopList){
+			return shopList.map(item=>{
+				item.note = ''
+				return item
+			})
+		},
+		//获取地址信息
+		getAddressData() {
+			this.UserService.QueryAddressList({ pageNum: 1, pageSize: 1, userId: this.userId }).then(res => {
+				this.addressData = res.data.list[0]
+				this.subParams.addressId = this.addressData.addressId
+			})
+		},
+		orderSubmit() {
+		    //提交订单
+		    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 }
+		    })
+		    this.isSubLoading = true
+		    this.loadingText = '正在创建订单...'
+		    this.OrderService.CreatedOrderSubmit(this.subParams)
+		        .then(response => {
+		            const data = response.data
+		            this.hanldOrder.order = 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
+		        })
+		},
+	}
 }
 </script>
 
 <style lang="scss" scoped>
 .create-order {
-    background: #f7f7f7;
-    min-height: 100vh;
+	background: #f7f7f7;
+	min-height: 100vh;
+	padding-top: 136rpx;
+	
+	&.has-bottom{
+		padding-bottom: 100rpx;
+	}
+	
+	.order-top{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
+	}
 }
 
 .grid {
-    width: 100%;
-    height: 20rpx;
-    background: #f7f7f7;
+	width: 100%;
+	height: 20rpx;
+	background: #f7f7f7;
 }
 
 .order-list {
-    background: #fff;
-
-    .order-section {
-        padding: 38rpx 0;
-        margin-top: 20rpx;
-        &:first-child {
-            margin-top: 0;
-        }
-    }
-
-    .goods-list {
-        .order-goods {
-            padding-top: 32rpx;
-            &:first-child {
-                padding-top: 0;
-            }
-        }
-    }
-
-    .origin {
-        padding: 0 24rpx;
-        margin-bottom: 16rpx;
-        display: flex;
-        justify-content: flex-start;
-        align-items: center;
-        .cover {
-            width: 56rpx;
-            height: 56rpx;
-            border-radius: 4rpx;
-        }
-        .name {
-            margin-left: 16rpx;
-            font-size: 30rpx;
-            color: #333333;
-        }
-    }
+	background: #fff;
+
+	.order-section {
+		padding: 38rpx 0;
+		margin-top: 20rpx;
+		&:first-child {
+			margin-top: 0;
+		}
+	}
+
+	.goods-list {
+		.order-goods {
+			padding-top: 32rpx;
+			&:first-child {
+				padding-top: 0;
+			}
+		}
+	}
+
+	.origin {
+		padding: 0 24rpx;
+		margin-bottom: 16rpx;
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+		.cover {
+			width: 56rpx;
+			height: 56rpx;
+			border-radius: 4rpx;
+		}
+		.name {
+			margin-left: 16rpx;
+			font-size: 30rpx;
+			color: #333333;
+		}
+	}
 }
 
 .total-price {
-    padding: 24rpx;
-    text-align: right;
-    font-size: 26rpx;
-    color: #333;
-    background: #fff;
-
-    .price {
-        color: #ff457b;
-    }
+	padding: 24rpx;
+	text-align: right;
+	font-size: 26rpx;
+	color: #333;
+	background: #fff;
+
+	.price {
+		color: #ff457b;
+	}
 }
 
 .remark {
-    padding: 0 24rpx;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    background: #fff;
-
-    .label {
-        width: 78rpx;
-        font-size: 26rpx;
-        color: #999999;
-        margin-right: 16rpx;
-    }
-
-    .control {
-        flex: 1;
-        font-size: 26rpx;
-        color: #333333;
-        padding: 8rpx 16rpx;
-        background: #f7f7f7;
-        border-radius: 8rpx;
-    }
+	padding: 0 24rpx;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	background: #fff;
+
+	.label {
+		width: 78rpx;
+		font-size: 26rpx;
+		color: #999999;
+		margin-right: 16rpx;
+	}
+
+	.control {
+		flex: 1;
+		font-size: 26rpx;
+		color: #333333;
+		padding: 8rpx 16rpx;
+		background: #f7f7f7;
+		border-radius: 8rpx;
+	}
 }
 </style>

+ 151 - 0
pages/order/error.vue

@@ -0,0 +1,151 @@
+<template>
+	<view class="container cashier">
+		<view class="container-cash clearfix">
+			<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 | NumFormat }}</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 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: {
+		CmLoading
+	},
+	// 混入支付
+	mixins: [wechatPay],
+	data() {
+		return {
+			StaticUrl: this.$Static,
+			orderId: '',
+			successText: '订单支付失败',
+			orderInfo: {}
+		}
+	},
+	onLoad() {
+		this.initOrderInfo()
+	},
+	filters: {
+		NumFormat(value) {
+			//处理金额
+			return Number(value).toFixed(2)
+		}
+	},
+	computed: {
+		...mapGetters(['isIphoneX']),
+		hanldOrder() {
+			return {
+				order: this.orderInfo
+			}
+		}
+	},
+	methods: {
+		initOrderInfo() {
+			this.orderInfo = uni.getStorageSync('orderInfo')
+			uni.removeStorageSync('orderInfo')
+		},
+		// 查看订单
+		searchOrder() {
+			this.$api.redirectTo('/pages/order/order-detail?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>

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

@@ -59,15 +59,15 @@ const wechatPay = {
                 // 支付成功重定向
                 uni.setStorageSync('orderInfo', this.hanldOrder.order)
                 if (payFlag) {
-                    uni.redirectTo({ url: '/pages/user/order/success' })
+                    uni.reLaunch({ url: '/pages/order/success' })
                 } else {
-                    uni.redirectTo({ url: '/pages/user/order/error' })
+                    uni.reLaunch({ url: '/pages/order/error' })
                 }
             } catch (error) {
                 // 微信支付失败
                 if (error.msg === 'error') {
                     uni.setStorageSync('orderInfo', this.hanldOrder.order)
-                    uni.redirectTo({ url: '/pages/user/order/error' })
+                    uni.reLaunch({ url: '/pages/order/error' })
                 } else this.$util.msg(error.msg, 2000)
             } finally {
                 this.isSubLoading = false

+ 251 - 231
pages/order/order-detail.vue

@@ -1,75 +1,80 @@
 <template>
-    <view class="order-detail" :class="{ hasBottom: hasControlNav }">
-        <!-- 收货地址 -->
-        <view class="address">
-            <cm-choose-address :addressData="userInfo" disabled></cm-choose-address>
-        </view>
-        
-        <!-- 订单商品列表 -->
-        <template v-for="(shopOrder, shopOrderIndex) in shopOrderList">
-            <view class="grid" :key="shopOrderIndex"></view>
-            <view class="shop-section" :key="shopOrderIndex">
-                <!-- 供应商 -->
-                <view class="origin">
-                    <image class="cover" :src="shopOrder.shopLogo"></image>
-                    <view class="name">{{ shopOrder.shopName }}</view>
-                </view>
-                <!-- 商品列表 -->
-                <view class="goods-list">
-                    <!-- 商品信息 -->
-                    <view class="order-goods" v-for="goods in shopOrder.orderProductList" :key="goods.productId">
-                        <cm-order-prodcut :goods-data="goods"></cm-order-prodcut>
-                    </view>
-                </view>
-                <view class="line"></view>
-                <!-- 统计 -->
-                <view class="total">
-                    <view class="count">共{{ shopOrder.itemCount }}件商品</view>
-                    <view class="status">
-                        <text class="label">商品总额:</text> <text>¥{{ shopOrder.totalAmount | formatPrice }}</text>
-                    </view>
-                </view>
-            </view>
-        </template>
-
-        <view class="grid"></view>
-        <!-- 订单详细信息 -->
-        <cm-order-information :orderInfo="orderInfo"></cm-order-information>
-        
-        <!-- 操作 -->
-        <view class="order-control" v-if="hasControlNav">
-            <cm-order-control-nav
-                :orderInfo="orderInfo"
-                @confirm="handleConfirmClick"
-                @change="getCount"
-            ></cm-order-control-nav>
-        </view>
-        
-        <!-- 操作弹窗 -->
-        <tui-modal
-            :show="modal"
-            :content="modalText"
-            :size="32"
-            :maskClosable="false"
-            color="#333"
-            shape="circle"
-            @click="handleModalConfirm"
-        ></tui-modal>
-        
-        <!-- 加载框 -->
-        <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
-        
-        <!-- 失效商品列表 -->
-        <cm-order-invalid-modal
-            :goodsList="invalidList"
-            :visible="buyAgainModal"
-            @confirm="buyAgainModalClick"
-            @cancel="buyAgainModalHide"
-        ></cm-order-invalid-modal>
-        
-        <!-- 底部占位 -->
-        <view class="reserved" v-if="isIphoneX"></view>
-    </view>
+	<view class="order-detail" :class="{ hasBottom: hasControlNav }">
+		<tui-skeleton v-if="isRequest" loadingType="2"></tui-skeleton>
+		
+		<view class="detail-top">
+			<!-- 订单状态 -->
+			<view class="order-status">{{ stateExpFormat(orderInfo.status) }}</view>
+			<!-- 收货地址 -->
+			<cm-choose-address :addressData="userInfo" disabled></cm-choose-address>
+		</view>
+
+		<!-- 订单商品列表 -->
+		<template v-for="(shopOrder, shopOrderIndex) in shopOrderList">
+			<view class="grid" :key="shopOrderIndex"></view>
+			<view class="shop-section" :key="shopOrderIndex">
+				<!-- 供应商 -->
+				<view class="origin">
+					<image class="cover" :src="shopOrder.shopLogo"></image>
+					<view class="name">{{ shopOrder.shopName }}</view>
+				</view>
+				<!-- 商品列表 -->
+				<view class="goods-list">
+					<!-- 商品信息 -->
+					<view class="order-goods" v-for="goods in shopOrder.orderProductList" :key="goods.productId">
+						<cm-order-prodcut :goods-data="goods"></cm-order-prodcut>
+					</view>
+				</view>
+				<view class="line"></view>
+				<!-- 统计 -->
+				<view class="total">
+					<view class="count">共{{ shopOrder.itemCount }}件商品</view>
+					<view class="status">
+						<text class="label">商品总额:</text>
+						<text>¥{{ shopOrder.totalAmount | formatPrice }}</text>
+					</view>
+				</view>
+			</view>
+		</template>
+
+		<view class="grid"></view>
+		<!-- 订单详细信息 -->
+		<cm-order-information :orderInfo="orderInfo"></cm-order-information>
+
+		<!-- 操作 -->
+		<view class="order-control" v-if="hasControlNav">
+			<cm-order-control-nav
+				:orderInfo="orderInfo"
+				@confirm="handleConfirmClick"
+				@change="getCount"
+			></cm-order-control-nav>
+		</view>
+
+		<!-- 操作弹窗 -->
+		<tui-modal
+			:show="modal"
+			:content="modalText"
+			:size="32"
+			:maskClosable="false"
+			color="#333"
+			shape="circle"
+			@click="handleModalConfirm"
+		></tui-modal>
+
+		<!-- 加载框 -->
+		<cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
+
+		<!-- 失效商品列表 -->
+		<cm-order-invalid-modal
+			:goodsList="invalidList"
+			:visible="buyAgainModal"
+			@confirm="buyAgainModalClick"
+			@cancel="buyAgainModalHide"
+		></cm-order-invalid-modal>
+
+		<!-- 底部占位 -->
+		<view class="reserved" v-if="isIphoneX"></view>
+	</view>
 </template>
 
 <script>
@@ -84,170 +89,185 @@ import wechatPay from './mixins/wechatPay.js'
 
 import { mapGetters } from 'vuex'
 export default {
-    mixins: [wechatPay, orderList],
-    components: {
-        CmOrderProdcut,
-        CmOrderInformation,
-        CmOrderControlNav,
-        CmOrderInvalidModal,
-        CmLoading,
-        CmChooseAddress
-    },
-    data() {
-        return {
-            orderId: '',
-            discernReceiptList: [],
-            shopOrderList: [],
-            orderInfo: {},
-            userInfo: {},
-            buttonCount: 0
-        }
-    },
-    filters: {
-        formatPrice(price) {
-            if (!price) return '0.00'
-            return Number(price).toFixed(2)
-        }
-    },
-    computed: {
-        ...mapGetters(['userId', 'userIdentity', 'isIphoneX']),
-        // 当前用户是否为协销
-        isDealer() {
-            return this.userIdentity === 2
-        },
-        hasControlNav(){
-            return this.orderInfo.buyUserId === this.userId && this.buttonCount > 0
-        }
-    },
-    onLoad(option) {
-        this.orderId = option.orderId
-        this.getOrderDetail()
-    },
-    methods: {
-        getOrderDetail() {
-            this.OrderService.QueryOrderDetails({ orderId: this.orderId })
-                .then(res => {
-                    console.log(res)
-                    this.discernReceiptList = res.data.discernReceiptList
-                    this.shopOrderList = res.data.shopOrderList
-                    this.orderInfo = res.data.order
-                    this.userInfo = res.data.userInfo
-                })
-                .catch(err => {
-                    console.log(err)
-                })
-        },
-        getCount(e){
-            this.buttonCount = e.count
-        }
-    }
+	mixins: [wechatPay, orderList],
+	components: {
+		CmOrderProdcut,
+		CmOrderInformation,
+		CmOrderControlNav,
+		CmOrderInvalidModal,
+		CmLoading,
+		CmChooseAddress
+	},
+	data() {
+		return {
+			isRequest: false,
+			orderId: '',
+			discernReceiptList: [],
+			shopOrderList: [],
+			orderInfo: {},
+			userInfo: {},
+			buttonCount: 0
+		}
+	},
+	filters: {
+		formatPrice(price) {
+			if (!price) return '0.00'
+			return Number(price).toFixed(2)
+		}
+	},
+	computed: {
+		...mapGetters(['userId', 'userIdentity', 'isIphoneX']),
+		// 当前用户是否为协销
+		isDealer() {
+			return this.userIdentity === 2
+		},
+		hasControlNav() {
+			return this.orderInfo.buyUserId === this.userId && this.buttonCount > 0
+		}
+	},
+	onLoad(option) {
+		this.orderId = option.orderId
+		this.getOrderDetail()
+	},
+	methods: {
+		getOrderDetail() {
+			this.OrderService.QueryOrderDetails({ orderId: this.orderId })
+				.then(res => {
+					this.discernReceiptList = res.data.discernReceiptList
+					this.shopOrderList = res.data.shopOrderList
+					this.orderInfo = res.data.order
+					this.userInfo = res.data.userInfo
+				})
+				.catch(err => {
+					this.$util.modal('提示', '订单查询失败,请稍后重试~', '确定', '', false, () => {
+					    this.$api.switchTabTo('/pages/tabBar/index/index')
+					})
+				})
+				.finally(() => {
+					this.isRequest = false
+				})
+		},
+		getCount(e) {
+			this.buttonCount = e.count
+		}
+	}
 }
 </script>
 
 <style lang="scss" scoped>
 .order-detail {
-    min-height: 100vh;
-    background: #f7f7f7;
-    
-    padding-top: 138rpx;
-    box-sizing: border-box;
-    
-    &.has-bottom{
-        padding-bottom: 100rpx;
-    }
-
-    .grid {
-        height: 20rpx;
-        background: #f7f7f7;
-    }
-    
-    .address{
-        height: 138rpx;
-        position: fixed;
-        top: 0;
-    }
-    
-
-    .shop-section {
-        background: #fff;
-        overflow: hidden;
-
-        .line {
-            width: 702rpx;
-            height: 1px;
-            background: #f7f7f7;
-            margin: 0 auto;
-        }
-
-        .origin {
-            padding: 0 24rpx;
-            margin-top: 24rpx;
-            margin-bottom: 16rpx;
-            display: flex;
-            justify-content: flex-start;
-            align-items: center;
-
-            .cover {
-                width: 56rpx;
-                height: 56rpx;
-                border-radius: 4rpx;
-                border: 1px solid #F7F7F7;
-                box-sizing: border-box;
-            }
-
-            .name {
-                margin-left: 16rpx;
-                font-size: 30rpx;
-                color: #333333;
-                font-weight: bold;
-            }
-        }
-
-        .goods-list {
-            margin-bottom: 32rpx;
-            .order-goods {
-                padding-top: 32rpx;
-                &:first-child {
-                    padding-top: 0;
-                }
-            }
-        }
-    }
-
-    .total {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-
-        padding: 0 24rpx;
-        margin: 32rpx 0;
-
-        font-size: 26rpx;
-        color: #333333;
-
-        .count {
-            font-weight: bold;
-        }
-
-        .status {
-            color: #ff457b;
-
-            .label {
-                color: #333333;
-            }
-        }
-    }
-    
-    .order-control{
-        position: fixed;
-        width: 100%;
-        box-sizing: border-box;
-        height: 100rpx;
-        display: flex;
-        justify-content: flex-end;
-        align-items: center;
-        bottom: 0;
-        background: #fff;
-    }
+	min-height: 100vh;
+	background: #f7f7f7;
+
+	padding-top: 138rpx + 60rpx;
+	box-sizing: border-box;
+
+	&.has-bottom {
+		padding-bottom: 100rpx;
+	}
+	
+	.order-status{
+		height: 60rpx;
+		font-size: 26rpx;
+		line-height: 26rpx;
+		padding: 34rpx 24rpx 0;
+		box-sizing: border-box;
+		color: #FF457B;
+		background: #fff;
+	}
+	
+	.detail-top {
+		height: 138rpx + 60rpx;
+		position: fixed;
+		top: 0;
+		z-index: 999;
+	}
+	
+	.grid {
+		height: 20rpx;
+		background: #f7f7f7;
+	}
+
+	.shop-section {
+		background: #fff;
+		overflow: hidden;
+
+		.line {
+			width: 702rpx;
+			height: 1px;
+			background: #f7f7f7;
+			margin: 0 auto;
+		}
+
+		.origin {
+			padding: 0 24rpx;
+			margin-top: 24rpx;
+			margin-bottom: 16rpx;
+			display: flex;
+			justify-content: flex-start;
+			align-items: center;
+
+			.cover {
+				width: 56rpx;
+				height: 56rpx;
+				border-radius: 4rpx;
+				border: 1px solid #f7f7f7;
+				box-sizing: border-box;
+			}
+
+			.name {
+				margin-left: 16rpx;
+				font-size: 30rpx;
+				color: #333333;
+				font-weight: bold;
+			}
+		}
+
+		.goods-list {
+			margin-bottom: 32rpx;
+			.order-goods {
+				padding-top: 32rpx;
+				&:first-child {
+					padding-top: 0;
+				}
+			}
+		}
+	}
+
+	.total {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+
+		padding: 0 24rpx;
+		margin: 32rpx 0;
+
+		font-size: 26rpx;
+		color: #333333;
+
+		.count {
+			font-weight: bold;
+		}
+
+		.status {
+			color: #ff457b;
+
+			.label {
+				color: #333333;
+			}
+		}
+	}
+
+	.order-control {
+		position: fixed;
+		width: 100%;
+		box-sizing: border-box;
+		height: 100rpx;
+		display: flex;
+		justify-content: flex-end;
+		align-items: center;
+		bottom: 0;
+		background: #fff;
+	}
 }
 </style>

+ 21 - 16
pages/order/order-list.vue

@@ -1,17 +1,18 @@
 <template>
     <view class="order-list">
         <tui-skeleton v-if="isRequest" loadingType="2"></tui-skeleton>
-        
         <!-- 滑块 tabs -->
-        <tui-tabs
-            :tabs="tabs"
-            :currentTab="currentTab"
-            @change="tabChange"
-            :sliderWidth="48"
-            color="#333333"
-            selectedColor="#FF457B"
-            sliderBgColor="#FF457B"
-        ></tui-tabs>
+        <view class="tabs">
+			<tui-tabs
+			    :tabs="tabs"
+			    :currentTab="currentTab"
+			    @change="tabChange"
+			    :sliderWidth="48"
+			    color="#333333"
+			    selectedColor="#FF457B"
+			    sliderBgColor="#FF457B"
+			></tui-tabs>
+		</view>
         
         <!-- 协销筛选订单 -->
         <cm-order-filter-control
@@ -193,7 +194,7 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['userId', 'userIdentity']),
+        ...mapGetters(['userId', 'userIdentity']), 
         // 当前用户是否为协销
         isDealer() {
             return this.userIdentity === 2
@@ -218,11 +219,10 @@ export default {
             return info
         }
     },
-    created() {
-        setTimeout(() => {
-            this.fetchOrderData()
-        }, 2000)
-    },
+	onLoad(options) {
+		this.currentTab = options.state
+		this.fetchOrderData()
+	},
     // 下拉刷新
     onPullDownRefresh() {
         this.resetOrderList()
@@ -342,6 +342,11 @@ export default {
 .order-list {
     min-height: 100vh;
     background: #f7f7f7;
+	
+	.tabs{
+		position: relative;
+		z-index: 100000;
+	}
 
     .swiper {
         &.swiper-hegiht1 {

+ 405 - 404
pages/order/order-logistics.vue

@@ -1,422 +1,423 @@
 <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>
+	<view class="container logistics clearfix">
+		<!-- 商品 -->
+		<view class="logistics-container">
+			<view class="logistics-batch" v-for="(item, index) in goodsList" :key="index">
+				<view class="order-item" v-for="(comItem, comIndex) in item.companyList" :key="comIndex">
+					<view class="goods-title">
+						<view class="title-logo"><image :src="comItem.shopLogo" mode=""></image></view>
+						<view class="title-text">{{ comItem.name }}</view>
+					</view>
+					<view class="goods-item" v-for="(pros, prosIndex) in comItem.productsList" :key="prosIndex">
+						<view class="goods-pros-t">
+							<view class="pros-img"><image :src="pros.image" alt="" /></view>
+							<view class="pros-product">
+								<view class="producttitle">{{ pros.productName }}</view>
+								<view class="productspec">
+									购买数量:
+									<text class="color">{{ pros.number }}</text>
+								</view>
+								<view class="productspec">
+									已发货数量:
+									<text class="color">{{ pros.logNumber }}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="logistics-template">
+					<!-- 物流信息 -->
+					<view
+						class="logistics-content"
+						v-if="item.logisticsData.length > 0"
+						v-for="(logItem, loIndex) in item.logisticsData"
+						:key="loIndex"
+					>
+						<view class="logistics-top"><text class="name">物流信息</text></view>
+						<view class="logistics-warp">
+							<view class="logistics-warp__wrapper">
+								<view class="logistics-main">
+									<view class="logistics-main-top">
+										<view class="main-top" @click="showlogistics(index, loIndex)">
+											{{ logItem.expressname }}:
+											<text class="expressNumber">{{ logItem.expressNumber }}</text>
+											<text class="clipboard" @click.stop="clipboard(logItem.expressNumber)">
+												复制
+											</text>
+											<text
+												class="arrow-showMore iconfont icon-web_xiangxiazhankai"
+												:style="{
+													transform: logItem.isOpen ? 'rotate(180deg)' : 'rotate(0)',
+													transition: 'transform 0.3s ease'
+												}"
+											></text>
+										</view>
+										<view class="main-bot">发货时间:{{ logItem.expressNewtime }}</view>
+									</view>
+									<view
+										v-if="logItem.expressRecord.length > 0"
+										v-for="(infoItem, infoIndex) in logItem.expressRecord"
+										:key="infoIndex"
+										:class="{ 'logistics-warp--hide': !logItem.isOpen }"
+										class="logistics-main-bot logistics-animation"
+										:style="{
+											transform: logItem.isOpen ? 'translateY(0)' : 'translateY(-50%)',
+											'-webkit-transform': logItem.isOpen ? 'translateY(0)' : 'translateY(-50%)'
+										}"
+									>
+										{{ infoItem.time }} {{ infoItem.desc }}
+									</view>
+									<view
+										v-if="logItem.expressRecord.length < 1"
+										:class="{ 'logistics-warp--hide': !logItem.isOpen }"
+										class="logistics-main-bot logistics-animation"
+										:style="{
+											transform: logItem.isOpen ? 'translateY(0)' : 'translateY(-50%)',
+											'-webkit-transform': logItem.isOpen ? 'translateY(0)' : 'translateY(-50%)'
+										}"
+									>
+										暂无物流信息
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="logistics-content" v-else>暂无物流信息</view>
+				</view>
+			</view>
+		</view>
+		<!-- 物流信息 -->
+		<!-- <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)
-                })
-        }
-    }
+	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;
+	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;
-                }
-            }
-        }
-    }
+	width: 100%;
+	height: auto;
+	float: left;
+	background: #f7f7f7;
+	border-top: 1px solid #f8f8f8;
+	.logistics-batch {
+		display: flex;
+		flex-direction: column;
+		margin-bottom: 24rpx;
+	}
+	.order-item {
+		width: 702rpx;
+		padding: 24rpx 24rpx 12rpx 24rpx;
+		height: auto;
+		float: left;
+		background: #ffffff;
+		margin-bottom: 20rpx;
+		.goods-title {
+			width: 100%;
+			height: 48rpx;
+			float: left;
+			margin-bottom: 12rpx;
+			.title-logo {
+				width: 48rpx;
+				height: 48rpx;
+				float: left;
+				border-radius: 8rpx;
+				border: 1px solid #e1e1e1;
+				image {
+					border-radius: 8rpx;
+					width: 48rpx;
+					height: 48rpx;
+				}
+			}
+			.title-text {
+				float: left;
+				margin-left: 16rpx;
+				font-size: 28rpx;
+				color: #333333;
+				text-align: left;
+				line-height: 48rpx;
+				font-weight: bold;
+			}
+		}
+		.goods-item {
+			width: 100%;
+			height: auto;
+			border-bottom: 1px solid #e1e1e1;
+			&:last-child {
+				border-bottom: none;
+			}
+		}
+		.goods-pros-t {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 180rpx;
+			padding: 20rpx 0;
+			.pros-img {
+				width: 180rpx;
+				height: 180rpx;
+				border-radius: 10rpx;
+				margin: 0 26rpx 0 0;
+				border: 1px solid #f3f3f3;
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 10rpx;
+				}
+			}
+		}
+		.pros-product {
+			width: 468rpx;
+			height: 100%;
+			line-height: 36rpx;
+			font-size: 26rpx;
+			position: relative;
+			.producttitle {
+				width: 100%;
+				display: inline-block;
+				height: auto;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				word-break: break-all;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+				overflow: hidden;
+				margin-bottom: 28rpx;
+			}
+			.productspec {
+				height: 36rpx;
+				color: #999999;
+				line-height: 36rpx;
+				font-size: 26rpx;
+				.color {
+					color: #333333;
+				}
+			}
+		}
+	}
 }
 
 .logistics-template {
-    width: 702rpx;
-    height: 100%;
-    background: #ffffff;
-    float: left;
-    padding: 24rpx 24rpx 12rpx 24rpx;
-    .logistics-content {
-        width: 100%;
-        padding: 20rpx 0;
-        height: auto;
-        .arrow-showMore {
-            position: absolute;
-            right: 24rpx;
-            z-index: 99;
-        }
-        .logistics-top {
-            width: 100%;
-            height: 40rpx;
-            line-height: 40rpx;
-            font-size: $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;
-        }
-    }
+	width: 702rpx;
+	height: 100%;
+	background: #ffffff;
+	float: left;
+	padding: 24rpx 24rpx 12rpx 24rpx;
+	.logistics-content {
+		width: 100%;
+		padding: 20rpx 0;
+		height: auto;
+		.arrow-showMore {
+			position: absolute;
+			right: 24rpx;
+			z-index: 99;
+		}
+		.logistics-top {
+			width: 100%;
+			height: 40rpx;
+			line-height: 40rpx;
+			font-size: 28rpx;
+			color: #333;
+			text-align: left;
+			padding-bottom: 24rpx;
+			border-bottom: 1px solid #f8f8f8;
+			.name {
+				float: left;
+				font-weight: bold;
+			}
+			.icon-web_xiangxiazhankai {
+				transform: rotate(0deg);
+				transform-origin: center center;
+				float: right;
+				font-size: 32rpx;
+				color: #000000;
+				/* transition: transform 0.3s ease;*/
+				transition-property: transform;
+				transition-duration: 0.3s;
+				transition-timing-function: ease;
+			}
+			.icon-web_xiangxiazhankai-active {
+				transform: rotate(180deg);
+			}
+		}
+		.logistics-warp {
+			width: 100%;
+			overflow: hidden;
+			.table {
+				height: 76rpx;
+				line-height: 76rpx;
+				font-size: 26rpx;
+				color: #333;
+				text-align: left;
+			}
+			.expressNumber {
+				width: 250rpx;
+				display: inline-block;
+			}
+		}
+		.logistics-main-top {
+			width: 100%;
+			height: auto;
+			float: left;
+			padding-top: 24rpx;
+			.main-top,
+			.main-bot {
+				font-size: 28rpx;
+				color: #333;
+				line-height: 40rpx;
+				margin: 4rpx 0;
+			}
+		}
+		.logistics-main-bot {
+			width: 100%;
+			height: auto;
+			font-size: $font-size-24;
+			color: #333;
+			line-height: 56rpx;
+			text-align: justify;
+			float: left;
+		}
+		.logistics-animation {
+			/* transition: transform 0.3s ease;*/
+			transition-property: transform;
+			transition-duration: 0.3s;
+			transition-timing-function: ease;
+		}
+		.logistics-warp__wrapper {
+			/* #ifndef APP-NVUE */
+			display: flex;
+			/* #endif */
+			flex-direction: column;
+		}
+		.logistics-warp--hide {
+			// padding: 0 0;
+			// height: 0px;
+			// line-height: 0px;
+			display: none;
+		}
+		.clipboard {
+			width: 80rpx;
+			height: 40rpx;
+			background: #fff8fd;
+			text-align: center;
+			font-size: 22rpx;
+			color: #ff457b;
+			border-radius: 7rpx;
+			line-height: 40rpx;
+			display: inline-block;
+		}
+	}
 }
 </style>

+ 155 - 0
pages/order/success.vue

@@ -0,0 +1,155 @@
+<template>
+	<view class="container cashier">
+		<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 | NumFormat }}</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 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: {
+		CmLoading
+	},
+	// 混入支付
+	mixins: [wechatPay],
+	data() {
+		return {
+			StaticUrl: this.$Static,
+			orderId: '',
+			successText: '订单支付成功',
+			orderInfo: {}
+		}
+	},
+	onLoad() {
+		this.initOrderInfo()
+	},
+	filters: {
+		NumFormat(value) {
+			//处理金额
+			return Number(value).toFixed(2)
+		}
+	},
+	computed: {
+		...mapGetters(['isIphoneX']),
+		hanldOrder() {
+			return {
+				order: this.orderInfo
+			}
+		}
+	},
+	methods: {
+		initOrderInfo() {
+			this.orderInfo = uni.getStorageSync('orderInfo')
+			uni.removeStorageSync('orderInfo')
+		},
+		// 回到首页
+		goHome() {
+			uni.reLaunch({ url: '/pages/tabBar/index/index' })
+		},
+		// 查看订单
+		searchOrder() {
+			this.$api.redirectTo('/pages/order/order-detail?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>

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

@@ -502,7 +502,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/create-order')
         },
         hideModal() {
             this.modal = false

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

@@ -169,11 +169,7 @@ export default {
         OrderNavigator(state) {
             if (!this.hasLogin) return this.$api.navigateTo('/pages/login/login')
             // 栏目跳转
-            if (this.userIdentity == 2) {
-                this.$api.navigateTo(`/pages/user/order/order-list-retail?state=${state}`)
-            } else {
-                this.$api.navigateTo(`/pages/user/order/order-list?state=${state}`)
-            }
+            this.$api.navigateTo(`/pages/order/order-list?state=${state}`)
         },
         navigator(url) {
             if (this.hasLogin) {

+ 1 - 1
services/order.service.js

@@ -43,7 +43,7 @@ export default class OrderService {
         return this.AjaxService.get({
             url: '/order/detail',
             data,
-            isLoading: true,
+            isLoading: false,
         })
     }
     /* 操作取消订单 */