codecamp

YurunDoc 调度类(ApiAgent)

目录

[TOC]

说明

不管使用跨域接口代理还是接口合并请求都需要通过这个类来调用。

命名空间

Yurun\ApiAgent\ApiAgent

属性

方法

ApiAgent::run

执行接口代理<br/>

定义: public static function run($mode, $config = null, $modeConfig = null)

参数:

名称 类型 描述
$mode string /
$config array ApiAgent配置,为空则读取配置文件
$modeConfig array 模式配置,为空则读取配置文件

返回值:

YurunDoc API文档
YurunDoc 跨域接口代理类(Cross)
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }