Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
|
a5e8a318a7 | |
|
4af2830df2 | |
|
4f93e1b315 | |
|
5b6492c571 | |
|
6e8f457939 | |
|
35b1390c90 |
|
@ -71,11 +71,8 @@ export function getOut(){
|
|||
|
||||
export function updateByordersState1(data){
|
||||
return request({
|
||||
|
||||
|
||||
|
||||
url:"/market/orders/updateByordersState1",
|
||||
method: "POST",
|
||||
method: "GET",
|
||||
data: data
|
||||
})}
|
||||
|
||||
|
|
|
@ -130,20 +130,38 @@
|
|||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<el-form-item label="返回参数说明:">
|
||||
|
||||
{{myapi.productContent}}
|
||||
</el-form-item>
|
||||
<el-form-item label="JSON返回示例:">
|
||||
|
||||
<div style="width: 80px ; height: 30px; " ></div>
|
||||
{{myapi}}
|
||||
</el-form-item>
|
||||
<el-form-item label="XML返回示例:">
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="错误码参照" name="second">错误码参照</el-tab-pane>
|
||||
<el-tab-pane label="错误码参照" name="second">
|
||||
错误码参照
|
||||
<el-table
|
||||
:data="errCode"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="code"
|
||||
label="错误码"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="message"
|
||||
label="错误描述"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="mesg"
|
||||
label="解决方案">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="数据统计" name="third">数据统计</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div></el-col>
|
||||
|
@ -286,7 +304,7 @@
|
|||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click=" confirmSelection(row)">确 定</el-button>
|
||||
<el-button type="primary" @click="confirmSelection(newapi)">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
@ -307,8 +325,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,14 +346,46 @@ export default {
|
|||
activeName: 'first',
|
||||
dialogVisible: false,
|
||||
dialogVisible1: false,
|
||||
productInfo: null,
|
||||
ruleForm:{},
|
||||
tableData:[],
|
||||
newapi:{},
|
||||
products: [],
|
||||
orders: [],
|
||||
//请求头部
|
||||
heanderData:[],
|
||||
//请求参数
|
||||
requestData:[]
|
||||
requestData:[],
|
||||
errCode:[
|
||||
{
|
||||
code:'10000',
|
||||
message:'服务调用成功',
|
||||
mesg:'服务调用成功,不返回 subCode 和 subMessage'
|
||||
}, {
|
||||
code:'20000',
|
||||
message:'服务不可用',
|
||||
mesg:'错误信息详情查看错误码'
|
||||
}, {
|
||||
code:'40002',
|
||||
message:'提示无效签名,isv.invalid-signature等字样',
|
||||
mesg:'可查看 自助排查签名验签问题。'
|
||||
}, {
|
||||
code:'40006',
|
||||
message:'isv.insufficient-isv-permissions',
|
||||
mesg:'1.请联系IoT开放平台技术支持,并提供 IoT 开放平台上应用的 APPID。\n' +
|
||||
'2.请联系IoT开放平台技术支持添加白名单。'
|
||||
}, {
|
||||
code:'E70201',
|
||||
message:'system error',
|
||||
mesg:'系统错误,请联系IoT开放平台技术支持协助解决。'
|
||||
}, {
|
||||
code:'E70202',
|
||||
message:'invalid parameter',
|
||||
mesg:'\t\n' +
|
||||
'系统入参检查失败,请联系IoT开放平台技术支持。'
|
||||
}, ]
|
||||
};
|
||||
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
computed: {},
|
||||
|
@ -426,6 +477,7 @@ export default {
|
|||
productPrice: row.middlePrice,
|
||||
productContent:this.myapi.productContent,
|
||||
}
|
||||
|
||||
},
|
||||
//测试发送请求 无参数
|
||||
noForm(ruleForm){
|
||||
|
@ -550,15 +602,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(){
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="订单款项状态" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==0">待支付</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==1">已付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==2">未付款</span>
|
||||
|
@ -161,11 +162,14 @@ import {
|
|||
ordersDelete,
|
||||
pay,
|
||||
getOut,
|
||||
updateByeExist, updateByordersState1
|
||||
updateByeExist,
|
||||
updateByordersState1
|
||||
} from '@/api/market/orders'
|
||||
import { diGui } from "@/api/market/orders";
|
||||
import axios from 'axios'
|
||||
import item from '@/layout/components/Sidebar/Item.vue'
|
||||
import { showByproductId } from '@/api/market/product'
|
||||
import product from '@/views/market/product/index.vue'
|
||||
|
||||
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
|
@ -182,7 +186,8 @@ export default {
|
|||
pageNum:1,
|
||||
pageSize:10,
|
||||
total:1,
|
||||
typeId:0
|
||||
ordersId:3,
|
||||
productId:3
|
||||
},
|
||||
arr:[],
|
||||
type:[],
|
||||
|
@ -196,6 +201,7 @@ export default {
|
|||
addtitle:'',
|
||||
addordersoff:false,
|
||||
ordersForm:{},
|
||||
productInfo: null,
|
||||
|
||||
options: [{
|
||||
value: ' ',
|
||||
|
@ -313,16 +319,15 @@ export default {
|
|||
},
|
||||
|
||||
pay(row){
|
||||
|
||||
console.log(row)
|
||||
updateByordersState1(this.orders).then(res =>{
|
||||
this.orders.ordersId=this.orders.ordersId;
|
||||
this.orders.productId=this.orders.productId;
|
||||
window.open("http://21.12.0.10:80/prod-api/market/alipay/pay?productName="+row.productName +"&ordersNum="+row.ordersNum+"&ordersPrice="+row.ordersPrice)
|
||||
|
||||
this.$message.success('付款成功')
|
||||
updateByordersState1(ordersForm).then(response=>{
|
||||
alert(response.msg)
|
||||
if (response.code==200){ }
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
)
|
||||
|
||||
},
|
||||
|
||||
|
|
|
@ -61,10 +61,6 @@
|
|||
</el-container>
|
||||
</el-container>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Reference in New Issue