|
|
@@ -0,0 +1,677 @@
|
|
|
+import {copy, danxiangdinge_index, danxiangdinge_index_djcs, renameDingE, extractFuzhu, match_target, azfy, xsazfy, tjazfy, addChildren} from './utils';
|
|
|
+import { v4 as uuidv4 } from 'uuid';
|
|
|
+class SimpleService{
|
|
|
+
|
|
|
+ constructor() {
|
|
|
+ this.footprint = [];
|
|
|
+ this.cache = [];
|
|
|
+ this.memory = [];
|
|
|
+ this.mem_pointer = -1;
|
|
|
+ this.cache_djcs = [];
|
|
|
+ this.memory_djcs = [];
|
|
|
+ this.mem_pointer_djcs = -1;
|
|
|
+ this.qufei = [];
|
|
|
+ this.qufeiEntry = null;
|
|
|
+ this.jiagongcai = [];
|
|
|
+ this.mapper={
|
|
|
+ '99090513' : ['汽车式起重机 50t', 2838.92],
|
|
|
+ '99090509' : ['汽车式起重机 25t', 1174.12],
|
|
|
+ '99090111': ['履带式起重机 提升质量50t', 1755.71],
|
|
|
+ '99090108': ['履带式起重机 提升质量25t', 904.68],
|
|
|
+ '99030306': ['静力压桩机 压力1200kN', 1508.23],
|
|
|
+ '99030124': ['轨道式柴油打桩机 冲击质量2.5t', 1143.91],
|
|
|
+ '99030106' : ['履带式柴油打桩机 冲击质量7t', 2545.82],
|
|
|
+ '10450518' : ['纯铝箔 140×140', 0.35],
|
|
|
+ '10450508' : ['纯银箔 93.3×93.3', 4.5],
|
|
|
+ '04050101' : ['道碴 40~80mm', 47],
|
|
|
+ '04034103' : ['石屑(米砂)', 40]
|
|
|
+ };
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ ip() {
|
|
|
+ //return "/api"//return "http://127.0.0.1:8000"
|
|
|
+ return "http://127.0.0.1:1313/api"
|
|
|
+ }
|
|
|
+
|
|
|
+ clearCache() {//set qufei will clear cache
|
|
|
+ this.cache = [];
|
|
|
+ this.footprint= [];
|
|
|
+ this.memory = [];
|
|
|
+ this.mem_pointer = -1;
|
|
|
+ this.cache_djcs = [];
|
|
|
+ this.memory_djcs = [];
|
|
|
+ this.mem_pointer_djcs = -1;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ async uploadFile(fd) {
|
|
|
+ const response = await fetch(this.ip().concat( "/upload/"), {
|
|
|
+ method : "POST",
|
|
|
+ body : fd
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async generateQufei(name) {
|
|
|
+ const response = await fetch(this.ip().concat("/qufei/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body : JSON.stringify({
|
|
|
+ "name": name
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generateOutline2(name) {
|
|
|
+ const response = await fetch(this.ip().concat( "/outline2"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body : JSON.stringify({
|
|
|
+ "name": name
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ async generateDetail2(name) {
|
|
|
+ const response = await fetch(this.ip().concat("/detail2"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body : JSON.stringify({
|
|
|
+ "name": name
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async generateBaojiahuizong2(name, id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/baojiahuizong2/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ name: name,
|
|
|
+ id : id
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async generateGuifeishuijin2(name, id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/guifeishuijin2/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ name: name,
|
|
|
+ id: id
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ async generateQitaxiangmu2(name, id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/qitaxiangmu2/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ name: name,
|
|
|
+ id : id
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async generateZygczgj(name, id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/zygczgj/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ name: name,
|
|
|
+ id : id
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ async generateZongchengbaofuwufei2(name, id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/zongchengbaofuwufei2/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ name: name,
|
|
|
+ id: id
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async generateFabaorengongyingcailiao2(name, id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/fabaorengongyingcailiao2/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ name: name,
|
|
|
+ id : id
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ async generateJirigong2(name, id) {
|
|
|
+ const response = await fetch(this.ip().concat("/jirigong2/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ name: name,
|
|
|
+ id: id
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ async generateZanliejine2(name, id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/zanliejine2/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ name: name,
|
|
|
+ id: id
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async generateQingdanxiangmu2(name, id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/qingdanxiangmu2/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ name: name,
|
|
|
+ id: id
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async searchDe(zhuanye, text) {
|
|
|
+ const response = await fetch(this.ip().concat( "/searchde/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ zhuanye: zhuanye,
|
|
|
+ text: text
|
|
|
+ })
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /////////////////////////////////////qingdan//////////////////////////////////////
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/////////////////////////////end of qingdan////////////////////////////////////
|
|
|
+
|
|
|
+async generateQingdanTuijian(name, bh, bt, bm) {
|
|
|
+ const response = await fetch(this.ip().concat( "/qingdantuijian/".concat(bm)), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+}
|
|
|
+ async generateZjcs(name, bh) {
|
|
|
+ const response = await fetch(this.ip().concat( "/zjcs/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify(
|
|
|
+ {
|
|
|
+ "bh": bh,
|
|
|
+ "name": name
|
|
|
+ }
|
|
|
+ )
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ async generateFiles2() {
|
|
|
+ const response = await fetch(this.ip().concat( "/files2/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async deleteFiles(id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/deleteFile/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify(
|
|
|
+ {
|
|
|
+ "name": id,
|
|
|
+
|
|
|
+ }
|
|
|
+ )
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async generatePeibiXilie(id, zhuanye) {
|
|
|
+ const response = await fetch(this.ip().concat( "/pbxl/").concat(id).concat('/').concat(zhuanye.toString()), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generateJixieXilie(id, zhuanye) {
|
|
|
+ const response = await fetch(this.ip().concat( "/jxxl/").concat(id).concat('/').concat(zhuanye.toString()), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generateCailiaoXilie(id, zhuanye) {
|
|
|
+ const response = await fetch(this.ip().concat( "/clxl/").concat(id).concat('/').concat(zhuanye.toString()), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generatePeibishu(zhuanye) {
|
|
|
+
|
|
|
+ const response = await fetch(this.ip().concat( "/pbs/").concat(zhuanye.toString()), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generateJixieshu(zhuanye) {
|
|
|
+
|
|
|
+ const response = await fetch(this.ip().concat( "/jxs/").concat(zhuanye.toString()), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generateCailiaoshu(zhuanye) {
|
|
|
+
|
|
|
+ const response = await fetch(this.ip().concat( "/cls/").concat(zhuanye.toString()), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generateDingeshu(value) {
|
|
|
+
|
|
|
+ const response = await fetch(this.ip().concat( "/des/").concat(value.toString()), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generateDingeXilie(value, id) {//定额书的一个栏目的所有具体定额
|
|
|
+ const response = await fetch(this.ip().concat("/dexilie/").concat(value.toString()).concat("/").concat(id), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generateSingleDingeXilie(zhuanye, debh, mc) {//清单页面展示用
|
|
|
+ const response = await fetch(this.ip().concat( "/singledexilie/").concat(zhuanye.toString()).concat("/").concat(debh).concat("/").concat(encodeURIComponent(mc.replace(/\//g, ''))), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ async generateSingleDingeXilie2(zhuanye, debh) {//清单页面展示用
|
|
|
+ const response = await fetch(this.ip().concat( "/singledexilie2/").concat(zhuanye.toString()).concat("/").concat(debh.replace(/\//g, '')), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ async generateJiagongcai(name) {
|
|
|
+ const response = await fetch(this.ip().concat( "/jiagongcai/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify(
|
|
|
+ {
|
|
|
+
|
|
|
+ "name": name
|
|
|
+ }
|
|
|
+ )
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ async applyFL(id, data) {
|
|
|
+ const response = await fetch(this.ip().concat( "/applyFL/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify(
|
|
|
+ {
|
|
|
+ "id": id,
|
|
|
+ "name": JSON.stringify(data)
|
|
|
+ }
|
|
|
+ )
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async download(id) {
|
|
|
+ const response = await fetch(this.ip().concat( "/download/").concat(id.toString()));
|
|
|
+
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.blob();
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ async updateZjcs(biao_id, bh, row) {
|
|
|
+
|
|
|
+ const response = await fetch(this.ip().concat( "/updatezjcs/"), {
|
|
|
+ method : "POST",
|
|
|
+ headers: {
|
|
|
+ "Content-type": "application/json"
|
|
|
+ },
|
|
|
+ body: JSON.stringify(
|
|
|
+ {
|
|
|
+ "biao_id": biao_id,
|
|
|
+ "bh": bh,
|
|
|
+ 'mc': row['名称'].toString(),
|
|
|
+ 'fl': row['费率'].toString()
|
|
|
+
|
|
|
+ }
|
|
|
+ )
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async cankao() { //参考费率
|
|
|
+
|
|
|
+ const response = await fetch(this.ip().concat( "/cankao/"), {
|
|
|
+ method : "GET",
|
|
|
+
|
|
|
+ });
|
|
|
+ if (!response.ok) {
|
|
|
+ //const error = await response.json();
|
|
|
+ console.error('error');
|
|
|
+ } else {
|
|
|
+ const data = await response.json();
|
|
|
+
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+export default new SimpleService();
|