修改显示问题
This commit is contained in:
1 parent
07a90e860d
commit
88bffaa5d0
5 files changed
+22
-2
No files matched your search
@@ -79,6 +79,8 @@ async function isAdmin(openid) {
|
||||
|
||||
const sha1 = (text) => crypto.createHash('sha1').update(text).digest('hex')
|
||||
const isPaid = (status) => status >= 2 && status <= 4 // 2 已支付待发货 / 3 发货中 / 4 已发货
|
||||
// 订单渠道:7 / 8 是苹果 iOS(内购)订单,开发者不能主动退款
|
||||
const isAppleOrder = (order) => [7, 8].includes(Number(order && order.order_type))
|
||||
|
||||
// 从推送的 XML 里取字段,值可能在 CDATA 里
|
||||
function xmlTag(xml, name) {
|
||||
@@ -244,6 +246,7 @@ async function deliverRecord(record, order) {
|
||||
const delivered = await store.assignCode(record.outTradeNo, {
|
||||
wxOrderId: detail.wx_order_id || record.wxOrderId || '',
|
||||
paidFee: detail.paid_fee || 0,
|
||||
channel: isAppleOrder(detail) ? 'apple' : 'wxpay',
|
||||
})
|
||||
const notify = await tryNotify(delivered)
|
||||
return {
|
||||
@@ -343,6 +346,7 @@ async function myCodes(code) {
|
||||
productId: record.productId,
|
||||
productName: await nameOf(record.productId),
|
||||
env: record.env || 0,
|
||||
channel: record.channel || '',
|
||||
deliveredAt: record.deliveredAt,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user