1.31 财务分析,财务数据模块完善,产业链桑基图展示
This commit is contained in:
1
unpackage/dist/build/mp-weixin/request/http.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/request/http.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../common/vendor.js");let o="";o="https://api.valuefrontier.cn:5002",exports.get=function(t,n,i){return new Promise(((a,r)=>{let d=e.index.getStorageSync("token");e.index.showLoading({title:"加载中"});let s=o;i&&(s="https://api.valuefrontier.cn"),e.index.request({url:s+t,data:n,header:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded",Authorization:d?"Bearer "+d:""},method:"GET",success:o=>{console.log(o),e.index.hideLoading(),401==o.data.code?(e.index.removeStorageSync("token"),e.index.navigateTo({url:"/pages/login/login"})):a(o.data)},fail:o=>{e.index.hideLoading(),e.index.showToast({title:"请求失败",icon:"error"}),r(o.response)}})}))},exports.getBaseURL1=function(){return"https://valuefrontier.cn"},exports.post=function(t,n,i){return new Promise(((i,a)=>{let r=e.index.getStorageSync("token"),d=0,s=0;if(n&&(d=n.isJson),n&&(s=n.isFile),e.index.showLoading({title:"加载中"}),s){let r=e.index.getStorageSync("token");e.index.uploadFile({url:o+t,filePath:n.avatar,name:"avatar",header:{Authorization:r?"Bearer "+r:""},formData:n,success:o=>{console.log(o),e.index.hideLoading(),401==o.data.code?(e.index.removeStorageSync("token"),e.index.navigateTo({url:"/pages/login/login"}),a(o.data)):i(o.data)},fail:o=>{console.log("上传失败"+o.errMsg),e.index.hideLoading(),e.index.showToast({title:"请求失败",icon:"error"}),a()}})}else{let l=o;(t.indexOf("concept-api")>-1||t.indexOf("api/market/trade/batch")>-1)&&(l="https://api.valuefrontier.cn"),e.index.request({url:l+t,data:n,header:{Accept:"application/json","Content-Type":d?"application/json":s?"multipart/form-data":"application/x-www-form-urlencoded",Authorization:r?"Bearer "+r:""},method:"POST",success:o=>{e.index.hideLoading(),n&&n.isNotNeedLogin||(console.log(o.data),401==o.data.code?(e.index.removeStorageSync("token"),e.index.navigateTo({url:"/pages/login/login"}),a(o.data)):i(o.data))},fail:o=>{e.index.hideLoading(),e.index.showToast({title:"请求失败",icon:"error"}),a(o.response)}})}}))};
|
||||
Reference in New Issue
Block a user