update 修复

This commit is contained in:
qijq 2025-08-11 09:02:27 +08:00
parent d268c6a294
commit 2a2049084f
15 changed files with 197 additions and 31 deletions

View File

@ -113,21 +113,13 @@ export default {
if (res.data) { if (res.data) {
const app = getApp(); const app = getApp();
if (!app.globalData.isAppActive) { if (!app.globalData.isAppActive) {
//
const ordrPushHistoryList =
uni.getStorageSync("PUSH_MSG_DATA") || [];
// historyList
const newList = Array.isArray(ordrPushHistoryList)
? [...ordrPushHistoryList, res.data]
: [res.data];
//
uni.setStorageSync("PUSH_MSG_DATA", newList);
// //
uni.setStorageSync("pendingPushData", res.data);
uni.createPushMessage(res.data); uni.createPushMessage(res.data);
} else { } else {
console.log("应用已打开,直接处理消息"); console.log("应用已打开,直接处理消息");
// UI // UI
this.$store.dispatch("order/orderPush", res.data); this.$store.dispatch("push/setPush", res.data);
} }
} }
}); });

View File

@ -2,7 +2,7 @@ import http from "../utils/http";
import config from "../config/config"; import config from "../config/config";
/** /**
* 获取订单列表 * 获取同城订单列表
* @author Seven * @author Seven
* @data 2025-3-28 * @data 2025-3-28
* @param { * @param {
@ -26,6 +26,26 @@ export function GetOrderList(params) {
}); });
} }
/**
* 获取同城订单详情
* @author Seven
* @data 2025-3-28
* @param {
* orderId:"DD-2025070723-1"
* }
* @returns { }
* @see https://mall.gpxscs.cn/admin/shop/shop-order-base/mch/order/detail
*/
export function GetOrderDetail(params) {
return http({
url: "/shop/shop-order-base/mch/order/detail",
method: "post",
data: params,
baseURL: config.adminApi,
});
}
/** /**
* 获取退货订单列表 * 获取退货订单列表
* @author Seven * @author Seven

View File

@ -235,7 +235,9 @@ export default {
}); });
}, },
handleShowTime() { handleShowTime() {
this.$refs["time"].open(); uni.navigateTo({
url: "/pages/my/storeBusinessStatus/businessStatus",
});
}, },
handleTimeRange(e) { handleTimeRange(e) {
this.form.businessTime = e[0] + e[1]; this.form.businessTime = e[0] + e[1];

View File

@ -3,7 +3,7 @@
<view class="expresser expresser-2"> <view class="expresser expresser-2">
<view class="header"> <view class="header">
<text class="symbol">#</text> <text class="symbol">#</text>
<text>{{ currOrderItem.order_pickup_num }}</text> <text>{{ currOrderItem.orderNum }}</text>
</view> </view>
<view class="footer"> <view class="footer">
<view class="status">{{ currOrderItem.return_state_name }}</view> <view class="status">{{ currOrderItem.return_state_name }}</view>

View File

@ -599,23 +599,46 @@ export default {
}, },
computed: { computed: {
...mapState("user", ["userInfo"]), ...mapState("user", ["userInfo"]),
...mapState("order", ["pushOrderInfo"]), ...mapState("push", ["orderDetail", "orderStatus"]),
}, },
watch: { watch: {
pushOrderInfo: { orderDetail: {
handler(newValue, oldValue) { handler(newValue) {
if (newValue && newValue.order_id) {
console.log("orderDetail", newValue);
//
const index = this.orderInfo.order_page_list.records.findIndex(
(item) => item.order_id === newValue.order_id
);
//
if (index !== -1) {
// orderNum
const originalOrderNum =
this.orderInfo.order_page_list.records[index].orderNum;
this.$set(this.orderInfo.order_page_list.records, index, {
...this.orderInfo.order_page_list.records[index],
...newValue,
orderNum: originalOrderNum,
});
}
}
},
deep: true,
},
orderStatus: {
handler(newValue) {
if (newValue) { if (newValue) {
console.log("order watch", newValue); this.pageNum = 1;
if (newValue == "mchRetrunOrderList") {
this.orderInfo.order_page_list.records.unshift(newValue); console.log("触发getSalesReturnOrderList");
this.getSalesReturnOrderList();
this.orderInfo.order_page_list.records = } else {
this.orderInfo.order_page_list.records.map((item, index) => ({ this.getOrderList(false);
...item, // console.log("触发getOrderList");
orderNum: index + 1, // orderNum (1, 2, 3, ...) }
}));
console.log(this.orderInfo.order_page_list.records);
} }
}, },
}, },
@ -630,7 +653,7 @@ export default {
this.getOrderList(); this.getOrderList();
}, },
methods: { methods: {
async getOrderList() { async getOrderList(isLoding = true) {
let accountDashboard = uni.getStorageSync("accountDashboard"); let accountDashboard = uni.getStorageSync("accountDashboard");
let auditInfo = uni.getStorageSync("auditInfo"); let auditInfo = uni.getStorageSync("auditInfo");
@ -648,7 +671,9 @@ export default {
if (this.loadingDownOnlinData) { if (this.loadingDownOnlinData) {
this.showOrderLoading = false; this.showOrderLoading = false;
} else { } else {
this.showOrderLoading = true; if (isLoding) {
this.showOrderLoading = true;
}
} }
this.params = { this.params = {

View File

@ -587,6 +587,7 @@ export default {
}, },
showDelectPopup: false, showDelectPopup: false,
cheboxList: [], cheboxList: [],
productSpec: [],
}; };
}, },
computed: { computed: {
@ -916,6 +917,8 @@ export default {
}; };
if (this.cheboxList.length > 0 || this.productSpec.length > 0) { if (this.cheboxList.length > 0 || this.productSpec.length > 0) {
console.log(this.cheboxList, this.productSpec);
obj.product_spec = JSON.stringify([ obj.product_spec = JSON.stringify([
{ {
id: item.spec_id, id: item.spec_id,

View File

@ -782,6 +782,10 @@ export default {
if (!isVerify) return; if (!isVerify) return;
this.checkboxValue = this.checkboxValue.filter(
(item) => item !== null && item !== undefined
);
this.$emit( this.$emit(
"handerSpecificationInfoList", "handerSpecificationInfoList",
this.specificationInfoList, this.specificationInfoList,

View File

@ -3,6 +3,7 @@ import Vuex from "vuex";
import user from "./modules/user"; import user from "./modules/user";
import order from "./modules/order"; import order from "./modules/order";
import audit from "./modules/audit"; import audit from "./modules/audit";
import push from "./modules/push";
Vue.use(Vuex); Vue.use(Vuex);
@ -11,6 +12,7 @@ const store = new Vuex.Store({
user, user,
order, order,
audit, audit,
push,
}, },
}); });

View File

@ -0,0 +1,117 @@
import { GetOrderDetail } from "@/api/order";
const defaultState = () => {
return {
pushBase: {
unipush_version: "",
payload: {
orderId: "",
category: "",
},
title: "",
content: "",
},
orderDetail: {},
orderStatus: "",
appOpenStatus: false,
};
};
const state = defaultState();
const getters = {};
const mutations = {
SET_PUSH(state, pushBase) {
state.pushBase = pushBase;
},
SET_ORDER_DETAIL(state, orderDetail) {
state.orderDetail = orderDetail;
},
SET_ORDER_STATUS_API(state, orderStatus) {
state.orderStatus = orderStatus;
},
SET_APP_OPENT_STATUS(state, appOpenStatus) {
state.appOpenStatus = appOpenStatus;
},
};
const actions = {
async setPush({ commit }, pushBase) {
console.log(pushBase);
commit("SET_PUSH", pushBase);
// 判断唤醒
const pendingPushData = uni.getStorageSync("pendingPushData");
const AUDIO = uni.createInnerAudioContext();
AUDIO.stop();
switch (pushBase.payload.category) {
case "mchContract":
uni.navigateTo({ url: "/pages/audit/checkAudit" });
break;
// 订单详情
case "mchOrderDetail":
// AUDIO.src = "../../static/mp3/jinxingzhong.MP3";
// AUDIO.play();
let params = {
orderId: pushBase.payload.orderId,
};
let res = await GetOrderDetail(params);
console.log(res);
if (res && res.status == 200) {
commit("SET_ORDER_DETAIL", res.data);
if (pendingPushData) {
uni.removeStorageSync("pendingPushData");
uni.navigateTo({
url: "/pages/order/order",
});
}
}
break;
// 订单列表
case "mchOnLineOrderList":
AUDIO.src = "../../static/mp3/jinxingzhong.MP3";
AUDIO.play();
commit("SET_ORDER_STATUS_API", pushBase.payload.category);
if (pendingPushData) {
uni.removeStorageSync("pendingPushData");
uni.navigateTo({
url: "/pages/order/order",
});
}
break;
// 异常订单
case "mchAbnormalOrderList":
// AUDIO.src = require("@static/mp3/1.MP3");
commit("SET_ORDER_STATUS_API", pushBase.payload.category);
if (pendingPushData) {
uni.removeStorageSync("pendingPushData");
uni.navigateTo({
url: "/pages/order/order",
});
}
break;
// 退款订单
case "mchRetrunOrderList":
AUDIO.src = "../../static/mp3/tuihuo.MP3";
AUDIO.play();
commit("SET_ORDER_STATUS_API", pushBase.payload.category);
if (pendingPushData) {
uni.removeStorageSync("pendingPushData");
uni.navigateTo({
url: "/pages/order/order",
});
}
break;
}
},
};
export default {
namespaced: true,
state,
getters,
mutations,
actions,
};

View File

@ -121,10 +121,9 @@ const actions = {
params.cid = push_clientid; params.cid = push_clientid;
params.osType = osType; params.osType = osType;
console.log("push_clientid", push_clientid);
// #endif // #endif
console.log("push_clientid");
const res = await GetAccountLogin(params); const res = await GetAccountLogin(params);
console.log(res); console.log(res);

View File

@ -42,6 +42,8 @@ service.interceptors.response.use(
(response) => { (response) => {
const res = response.data; const res = response.data;
console.log(res);
if (res && res.status == 250) { if (res && res.status == 250) {
uni.$u.toast(`提示:${res.msg}`); uni.$u.toast(`提示:${res.msg}`);