|
@@ -158,11 +158,8 @@
|
|
|
//退款
|
|
|
let refundOrder = (order_sn) => {
|
|
|
this.$store.commit('updateLoadingStatus', {isLoading: true});
|
|
|
- this.$http.jsonp(Api.refundOrder(), {_timeout: 5000}, {
|
|
|
- params: {
|
|
|
- order_sn: order_sn,
|
|
|
- }
|
|
|
- }).then(function (res) {
|
|
|
+ this.$http.jsonp(Api.refundOrder(order_sn), {_timeout: 5000}).then(function (res) {
|
|
|
+ _self.$store.commit('updateLoadingStatus', {isLoading: false});
|
|
|
if (res.body.code != 200) {
|
|
|
this.$vux.toast.show({
|
|
|
type: 'text',
|
|
@@ -173,8 +170,8 @@
|
|
|
return;
|
|
|
}
|
|
|
_self.$store.commit("updateOrderState", {action: res.body.datas, action_id: new Date()});
|
|
|
- _self.$store.commit('updateLoadingStatus', {isLoading: false});
|
|
|
}, (err) => {
|
|
|
+ _self.$store.commit('updateLoadingStatus', {isLoading: false});
|
|
|
this.$vux.toast.show({
|
|
|
type: 'text',
|
|
|
text: "网络错误",
|
|
@@ -186,12 +183,8 @@
|
|
|
//通知服务器改变状态
|
|
|
let changeState = (action, order_id) => {
|
|
|
this.$store.commit('updateLoadingStatus', {isLoading: true});
|
|
|
- this.$http.jsonp(Api.changeOrderState(), {_timeout: 5000}, {
|
|
|
- params: {
|
|
|
- act_type: action,
|
|
|
- order_id: order_id
|
|
|
- }
|
|
|
- }).then(function (res) {
|
|
|
+ this.$http.jsonp(Api.changeOrderState(action, order_id), {_timeout: 5000}).then(function (res) {
|
|
|
+ _self.$store.commit('updateLoadingStatus', {isLoading: false});
|
|
|
if (res.body.code != 200) {
|
|
|
this.$vux.toast.show({
|
|
|
type: 'text',
|
|
@@ -202,8 +195,8 @@
|
|
|
return;
|
|
|
}
|
|
|
_self.$store.commit("updateOrderState", {action: res.body.datas, action_id: new Date()});
|
|
|
- _self.$store.commit('updateLoadingStatus', {isLoading: false});
|
|
|
}, (err) => {
|
|
|
+ _self.$store.commit('updateLoadingStatus', {isLoading: false});
|
|
|
this.$vux.toast.show({
|
|
|
type: 'text',
|
|
|
text: "网络错误",
|