Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
目前有两个待确定的问题: - `channel` 参数是可选的,如果后面跟上的`site` 也是可选的会影响到前面的逻辑,所以暂时先用`query`参数(`?site=big5`)代替了。全局搜了下发现`query`参数好像只在中间件里用到,有些担心会冲突或者破坏一些先前约定什么的,这里需要请教下看看有啥更好的参数设计方案不 - 测试的时候网络有点小坑,没能完全测试完,方便的话麻烦看下繁体输出的会不会有问题 以上
- Loading branch information
Showing
5 changed files
with
65 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const utils = require('./utils'); | ||
|
||
module.exports = async (ctx) => { | ||
ctx.state.data = await utils.getData({ | ||
site: ctx.params.language === 'chinese' ? 'www' : 'big5', | ||
channel: ctx.params.channel, | ||
}); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters