提交 dd3371bb 编写于 作者: guangjun.yang's avatar guangjun.yang

增加详情页面

上级 ab70a33c
......@@ -5,12 +5,12 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
<title>hello-world</title>
<title>微信支付Demo</title>
</head>
<body>
<noscript>
<!-- <noscript>
<strong>We're sorry but hello-world doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
</noscript> -->
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
......
<template>
<section>
<div class="detailsAndBuy">
<div>
<p>订单详情</p>
<p>商品名:{{orderDetails.goodsLabel}}</p>
<p>单价:{{orderDetails.price}}</p>
<p>数量:{{orderDetails.quantity}}</p>
<p>总价:{{orderDetails.totalFee}}</p>
<p>付款状态:{{orderDetails.status}}</p>
</div>
</div>
</section>
</template>
<script>
export default {
name: "detail",
data() {
return {
token: "0E5B3FC9A588458DA44DB7DDC3BC8068" || "08A7A6D8AA224AB7BC2E7BC44D44F34E",
orderId: null,
prePayId: null,
isDisabled: false,
orderDetails: {}
};
},
created() {
this.orderId = this.$route && this.$route.query && this.$route.query.orderId || 123
this.getOrderDetails();
},
mounted() {},
methods: {
getOrderDetails() {
this.axios({
method: "GET",
headers: {
token: this.token
},
url: `${this.APIDOMAIN}/trade/center/order/${this.orderId}`
}).then(res => {
if (res.data.code == "000000") {
this.orderDetails = res.data.data;
}
})
.catch(res => {
//do somethings
});
},
}
};
</script>
<style scoped>
input {
margin: 0 auto;
border: 1px solid #000;
margin-bottom: 10px;
}
button {
display: block;
margin: 0 auto;
background: #42b983;
color: #fff;
}
</style>
\ No newline at end of file
......@@ -9,13 +9,28 @@ Vue.use(Router)
const router = new Router({
mode: 'hash',
// base: '/',
// base: '/pica-wx-pay/',
routes: [{
path: '/',
name: 'index',
name: 'index-1',
component: () => import(/* webpackChunkName: "lazy" */ './index.vue'),
meta: {
title: '首页',
},
},{
path: '/index',
name: 'index-2',
component: () => import(/* webpackChunkName: "lazy" */ './index.vue'),
meta: {
title: '首页',
},
}, {
path: '/detail',
name: 'detail',
component: () => import(/* webpackChunkName: "lazy" */ './detail.vue'),
meta: {
title: '支付详情页面',
}
}]
});
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册