consumer模块完成度95%,安卓端大部分页面能正常获取数据,页面样式显示基本正常,逐渐完善;消费者端的积分、余额、评价、优惠券等小模块正在完善
This commit is contained in:
@@ -364,12 +364,23 @@ export class AkSupaQueryBuilder {
|
||||
}
|
||||
}
|
||||
if (total == 0) {
|
||||
if (typeof res['count'] == 'number') {
|
||||
total = res['count'] as number ?? 0;
|
||||
// 使用 JSON 序列化访问 res 对象
|
||||
const resStr = JSON.stringify(res)
|
||||
const resParsed = JSON.parse(resStr)
|
||||
if (resParsed != null) {
|
||||
const resObj = resParsed as UTSJSONObject
|
||||
const countVal = resObj.getNumber('count')
|
||||
if (countVal != null) {
|
||||
total = countVal
|
||||
} else if (Array.isArray(resdata)) {
|
||||
total = resdata.length
|
||||
} else {
|
||||
total = 0
|
||||
}
|
||||
} else if (Array.isArray(resdata)) {
|
||||
total = resdata.length;
|
||||
total = resdata.length
|
||||
} else {
|
||||
total = 0;
|
||||
total = 0
|
||||
}
|
||||
}
|
||||
if (!hasmore) hasmore = (page * limit) < total; // 如果是 head 模式,只返回 count 信息
|
||||
|
||||
Reference in New Issue
Block a user