diff --git a/src/api/market/orders.js b/src/api/market/orders.js index bcd8bbb..97669c5 100644 --- a/src/api/market/orders.js +++ b/src/api/market/orders.js @@ -71,9 +71,6 @@ export function getOut(){ export function updateByordersState1(data){ return request({ - - - url:"/market/orders/updateByordersState1", method: "POST", data: data diff --git a/src/views/market/apitest/index.vue b/src/views/market/apitest/index.vue index 583ca05..008fd34 100644 --- a/src/views/market/apitest/index.vue +++ b/src/views/market/apitest/index.vue @@ -286,7 +286,7 @@ 取 消 - 确 定 + 确 定 @@ -307,8 +307,9 @@ import { } from "@/api/apitest/apitest"; import api from "js-cookie"; import {companyauthentication, ifcompanyauthentication} from "@/api/authentication/authentication"; -import {selectproductspecification} from "@/api/market/product"; +import { selectproductspecification, showByproductId } from '@/api/market/product' import myapi from "@/views/market/myapi/index.vue"; +import { addordersup, updateOrders } from '@/api/market/orders' export default { name: "Apitest", @@ -327,9 +328,12 @@ export default { activeName: 'first', dialogVisible: false, dialogVisible1: false, + productInfo: null, ruleForm:{}, tableData:[], newapi:{}, + products: [], + orders: [], //请求头部 heanderData:[], //请求参数 @@ -550,15 +554,36 @@ export default { }); }}, confirmSelection(row) { - if (this.selectedRow) { + if (this.selectedRow) { // 这里假设你有一个发起支付的方法,传入所选行的数据 // startPayment(this.selectedRow); console.log(row) window.open("http://21.12.0.10:80/prod-api/market/alipay/pay?ordersPrice=" + row.middlePrice) this.$message.success('付款成功') - } + showByproductId(row).then( + res =>{ + this.$message.success(res.msg) + } + ), + showByproductId().then( + response => { + this.productInfo = response.data; + const orderData = { + ordersProduct:this.productInfo.productId, + productName: this.productInfo.productName, + ordersPrice: this.productInfo.productPrice, + ordersSpecification : this.productInfo.productSpecification + }; + return addordersup(orderData); + if (response.code==200){} + this.addordersoff=false + }).then(() => { + this.$message.success('订单添加成功'); + }) + location.reload(); + } }, show(){ diff --git a/src/views/market/orders/index.vue b/src/views/market/orders/index.vue index 3e43b71..75eded5 100644 --- a/src/views/market/orders/index.vue +++ b/src/views/market/orders/index.vue @@ -78,6 +78,7 @@