UNPKG

egg-jianghu

Version:
53 lines (45 loc) 1.12 kB
{% extends 'template/jhTemplate.html'%} {% block vue_template %} <jh-layout> <div v-if="error.errorCode"> <h2>{{ error.errorCode }} : {{ error.errorReason }}</h2> <hr/> <h2>{{ error.errorReasonSupplement }}</h2> </div> <div v-else> <h2>亲,你似乎迷路了?</h2> </div> </jh-layout> {% endblock %} {% block vue_body %} {% include 'layout/jhLayout.html' %} <script type="module"> new Vue({ el: '#app', template: '#app-template', vuetify: new Vuetify(), data: () => ({ error: { errorCode: null, errorReason: null, errorReasonSupplement: null, } }), async created() { const urlParams = new URLSearchParams(location.search); if (urlParams.get('errorCode')) { this.error.errorCode = urlParams.get('errorCode'); } if (urlParams.get('errorReason')) { this.error.errorReason = urlParams.get('errorReason'); } if (urlParams.get('errorReasonSupplement')) { this.error.errorReasonSupplement = urlParams.get('errorReasonSupplement'); } }, methods: {} }) </script> <style scoped> </style> {% endblock %}