提交 9dc4c047 编写于 作者: D DCloud_LXH

chore: api router

上级 193cb23a
......@@ -94,7 +94,7 @@ export default ({
if (Vue.$vuepress.$get('disableScrollBehavior')) {
return false;
}
const selector = decodeURIComponent(to.hash)
const selector = decodeURIComponent(to.hash.toLowerCase())
return new Promise((resolve, reject) => {
setTimeout(() => {
if (!mounted) mounted = true
......
import Vue from 'vue';
export const isServer = Vue.prototype.$isServer
export const hashRE = /#.*$/
export const extRE = /\.(md|html)$/
export const endingSlashRE = /\/$/
......
......@@ -197,6 +197,19 @@ uni.addInterceptor({
```
## API 列表
#### 基础
##### 日志打印
|API|说明|
|:-|:-|
|[日志打印](log)|向控制台打印日志信息|
|[定时器](timer)|在定时到期以后执行注册的回调函数|
|[uni.base64ToArrayBuffer](base64ToArrayBuffer)|将 Base64 字符串转成 ArrayBuffer 对象|
|[uni.arrayBufferToBase64](arrayBufferToBase64)|将 ArrayBuffer 对象转成 Base64 字符串|
|[应用级事件](/api/application)|监听应用事件|
|[拦截器](interceptor)|拦截 Api 等调用并执行回调|
|[全局API](global)|可全局调用 Api|
#### 网络
##### 发起请求
......@@ -576,6 +589,15 @@ uni.addInterceptor({
|[uni.onPush](plugins/push?id=onpush)|监听透传数据|
|[uni.offPush](plugins/push?id=offpush)|移除监听透传数据|
#### 广告
|API|说明|
|:-|:-|
|[激励视频广告](/api/a-d/rewarded-video.html)|激励视频广告,是cpm收益最高的广告形式|
|[全屏视频广告](/api/a-d/full-screen-video.html)|全屏视频广告|
|[内容联盟广告](/api/a-d/content-page.html)|内容联盟广告|
|[插屏广告](/api/a-d/interstitial.html)|插屏广告|
|[互动游戏](/api/a-d/interactive.html)|互动游戏是DCloud联合三方服务商为开发者提供新的广告场景增值服务|
#### 平台扩展
|API|说明|
......
......@@ -2,8 +2,8 @@
* 基础
* [日志打印](api/log.md)
* [定时器](api/timer.md)
* [uni.base64ToArrayBuffer](api/base64ToArrayBuffer?id=base64toarraybuffer)
* [uni.arrayBufferToBase64](api/arrayBufferToBase64?id=arraybuffertobase64)
* [uni.base64ToArrayBuffer](api/base64ToArrayBuffer.md)
* [uni.arrayBufferToBase64](api/arrayBufferToBase64.md)
* [生命周期](api/lifecycle.md)
* [应用级事件](api/application.md)
* [拦截器](api/interceptor.md)
......@@ -15,7 +15,7 @@
* [SocketTask](api/request/socket-task.md)
* [mDNS](api/request/mDNS.md)
* [UDP 通信](api/request/UDP.md)
* 路由与页面跳转
* [路由与页面跳转](/api/router)
* [uni.navigateTo](/api/router?id=navigateto)
* [uni.redirectTo](/api/router?id=redirectto)
* [uni.reLaunch](/api/router?id=relaunch)
......@@ -23,7 +23,7 @@
* [uni.navigateBack](/api/router?id=navigateback)
* [uni.preloadPage](/api/preload-page)
* [窗口动画](/api/router?id=animation)
* 数据缓存
* [数据缓存](/api/storage/storage)
* [uni.setStorage](/api/storage/storage?id=setstorage)
* [uni.setStorageSync](/api/storage/storage?id=setStorageSync)
* [uni.getStorage](/api/storage/storage?id=getStorage)
......@@ -74,7 +74,7 @@
* [设备方向](api/system/deviceMotion.md)
* [生物认证](api/system/authentication.md)
* [Worker](api/worker.md)
* 键盘
* [键盘](/api/key)
* [uni.hideKeyboard](/api/key?id=hidekeyboard)
* [uni.onKeyboardHeightChange](/api/key?id=onkeyboardheightchange)
* [uni.offKeyboardHeightChange](/api/key?id=offkeyboardheightchange)
......@@ -83,7 +83,7 @@
* [设置导航条](api/ui/navigationbar.md)
* [设置TabBar](api/ui/tabbar.md)
* [背景](api/ui/bgcolor.md)
* [动画](api/ui/animation?id=unicreateanimationobject)
* [动画](api/ui/animation)
* [滚动](api/ui/scroll)
* [窗口](api/ui/window.md)
* [宽屏适配](api/ui/adapt.md)
......@@ -99,7 +99,7 @@
* [页面](api/window/window.md)
* [页面通讯](api/window/communication.md)
* [subNVue原生子窗体](api/window/subNVues.md)
* 文件
* [文件](/api/file/file)
* [uni.saveFile](/api/file/file?id=savefile)
* [uni.getSavedFileList](/api/file/file?id=getSavedFileList)
* [uni.getSavedFileInfo](/api/file/file?id=getSavedFileInfo)
......
......@@ -11,7 +11,7 @@
|√|√|√|√|x|√|√|√|√|
#### uni.onKeyboardHeightChange(CALLBACK)
#### uni.onKeyboardHeightChange(CALLBACK) @onkeyboardheightchange
监听键盘高度变化
......@@ -35,7 +35,7 @@ uni.onKeyboardHeightChange(res => {
})
```
#### uni.offKeyboardHeightChange(CALLBACK)
#### uni.offKeyboardHeightChange(CALLBACK) @offkeyboardheightchange
取消监听键盘高度变化事件
......
......@@ -23,7 +23,7 @@ uni.setStorage({
});
```
#### uni.setStorageSync(KEY,DATA)
#### uni.setStorageSync(KEY,DATA) @setStorageSync
将 data 存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个同步接口。
**参数说明**
......@@ -41,7 +41,7 @@ try {
}
```
#### uni.getStorage(OBJECT)
#### uni.getStorage(OBJECT) @getStorage
从本地缓存中异步获取指定 key 对应的内容。
**OBJECT 参数说明**
......@@ -70,7 +70,7 @@ uni.getStorage({
});
```
#### uni.getStorageSync(KEY)
#### uni.getStorageSync(KEY) @getStorageSync
从本地缓存中同步获取指定 key 对应的内容。
**参数说明**
......@@ -92,7 +92,7 @@ try {
}
```
#### uni.getStorageInfo(OBJECT)
#### uni.getStorageInfo(OBJECT) @getStorageInfo
异步获取当前 storage 的相关信息。
**平台差异说明**
......@@ -129,7 +129,7 @@ uni.getStorageInfo({
});
```
#### uni.getStorageInfoSync()
#### uni.getStorageInfoSync() @getStorageInfoSync
同步获取当前 storage 的相关信息。
**平台差异说明**
......@@ -174,7 +174,7 @@ uni.removeStorage({
});
```
#### uni.removeStorageSync(KEY)
#### uni.removeStorageSync(KEY) @removeStorageSync
从本地缓存中同步移除指定 key。
**参数说明**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册