初始化
parent
5d1ff814ce
commit
fd8d7d611c
|
@ -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',
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
||||
},
|
||||
async gotoMaintained(customer){
|
||||
this.pay.subject=customer.sysIntro
|
||||
|
|
Loading…
Reference in New Issue