mirror of https://github.com/IoTcat/Ushio-js.git
parent
901042b5a8
commit
3ce3bceb05
1 changed files with 64 additions and 41 deletions
@ -1,44 +1,67 @@ |
|||||||
# Ushio-js |
# Ushio-js |
||||||
|
|
||||||
## 全局属性page |
Ushio front-end toolkit |
||||||
+ `page.fp`: 设备的fp |
|
||||||
+ `page.params`: GET参数 |
|
||||||
+ `page.fpKey`: fp校验码 |
|
||||||
+ `page.ip`: 客户端ip地址 |
|
||||||
+ `page.path`: 页面路径 |
|
||||||
+ `page.url`: 页面带参路径 |
|
||||||
+ `page.Timer`: 页面已打开时长 |
|
||||||
+ `page.openTime`:打开页面的时间戳 |
|
||||||
+ `page.title`: 页面标题 |
|
||||||
+ `page.host`: 目标主机名 |
|
||||||
+ `page.sid`: 会话id |
|
||||||
+ `page.timezone`: 时区 |
|
||||||
+ `page.timezoneOffset`: 时区校准参数 |
|
||||||
+ `page.platform`: 操作平台 |
|
||||||
+ `page.userAgent`: 用户代理 |
|
||||||
+ `page.language`: 客户端语言 |
|
||||||
+ `page.copyright.full`: 版权 |
|
||||||
|
|
||||||
## Block参数 |
|
||||||
+ `block_aplayer`: 不加载aplayer |
|
||||||
+ `block_viewport`: 不自动适配移动端 |
|
||||||
+ `block_tips`: 不加载Global Tips |
|
||||||
+ `aplayer_playlist`: 播放歌单 |
|
||||||
|
|
||||||
## Session方法 |
|
||||||
+ `session.set(index, val)`: 设置session |
|
||||||
+ `session.get(index)`: 获取session |
|
||||||
+ `session.del(index)`: 删除session |
|
||||||
|
|
||||||
## tips方法 |
|
||||||
[完全兼容izitoast](https://izitoast.marcelodolza.com/) |
|
||||||
+ `tips.show(params)`: 显示提示 |
|
||||||
+ `tips.info(params)`: 显示信息 |
|
||||||
+ `tips.success(params)`: 成功信息 |
|
||||||
+ `tips.warning(params)`: 警告信息 |
|
||||||
+ `tips.error(params)`: 错误信息 |
|
||||||
+ `tips.question(params)`: 问题 |
|
||||||
|
|
||||||
## jQuery |
|
||||||
+ `$.md5()`: 支持md5扩展 |
|
||||||
|
|
||||||
|
[简体中文(推荐)](./zh.md) |
||||||
|
|
||||||
|
## Positioning |
||||||
|
Ushio-js integrates a series of front-end services such as ushio-session, fp user agent recognition, [ushio user system](https://github.com/iotcat/ushio-auth), aplayer music control, tips pop-up window management, etc. Toolkit. ushio-js is referenced by all ushio supported websites. |
||||||
|
|
||||||
|
|
||||||
|
## Instructions |
||||||
|
|
||||||
|
### Global properties page |
||||||
|
+ `page.fp`: device fp |
||||||
|
+ `page.params`: GET parameters |
||||||
|
+ `page.fpObj`: parameter of fp |
||||||
|
+ `page.ip`: client ip address |
||||||
|
+ `page.path`: page path |
||||||
|
+ `page.url`: page with parameter path |
||||||
|
+ `page.Timer`: the length of time the page has been opened |
||||||
|
+ `page.openTime`: the timestamp of the open page |
||||||
|
+ `page.title`: page title |
||||||
|
+ `page.host`: target hostname |
||||||
|
+ `page.sid`: session id |
||||||
|
+ `page.timezone`: time zone |
||||||
|
+ `page.timezoneOffset`: Time zone calibration parameter |
||||||
|
+ `page.platform`: operating platform |
||||||
|
+ `page.userAgent`: user agent |
||||||
|
+ `page.language`: client language |
||||||
|
+ `page.copyright.full`: copyright |
||||||
|
+ `page.auth[]`: authentication information required for the page |
||||||
|
+ `page.availableScreenResolution`: Available screen size |
||||||
|
+ `page.deviceMemory`: device memory |
||||||
|
+ `page.group[]`: page requirements for user groups |
||||||
|
+ `page.lang[]`: the language the user knows |
||||||
|
+ `page.mask`: page mask information |
||||||
|
+ `page.nolang[]`: a language that the user does not recognize |
||||||
|
+ `page.proj`: github project address corresponding to the page |
||||||
|
+ `page.tran`: Translation related methods |
||||||
|
+ `page.showUshio()`: Show Ushio menu |
||||||
|
|
||||||
|
|
||||||
|
### Page setting parameters |
||||||
|
+ `block_aplayer`: do not load aplayer |
||||||
|
+ `block_viewport`: does not automatically adapt to mobile |
||||||
|
+ `block_tips`: Do not load Global Tips |
||||||
|
+ `aplayer_playlist`: play list |
||||||
|
+ `block_setting`: Do not display the setting gear |
||||||
|
+ `lang[]`: Languages supported by the page |
||||||
|
+ `allow_no_cookie`: Allow cookieless operation |
||||||
|
|
||||||
|
### Session method |
||||||
|
+ `session.set(index, val)`: set session |
||||||
|
+ `session.get(index)`: Get session |
||||||
|
+ `session.del(index)`: delete session |
||||||
|
|
||||||
|
### tips method |
||||||
|
[Fully compatible with izitoast](https://izitoast.marcelodolza.com/) |
||||||
|
+ `tips.show(params)`: show tips |
||||||
|
+ `tips.info(params)`: display information |
||||||
|
+ `tips.success(params)`: success information |
||||||
|
+ `tips.warning(params)`: warning message |
||||||
|
+ `tips.error(params)`: error message |
||||||
|
+ `tips.question(params)`: question |
||||||
|
|
||||||
|
### jQuery |
||||||
|
+ `$.md5()`: Support md5 extension |
||||||
|
Loading…
Reference in new issue