mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-11 23:59:56 +08:00
feat: add route for uniqlo styling book - woman (#4585)
This commit is contained in:
@@ -83,9 +83,9 @@ For instance, in https://www.leboncoin.fr/recherche/?**category=10&locations=Par
|
|||||||
### 最新商品
|
### 最新商品
|
||||||
|
|
||||||
<Route author="MeXunco" example="/wineyun/home" path="/wineyun/:category" :paramsDesc="['分类名']" >
|
<Route author="MeXunco" example="/wineyun/home" path="/wineyun/:category" :paramsDesc="['分类名']" >
|
||||||
| 全部 | 闪购 | 秒发 | 跨境 | 尾货专场 |
|
| 全部 | 闪购 | 秒发 | 跨境 | 尾货专场 |
|
||||||
| -------- | ------- | --- | ------- | ------ |
|
| ---- | ------- | ------ | -------- | -------- |
|
||||||
| home | shangou | miaofa | csborder | weihuo |
|
| home | shangou | miaofa | csborder | weihuo |
|
||||||
|
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
@@ -235,6 +235,16 @@ For instance, in https://www.leboncoin.fr/recherche/?**category=10&locations=Par
|
|||||||
|
|
||||||
<Route author="HenryQW" example="/ikea/uk/offer" path="/ikea/uk/offer"/>
|
<Route author="HenryQW" example="/ikea/uk/offer" path="/ikea/uk/offer"/>
|
||||||
|
|
||||||
|
## 优衣库
|
||||||
|
|
||||||
|
### Stylingbook
|
||||||
|
|
||||||
|
<Route author="LunaXu" example="/uniqlo/stylingbook/women" path="/uniqlo/stylingbook/:category?" :paramsDesc="['类别']">
|
||||||
|
| 女式 | 男式 | 小孩 | 婴儿 |
|
||||||
|
| ----- | ---- | ---- | ---- |
|
||||||
|
| women | men | kids | baby |
|
||||||
|
</Route>
|
||||||
|
|
||||||
## 有赞
|
## 有赞
|
||||||
|
|
||||||
### 商品上新
|
### 商品上新
|
||||||
|
|||||||
@@ -2598,6 +2598,9 @@ router.get('/axis-studios/:type/:tag?', require('./routes/axis-studios/work'));
|
|||||||
// 人民邮电出版社
|
// 人民邮电出版社
|
||||||
router.get('/ptpress/book/:type?', require('./routes/ptpress/book'));
|
router.get('/ptpress/book/:type?', require('./routes/ptpress/book'));
|
||||||
|
|
||||||
|
// uniqlo styling book
|
||||||
|
router.get('/uniqlo/stylingbook/:category?', require('./routes/uniqlo/stylingbook'));
|
||||||
|
|
||||||
// 本地宝焦点资讯
|
// 本地宝焦点资讯
|
||||||
router.get('/bendibao/news/:city', require('./routes/bendibao/news'));
|
router.get('/bendibao/news/:city', require('./routes/bendibao/news'));
|
||||||
|
|
||||||
|
|||||||
24
lib/routes/uniqlo/stylingbook.js
Normal file
24
lib/routes/uniqlo/stylingbook.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
const got = require('@/utils/got');
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const category = ctx.params.category ? ctx.params.category : 'women';
|
||||||
|
const url = `https://style.uniqlo.com/api/v2/styleSearch.json?dptId=${category}&lang=en&limit=50&locale=my&offset=0`;
|
||||||
|
|
||||||
|
const response = await got({
|
||||||
|
method: 'get',
|
||||||
|
url: url,
|
||||||
|
});
|
||||||
|
|
||||||
|
const data = response.data.result.styles;
|
||||||
|
|
||||||
|
ctx.state.data = {
|
||||||
|
title: `Uniqlo styling book`,
|
||||||
|
link: `https://www.uniqlo.com/my/stylingbook/pc/${category}`,
|
||||||
|
description: `Uniqlo styling book`,
|
||||||
|
item: data.map((item) => ({
|
||||||
|
title: item.styleId,
|
||||||
|
description: `<img src="${item.styleImgUrl}">`,
|
||||||
|
link: `https://www.uniqlo.com/my/stylingbook/pc/style/` + item.styleId,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user