<template>
<!-- icondaizhifu -->
	<appResult :title="status == '2' ? '审核中' : '审核通过'" :icon="status == '2' ? 'icondaizhifu' : 'iconchenggong'">
		<button class="admin-button-com blue big" v-if="status != '2'" @click="loginSys">登录后台</button>
		<button class="admin-button-com big" @click="openInform">开启通知</button>
    <view class="openInfo">开启通知，第一时间接受{{text}}</view>
	</appResult>
</template>

<script>
import appResult from "@/components/app-result";
export default {
	name: "BillingResult", // 开单结果
  data(){
    return {
      status: ''
    }
    
  },
  computed: {
    text() {
      return this.status == '2' ? '审核结果' : '门店动态'
    }
  },
	components: {
		appResult
	},
  onLoad(option){
    console.log(option)
    this.status = option.status
  },
  onUnload() {
      uni.removeStorageSync('HOME_REFRESH')
    },
	methods: {
    loginSys(){
      uni.removeStorageSync('OPEN_SHOP_ID')
      uni.removeStorageSync('HOME_STATUS_STROAGE_SHOW')
      this.$util.pageTo({
        url: '/admin/home/workbench',
        type: 3
      })
      this.$store.commit("setLoginInfo", {});
    },
    openInform(){
      this.pageTo({
        url: '/pagesClient/official/warn',
        type: 2
      })
    }
	}
};
</script>

<style lang="scss" scoped>
.admin-button-com {
	margin-bottom: 20px;
	width: 100%;
}
.openInfo{
  text-align: center;
  font-size: 30upx;
  margin-top: 20upx;
  color: #666;
}
</style>
