1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- //基本配置项
- const base = {
- debug: false
- }
- const im = {
- host : 'ws://he.shemic.com:8282'
- }
- const share = {
- host : 'https://he.shemic.com/package/share/?l=api.'
- }
- //http request请求配置
- const request = {
- // 服务器接口地址
- host: "https://he.shemic.com/",
- //host: "http://192.168.33.10/dreamland/",
-
- // 请求的参数
- data: {},
- // 设置请求的 header,header 中不能设置 Referer。
- header: {'content-type': 'application/x-www-form-urlencoded'},
- // (需大写)有效值:OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
- method: "POST",
- // json 如果设为json,会尝试对返回的数据做一次 JSON.parse
- dataType: "json",
- // text 设置响应的数据类型。合法值:text、arraybuffer 1.7.0
- responseType: "text",
- // 收到开发者服务成功返回的回调函数
- success() {},
- // 接口调用失败的回调函数
- fail() {},
- // 接口调用结束的回调函数(调用成功、失败都会执行)
- complete() {},
- }
- //上传配置
- const upload = {
- url: request.host + 'package/upload/?l=save.start&key=6',
- name: 'file',
- }
- //后端服务列表
- const server = {
- }
- export default {
- base,
- request,
- server,
- upload,
- im,
- share,
- }
|