mirror of
https://github.com/Hello-hao/Tbed.git
synced 2024-04-21 12:32:10 +00:00
2019-08-15更新
This commit is contained in:
+36
-22
@@ -1,17 +1,17 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : localhost
|
||||
Source Server : 129.28.173.126
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50720
|
||||
Source Host : localhost:3306
|
||||
Source Server Version : 50562
|
||||
Source Host : 129.28.173.126:3306
|
||||
Source Schema : picturebed
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50720
|
||||
Target Server Version : 50562
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 10/08/2019 16:24:06
|
||||
Date: 15/08/2019 16:49:51
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@@ -35,14 +35,14 @@ CREATE TABLE `config` (
|
||||
`domain` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点域名',
|
||||
`background1` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '首页背景图',
|
||||
`background2` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上传页面背景图',
|
||||
`sett` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`sett` int(2) NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of config
|
||||
-- ----------------------------
|
||||
INSERT INTO `config` VALUES (1, 3, 1, 'Hellohao', '网站由JAVA语言编写应用SpringBoot框架开发,前端全部组件由BootStrap/Layui框架编写。由作者个人更新维护,后期会加入更全面的功能供大家使用,如有BUG请与我反馈。', 'https://hellohao.nos-eastchina1.126.net/%E7%BD%91%E7%AB%99%E7%B4%A0%E6%9D%90/logo2.png', 'Hellohao 切勿上传违反中华人民共和国互联网法律条约资源', '<li><a href=\"http://www.hellohao.cn/\" rel=\"nofollow\" target=\"_blank\">作者博客</a></li><li><a href=\"http://bz.hellohao.cn/\" rel=\"nofollow\" target=\"_blank\">高清壁纸</a></li><li><a href=\"http://json.hellohao.cn/\" rel=\"nofollow\" target=\"_blank\">json格式化</a></li>', '也许...|这将是最好用的图床', 'console.log(\'百度统计JS代码\');', 'http://tc.hellohao.cn', 'https://hellohao.oss-cn-beijing.aliyuncs.com/Hellohao/eb83a0714030248.jpg', 'https://hellohao.oss-cn-beijing.aliyuncs.com/Hellohao/086650714030248.jpg', NULL);
|
||||
INSERT INTO `config` VALUES (1, 1, 1, 'Hellohao', '本站是Hellohao图床测试站,账号/密码:admin,为了更多人测试,切勿修改账号密码,恶意使用永久拉黑IP,并公布于众。', 'https://hellohao.nos-eastchina1.126.net/%E7%BD%91%E7%AB%99%E7%B4%A0%E6%9D%90/logo2.png', 'Hellohao 切勿上传违反中华人民共和国互联网法律条约资源', '<li><a href=\"http://www.hellohao.cn/\" rel=\"nofollow\" target=\"_blank\">作者博客</a></li><li><a href=\"http://bz.hellohao.cn/\" rel=\"nofollow\" target=\"_blank\">高清壁纸</a></li><li><a href=\"http://json.hellohao.cn/\" rel=\"nofollow\" target=\"_blank\">json格式化</a></li>', '也许...|这将是最好用的图床', 'console.log(\'百度统计JS代码\');', 'http://129.28.173.126:8088', 'https://hellohao.oss-cn-beijing.aliyuncs.com/Hellohao/eb83a0714030248.jpg', 'https://hellohao.oss-cn-beijing.aliyuncs.com/Hellohao/086650714030248.jpg', 1);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for emailconfig
|
||||
@@ -78,13 +78,7 @@ CREATE TABLE `imgdata` (
|
||||
`abnormal` int(2) NULL DEFAULT NULL COMMENT '异常',
|
||||
`source` int(2) NULL DEFAULT NULL COMMENT '存储源',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of imgdata
|
||||
-- ----------------------------
|
||||
INSERT INTO `imgdata` VALUES (1, 'admin/09bf60810015053.png', 'http://img.wwery.com/admin/09bf60810015053.png', 1, '2019-08-10', 71, NULL, 3);
|
||||
INSERT INTO `imgdata` VALUES (2, 'admin/d5b2c0810025302.png', 'http://img.wwery.com/admin/d5b2c0810025302.png', 1, '2019-08-10', 120, NULL, 3);
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 89 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for imgreview
|
||||
@@ -103,7 +97,7 @@ CREATE TABLE `imgreview` (
|
||||
-- ----------------------------
|
||||
-- Records of imgreview
|
||||
-- ----------------------------
|
||||
INSERT INTO `imgreview` VALUES (1, NULL, NULL, NULL, 0, 0);
|
||||
INSERT INTO `imgreview` VALUES (1, '1111111111111111', '11111111111111111', '111111111111111', 0, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for keys
|
||||
@@ -123,13 +117,13 @@ CREATE TABLE `keys` (
|
||||
-- ----------------------------
|
||||
-- Records of keys
|
||||
-- ----------------------------
|
||||
INSERT INTO `keys` VALUES (1, '', '', '', '', '', 1);
|
||||
INSERT INTO `keys` VALUES (2, '11111111', '222222222222', '444444444444', '555555555', 'http://1.1.1', 2);
|
||||
INSERT INTO `keys` VALUES (3, '', '', '0', '', '', 3);
|
||||
INSERT INTO `keys` VALUES (4, '123', '123', '4', '412', 'https://0.0', 4);
|
||||
INSERT INTO `keys` VALUES (1, '547046ec6495457783f040df098a8ce3', '255b334a4d174e95a3d9e5938f1966ab', 'https://nos-eastchina1.126.net', 'hellohao', 'https://hellohao.nos-eastchina1.126.net', 1);
|
||||
INSERT INTO `keys` VALUES (2, '', '', '', '', '', 2);
|
||||
INSERT INTO `keys` VALUES (3, '', '', '', '', '', 3);
|
||||
INSERT INTO `keys` VALUES (4, '', '', '', '', '', 4);
|
||||
INSERT INTO `keys` VALUES (5, '0', '0', '0', '0', '0', 5);
|
||||
INSERT INTO `keys` VALUES (6, '', '', '', '', '', 6);
|
||||
INSERT INTO `keys` VALUES (7, '234', '234124', '234124', '', '234142', 7);
|
||||
INSERT INTO `keys` VALUES (7, '', '', '', '', '', 7);
|
||||
INSERT INTO `keys` VALUES (8, '', '', '', '', '', 8);
|
||||
INSERT INTO `keys` VALUES (9, '', '', '', '', '', 9);
|
||||
INSERT INTO `keys` VALUES (10, '0', '', '0', '0', '0', 10);
|
||||
@@ -143,6 +137,26 @@ CREATE TABLE `notice` (
|
||||
`text` varchar(10000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of notice
|
||||
-- ----------------------------
|
||||
INSERT INTO `notice` VALUES (1, '2019-07-25');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sysconfig
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sysconfig`;
|
||||
CREATE TABLE `sysconfig` (
|
||||
`id` int(2) NOT NULL AUTO_INCREMENT,
|
||||
`register` int(2) NOT NULL COMMENT '是否可以注册',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sysconfig
|
||||
-- ----------------------------
|
||||
INSERT INTO `sysconfig` VALUES (1, 1);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uploadconfig
|
||||
-- ----------------------------
|
||||
@@ -163,7 +177,7 @@ CREATE TABLE `uploadconfig` (
|
||||
-- ----------------------------
|
||||
-- Records of uploadconfig
|
||||
-- ----------------------------
|
||||
INSERT INTO `uploadconfig` VALUES (1, 3, 5, 1, 5, 'gif,jpg,jpeg,bmp,png', 1, 1, 0);
|
||||
INSERT INTO `uploadconfig` VALUES (1, 2, 5, 1, 5, 'gif,jpg,jpeg,bmp,png', 2, 0, 1);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user
|
||||
@@ -179,7 +193,7 @@ CREATE TABLE `user` (
|
||||
`uid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户唯一标识',
|
||||
`isok` int(2) NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of user
|
||||
|
||||
@@ -6,6 +6,7 @@ import cn.hellohao.utils.StringUtils;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -31,7 +32,10 @@ public class AdminRootController {
|
||||
private UploadConfigService uploadConfigService;
|
||||
@Autowired
|
||||
private NoticeService noticeService;
|
||||
|
||||
@Autowired
|
||||
private SysConfigService sysConfigService;
|
||||
@Value("${systemupdate}")
|
||||
private String systemupdate;
|
||||
//返回对象存储界面
|
||||
@RequestMapping(value = "/touser")
|
||||
public String touser() {
|
||||
@@ -151,8 +155,10 @@ public class AdminRootController {
|
||||
public String towebconfig(Model model) {
|
||||
Config config = configService.getSourceype();
|
||||
UploadConfig updateConfig = uploadConfigService.getUpdateConfig();
|
||||
SysConfig sysConfig = sysConfigService.getstate();
|
||||
model.addAttribute("config",config);
|
||||
model.addAttribute("updateConfig",updateConfig);
|
||||
model.addAttribute("sysconfig",sysConfig);
|
||||
return "admin/webconfig";
|
||||
}
|
||||
//修改站点配置
|
||||
@@ -160,7 +166,7 @@ public class AdminRootController {
|
||||
@ResponseBody
|
||||
public Integer updateconfig(String webname,String explain, String logos,
|
||||
String footed, String links, String notice,String baidu,
|
||||
String domain,String background1,String background2 ) {
|
||||
String domain,String background1,String background2,Integer sett ) {
|
||||
Config config = new Config();
|
||||
config.setWebname(webname);
|
||||
config.setExplain(explain);
|
||||
@@ -172,6 +178,7 @@ public class AdminRootController {
|
||||
config.setDomain(domain);
|
||||
config.setBackground1(background1);
|
||||
config.setBackground2(background2);
|
||||
config.setSett(sett);
|
||||
Integer ret = configService.setSourceype(config);
|
||||
return ret;
|
||||
}
|
||||
@@ -192,6 +199,15 @@ public class AdminRootController {
|
||||
jsonArray.add(ret);
|
||||
return jsonArray.toString();
|
||||
}
|
||||
//修改注册开关
|
||||
@PostMapping("/setstate")
|
||||
@ResponseBody
|
||||
public Integer setstate(HttpSession session, SysConfig sysConfig) {
|
||||
Integer ret =-1;
|
||||
ret = sysConfigService.setstate(sysConfig);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
//关于系统
|
||||
@RequestMapping("/about")
|
||||
@@ -199,6 +215,7 @@ public class AdminRootController {
|
||||
//Integer ret = uploadConfigService.setUpdateConfig(updateConfig);
|
||||
User u = (User) session.getAttribute("user");
|
||||
model.addAttribute("level",u.getLevel());
|
||||
model.addAttribute("systemupdate",systemupdate);
|
||||
return "admin/about";
|
||||
}
|
||||
//检查更新
|
||||
|
||||
@@ -126,7 +126,6 @@ public class UpdateImgController {
|
||||
@ResponseBody
|
||||
public String upimg( HttpSession session
|
||||
, @RequestParam(value = "file", required = false) MultipartFile[] file) throws Exception {
|
||||
|
||||
Config config = configService.getSourceype();//查询当前系统使用的存储源类型。
|
||||
UploadConfig uploadConfig = uploadConfigService.getUpdateConfig();
|
||||
User u = (User) session.getAttribute("user");
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.hellohao.dao;
|
||||
|
||||
import cn.hellohao.pojo.SysConfig;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author Tiansh
|
||||
* @version 1.0
|
||||
* @date 2019/8/15 13:33
|
||||
*/
|
||||
@Mapper
|
||||
public interface SysConfigMapper {
|
||||
SysConfig getstate();
|
||||
Integer setstate(SysConfig sysConfig);
|
||||
}
|
||||
@@ -14,13 +14,13 @@ public class Config {
|
||||
private String domain;
|
||||
private String background1;
|
||||
private String background2;
|
||||
private String sett;
|
||||
private Integer sett;
|
||||
|
||||
|
||||
public Config() {
|
||||
}
|
||||
|
||||
public Config(Integer id, Integer sourcekey, Integer emails, String webname, String explain, String logos, String footed, String links, String notice, String baidu, String domain, String background1, String background2, String sett) {
|
||||
public Config(Integer id, Integer sourcekey, Integer emails, String webname, String explain, String logos, String footed, String links, String notice, String baidu, String domain, String background1, String background2, Integer sett) {
|
||||
this.id = id;
|
||||
this.sourcekey = sourcekey;
|
||||
this.emails = emails;
|
||||
@@ -141,11 +141,11 @@ public class Config {
|
||||
this.background2 = background2;
|
||||
}
|
||||
|
||||
public String getSett() {
|
||||
public Integer getSett() {
|
||||
return sett;
|
||||
}
|
||||
|
||||
public void setSett(String sett) {
|
||||
public void setSett(Integer sett) {
|
||||
this.sett = sett;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package cn.hellohao.pojo;
|
||||
|
||||
/**
|
||||
* @author Hellohao
|
||||
* @version 1.0
|
||||
* @date 2019/8/15 13:27
|
||||
*/
|
||||
public class SysConfig {
|
||||
private Integer id;
|
||||
private String register;
|
||||
|
||||
public SysConfig() {
|
||||
}
|
||||
|
||||
public SysConfig(Integer id, String register) {
|
||||
this.id = id;
|
||||
this.register = register;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getRegister() {
|
||||
return register;
|
||||
}
|
||||
|
||||
public void setRegister(String register) {
|
||||
this.register = register;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.hellohao.service;
|
||||
|
||||
import cn.hellohao.dao.SysConfigMapper;
|
||||
import cn.hellohao.pojo.SysConfig;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author Hellohao
|
||||
* @version 1.0
|
||||
* @date 2019/8/15 13:46
|
||||
*/
|
||||
@Service
|
||||
public interface SysConfigService {
|
||||
SysConfig getstate();
|
||||
Integer setstate(SysConfig sysConfig);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.hellohao.service.impl;
|
||||
|
||||
import cn.hellohao.dao.SysConfigMapper;
|
||||
import cn.hellohao.pojo.SysConfig;
|
||||
import cn.hellohao.service.SysConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author Hellohao
|
||||
* @version 1.0
|
||||
* @date 2019/8/15 13:48
|
||||
*/
|
||||
@Service
|
||||
public class SysConfigServiceImpl implements SysConfigService {
|
||||
@Autowired
|
||||
private SysConfigMapper sysConfigMapper;
|
||||
@Override
|
||||
public SysConfig getstate() {
|
||||
return sysConfigMapper.getstate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer setstate(SysConfig sysConfig) {
|
||||
return sysConfigMapper.setstate(sysConfig);
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ multipart.maxFileSize=10240KB
|
||||
multipart.maxRequestSize=10240KB
|
||||
spring.thymeleaf.mode = LEGACYHTML5
|
||||
spring.http.multipart.location=/data/upload_tmp
|
||||
systemupdate=2019-08-10
|
||||
systemupdate=2019-08-15
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.hellohao.dao.SysConfigMapper">
|
||||
|
||||
<select id="getstate" resultType="cn.hellohao.pojo.SysConfig">
|
||||
select * from sysconfig where id = 1
|
||||
</select>
|
||||
|
||||
<update id="setstate" parameterType="cn.hellohao.pojo.SysConfig">
|
||||
UPDATE sysconfig
|
||||
<set>
|
||||
<if test="register != null">
|
||||
`register` = #{register}
|
||||
</if>
|
||||
</set>
|
||||
where id=1
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -27,7 +27,7 @@
|
||||
<hr />
|
||||
<h3><i class="layui-icon layui-icon-login-qq"> </i>开发者交流群:32452345342</h3>
|
||||
<hr />
|
||||
<h3><i class="layui-icon layui-icon-auz"> </i>当前系统版本:2019-08-10 <a onclick="sysupdate('2019-08-10');" class="layui-btn layui-btn-normal layui-btn-sm">检查更新</a></h3>
|
||||
<h3><i class="layui-icon layui-icon-auz"> </i><span id="dates" th:text="${systemupdate}"></span> <a onclick="sysupdate();" class="layui-btn layui-btn-normal layui-btn-sm">检查更新</a></h3>
|
||||
<hr />
|
||||
<h3 style="font-weight: bold;"><i class="layui-icon layui-icon-rmb"> </i>支持一下作者吧:</h3>
|
||||
<br />
|
||||
@@ -46,7 +46,8 @@
|
||||
|
||||
})
|
||||
});
|
||||
function sysupdate(v) {
|
||||
function sysupdate() {
|
||||
var v = $('#dates').text();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/admin/root/sysupdate",
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
.layui-logo{
|
||||
font-family: 'Old English Text MT', 'EngraversOldEnglishBT-Bold', 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
}
|
||||
#titles{
|
||||
font-size: 1.2em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -24,7 +27,7 @@
|
||||
<!-- logo 区域 -->
|
||||
<div class="layui-logo">
|
||||
<!-- <img src="images/security.png" alt="logo"/>-->
|
||||
<cite> 图床后台管理 </cite>
|
||||
<span id="titles"> <i style="font-size: 1.5em;" class="layui-icon layui-icon-engine"> </i>Console</span>
|
||||
</div>
|
||||
<!-- 头部区域 -->
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
<li class="layui-this" lay-id="111">首页设置</li>
|
||||
<li lay-id="222">百度统计</li>
|
||||
<li lay-id="333">上传配置</li>
|
||||
<li lay-id="444">站点配置</li>
|
||||
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
|
||||
<form class="layui-form layui-form-pane" action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">首页公告</label>
|
||||
@@ -105,8 +105,18 @@
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
<br />
|
||||
<form class="layui-form-item " >
|
||||
<div class="laydfdaui-form-item">
|
||||
<label class="layui-form-label">首页类型</label>
|
||||
<div class="layui-input-block" id="sett">
|
||||
<input type="radio" id="sett1" name="settweb" value="1" title="默认首页" checked>
|
||||
<input type="radio" id="sett2" name="settweb" value="2" title="精简首页">
|
||||
</div><span style="color: #DAA5A6;">精简首页:页面加载完直接打开上传页面,没有展示页</span>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<br />
|
||||
<a class="layui-btn" lay-filter="demo2" onclick="updateconfig()">保存</a>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
@@ -191,8 +201,8 @@
|
||||
<div class="laydfdaui-form-item">
|
||||
<label class="layui-form-label">链接格式</label>
|
||||
<div class="layui-input-block" id="imgurltype">
|
||||
<input type="radio" name="urltype" value="1" title="用户名格式:/user/">
|
||||
<input type="radio" name="urltype" value="2" title="日期格式:/YY/mm/dd/" checked>
|
||||
<input type="radio" id="urltype1" name="urltype" value="1" title="用户名格式:/user/">
|
||||
<input type="radio" id="urltype2" name="urltype" value="2" title="日期格式:/YY/mm/dd/" checked>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -200,6 +210,20 @@
|
||||
|
||||
<a class="layui-btn" lay-filter="demo2" onclick="scconfig()">保存</a>
|
||||
</div>
|
||||
<!--站点设置-->
|
||||
<div class="layui-tab-item">
|
||||
<form class="layui-form layui-form-pane" action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开放注册</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="dologo" type="checkbox" name="close" lay-skin="switch" lay-filter="switchTest3"
|
||||
lay-text="开启|关闭">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<h3>更多功能陆续开放...</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -209,6 +233,7 @@
|
||||
<script type="text/javascript">
|
||||
var isupval = [[${updateConfig.getIsupdate()}]];
|
||||
var isapi = [[${updateConfig.getApi()}]];
|
||||
var state = [[${sysconfig.getRegister()}]];
|
||||
$(function () {
|
||||
layui.use(['form','table','element'], function(){
|
||||
var table = layui.table;
|
||||
@@ -229,6 +254,15 @@
|
||||
upapi(0);
|
||||
}
|
||||
});
|
||||
|
||||
form.on('switch(switchTest3)', function (data) {
|
||||
if (this.checked == true) {
|
||||
setstate(1);
|
||||
} else {
|
||||
setstate(2);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
if (isupval == 1) {
|
||||
$('#upopen').attr("checked", 'hellohao'); //增加属性
|
||||
@@ -240,14 +274,26 @@
|
||||
} else {
|
||||
$('#bedapi').removeAttr("checked"); //移除属性
|
||||
}
|
||||
if (state == 1) {
|
||||
$('#dologo').attr("checked", 'hellohao'); //增加属性
|
||||
} else {
|
||||
$('#dologo').removeAttr("checked"); //移除属性
|
||||
}
|
||||
|
||||
});
|
||||
$(function () {
|
||||
var usertype = [[${updateConfig.getUrltype()!=null?updateConfig.getUrltype():1}]];
|
||||
var sett = [[${config.getSett()}]];
|
||||
if(usertype==2){
|
||||
$('input:radio:input:radio:last').attr('checked', 'true');
|
||||
$('#urltype2:radio:input:radio:last').attr('checked', 'true');
|
||||
}else{
|
||||
$('input:radio:first').attr('checked', 'true');
|
||||
$('#urltype1:radio:first').attr('checked', 'true');
|
||||
}
|
||||
if(sett==2){
|
||||
$('#sett2:radio:input:radio:last').attr('checked', 'true');
|
||||
}else{
|
||||
$('#sett1:radio:first').attr('checked', 'true');
|
||||
}
|
||||
});
|
||||
function updateconfig() {
|
||||
var webname = $("#webname").val();
|
||||
@@ -259,12 +305,13 @@
|
||||
var domain = $("#domain").val();
|
||||
var background1 = $("#background1").val();
|
||||
var background2 = $("#background2").val();
|
||||
var sett = $('#sett input[name="settweb"]:checked ').val();
|
||||
if (webname != "" && domain!="" ) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/admin/root/updateconfig",
|
||||
dataType: "json",
|
||||
data: {webname: webname, explain: explain, logos: logos,footed:footed,links:links,notice:notice,domain:domain,background1:background1,background2:background2},
|
||||
data: {webname: webname, explain: explain, logos: logos,footed:footed,links:links,notice:notice,domain:domain,background1:background1,background2:background2,sett:sett},
|
||||
success: function (data) {
|
||||
var vals = Number(data);
|
||||
if (vals > 0) {
|
||||
@@ -371,6 +418,26 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function setstate(values) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/admin/root/setstate",
|
||||
dataType: "json",
|
||||
data: {register: values},
|
||||
success: function (data) {
|
||||
var vals = Number(data);
|
||||
if (vals > 0) {
|
||||
if (values == 1) {
|
||||
layer.msg("已开放注册功能", {icon: 1});
|
||||
} else {
|
||||
layer.msg("已禁用注册功能", {icon: 1});
|
||||
}
|
||||
} else {
|
||||
layer.msg("操作失败,请重新打开页面会后尝试", {icon: 2});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -116,7 +116,7 @@
|
||||
<!-- section container -->
|
||||
<div class="section-container">
|
||||
<!-- home section -->
|
||||
<section class="home-section">
|
||||
<section id="diyi" class="home-section">
|
||||
<!-- section background -->
|
||||
<div class="bg-container"></div>
|
||||
<!-- end section background -->
|
||||
@@ -183,7 +183,7 @@ Technology constantly updated, we will always move forward on the road ahead.
|
||||
<!-- end home section -->
|
||||
<div class="tlinks">Collect from <a href="/" >网站建设</a></div>
|
||||
<!-- contact section -->
|
||||
<section class="contact-section">
|
||||
<section id="dier" class="contact-section">
|
||||
<ul style=" position: absolute;right: 63px;top: 24px;z-index: 9999;">
|
||||
<li class="active">
|
||||
<a class="menu-link" data-section="home" data-nav-title="home"data-section-pos="0" data-section-posy="0">
|
||||
@@ -202,7 +202,7 @@ Technology constantly updated, we will always move forward on the road ahead.
|
||||
<!-- <div class="form-group">-->
|
||||
<!--图片上传模板-->
|
||||
<div id="wrapper">
|
||||
<div id="container">
|
||||
<div id="container" >
|
||||
<!--头部,相册选择和格式选择-->
|
||||
<div id="uploader">
|
||||
<div class="queueList">
|
||||
@@ -389,6 +389,12 @@ Technology constantly updated, we will always move forward on the road ahead.
|
||||
});
|
||||
$(function () {
|
||||
var sc = [[${error}]];
|
||||
var sett = [[${config.getSett()}]];
|
||||
if(sett!=1){
|
||||
$('#diyi').removeClass('home-section');
|
||||
$('#dier').addClass('home-section')
|
||||
$('#dier').removeClass('contact-section');
|
||||
}
|
||||
if(sc!=1 && sc!=null){
|
||||
alert(sc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user