<template>
  <div class="service-result">
    <image :src="type === '0' ? '/static/img/service-success.png' : '/static/img/error.png'"/>
    <h2>{{ type === '1' ? '领取失败！请联系管理员处理' : '提交成功！' }}</h2>
    <div class="text" v-if="type === '0'">可在"我的-超市订单"中,查看订单信息</div>
    <div class="service-btn" hover-class="text-hover" @click="back">确定</div>
  </div>
</template>

<script>
export default {
  appName: "提交",
  data() {
    return {
      type: '0'
    }
  },

  onLoad(query) {
    this.type = query.type
  },

  methods: {
    back() {
      uni.navigateBack({
        delta: 2
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.service-result {
  min-height: 100vh;
  padding-top: 96px;
  text-align: center;
  background: #fff;
  box-sizing: border-box;

  .service-btn {
    width: 558px;
    height: 88px;
    line-height: 88px;
    margin: 64px auto 0;
    text-align: center;
    background: #197DF0;
    font-size: 36px;
    color: #fff;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
    border-radius: 8px;
  }

  h2 {
    margin-bottom: 8px;
    color: #333333;
    font-size: 36px;
    font-weight: 600;
  }

  .text {
    font-size: 32px;
    color: #666666;
  }

  image {
    width: 192px;
    height: 192px;
  }
}
</style>
