Commit f156fe12 authored by qinhaitao's avatar qinhaitao

fix: 🐛 订单增加可选链

parent 58bbff94
/** @format */ /** @format */
export const noVip = (target: any, name: string, descriptor: PropertyDescriptor) => { export const noVipInfo = (target: any, name: string, descriptor: PropertyDescriptor) => {
const method = descriptor.value const method = descriptor.value
descriptor.value = async function (...args: any[]) { descriptor.value = async function (...args: any[]) {
const [context, otherArgs = {}] = args const [context, otherArgs = {}] = args
......
...@@ -35,7 +35,7 @@ export const getUserOrderlist = async (context, queryStartTime, queryEndTime?, s ...@@ -35,7 +35,7 @@ export const getUserOrderlist = async (context, queryStartTime, queryEndTime?, s
const { trade } = orderResult.trades const { trade } = orderResult.trades
trade.forEach(i => { trade.forEach(i => {
if (TAOBAO_SUCCESS_ORDER_STATUS.includes(i.status)) { if (TAOBAO_SUCCESS_ORDER_STATUS.includes(i.status)) {
i.orders.order.forEach(s => { i?.orders?.order?.forEach(s => {
results.push({ results.push({
payTime: i.pay_time, payTime: i.pay_time,
itemId: s.num_iid, itemId: s.num_iid,
......
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