From 477d0e86022a028ac927acc85018cef31ecebcac Mon Sep 17 00:00:00 2001 From: Vion Date: Sun, 23 Jan 2022 14:55:21 +0800 Subject: [PATCH] Error page template added --- rc-busness/app.html | 9 +++ rc-busness/app/views/error.html | 56 ++++++++++++++++ rc-busness/layouts/error.vue | 67 +++++++++++++++++++ rc-busness/pages/productdetails/producted.vue | 8 ++- 4 files changed, 138 insertions(+), 2 deletions(-) create mode 100644 rc-busness/app.html create mode 100644 rc-busness/app/views/error.html create mode 100644 rc-busness/layouts/error.vue diff --git a/rc-busness/app.html b/rc-busness/app.html new file mode 100644 index 00000000..cf5975e7 --- /dev/null +++ b/rc-busness/app.html @@ -0,0 +1,9 @@ + + + + {{ HEAD }} + + + {{ APP }} + + \ No newline at end of file diff --git a/rc-busness/app/views/error.html b/rc-busness/app/views/error.html new file mode 100644 index 00000000..15794e35 --- /dev/null +++ b/rc-busness/app/views/error.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + +
+ +
+

检测到系统错误

+
+ 请联系管理员或尝试其他操作 +

+ 回到首页 +
+
+
+ + + \ No newline at end of file diff --git a/rc-busness/layouts/error.vue b/rc-busness/layouts/error.vue new file mode 100644 index 00000000..506a8797 --- /dev/null +++ b/rc-busness/layouts/error.vue @@ -0,0 +1,67 @@ + + + + \ No newline at end of file diff --git a/rc-busness/pages/productdetails/producted.vue b/rc-busness/pages/productdetails/producted.vue index 9f11234e..e63edceb 100644 --- a/rc-busness/pages/productdetails/producted.vue +++ b/rc-busness/pages/productdetails/producted.vue @@ -321,10 +321,14 @@ export default { stopIndex++; } } - productAttachmentList = newlist[0].productAttachmentList; + if(curItem.productAttachmentList != undefined) + productAttachmentList = curItem.productAttachmentList; + if(curItem.productName == undefined) + curItem = newlist[0]; userbuy = true; } - + if(!curItem || curItem.productName == undefined) + throw new Error("The id property is missing."); let crumbs = [ { path:'/productdetails/productlist/',