Kaynağa Gözat

#4 添加店铺未开通和店铺关闭提示页面

huxz 8 yıl önce
ebeveyn
işleme
dee7658802

+ 9 - 3
src/main/java/com/uas/platform/b2c/prod/store/controller/StoreInformationController.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.prod.store.controller;
 
 import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.b2c.prod.store.model.StoreStatus;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -39,10 +40,15 @@ public class StoreInformationController {
 		System.out.println("根据店铺UUID获取模板信息");
 		StoreIn store = storeService.findByUuid(uuid);
 		if (store == null) {
-			return "redirect:/index";
+			return "store_none";
+		}
+
+		// 判断店铺是否开店状态
+		if (StoreStatus.OPENED == store.getStatus()) {
+			return "store_default";
+		} else {
+			return "store_close";
 		}
-		// TODO huxz 添加分类信息
-		return "store_default";
 	}
 
 }

+ 47 - 0
src/main/webapp/WEB-INF/views/normal/store_close.html

@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html lang="zh-CN">
+<head>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+<meta name="renderer" content="webkit">
+<title i18n="home.title"></title>
+<base href="../"/>
+<meta name="description" content="优软商城,电子元器件搜索引擎" />
+<meta name="keywords"
+	content="优软商城,B2B,B2C,行业门户,网上贸易,电子商务,网上贸易,网上交易,交易市场,在线交易,供求信息,采购,求购信息,供应信息" />
+<link href="static/img/all/u.png" rel="icon" type="image/x-icon" />
+<link rel="stylesheet" href="static/lib/bootstrap/css/bootstrap.min.css" />
+<link rel="stylesheet" href="static/lib/angular/toaster.css" />
+<link rel="stylesheet" href="static/lib/fontawesome/css/font-awesome.min.css" />
+<link rel="stylesheet" href="static/css/common/common.css" />
+<link rel="stylesheet" href="static/lib/angular/ng-table.css">
+<script type="text/javascript" src="static/js/common/bd_pv.js"></script>
+</head>
+<body>
+	<!-- 消息提示框  Start-->
+	<toaster-container
+		toaster-options="{'position-class': 'toast-bottom-center'}"></toaster-container>
+	<!-- 消息提示框 End -->
+	<!-- Loading Start -->
+	<div id="loading" class="loading">
+		<i></i>
+	</div>
+	<!-- Loading End -->
+
+	<!-- top 置顶栏 Start -->
+	<div ng-include src="'static/view/common/site-nav.html'"></div>
+	<!-- top 置顶栏 End -->
+
+	<div ng-include src="'static/view/store/default/store-close.html'"></div>
+
+	<!-- 页脚 Start -->
+	<div ng-include src="'static/view/common/footer.html'"></div>
+	<!-- 页脚 End -->
+
+	<!-- 侧边栏Start -->
+	<div ng-include src="'static/view/common/sidebar.html'"></div>
+	<!-- 侧边栏End -->
+	<script type="text/javascript" src="static/lib/require.js"
+		data-main="static/js/store/main.js"></script>
+</body>
+</html>

+ 47 - 0
src/main/webapp/WEB-INF/views/normal/store_none.html

@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html lang="zh-CN">
+<head>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+<meta name="renderer" content="webkit">
+<title i18n="home.title"></title>
+<base href="../"/>
+<meta name="description" content="优软商城,电子元器件搜索引擎" />
+<meta name="keywords"
+	content="优软商城,B2B,B2C,行业门户,网上贸易,电子商务,网上贸易,网上交易,交易市场,在线交易,供求信息,采购,求购信息,供应信息" />
+<link href="static/img/all/u.png" rel="icon" type="image/x-icon" />
+<link rel="stylesheet" href="static/lib/bootstrap/css/bootstrap.min.css" />
+<link rel="stylesheet" href="static/lib/angular/toaster.css" />
+<link rel="stylesheet" href="static/lib/fontawesome/css/font-awesome.min.css" />
+<link rel="stylesheet" href="static/css/common/common.css" />
+<link rel="stylesheet" href="static/lib/angular/ng-table.css">
+<script type="text/javascript" src="static/js/common/bd_pv.js"></script>
+</head>
+<body>
+	<!-- 消息提示框  Start-->
+	<toaster-container
+		toaster-options="{'position-class': 'toast-bottom-center'}"></toaster-container>
+	<!-- 消息提示框 End -->
+	<!-- Loading Start -->
+	<div id="loading" class="loading">
+		<i></i>
+	</div>
+	<!-- Loading End -->
+
+	<!-- top 置顶栏 Start -->
+	<div ng-include src="'static/view/common/site-nav.html'"></div>
+	<!-- top 置顶栏 End -->
+
+	<div ng-include src="'static/view/store/default/store-none.html'"></div>
+
+	<!-- 页脚 Start -->
+	<div ng-include src="'static/view/common/footer.html'"></div>
+	<!-- 页脚 End -->
+
+	<!-- 侧边栏Start -->
+	<div ng-include src="'static/view/common/sidebar.html'"></div>
+	<!-- 侧边栏End -->
+	<script type="text/javascript" src="static/lib/require.js"
+		data-main="static/js/store/main.js"></script>
+</body>
+</html>

+ 23 - 0
src/main/webapp/resources/view/store/default/store-close.html

@@ -0,0 +1,23 @@
+<style>
+	.store_error_show {
+		display: table;
+		min-height: 340px;
+		width: 100%;
+	}
+	.store_error_tip {
+		display: table-cell;
+		vertical-align: middle;
+		text-align: center;
+	}
+	.store_error_tip > span {
+		font-size: 16px;
+	}
+</style>
+<div class="container">
+	<div class="store_error_show">
+		<div class="store_error_tip">
+			<img src="static/img/store/common/default.png" alt="店铺图片"/>
+			<span>该店铺处于关闭状态,请<a href="index">返回首页</a></span>
+		</div>
+	</div>
+</div>

+ 23 - 0
src/main/webapp/resources/view/store/default/store-none.html

@@ -0,0 +1,23 @@
+<style>
+	.store_error_show {
+		display: table;
+		min-height: 340px;
+		width: 100%;
+	}
+	.store_error_tip {
+		display: table-cell;
+		vertical-align: middle;
+		text-align: center;
+	}
+	.store_error_tip > span {
+		font-size: 16px;
+	}
+</style>
+<div class="container">
+	<div class="store_error_show">
+		<div class="store_error_tip">
+			<img src="static/img/store/common/default.png" alt="店铺图片"/>
+			<span>该店铺还未开通,请<a href="index">返回首页</a></span>
+		</div>
+	</div>
+</div>