mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
增加: 探物 (#1060)
This commit is contained in:
@@ -2195,3 +2195,7 @@ IATA 国际航空运输协会机场代码, 参见[维基百科 国际航空运
|
||||
### 搜狗
|
||||
|
||||
<route name="搜狗特色LOGO" author="xyqfer" example="/sogou/doodles" path="/sogou/doodles"/>
|
||||
|
||||
### 探物
|
||||
|
||||
<route name="产品" author="xyqfer" example="/tanwu/products" path="/tanwu/products"/>
|
||||
|
||||
@@ -752,4 +752,7 @@ router.get('/hko/weather', require('./routes/hko/weather'));
|
||||
// sankakucomplex
|
||||
router.get('/sankakucomplex/post', require('./routes/sankakucomplex/post'));
|
||||
|
||||
// 探物
|
||||
router.get('/tanwu/products', require('./routes/tanwu/products'));
|
||||
|
||||
module.exports = router;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
const axios = require('../../utils/axios');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'https://api.tanwuapp.com/iOS/2.0.0/products?rentType=0&pageSize=1000&pageNum=1&clientType=web:h5',
|
||||
});
|
||||
|
||||
const data = response.data.details.allProductList.data;
|
||||
|
||||
ctx.state.data = {
|
||||
title: '探物',
|
||||
link: 'https://m.tanwuapp.com',
|
||||
description: '探物是一个科技数码产品租赁平台,旨在把市面上最新、最酷、最实用的科技产品带去给用户,传播科技便捷生活、共享丰富生活的价值理念。',
|
||||
item: data.map(({ productName, productImageSrc, productRent, rentUnit, productId, appraiseAvgScore }) => ({
|
||||
title: productName,
|
||||
link: `https://m.tanwuapp.com/?source=mobile#/productDetails?productId=${productId}`,
|
||||
description: `
|
||||
<img referrerpolicy="no-referrer" src="${productImageSrc}"><br>
|
||||
<strong>${productName}</strong><br><br>
|
||||
价格: ¥${productRent} / ${rentUnit}<br>
|
||||
评分: ${appraiseAvgScore}
|
||||
`,
|
||||
guid: productId,
|
||||
})),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user