Commit 417e8adc authored by verestrasz's avatar verestrasz

update

parent 5a342125
...@@ -2,8 +2,8 @@ import { ...@@ -2,8 +2,8 @@ import {
OrderStatus, OrderStatus,
OrderType, OrderType,
CommentStatus CommentStatus
} from "@/enums"; } from "@/enums"
import bus from "@/utils/bus"
export const OrderMixin = { export const OrderMixin = {
computed: { computed: {
btnList() { btnList() {
...@@ -103,6 +103,7 @@ export const OrderMixin = { ...@@ -103,6 +103,7 @@ export const OrderMixin = {
postData: this.data.payId, postData: this.data.payId,
success: () => { success: () => {
this.data.orderState = OrderStatus.CLOSE; this.data.orderState = OrderStatus.CLOSE;
bus.$emit("changeState", this.data);
}, },
complete: () => { complete: () => {
this.$hideLoading(); this.$hideLoading();
...@@ -132,6 +133,7 @@ export const OrderMixin = { ...@@ -132,6 +133,7 @@ export const OrderMixin = {
postData: this.data.oid, postData: this.data.oid,
success: () => { success: () => {
this.data.orderState = OrderStatus.SUCCESS; this.data.orderState = OrderStatus.SUCCESS;
bus.$emit("changeState", this.data);
}, },
complete: () => { complete: () => {
this.$hideLoading(); this.$hideLoading();
......
import Vue from 'vue'
const bus = new Vue()
export default bus
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
import { OrderStatus, OrderStatusObj, CommentStatus, OrderType } from "@/enums"; import { OrderStatus, OrderStatusObj, CommentStatus, OrderType } from "@/enums";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import { OrderMixin } from "@/mixins"; import { OrderMixin } from "@/mixins";
import bus from "@/utils/bus"
export default { export default {
mixins: [OrderMixin], mixins: [OrderMixin],
props: { props: {
...@@ -133,6 +134,13 @@ export default { ...@@ -133,6 +134,13 @@ export default {
}, },
}, },
mounted(){
bus.$on("changeState", (data) => {
if(data.oid===this.data.oid){
this.data.orderState=data.orderState
}
});
},
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment