<template>
  <div id="agent_order_detail_container">
    <van-cell title="订单编号" :value="order.sn" :border="false"></van-cell>
    <van-cell title="消费产品" :value="order.goods_name" :border="false"></van-cell>
    <van-cell title="下单时间" :value="order.create_time" :border='false'></van-cell>
    <van-cell title="买家" :value="order.user_name" :border="false"></van-cell>
<!--    <van-cell title="卖家等级" value="一级消费" :border="false"></van-cell>-->
    <van-cell title="结算状态" :border="false">
      <text v-if="order.provide_status == 1">收益到余额</text>
      <text v-if="order.provide_status == 2">未收益</text>
      <text v-if="order.provide_status == 3">收益到冻结余额</text>
    </van-cell>
    <van-cell title="佣金收益" :value="order.rebater" :border="false"></van-cell>
    <van-cell title="订单总价" :value="order.price" :border="false"></van-cell>


  </div>
</template>

<script>


import {agentOrderDetail} from "../../../../requests/agent";
import util from '@/utils/index'

var $this
export default {
  name: "agent_order_detail_container",
  components: {},
  data() {
    return {
      order: {}
    }
  },
  methods: {
    get_order($sn) {
      let $params = {
        sn: $sn
      }
      agentOrderDetail($params).then((res) => {
        let $data = res.data;
        $this.order = $data.data
        $this.order['create_time'] = util.formatTime($this.order['create_time'])
      })
    }
  },
  mounted() {
  },
  created() {
    $this = this
  },
  onLoad($options) {
    let $order_sn = $options.sn
    $this.get_order($order_sn)
  }
}
</script>

<style scoped>
page {
  background-color: #fff;
}

.not_show {
  opacity: 0;
}

</style>
