<template>
  <view class="orderDetail">
    <view class="orderinfo">
      <orderdetailInfo key1="订单编号" :val="list.order_no" class="info"></orderdetailInfo>
      <orderdetailInfo key1="下单时间" :val="list.addtime" class="info"></orderdetailInfo>
      <orderdetailInfo key1="支付方式" val="微信" class="info"></orderdetailInfo>
    </view>

    <view class="infos">
      <view class="tittle">
        <orderdetailTittle tittle0="收货信息"></orderdetailTittle>
      </view>
          
      <orderdetailInfo key1="收货人" :val="list.ps_uname" class="info"></orderdetailInfo>
      <orderdetailInfo key1="联系方式" :val="list.ps_phone" class="info"></orderdetailInfo>
      <orderdetailInfo key1="收货地址" :val="list.ps_address" class="info"></orderdetailInfo>
    </view>
    <view class="shopinfo">
      <view class="tittle">
         <orderdetailTittle tittle0="商品信息"></orderdetailTittle>
      </view>
       
     <orderdetailShopinfo :list="list.goods_list"></orderdetailShopinfo>
    </view>
    <view class="btn">
      <view class="btn1">
           <orderdetailBtn text="联系客服" ></orderdetailBtn>
      </view>
    </view>
          <view class="tittle">
         <orderdetailTittle tittle0="支付信息"></orderdetailTittle>
      </view>
      <orderdetailPay :all="list.price" :youhui="list.yhq_price" :yunfei="list.yf_price"></orderdetailPay>
      <orderdetailZongjia :zong="list.goods_price"></orderdetailZongjia>
  </view>
</template>

<script>
import orderdetailInfos from "../../components/orderdetail/orderdetailinfos";
import orderdetailInfo from "../../components/orderdetail/orderdetailinfo";
import orderdetailTittle from "../../components/orderdetail/orderdetailtitt";
import orderdetailShopinfo from "../../components/orderdetail/orderdetailshopinfo";
import orderdetailBtn from "../../components/orderdetail/orderdetailbtn"
import orderdetailPay from "../../components/orderdetail/orderdetailpay"
import orderdetailZongjia from "../../components/orderdetail/orderdetail-zongjia"
import {requestP} from "../../static/js/request"
export default {
  components: {
    orderdetailInfos,
    orderdetailInfo,
    orderdetailTittle,
    orderdetailShopinfo,
    orderdetailBtn,
    orderdetailPay,
    orderdetailZongjia
  },
  data(){
    return {
      list: []
    }
  },
  onLoad(a){
      requestP({
        url:"order/get_order_info",
        data:{
          order_id:a.id
        }
      }).then((res)=>{
        console.log(res)
        this.list = res.data.data
      })
  }
};
</script>

<style lang="scss">
.orderDetail {
  .orderinfo{
    background-color: white;
  }
  .infos {
    background-color: white;
  }
  .btn{
    width: 100%;
    background-color: white;
    margin-top: 2upx;
    .btn1{
      width: 710upx;
     margin: 0 auto;
    padding-top: 50upx;
    padding-bottom: 20upx;    
    }
  }
  .tittle{
    margin-top: 14upx;
    margin-bottom: 2upx;
  }
}
</style>