|
|
@@ -23,17 +23,22 @@
|
|
|
</div>
|
|
|
|
|
|
<order-sett ref="orderSett" :orderId="orderId" :userInfo="userInfo" @order-success="getList"></order-sett>
|
|
|
+
|
|
|
+ <order-detail ref="orderDetail" :orderDetail="orderDetail" :userInfo="userInfo"></order-detail>
|
|
|
+ <balance-tip ref="balanceTip" :orderDetail="orderDetail"></balance-tip>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { ordercreat, orderlist } from '@/api/order.js'
|
|
|
+import { ordercreat, orderlist, orderDetail } from '@/api/order.js'
|
|
|
import tools from '@/utils/tools.js'
|
|
|
import OrderSett from '@/views/Forestage/Tourism/order-sett.vue'
|
|
|
+import OrderDetail from '@/views/Forestage/Tourism/order-detail.vue'
|
|
|
+import BalanceTip from '@/views/Forestage/Tourism/balance-tip.vue'
|
|
|
import { userInfo } from '@/api/member'
|
|
|
export default {
|
|
|
name: 'Order',
|
|
|
- components: { OrderSett },
|
|
|
+ components: { OrderSett, OrderDetail, BalanceTip },
|
|
|
data () {
|
|
|
return {
|
|
|
page: 1,
|
|
|
@@ -42,7 +47,9 @@ export default {
|
|
|
total: 0,
|
|
|
lang: 'en',
|
|
|
orderId: '',
|
|
|
- userInfo: {}
|
|
|
+ userInfo: {},
|
|
|
+
|
|
|
+ orderDetail: {}
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
@@ -88,10 +95,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- goToPay (item) {
|
|
|
+ async goToPay (item) {
|
|
|
const token = localStorage.getItem('userToken')
|
|
|
if (token) {
|
|
|
- if (this.isAJAX) {
|
|
|
+ /* if (this.isAJAX) {
|
|
|
return
|
|
|
}
|
|
|
this.isAJAX = true
|
|
|
@@ -108,7 +115,11 @@ export default {
|
|
|
this.isAJAX = false
|
|
|
tools.error(res.msg)
|
|
|
}
|
|
|
- })
|
|
|
+ }) */
|
|
|
+ const result = await orderDetail({ orderId: item.id })
|
|
|
+ this.orderDetail = result.data
|
|
|
+ await this.getInfo()
|
|
|
+ this.$refs.orderDetail.setOpen(true)
|
|
|
} else {
|
|
|
this.$router.push({ path: '/login' })
|
|
|
}
|
|
|
@@ -176,6 +187,7 @@ export default {
|
|
|
font-size: 16px;
|
|
|
background-color: #C7AB7B;
|
|
|
border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
}
|