lilei 7 months ago
parent
commit
3c9fe00e5b
2 changed files with 12 additions and 5 deletions
  1. 11 0
      pagesB/cart/index.vue
  2. 1 5
      pagesB/procureOrder/creatOrder.vue

+ 11 - 0
pagesB/cart/index.vue

@@ -127,6 +127,17 @@
 			uni.$on('removeCatGood',(snList,a,b)=>{
 			uni.$on('removeCatGood',(snList,a,b)=>{
 				this.removeCart(snList,a,b)
 				this.removeCart(snList,a,b)
 			})
 			})
+			// 打开订单详情页
+			uni.$on('toOrderDetail',(purchaseSn)=>{
+				uni.navigateTo({
+					url: "/pagesB/procureOrder/orderDetail?purchaseSn="+purchaseSn
+				})
+			})
+		},
+		onUnload() {
+			uni.$off('refashCartList')
+			uni.$off('removeCatGood')
+			uni.$off('toOrderDetail')
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {

+ 1 - 5
pagesB/procureOrder/creatOrder.vue

@@ -288,11 +288,7 @@
 				// 创建成功,跳转到订单详情页
 				// 创建成功,跳转到订单详情页
 				this.showPopu = false
 				this.showPopu = false
 				uni.navigateBack()
 				uni.navigateBack()
-				setTimeout(()=>{
-					uni.navigateTo({
-						url: "/pagesB/procureOrder/orderDetail?purchaseSn="+this.$store.state.vuex_tempOrderData.purchaseSn
-					})
-				},150)
+				uni.$emit('toOrderDetail',this.$store.state.vuex_tempOrderData.purchaseSn)
 			},
 			},
 			// 计算总款数、合计、数量
 			// 计算总款数、合计、数量
 			getChooseHeji(){
 			getChooseHeji(){