From fd8d7d611cda5f1e1377b4a04a912ee2e43d3697 Mon Sep 17 00:00:00 2001 From: Wang YiHang <3060234389@qq.com> Date: Sun, 8 Sep 2024 16:28:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api/api.js | 8 +++++ src/api/firminfo/firminfo.js | 6 ++++ src/views/firminfo/firminfo/index.vue | 2 +- src/views/market/apitype/index.vue | 47 ++++++++++++++++++++------- 4 files changed, 50 insertions(+), 13 deletions(-) diff --git a/src/api/api/api.js b/src/api/api/api.js index 2b3e27f..337bf53 100644 --- a/src/api/api/api.js +++ b/src/api/api/api.js @@ -1,5 +1,13 @@ import request from '@/utils/request' + +export function addOrUpd(data) { + return request({ + url: '/market/api/addOrUpd', + method: 'post', + data: data + }) +} export function upd(data) { return request({ url: '/market/api/upd', diff --git a/src/api/firminfo/firminfo.js b/src/api/firminfo/firminfo.js index 58d2cc2..24c823e 100644 --- a/src/api/firminfo/firminfo.js +++ b/src/api/firminfo/firminfo.js @@ -1,5 +1,11 @@ import request from '@/utils/request' +export function upddata(data) { + return request({ + url: '/market/firminfo/upd/'+data, + method: 'post' + }) +} export function edit(data) { return request({ diff --git a/src/views/firminfo/firminfo/index.vue b/src/views/firminfo/firminfo/index.vue index dce25dd..3624e43 100644 --- a/src/views/firminfo/firminfo/index.vue +++ b/src/views/firminfo/firminfo/index.vue @@ -87,7 +87,7 @@ export default { const url = `http://10.0.2.1:8080/market/alipay/pay?subject=${this.pay.subject}&totalAmount=${this.pay.totalAmount}`; pay(this.pay).then(res=>{ console.log(res) - window.open(url, '_self'); + //window.open(url, '_self'); if(200==res.code){ this.firminfo.firmId=this.firminfoForm.firmId this.firminfo.firmScore=this.pay.totalAmount diff --git a/src/views/market/apitype/index.vue b/src/views/market/apitype/index.vue index dd56165..c13be5e 100644 --- a/src/views/market/apitype/index.vue +++ b/src/views/market/apitype/index.vue @@ -144,9 +144,25 @@ {{apimsg.sysSerial}} + 申请 + + + + + + + + 取 消 + 确 定 + + + @@ -155,6 +171,8 @@ import { listApitype, getApitype, delApitype, addApitype, updateApitype } from " import {getAirQuality, pay} from "../../../api/market/apitype"; import * as url from "url"; import {listMsg} from "../../../api/reqmsg/msg"; +import {addOrUpd} from "../../../api/api/api"; +import {upddata} from "../../../api/firminfo/firminfo"; export default { name: "Apitype", @@ -208,13 +226,26 @@ export default { apimsg:{}, reqmsg:[], reqmsgs:{}, - + apiQueryParams:{}, + Layout:"", }; }, created() { this.getList(); }, methods: { + buy(){ + this.Layout=this.apiQueryParams.myNum*this.apimsg.sysNumber + upddata(this.Layout).then(res=>{ + if (res.code==200){ + addOrUpd(this.apiQueryParams).then(res=>{ + console.log(res) + this.dialogVisible=false + location.reload() + }) + } + }) + }, getreqmsg(){ listMsg(this.reqmsgs).then(res=>{ this.reqmsg=res.data.rows @@ -222,6 +253,7 @@ export default { }) }, jkwd(customer){ + this.apiQueryParams.apiId=customer.sysId this.reqmsgs.sysId=customer.sysId this.sysId=customer.sysId this.apimsg=customer @@ -232,17 +264,8 @@ export default { this.dialogVisible=true }, test(){ - getAirQuality(this.sysId,this.unkownvalue).then(response =>{ - console.log(response) - this.jsonData=response - if(response.reason!=null){ - this.jsonData=response.reason - } - if(response.result!=null){ - this.jsonData=response.result - } - this.dialogVisible=true - }) + this.dialogVisible=true + }, async gotoMaintained(customer){ this.pay.subject=customer.sysIntro