|  |  |  | 
|---|
|  |  |  | * 通用js | 
|---|
|  |  |  | */ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var debugHost='www.baidu.com'; | 
|---|
|  |  |  | var debugHost='taiyan'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // api地址,请求参数,回调函数,是否遮罩 | 
|---|
|  |  |  | function request(params) { | 
|---|
|  |  |  | 
|---|
|  |  |  | method: "POST", | 
|---|
|  |  |  | header: { | 
|---|
|  |  |  | 'content-type': 'application/json', | 
|---|
|  |  |  | 'debugHost':debugHost | 
|---|
|  |  |  | //  'host':'www.jyymatrix.cc' | 
|---|
|  |  |  | //'debugHost':debugHost, | 
|---|
|  |  |  | 'companyCode':'debugHost' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data: {}, | 
|---|
|  |  |  | success: function(res) { | 
|---|
|  |  |  | 
|---|
|  |  |  | method: option.method, | 
|---|
|  |  |  | header: { | 
|---|
|  |  |  | 'content-type': 'application/json', | 
|---|
|  |  |  | 'debugHost':debugHost, | 
|---|
|  |  |  | 'companyCode':debugHost, | 
|---|
|  |  |  | 'token': getApp().loginToken | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data: data, | 
|---|
|  |  |  | 
|---|
|  |  |  | header: { | 
|---|
|  |  |  | "Content-Type": "multipart/form-data", | 
|---|
|  |  |  | 'token': res.data, | 
|---|
|  |  |  | 'debugHost':debugHost | 
|---|
|  |  |  | 'companyCode':debugHost | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | formData: formData, | 
|---|
|  |  |  | success: function(e) { | 
|---|
|  |  |  | 
|---|
|  |  |  | method: "POST", | 
|---|
|  |  |  | header: { | 
|---|
|  |  |  | 'content-type': 'application/json', | 
|---|
|  |  |  | 'debugHost':debugHost | 
|---|
|  |  |  | 'companyCode':debugHost | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data: {}, | 
|---|
|  |  |  | success: function(res) { | 
|---|