Commit 417e8adc authored by verestrasz's avatar verestrasz

update

parent 5a342125
......@@ -2,8 +2,8 @@ import {
OrderStatus,
OrderType,
CommentStatus
} from "@/enums";
} from "@/enums"
import bus from "@/utils/bus"
export const OrderMixin = {
computed: {
btnList() {
......@@ -103,6 +103,7 @@ export const OrderMixin = {
postData: this.data.payId,
success: () => {
this.data.orderState = OrderStatus.CLOSE;
bus.$emit("changeState", this.data);
},
complete: () => {
this.$hideLoading();
......@@ -132,6 +133,7 @@ export const OrderMixin = {
postData: this.data.oid,
success: () => {
this.data.orderState = OrderStatus.SUCCESS;
bus.$emit("changeState", this.data);
},
complete: () => {
this.$hideLoading();
......
import Vue from 'vue'
const bus = new Vue()
export default bus
......@@ -54,6 +54,7 @@
import { OrderStatus, OrderStatusObj, CommentStatus, OrderType } from "@/enums";
import { mapMutations } from "vuex";
import { OrderMixin } from "@/mixins";
import bus from "@/utils/bus"
export default {
mixins: [OrderMixin],
props: {
......@@ -133,6 +134,13 @@ export default {
},
},
mounted(){
bus.$on("changeState", (data) => {
if(data.oid===this.data.oid){
this.data.orderState=data.orderState
}
});
},
};
</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