@extends('theme::template_custom')

@section('head')
  <link rel="stylesheet" href="{{ themePath('css/member.css') }}">
  <link rel="stylesheet" href="{{ themePath('css/pretty.css') }}">
@stop

@section('banner')
  <div class="nbanner">
    <img src="{{ inject('ad')->single(4, 0, 'img') }}" alt="{{ inject('ad')->single(4, 0, 'title') }}">
  </div>
@stop

@section('anchor')
  <div id="anchor">
    <div class="container member-container">
		<span class="anchor">
			<a href="{{ url('/') }}">{{ inject('setting')->translate('shop', 'home') }}</a> >
      <a href="{{ url('member/order') }}">{{ inject('setting')->translate('shop', 'order_center') }}</a> >
        {{ inject('setting')->translate('shop', 'order_notification') }}
    </span>
    </div>
  </div>
@stop

@section('content')
  <div class="member-wrap" id="app-content">
    <div class="container">
      <div class="my-pay mt-30 mb-20">
        <div class="pay-title no-border">
          <i class="iconfont @if($state == 'success') icon-morendizhi @else icon-htmal5icon19 @endif"></i>
        </div>
        <div class="success">
          <span class="txt">{{ $message }}</span>
          <span class="second pr-10" v-text="second + ' s'"></span>
          <a href="{{ url('/') }}">{{ inject('setting')->translate('shop', 'home') }}</a>
        </div>
      </div>
    </div>
  </div>
@stop

@section('foot')
  <script type="text/javascript">
      new Vue({
          el: "#app-content",
          data: {
              second: 5,
              url: "{{ url('member/order') }}"
          },
          created: function() {
              this.setTime();
          },
          methods: {
              setTime: function() {
                  let _this = this;
                  if (this.second == 0) {
                      location.href = this.url;
                  } else {
                      this.second--;
                      setTimeout(function() {
                          _this.setTime()
                      },1000);
                  }
              },
          },
      });
  </script>
@stop