first commit
This commit is contained in:
commit
9399a88d39
347 files changed
+167716
No files matched your search
@@ -0,0 +1,25 @@
|
||||
(async () => {
|
||||
const out = { hasLib: typeof lib !== 'undefined', libKeys: typeof lib !== 'undefined' ? Object.keys(lib) : null };
|
||||
out.hasMtop = !!(typeof lib !== 'undefined' && lib.mtop && typeof lib.mtop.request === 'function');
|
||||
if (!out.hasMtop) return out;
|
||||
try {
|
||||
const r = await lib.mtop.request({
|
||||
api: 'mtop.alibaba.idle.seller.pc.datacompass.item.list',
|
||||
v: '1.0', type: 'POST', dataType: 'json',
|
||||
data: {
|
||||
tabType: 'all', dateRange: '', ms: '', dateType: 'recent7d',
|
||||
categoryInfoStr: '[]', itmName: '', itmId: '', isDpStk: '', mktActId: '',
|
||||
page: 1, pageSize: 3,
|
||||
},
|
||||
});
|
||||
out.ret = r && r.ret;
|
||||
const d = r && r.data && r.data.data;
|
||||
out.total = d && d.total;
|
||||
out.listLen = d && d.list && d.list.length;
|
||||
out.firstItem = d && d.list && d.list[0];
|
||||
out.topKeys = d ? Object.keys(d) : null;
|
||||
} catch (e) {
|
||||
out.error = String((e && e.message) || e);
|
||||
}
|
||||
return out;
|
||||
})()
|
||||
Reference in new issue
Block a user