fail.vue 1.73 KB
<template>
    <div class="zj-main">
        <div class="fail-main">
            <div class="fail-typer" :class="{'cg':$route.params.status==1}">
                <img src="../../static/images/diu.svg" style="width: 60%;vertical-align: middle;"
                     v-if="$route.params.status==1"/>
                <img src="../../static/images/cha.svg" style="width: 60%;vertical-align: middle;" v-else/>
            </div>
            <div class="fail-text">{{$route.params.con}}</div>
            <div class="fail-btn">
                <mt-button plain size="small" style="width:2rem" @click.native="gotohome">返回首页</mt-button>
                <span style="display:inline-block;width:10px;"></span>
                <mt-button plain size="small" style="width:2rem" @click.native="gotoorder"
                           v-if="$route.params.status==1">查看订单
                </mt-button>
                <mt-button plain size="small" style="width:2rem" @click.native="gotoorder" v-else>重新支付</mt-button>
            </div>
        </div>
    </div>
</template>

<script type="text/ecmascript-6">
    import {MessageBox, Actionsheet} from 'mint-ui';

    export default{
        data(){
            return {
                item: 'http://img.pconline.com.cn/images/upload/upc/tx/wallpaper/1308/02/c0/24056523_1375430477597.jpg',
            }
        },
        components: {},
        methods: {
            gotohome(){
                this.$router.push('/pageId/0');
            },
            gotoorder(){
                this.$router.push({
                    name: 'orderDetail',
                    params: {
                        orderId: this.$route.params.orderId,
                    }
                });
            }
        }
    }
</script>