前端页面优化
parent
a232935a67
commit
1f91165b65
|
@ -11,7 +11,7 @@
|
||||||
Target Server Version : 50716
|
Target Server Version : 50716
|
||||||
File Encoding : 65001
|
File Encoding : 65001
|
||||||
|
|
||||||
Date: 22/04/2021 14:57:16
|
Date: 30/05/2021 17:25:45
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
SET NAMES utf8mb4;
|
||||||
|
@ -119,6 +119,7 @@ INSERT INTO `sys_comment` VALUES (19, 1, 44, 8, '测试测试测试测试测试
|
||||||
INSERT INTO `sys_comment` VALUES (20, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247780833);
|
INSERT INTO `sys_comment` VALUES (20, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247780833);
|
||||||
INSERT INTO `sys_comment` VALUES (21, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247784508);
|
INSERT INTO `sys_comment` VALUES (21, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247784508);
|
||||||
INSERT INTO `sys_comment` VALUES (22, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247789686);
|
INSERT INTO `sys_comment` VALUES (22, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247789686);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_goods
|
-- Table structure for sys_goods
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
@ -285,7 +286,7 @@ CREATE TABLE `sys_order` (
|
||||||
`merchant_ratio` float(11, 1) NOT NULL DEFAULT 1.0 COMMENT '订单创建时商户的费率',
|
`merchant_ratio` float(11, 1) NOT NULL DEFAULT 1.0 COMMENT '订单创建时商户的费率',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
UNIQUE INDEX `order_id`(`order_id`) USING BTREE COMMENT '订单号唯一'
|
UNIQUE INDEX `order_id`(`order_id`) USING BTREE COMMENT '订单号唯一'
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 95 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
) ENGINE = InnoDB AUTO_INCREMENT = 94 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_order
|
-- Records of sys_order
|
||||||
|
@ -384,6 +385,6 @@ CREATE TABLE `sys_user` (
|
||||||
INSERT INTO `sys_user` VALUES (1, 'test', 'e10adc3949ba59abbe56e057f20f883e', 'bosen_once@163.com', 1, '/data/header/user/1.jpg');
|
INSERT INTO `sys_user` VALUES (1, 'test', 'e10adc3949ba59abbe56e057f20f883e', 'bosen_once@163.com', 1, '/data/header/user/1.jpg');
|
||||||
INSERT INTO `sys_user` VALUES (3, 'bosen_once@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 'bosen_once@qq.com', 1, '/data/header/user/default.jpg');
|
INSERT INTO `sys_user` VALUES (3, 'bosen_once@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 'bosen_once@qq.com', 1, '/data/header/user/default.jpg');
|
||||||
INSERT INTO `sys_user` VALUES (4, 'test111', 'e10adc3949ba59abbe56e057f20f883e', '806317173@qq.com', 0, '/data/header/user/default.jpg');
|
INSERT INTO `sys_user` VALUES (4, 'test111', 'e10adc3949ba59abbe56e057f20f883e', '806317173@qq.com', 0, '/data/header/user/default.jpg');
|
||||||
INSERT INTO `sys_user` VALUES (5, 'lalalal', 'e10adc3949ba59abbe56e057f20f883e', '2390025289@qq.com', 0, '/data/header/user/default.jpg');
|
INSERT INTO `sys_user` VALUES (5, 'lalalal', 'e10adc3949ba59abbe56e057f20f883e', '2390025288@qq.com', 0, '/data/header/user/default.jpg');
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
|
@ -67,34 +67,27 @@ public class AdminLoginController {
|
||||||
* 注册请求
|
* 注册请求
|
||||||
*/
|
*/
|
||||||
@RequestMapping("sign-up")
|
@RequestMapping("sign-up")
|
||||||
public ModelAndView signUp(ModelAndView modelAndView,String name,String email,String password){
|
public String signUp(String name,String email,String password){
|
||||||
int result = service.singup(email,email,password);
|
int result = service.singup(email,name,password);
|
||||||
if (result==0){
|
if (result==0){
|
||||||
// 必填信息不能为空!
|
return "必填信息不能为空!";
|
||||||
modelAndView.addObject("msg","必填信息不能为空!");
|
|
||||||
}
|
}
|
||||||
if (result==4){
|
if (result==4){
|
||||||
// 该邮箱已被注册
|
return "该邮箱已被注册";
|
||||||
modelAndView.addObject("msg","该邮箱已被注册");
|
|
||||||
}
|
}
|
||||||
if (result==3){
|
if (result==3){
|
||||||
// 邮箱格式不正确
|
return "邮箱格式不正确";
|
||||||
modelAndView.addObject("msg","邮箱格式不正确");
|
|
||||||
}
|
}
|
||||||
if (result==2){
|
if (result==2){
|
||||||
// 两次密码输入不一致
|
return "两次密码输入不一致";
|
||||||
modelAndView.addObject("msg","两次密码输入不一致");
|
|
||||||
}
|
}
|
||||||
if (result==1){
|
if (result==1){
|
||||||
// 验证邮件已发送,请留意您的邮箱
|
return "验证邮件已发送,请留意您的邮箱";
|
||||||
modelAndView.addObject("msg","验证邮件已发送,请留意您的邮箱");
|
|
||||||
}
|
}
|
||||||
if (result==-1){
|
if (result==-1){
|
||||||
// 验证邮件发送失败,请重试
|
return "注册超时,请重试";
|
||||||
modelAndView.addObject("msg","注册超时,请重试");
|
|
||||||
}
|
}
|
||||||
modelAndView.setViewName("redirect:login");
|
return null;
|
||||||
return modelAndView;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -107,11 +100,11 @@ public class AdminLoginController {
|
||||||
modelAndView.setViewName("redirect:/error");
|
modelAndView.setViewName("redirect:/error");
|
||||||
}
|
}
|
||||||
if (res==0){
|
if (res==0){
|
||||||
modelAndView.addObject("网络超时请重试");
|
modelAndView.addObject("msg", "网络超时请重试");
|
||||||
modelAndView.setViewName("redirect:login");
|
modelAndView.setViewName("redirect:login");
|
||||||
}
|
}
|
||||||
if (res==1){
|
if (res==1){
|
||||||
modelAndView.addObject("msg","注册成功");
|
modelAndView.addObject("msg","注册成功,请完成登录!");
|
||||||
modelAndView.setViewName("redirect:login");
|
modelAndView.setViewName("redirect:login");
|
||||||
}
|
}
|
||||||
return modelAndView;
|
return modelAndView;
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class AdminLoginService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 发送注册验证邮件
|
// 发送注册验证邮件
|
||||||
boolean res = mailService.sendHtmlMail(email,"捷阅网管理员注册验证","<a href='http://"+this.sitrUrl+"admin/sign-check?email="+email+"'>点击此链接完成注册验证</a>");
|
boolean res = mailService.sendHtmlMail(email,"捷阅网管理员注册验证","<a href='http://"+this.sitrUrl+"/admin/sign-check?email="+email+"'>点击此链接完成注册验证</a>");
|
||||||
if (res){
|
if (res){
|
||||||
return 1;
|
return 1;
|
||||||
}else{
|
}else{
|
||||||
|
@ -129,11 +129,11 @@ public class AdminLoginService {
|
||||||
int res1 = adminMapper.updateMark(1,email);
|
int res1 = adminMapper.updateMark(1,email);
|
||||||
if (res1==1){
|
if (res1==1){
|
||||||
// 设置用户角色,设置失败则回滚
|
// 设置用户角色,设置失败则回滚
|
||||||
if (adminRoleMapper.updateStatus(1,admin.getId()) != 1){
|
/*if (adminRoleMapper.updateStatus(1,admin.getId()) != 1){
|
||||||
// 执行回滚
|
// 执行回滚
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}*/
|
||||||
return 1;
|
return 1;
|
||||||
}else{
|
}else{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -50,5 +50,5 @@ public interface SysOrderMapper {
|
||||||
|
|
||||||
// 收益
|
// 收益
|
||||||
float websiteProfitCount();
|
float websiteProfitCount();
|
||||||
float merchantProfitCount(int merchantId);
|
Float merchantProfitCount(int merchantId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,10 @@ public class MerchantHomeController {
|
||||||
int commentCount = homeService.getCommandCount(merchant.getId());
|
int commentCount = homeService.getCommandCount(merchant.getId());
|
||||||
int userCount = homeService.getUserCount(merchant.getId());
|
int userCount = homeService.getUserCount(merchant.getId());
|
||||||
int orderCount = homeService.getOrderCount(merchant.getId());
|
int orderCount = homeService.getOrderCount(merchant.getId());
|
||||||
float profit = orderMapper.merchantProfitCount(merchant.getId());
|
float profit = 0;
|
||||||
|
if (orderMapper.merchantProfitCount(merchant.getId()) != null) {
|
||||||
|
profit = orderMapper.merchantProfitCount(merchant.getId());
|
||||||
|
}
|
||||||
|
|
||||||
modelAndView.addObject("commentCount",commentCount);
|
modelAndView.addObject("commentCount",commentCount);
|
||||||
modelAndView.addObject("profit",profit);
|
modelAndView.addObject("profit",profit);
|
||||||
|
|
|
@ -45,6 +45,10 @@ public class MerchantLoginController {
|
||||||
case 1:
|
case 1:
|
||||||
// 登陆成功
|
// 登陆成功
|
||||||
SysMt merchant = loginService.getMerchantInfo(email);
|
SysMt merchant = loginService.getMerchantInfo(email);
|
||||||
|
if (merchant.getState() == 0) {
|
||||||
|
modelAndView.addObject("msg","您的账号处于停用状态,请等待管理员处理");
|
||||||
|
break;
|
||||||
|
}
|
||||||
session.setAttribute("merchant",merchant);
|
session.setAttribute("merchant",merchant);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -65,27 +69,21 @@ public class MerchantLoginController {
|
||||||
* 注册
|
* 注册
|
||||||
*/
|
*/
|
||||||
@RequestMapping("sign-up")
|
@RequestMapping("sign-up")
|
||||||
public ModelAndView signUp(ModelAndView modelAndView,String email,String name,String password){
|
public String signUp(String email,String name,String password){
|
||||||
modelAndView.setViewName("redirect:/merchant/login");
|
|
||||||
int serviceRes = loginService.signUp(email,name,password);
|
int serviceRes = loginService.signUp(email,name,password);
|
||||||
switch (serviceRes){
|
switch (serviceRes){
|
||||||
case -1:
|
case -1:
|
||||||
modelAndView.addObject("msg","验证邮件发送失败,请重试");
|
return "验证邮件发送失败,请重试";
|
||||||
break;
|
|
||||||
case 0:
|
case 0:
|
||||||
modelAndView.addObject("msg","必填信息不能为空");
|
return "必填信息不能为空";
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
modelAndView.addObject("msg","验证信息已发送至邮箱,请留意接收");
|
return "验证信息已发送至邮箱,请留意接收";
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
modelAndView.addObject("msg","该邮箱已被注册");
|
return "该邮箱已被注册";
|
||||||
break;
|
|
||||||
case 3:
|
case 3:
|
||||||
modelAndView.addObject("msg","邮箱格式不正确");
|
return "邮箱格式不正确";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return modelAndView;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -104,7 +102,7 @@ public class MerchantLoginController {
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
modelAndView.setViewName("redirect:/merchant/login");
|
modelAndView.setViewName("redirect:/merchant/login");
|
||||||
modelAndView.addObject("msg","注册成功");
|
modelAndView.addObject("msg","注册成功,请等待管理员的审核");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return modelAndView;
|
return modelAndView;
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class MerchantLoginService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 发送注册验证邮件
|
// 发送注册验证邮件
|
||||||
boolean res = mailService.sendHtmlMail(email,"捷阅网商户注册验证","<a href='http://"+this.sitrUrl+"merchant/sign-check?email="+email+"'>点击此链接完成注册验证</a>");
|
boolean res = mailService.sendHtmlMail(email,"捷阅网商户注册验证","<a href='http://"+this.sitrUrl+"/merchant/sign-check?email="+email+"'>点击此链接完成注册验证</a>");
|
||||||
if (res){
|
if (res){
|
||||||
return 1;
|
return 1;
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -68,34 +68,27 @@ public class UserLoginController {
|
||||||
* 注册请求
|
* 注册请求
|
||||||
*/
|
*/
|
||||||
@RequestMapping("sign-up")
|
@RequestMapping("sign-up")
|
||||||
public ModelAndView signUp(ModelAndView modelAndView,String email,String username,String password,String repwd){
|
public String signUp(String email,String username,String password,String repwd){
|
||||||
int result = service.singup(email,username,password,repwd);
|
int result = service.singup(email,username,password,repwd);
|
||||||
if (result==0){
|
if (result==0){
|
||||||
// 必填信息不能为空!
|
return "必填信息不能为空!";
|
||||||
modelAndView.addObject("msg","必填信息不能为空!");
|
|
||||||
}
|
}
|
||||||
if (result==4){
|
if (result==4){
|
||||||
// 该邮箱已被注册
|
return "该邮箱已被注册";
|
||||||
modelAndView.addObject("msg","该邮箱已被注册");
|
|
||||||
}
|
}
|
||||||
if (result==3){
|
if (result==3){
|
||||||
// 邮箱格式不正确
|
return "邮箱格式不正确";
|
||||||
modelAndView.addObject("msg","邮箱格式不正确");
|
|
||||||
}
|
}
|
||||||
if (result==2){
|
if (result==2){
|
||||||
// 两次密码输入不一致
|
return "两次密码输入不一致";
|
||||||
modelAndView.addObject("msg","两次密码输入不一致");
|
|
||||||
}
|
}
|
||||||
if (result==1){
|
if (result==1){
|
||||||
// 验证邮件已发送,请留意您的邮箱
|
return "验证邮件已发送,请留意您的邮箱";
|
||||||
modelAndView.addObject("msg","验证邮件已发送,请留意您的邮箱");
|
|
||||||
}
|
}
|
||||||
if (result==-1){
|
if (result==-1){
|
||||||
// 验证邮件发送失败,请重试
|
return "注册超时,请重试";
|
||||||
modelAndView.addObject("msg","注册超时,请重试");
|
|
||||||
}
|
}
|
||||||
modelAndView.setViewName("redirect:login");
|
return "网络出现错误!!";
|
||||||
return modelAndView;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -112,7 +105,7 @@ public class UserLoginController {
|
||||||
modelAndView.setViewName("redirect:login");
|
modelAndView.setViewName("redirect:login");
|
||||||
}
|
}
|
||||||
if (res==1){
|
if (res==1){
|
||||||
modelAndView.addObject("msg","注册成功");
|
modelAndView.addObject("msg","注册成功,请完成登录");
|
||||||
modelAndView.setViewName("redirect:login");
|
modelAndView.setViewName("redirect:login");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
site-url: 47.115.118.34
|
site-url: 127.0.0.1
|
||||||
server:
|
server:
|
||||||
port: 80
|
port: 80
|
||||||
tomcat:
|
tomcat:
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 5.2 KiB |
|
@ -69,11 +69,11 @@
|
||||||
select * from sys_order where order_mark = #{orderMark};
|
select * from sys_order where order_mark = #{orderMark};
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="merchantProfitCount" resultType="FLOAT">
|
<select id="merchantProfitCount" resultType="java.lang.Float">
|
||||||
select sum((order_price-merchant_ratio*order_price)/1) from sys_order where order_merchant = #{merchantId} and order_state = 1;
|
select sum((order_price-merchant_ratio*order_price)/1) from sys_order where order_merchant = #{merchantId} and order_state = 1;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="websiteProfitCount" resultType="FLOAT">
|
<select id="websiteProfitCount" resultType="java.lang.Float">
|
||||||
select sum((merchant_ratio*order_price)/1) from sys_order where order_state = 1;
|
select sum((merchant_ratio*order_price)/1) from sys_order where order_state = 1;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectByEmail" resultType="com.example.jieyue.common.entity.SysUser">
|
<select id="selectByEmail" resultType="com.example.jieyue.common.entity.SysUser">
|
||||||
select email,password from sys_user where email = #{email};
|
select email,password,mark from sys_user where email = #{email};
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUserInfo" resultType="com.example.jieyue.common.entity.SysUser">
|
<select id="getUserInfo" resultType="com.example.jieyue.common.entity.SysUser">
|
||||||
|
|
|
@ -20,11 +20,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<div class="thumbnail"><img th:src="@{/css/admin/hat.svg}"/></div>
|
<div class="thumbnail"><img th:src="@{/css/admin/hat.svg}"/></div>
|
||||||
<form class="register-form" th:action="@{/admin/sign-up}" method="post">
|
<form class="register-form">
|
||||||
<input type="text" placeholder="昵称" name="name"/>
|
<input id="name" type="text" placeholder="昵称" name="name"/>
|
||||||
<input type="password" placeholder="密码" name="password"/>
|
<input id="email" type="text" placeholder="邮箱" name="email"/>
|
||||||
<input type="text" placeholder="邮箱" name="email"/>
|
<input id="password" type="password" placeholder="密码" name="password"/>
|
||||||
<button>注册</button>
|
<div style="text-align: center;width: 100%;height: 50px;background: #EF3B3A;color: white;border-radius: 5px"
|
||||||
|
id="button" onclick="button();">
|
||||||
|
<br/>注册
|
||||||
|
</div>
|
||||||
<p class="message">已注册账号? <a href="#">登录</a></p>
|
<p class="message">已注册账号? <a href="#">登录</a></p>
|
||||||
</form>
|
</form>
|
||||||
<form class="login-form" th:action="@{/admin/do-login}" method="post">
|
<form class="login-form" th:action="@{/admin/do-login}" method="post">
|
||||||
|
@ -35,6 +38,77 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script th:src="@{/js/admin/jquery.min.js}"></script>
|
<script th:src="@{/js/admin/jquery.min.js}"></script>
|
||||||
|
<script>
|
||||||
|
if (sessionStorage.getItem("admin_sign_num") > 0) {
|
||||||
|
sessionStorage.setItem("admin_sign_num", sessionStorage.getItem("admin_sign_num"));
|
||||||
|
change();
|
||||||
|
}
|
||||||
|
function button() {
|
||||||
|
var email = document.getElementById("email").value;
|
||||||
|
var name = document.getElementById("name").value;
|
||||||
|
var password = document.getElementById("password").value;
|
||||||
|
|
||||||
|
if (email == "") {
|
||||||
|
alert("邮箱不能为空!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/admin/sign-up?email="+email+"&name="+name+"&password="+password,
|
||||||
|
contentType: "application/json; charset=utf-8",
|
||||||
|
success: function (msg) {
|
||||||
|
alert(msg);
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
alert("网络出现了问题!!")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
sessionStorage.setItem("admin_sign_num", 60);
|
||||||
|
change();
|
||||||
|
}
|
||||||
|
function change() {
|
||||||
|
var button = document.getElementById("button");
|
||||||
|
button.style.background = "grey";
|
||||||
|
button.disabled = true;
|
||||||
|
var time = setInterval(function () {
|
||||||
|
var num = sessionStorage.getItem("admin_sign_num");
|
||||||
|
if (num <= 0) {
|
||||||
|
button.style.background = "#EF3B3A";
|
||||||
|
button.disabled = false;
|
||||||
|
button.innerHTML = "<br/>重新发送验证码";
|
||||||
|
clearInterval(time);
|
||||||
|
} else {
|
||||||
|
button.innerHTML = "<br/>重新发送验证码("+num+")";
|
||||||
|
}
|
||||||
|
sessionStorage.setItem("admin_sign_num", --num);
|
||||||
|
} , 1000);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
// 发送验证码
|
||||||
|
function sendCode(){
|
||||||
|
$(document).ready(function(){
|
||||||
|
//请求参数对象
|
||||||
|
var email = document.getElementById("email").value;
|
||||||
|
|
||||||
|
//执行Ajax请求
|
||||||
|
$.ajax({
|
||||||
|
url: "/admin/sign/send/code?email="+email,
|
||||||
|
|
||||||
|
success : function(result) {
|
||||||
|
if (result){
|
||||||
|
alert("验证码已成功发送至您的邮箱,请注意查收");
|
||||||
|
} else {
|
||||||
|
alert("邮箱格式不正确");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function (result) {
|
||||||
|
alert("验证码发送失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<script th:src="@{/js/admin/index.js}"></script>
|
<script th:src="@{/js/admin/index.js}"></script>
|
||||||
<script th:include="admin/common/model::alertMsg"></script>
|
<script th:include="admin/common/model::alertMsg"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
color: grey;
|
color: grey;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
font-size: 16px;
|
font-size: 12px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
form input:hover{
|
form input:hover{
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
这里还没有任何商户信息!!
|
这里还没有任何商户信息!!
|
||||||
</h3>
|
</h3>
|
||||||
<!-- /. PAGE INNER -->
|
<!-- /. PAGE INNER -->
|
||||||
<table style="text-align: center;background:ghostwhite;font-size: 18px;position: relative;left: 5%;width: 90%">
|
<table style="text-align: center;background:ghostwhite;font-size: 14px;position: relative;left: 5%;width: 90%">
|
||||||
<tr style="height: 35px;background: orangered;color: white">
|
<tr style="height: 35px;background: orangered;color: white">
|
||||||
<th>商户logo</th>
|
<th>商户logo</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
@ -77,14 +77,14 @@
|
||||||
</tr>
|
</tr>
|
||||||
<!--/*@thymesVar id="mtList" type="jdk"*/-->
|
<!--/*@thymesVar id="mtList" type="jdk"*/-->
|
||||||
<tr th:each="mt : ${mtList} " style="height: 100px">
|
<tr th:each="mt : ${mtList} " style="height: 100px">
|
||||||
<td>
|
<td height="80px">
|
||||||
<img th:src="@{${mt.getHeader()}}" style="border-radius: 100%;width: 80px">
|
<img th:src="@{${mt.getHeader()}}" style="border-radius: 100%;width: 60px">
|
||||||
</td>
|
</td>
|
||||||
<td>[[${mt.getId()}]]</td>
|
<td>[[${mt.getId()}]]</td>
|
||||||
<td>[[${mt.getName()}]]</td>
|
<td>[[${mt.getName()}]]</td>
|
||||||
<td>[[${mt.getEmail()}]]</td>
|
<td>[[${mt.getEmail()}]]</td>
|
||||||
<td th:if="${mt.getState()}==1">已启用</td>
|
<td th:if="${mt.getState()}==1" style="font-weight: bold; color: deepskyblue">已启用</td>
|
||||||
<td th:if="${mt.getState()}==0">未启用</td>
|
<td th:if="${mt.getState()}==0" style="font-weight: bold; color: orangered">未启用</td>
|
||||||
<td>
|
<td>
|
||||||
<form th:action="@{/admin/merchant/update-ratio}" method="post">
|
<form th:action="@{/admin/merchant/update-ratio}" method="post">
|
||||||
<br/>
|
<br/>
|
||||||
|
@ -99,12 +99,12 @@
|
||||||
<input type="submit" value="删除" style="width: 65px;"
|
<input type="submit" value="删除" style="width: 65px;"
|
||||||
onclick="if (confirm('确认删除该商户?')==false)return false;">
|
onclick="if (confirm('确认删除该商户?')==false)return false;">
|
||||||
</form>
|
</form>
|
||||||
<form th:action="@{/admin/merchant/update-merchant(email=${mt.getEmail()},state=0)}" method="post">
|
<form th:action="@{/admin/merchant/update-merchant(email=${mt.getEmail()},state=0,id=${mt.getId()})}" method="post">
|
||||||
<input th:if="${mt.getState()}==1" type="submit" value="停用" style="width: 65px;background: deepskyblue;color: white"
|
<input th:if="${mt.getState()}==1" type="submit" value="停用" style="width: 65px;background: deepskyblue; color: white; font-weight: bold"
|
||||||
onclick="if (confirm('确认停用该商户?')==false)return false; ">
|
onclick="if (confirm('确认停用该商户?')==false)return false; ">
|
||||||
</form>
|
</form>
|
||||||
<form th:action="@{/admin/merchant/update-merchant(email=${mt.getEmail()},state=1)}" method="post">
|
<form th:action="@{/admin/merchant/update-merchant(email=${mt.getEmail()},state=1,id=${mt.getId()})}" method="post">
|
||||||
<input th:if="${mt.getState()}==0" type="submit" value="启用" style="width: 65px;background: gold;color: white"
|
<input th:if="${mt.getState()}==0" type="submit" value="启用" style="width: 65px;background: orangered; color: white; font-weight: bold"
|
||||||
onclick="if (confirm('确认启用商户?')==false)return false; ">
|
onclick="if (confirm('确认启用商户?')==false)return false; ">
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -32,13 +32,13 @@
|
||||||
<textarea style="background: white;height: 50px" name="title" placeholder="通知标题"></textarea>
|
<textarea style="background: white;height: 50px" name="title" placeholder="通知标题"></textarea>
|
||||||
<textarea style="background: white;height: 300px" name="context" placeholder="通知内容"></textarea>
|
<textarea style="background: white;height: 300px" name="context" placeholder="通知内容"></textarea>
|
||||||
<label>
|
<label>
|
||||||
<input name="type" value="0" type="radio" style="width: 10px;height: 10px" checked="checked"><b style="color: red;">管理员</b>
|
<input name="type" value="0" type="radio" style="width: 10px;height: 10px" disabled><b style="color: red;">管理员</b>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input name="type" value="1" type="radio" style="width: 10px;height: 10px"><b style="color: mediumpurple;">商户</b>
|
<input name="type" value="1" type="radio" style="width: 10px;height: 10px" disabled><b style="color: mediumpurple;">商户</b>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input name="type" value="2" type="radio" style="width: 10px;height: 10px"><b style="color: limegreen;">会员</b>
|
<input name="type" value="2" type="radio" style="width: 10px;height: 10px" checked><b style="color: limegreen;">会员</b>
|
||||||
</label>
|
</label>
|
||||||
<label style="float: right">
|
<label style="float: right">
|
||||||
<input style="background: deepskyblue;color: white;font-weight: bold" value="发送" type="submit">
|
<input style="background: deepskyblue;color: white;font-weight: bold" value="发送" type="submit">
|
||||||
|
|
|
@ -64,13 +64,21 @@
|
||||||
<th>会员标记</th>
|
<th>会员标记</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr th:each="user : ${userList}" style="height: 100px">
|
<tr th:each="user : ${userList}" style="height: 100px">
|
||||||
<td>
|
<td height="80px">
|
||||||
<img th:src="@{${user.getHeader()}}" style="width: 80px;border-radius: 100%">
|
<img th:src="@{${user.getHeader()}}" style="width: 60px;border-radius: 100%">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<b>[[${user.getId()}]]</b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<b>[[${user.getUsername()}]]</b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<b>[[${user.getEmail()}]]</b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<b>[[${user.getMark()}]]</b>
|
||||||
</td>
|
</td>
|
||||||
<td th:text="${user.getId()}"></td>
|
|
||||||
<td th:text="${user.getUsername()}"></td>
|
|
||||||
<td th:text="${user.getEmail()}"></td>
|
|
||||||
<td th:text="${user.getMark()}"></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="height: 100px">
|
<tr style="height: 100px">
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
|
|
|
@ -33,18 +33,16 @@
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h2 class="card-title">商户注册</h2>
|
<h2 class="card-title">商户注册</h2>
|
||||||
<p>请使用您的电子邮箱进行注册</p>
|
<p>请使用您的电子邮箱进行注册</p>
|
||||||
<form th:action="@{/merchant/sign-up}" method="post">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<input id="name" class="form-control" type="text" placeholder="名称" name="name">
|
||||||
<input class="form-control" type="text" placeholder="名称" name="name">
|
</div>
|
||||||
</div>
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<input id="email" class="form-control" type="email" placeholder="邮箱" name="email">
|
||||||
<input class="form-control" type="email" placeholder="邮箱" name="email">
|
</div>
|
||||||
</div>
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<input id="password" class="form-control" type="password" placeholder="密码" name="password">
|
||||||
<input class="form-control" type="password" placeholder="密码" name="password">
|
</div>
|
||||||
</div>
|
<button id="button" onclick="button()" class="btn btn-lg">注册</button>
|
||||||
<button class="btn btn-lg">注册</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-back js-btn" data-target="welcome"><i class="fas fa-angle-left"></i></button>
|
<button class="btn btn-back js-btn" data-target="welcome"><i class="fas fa-angle-left"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,7 +58,6 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="form-control" type="password" placeholder="密码" name="password">
|
<input class="form-control" type="password" placeholder="密码" name="password">
|
||||||
</div>
|
</div>
|
||||||
<p><a href="#">忘记密码?</a></p>
|
|
||||||
<button class="btn btn-lg">登录</button>
|
<button class="btn btn-lg">登录</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -70,10 +67,55 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script th:src="@{/js/merchant/index.js}"></script>
|
<script th:src="@{/js/merchant/index.js}"></script>
|
||||||
|
|
||||||
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
|
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
|
||||||
|
<script>
|
||||||
|
if (sessionStorage.getItem("admin_sign_num") > 0) {
|
||||||
|
sessionStorage.setItem("admin_sign_num", sessionStorage.getItem("admin_sign_num"));
|
||||||
|
change();
|
||||||
|
}
|
||||||
|
function button() {
|
||||||
|
var email = document.getElementById("email").value;
|
||||||
|
var name = document.getElementById("name").value;
|
||||||
|
var password = document.getElementById("password").value;
|
||||||
|
|
||||||
|
if (email == "") {
|
||||||
|
alert("邮箱不能为空!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/merchant/sign-up?email="+email+"&name="+name+"&password="+password,
|
||||||
|
contentType: "application/json; charset=utf-8",
|
||||||
|
success: function (msg) {
|
||||||
|
alert(msg);
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
alert("网络出现了问题!!")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
sessionStorage.setItem("admin_sign_num", 60);
|
||||||
|
change();
|
||||||
|
}
|
||||||
|
function change() {
|
||||||
|
var button = document.getElementById("button");
|
||||||
|
button.style.background = "grey";
|
||||||
|
button.disabled = true;
|
||||||
|
var time = setInterval(function () {
|
||||||
|
var num = sessionStorage.getItem("admin_sign_num");
|
||||||
|
if (num <= 0) {
|
||||||
|
button.style.background = "orangered";
|
||||||
|
button.style.color = "white";
|
||||||
|
button.disabled = false;
|
||||||
|
button.innerText = "重新发送验证码";
|
||||||
|
clearInterval(time);
|
||||||
|
} else {
|
||||||
|
button.innerText = "重新发送验证码("+num+")";
|
||||||
|
}
|
||||||
|
sessionStorage.setItem("admin_sign_num", --num);
|
||||||
|
} , 1000);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
if ([[${param.msg}]] != null){
|
if ([[${param.msg}]] != null){
|
||||||
|
|
|
@ -54,22 +54,24 @@
|
||||||
<section class="wrapper">
|
<section class="wrapper">
|
||||||
<table style="text-align: center">
|
<table style="text-align: center">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td colspan="2">
|
||||||
<h4>商户头像(推荐logo长宽比例1:1)</h4>
|
<h4>商户头像(推荐logo长宽比例1:1)</h4>
|
||||||
<form th:action="@{/merchant/update-header}" method="post" enctype="multipart/form-data">
|
<form th:action="@{/merchant/update-header}" method="post" enctype="multipart/form-data">
|
||||||
<!--/*@thymesVar id="lowImg" type="com.example.jieyue.common.entity.SysMtUi"*/-->
|
<!--/*@thymesVar id="lowImg" type="com.example.jieyue.common.entity.SysMtUi"*/-->
|
||||||
<img th:src="@{${session.merchant.getHeader()}}" width="320px" height="320" onclick="upImg('headerInput')" id="header">
|
<img th:src="@{${session.merchant.getHeader()}}" width="240" height="240" onclick="upImg('headerInput')" id="header" style="border-radius: 100%">
|
||||||
<input style="display: none;" id="headerInput" type="file" name="img" onchange="showImg(this,'header')">
|
<input style="display: none;" id="headerInput" type="file" name="img" onchange="showImg(this,'header')">
|
||||||
<br/>
|
<br/>
|
||||||
<input type="submit" value="修改" style="background: purple;border-radius: 5px;color: white">
|
<input type="submit" value="修改" style="background: purple;border-radius: 5px;color: white">
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<h4>商城首页的店铺推荐海报(推荐400x320)</h4>
|
<h4>商城首页的店铺推荐海报(推荐400x320)</h4>
|
||||||
<form th:action="@{/merchant/update-home-img}" method="post" enctype="multipart/form-data">
|
<form th:action="@{/merchant/update-home-img}" method="post" enctype="multipart/form-data">
|
||||||
<!--/*@thymesVar id="homeImg" type="com.example.jieyue.common.entity.SysMtUi"*/-->
|
<!--/*@thymesVar id="homeImg" type="com.example.jieyue.common.entity.SysMtUi"*/-->
|
||||||
<img th:if="${homeImg}!=null" th:src="@{${homeImg.getUrl()}}" width="400px" height="320px" onclick="upImg('homeInput400')" id="home400">
|
<img th:if="${homeImg}!=null" th:src="@{${homeImg.getUrl()}}" width="300" height="240" onclick="upImg('homeInput400')" id="home400">
|
||||||
<img th:unless="${homeImg}!=null" th:src="@{/image/user/home/banner/7.jpg}" width="400px" height="320px" onclick="upImg('homeInput400')" id="home400">
|
<img th:unless="${homeImg}!=null" th:src="@{/image/user/home/banner/7.jpg}" width="300" height="240" onclick="upImg('homeInput400')" id="home400">
|
||||||
<input style="display: none;" id="homeInput400" type="file" name="img" onchange="showImg(this,'home400')">
|
<input style="display: none;" id="homeInput400" type="file" name="img" onchange="showImg(this,'home400')">
|
||||||
<input type="number" name="width" value="400" hidden>
|
<input type="number" name="width" value="400" hidden>
|
||||||
<input type="number" name="height" value="320" hidden>
|
<input type="number" name="height" value="320" hidden>
|
||||||
|
@ -78,14 +80,12 @@
|
||||||
<a style="color: purple" th:if="${homeImg}!=null" th:href="@{/merchant/del-home-img(id=${homeImg.getId()})}">删除</a>
|
<a style="color: purple" th:if="${homeImg}!=null" th:href="@{/merchant/del-home-img(id=${homeImg.getId()})}">删除</a>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<h4>商城首页的店铺推荐海报(推荐600x310,点击图片选择)</h4>
|
<h4>商城首页的店铺推荐海报(推荐600x310,点击图片选择)</h4>
|
||||||
<form th:action="@{/merchant/update-home-img}" method="post" enctype="multipart/form-data">
|
<form th:action="@{/merchant/update-home-img}" method="post" enctype="multipart/form-data">
|
||||||
<!--/*@thymesVar id="lowImg" type="com.example.jieyue.common.entity.SysMtUi"*/-->
|
<!--/*@thymesVar id="lowImg" type="com.example.jieyue.common.entity.SysMtUi"*/-->
|
||||||
<img th:if="${lowImg}!=null" th:src="@{${lowImg.getUrl()}}" width="600px" height="310px" onclick="upImg('homeInput600')" id="home600">
|
<img th:if="${lowImg}!=null" th:src="@{${lowImg.getUrl()}}" width="450" height="235" onclick="upImg('homeInput600')" id="home600">
|
||||||
<img th:unless="${lowImg}!=null" th:src="@{/image/user/home/blog/blog1.jpg}" width="600px" height="310px" onclick="upImg('homeInput600')" id="home600">
|
<img th:unless="${lowImg}!=null" th:src="@{/image/user/home/blog/blog1.jpg}" width="450" height="235" onclick="upImg('homeInput600')" id="home600">
|
||||||
<input style="display: none;" id="homeInput600" type="file" name="img" onchange="showImg(this,'home600')">
|
<input style="display: none;" id="homeInput600" type="file" name="img" onchange="showImg(this,'home600')">
|
||||||
<input type="number" name="width" value="600" hidden>
|
<input type="number" name="width" value="600" hidden>
|
||||||
<input type="number" name="height" value="310" hidden>
|
<input type="number" name="height" value="310" hidden>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||||
<head>
|
<head>
|
||||||
<title>商品列表</title>
|
<title>用户列表</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="keywords" content="" />
|
<meta name="keywords" content="" />
|
||||||
|
@ -78,8 +78,8 @@
|
||||||
<th>会员标记</th>
|
<th>会员标记</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr th:each="user : ${userList}" style="height: 100px">
|
<tr th:each="user : ${userList}" style="height: 100px">
|
||||||
<td>
|
<td height="80px">
|
||||||
<img th:src="@{${user.getHeader()}}" style="width: 80px;border-radius: 100%">
|
<img th:src="@{${user.getHeader()}}" style="width: 60px;border-radius: 100%">
|
||||||
</td>
|
</td>
|
||||||
<td th:text="${user.getId()}"></td>
|
<td th:text="${user.getId()}"></td>
|
||||||
<td th:text="${user.getUsername()}"></td>
|
<td th:text="${user.getUsername()}"></td>
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="product-thumbnail">
|
<td class="product-thumbnail">
|
||||||
<a th:href="@{/user/product(id=${cart.get('goodsId')})}">
|
<a th:href="@{/user/product(id=${cart.get('goodsId')})}">
|
||||||
<img th:src="@{${cart.get('goodsImg')}}" alt=""/>
|
<img th:src="@{${cart.get('goodsImg')}}" width="100%" alt=""/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="product-name">
|
<td class="product-name">
|
||||||
|
@ -162,20 +162,20 @@
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="product-price">
|
<td class="product-price">
|
||||||
<span class="amount">
|
<span class="amount" style="color: gold">
|
||||||
¥[[${cart.get("goodsPrice")}]]
|
¥[[${cart.get("goodsPrice")}]]
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="product-quantity">
|
<td class="product-quantity">
|
||||||
[[${cart.get("goodsMerchant")}]]
|
<a th:href="@{/user/shop(id = ${cart.get('merchantId')})}">[[${cart.get("goodsMerchant")}]]</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="product-subtotal">
|
<td class="product-subtotal" style="color: red">
|
||||||
<input hidden="hidden" th:id="'goodsStock'+${stat.index}" th:value="${cart.get('goodsStock')}">
|
<input hidden="hidden" th:id="'goodsStock'+${stat.index}" th:value="${cart.get('goodsStock')}">
|
||||||
<input hidden="hidden" th:id="'goodsState'+${stat.index}" th:value="${cart.get('goodsState')}">
|
<input hidden="hidden" th:id="'goodsState'+${stat.index}" th:value="${cart.get('goodsState')}">
|
||||||
[[${cart.get("goodsStock")}]]
|
[[${cart.get("goodsStock")}]]
|
||||||
</td>
|
</td>
|
||||||
<td class="product-subtotal">
|
<td class="product-subtotal">
|
||||||
<input onclick="cartGoods()" th:id="'goodsNum'+${stat.index}" type="number" min="1" th:value="${cart.get('goodsNum')}"/>
|
<input onclick="cartGoods()" th:id="'goodsNum'+${stat.index}" type="number" min="1" th:max="${cart.get('goodsStock')}" th:value="${cart.get('goodsNum')}"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="product-remove">
|
<td class="product-remove">
|
||||||
<a onclick="if (confirm('将该商品移出购物车?')==false)return false; "
|
<a onclick="if (confirm('将该商品移出购物车?')==false)return false; "
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
var checkbox = document.getElementById("checkbox" + i);
|
var checkbox = document.getElementById("checkbox" + i);
|
||||||
if (goodsStock.value < 1 || goodsStock.value < goodsNum.value || goodsState.value != 1){
|
if (goodsStock.value < 1 || goodsStock.value < goodsNum.value || goodsState.value != 1){
|
||||||
checkbox.checked = false;
|
checkbox.checked = false;
|
||||||
alert("购物车中存在库存不足,或已下架的商品!");
|
alert("您的购物车中存在超出库存,或者已下架的商品!");
|
||||||
}
|
}
|
||||||
if (checkbox.checked){
|
if (checkbox.checked){
|
||||||
var goodsId = document.getElementById("goodsId" + i);
|
var goodsId = document.getElementById("goodsId" + i);
|
||||||
|
|
|
@ -43,18 +43,65 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cont_form_sign_up"> <a href="#" onClick="ocultar_login_sign_up()"><i class="material-icons"></i></a>
|
<div class="cont_form_sign_up"> <a href="#" onClick="ocultar_login_sign_up()"><i class="material-icons"></i></a>
|
||||||
<h2>SIGN UP</h2>
|
<h2>SIGN UP</h2>
|
||||||
<form th:action="@{/user/sign-up}" method="post">
|
<br/><br/>
|
||||||
<input type="text" placeholder="邮箱" name="email"/>
|
<input style="border: 0;width: 80%;height: 40px;border-radius: 5px;text-align: left;padding-left: 10px" id="email" type="text" placeholder="邮箱" name="email"/>
|
||||||
<input type="text" placeholder="昵称" name="username"/>
|
<br/><br/>
|
||||||
<input type="password" placeholder="密码" name="password"/>
|
<input style="border: 0;width: 80%;height: 40px;border-radius: 5px;text-align: left;padding-left: 10px" id="username" type="text" placeholder="昵称" name="username"/>
|
||||||
<input type="password" placeholder="确认密码" name="repwd"/>
|
<br/><br/>
|
||||||
<button class="btn_sign_up" onClick="cambiar_sign_up()">注册</button>
|
<input style="border: 0;width: 80%;height: 40px;border-radius: 5px;text-align: left;padding-left: 10px" id="password" type="password" placeholder="密码" name="password"/>
|
||||||
</form>
|
<br/><br/>
|
||||||
|
<input style="border: 0;width: 80%;height: 40px;border-radius: 5px;text-align: left;padding-left: 10px" id="repwd" type="password" placeholder="确认密码" name="repwd"/>
|
||||||
|
<br/><br/>
|
||||||
|
<button type="button" id="button" class="btn_sign_up" onclick="button()">注册</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
if (sessionStorage.getItem("user_sign_num") > 0) {
|
||||||
|
sessionStorage.setItem("user_sign_num", sessionStorage.getItem("user_sign_num"));
|
||||||
|
change();
|
||||||
|
}
|
||||||
|
function button() {
|
||||||
|
var email = document.getElementById("email").value;
|
||||||
|
var username = document.getElementById("username").value;
|
||||||
|
var password = document.getElementById("password").value;
|
||||||
|
var repwd = document.getElementById("repwd").value;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/user/sign-up?email="+email+"&username="+username+"&password="+password+"&repwd="+repwd,
|
||||||
|
contentType: "application/json; charset=utf-8",
|
||||||
|
success: function (msg) {
|
||||||
|
alert(msg);
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
alert("网络出现了问题!!")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
sessionStorage.setItem("user_sign_num", 60);
|
||||||
|
change();
|
||||||
|
}
|
||||||
|
|
||||||
|
function change() {
|
||||||
|
var button = document.getElementById("button");
|
||||||
|
button.style.background = "grey";
|
||||||
|
button.disabled = true;
|
||||||
|
var time = setInterval(function () {
|
||||||
|
var num = sessionStorage.getItem("user_sign_num");
|
||||||
|
if (num <= 0) {
|
||||||
|
button.style.background = "orangered";
|
||||||
|
button.disabled = false;
|
||||||
|
button.innerText = "重新发送验证码";
|
||||||
|
clearInterval(time);
|
||||||
|
} else {
|
||||||
|
button.innerText = "重新发送验证码("+num+")";
|
||||||
|
}
|
||||||
|
sessionStorage.setItem("user_sign_num", --num);
|
||||||
|
} , 1000);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<script th:src="@{/js/user/index.js}"></script>
|
<script th:src="@{/js/user/index.js}"></script>
|
||||||
<script th:include="user/common/model::alertMsg"></script>
|
<script th:include="user/common/model::alertMsg"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -80,12 +80,16 @@
|
||||||
<script th:src="@{/js/user/home/vendor/modernizr-2.8.3.min.js}"></script>
|
<script th:src="@{/js/user/home/vendor/modernizr-2.8.3.min.js}"></script>
|
||||||
<style>
|
<style>
|
||||||
table {
|
table {
|
||||||
background: #bcc2d8;
|
background: #bcc2e4;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
width: 85%;
|
width: 85%;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
color: darkslategrey;
|
color: darkslategrey;
|
||||||
}
|
}
|
||||||
|
pre {
|
||||||
|
background: #bcc2e4;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
.context{
|
.context{
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
@ -117,6 +121,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- entry-header-area end -->
|
||||||
|
|
||||||
|
<!-- cart-main-area start -->
|
||||||
<div class="cart-main-area">
|
<div class="cart-main-area">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -131,8 +138,10 @@
|
||||||
<table th:each="notice : ${noticeList}">
|
<table th:each="notice : ${noticeList}">
|
||||||
<tr style="height: 36px">
|
<tr style="height: 36px">
|
||||||
<td style="width: 50px;"></td>
|
<td style="width: 50px;"></td>
|
||||||
<td style="position:relative;font-size: 24px"
|
<td style="position:relative;font-size: 24px">
|
||||||
th:text="${notice.getTitle()}">
|
<br/><br/>
|
||||||
|
<b>[[${notice.getTitle()}]]</b>
|
||||||
|
<br/><br/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" th:onclick="delNotice('[[${notice.getId()}]]')" style="font-weight: bold;font-size: 30px;float: right;
|
<a href="#" th:onclick="delNotice('[[${notice.getId()}]]')" style="font-weight: bold;font-size: 30px;float: right;
|
||||||
|
@ -158,12 +167,14 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<hr/>
|
<hr style="color: black"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="overflow-x: hidden;">
|
<tr style="overflow-x: hidden;">
|
||||||
<td style="width: 50px;"></td>
|
<td style="width: 50px;"></td>
|
||||||
<td class="context" th:text="'系统消息:'+${notice.getContext()}"></td>
|
<td class="context">
|
||||||
|
<pre>[[${notice.getContext()}]]</pre>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
<table th:if="${orderList.size()} == 0">
|
<table th:if="${orderList.size()} == 0">
|
||||||
<tr style="height: 400px">
|
<tr style="height: 400px">
|
||||||
<td style="font-size: 24px">
|
<td style="font-size: 24px">
|
||||||
您还未在本网站购买任何商品
|
!!!这里是空的!!!
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
<td class="product-thumbnail">
|
<td class="product-thumbnail">
|
||||||
<a target="_blank"
|
<a target="_blank"
|
||||||
th:href="@{/user/product(id=${goodsList.get(stat.index).getId()})}">
|
th:href="@{/user/product(id=${goodsList.get(stat.index).getId()})}">
|
||||||
<img th:src="@{${goodsList.get(stat.index).getImg()}}" alt=""/>
|
<img th:src="@{${goodsList.get(stat.index).getImg()}}" width="100%" alt=""/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="product-name">
|
<td class="product-name">
|
||||||
|
|
Loading…
Reference in New Issue