初始化

master
法外狂徒张三 2024-09-08 16:28:10 +08:00
parent 5d1ff814ce
commit fd8d7d611c
4 changed files with 50 additions and 13 deletions

View File

@ -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',

View File

@ -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({

View File

@ -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

View File

@ -144,9 +144,25 @@
<el-form-item label="返回报文" prop="pass">
<span>{{apimsg.sysSerial}}</span>
</el-form-item>
<el-button @click="test()"></el-button>
</el-form>
</el-dialog>
<el-dialog
title="申请"
:visible.sync="dialogVisible"
width="30%">
<el-form :model="apiQueryParams" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="次数" prop="pass">
<el-input v-model="apiQueryParams.myNum" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="buy()"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -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