├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── pom.xml ├── schoolpig.sql └── src ├── main ├── java │ └── com │ │ └── pigschool │ │ └── xyzshow │ │ ├── XyzShowApplication.java │ │ ├── common │ │ ├── CommonStatus.java │ │ └── JsonReturn.java │ │ ├── config │ │ └── WebConfiguration.java │ │ ├── controller │ │ ├── IndexController.java │ │ ├── LoginController.java │ │ ├── SmController.java │ │ ├── TestController.java │ │ └── UploadController.java │ │ ├── exception │ │ └── GlobalException.java │ │ ├── interceptor │ │ └── LoginInterceptor.java │ │ ├── mapper │ │ ├── XyzContentMapper.java │ │ ├── XyzExchangeMapper.java │ │ ├── XyzFavoriteMapper.java │ │ ├── XyzItemMapper.java │ │ ├── XyzMessageMapper.java │ │ ├── XyzNeedFavMapper.java │ │ ├── XyzNeedMapper.java │ │ └── XyzUserMapper.java │ │ ├── model │ │ ├── XyzContent.java │ │ ├── XyzContentExample.java │ │ ├── XyzExchange.java │ │ ├── XyzExchangeExample.java │ │ ├── XyzFavorite.java │ │ ├── XyzFavoriteExample.java │ │ ├── XyzItem.java │ │ ├── XyzItemExample.java │ │ ├── XyzMessage.java │ │ ├── XyzMessageExample.java │ │ ├── XyzNeed.java │ │ ├── XyzNeedExample.java │ │ ├── XyzNeedFav.java │ │ ├── XyzNeedFavExample.java │ │ ├── XyzUser.java │ │ ├── XyzUserExample.java │ │ └── vo │ │ │ └── MessageList.java │ │ ├── service │ │ ├── IndexService.java │ │ ├── LoginService.java │ │ ├── SmService.java │ │ └── impl │ │ │ ├── IndexServiceImpl.java │ │ │ ├── LoginServiceImpl.java │ │ │ └── SmServiceImpl.java │ │ └── util │ │ ├── BzsyUtils.java │ │ ├── CookieUtils.java │ │ ├── IDUtils.java │ │ ├── JsonHelper.java │ │ ├── JsonUtils.java │ │ └── Md5Utils.java └── resources │ ├── application.properties │ ├── application.yml │ ├── mapper │ ├── XyzContentMapper.xml │ ├── XyzExchangeMapper.xml │ ├── XyzFavoriteMapper.xml │ ├── XyzItemMapper.xml │ ├── XyzMessageMapper.xml │ ├── XyzNeedFavMapper.xml │ ├── XyzNeedMapper.xml │ └── XyzUserMapper.xml │ ├── mybatis-generator.xml │ ├── static │ ├── Data │ │ ├── SecondHand │ │ │ ├── Item │ │ │ │ ├── 66 │ │ │ │ │ ├── 66_1 │ │ │ │ │ ├── 66_2 │ │ │ │ │ ├── 66_3 │ │ │ │ │ ├── 66_4 │ │ │ │ │ └── cover │ │ │ │ ├── 67 │ │ │ │ │ ├── 67_1 │ │ │ │ │ ├── 67_2 │ │ │ │ │ └── cover │ │ │ │ ├── 68 │ │ │ │ │ ├── 68_1 │ │ │ │ │ └── cover │ │ │ │ ├── 69 │ │ │ │ │ ├── 69_1 │ │ │ │ │ ├── 69_2 │ │ │ │ │ ├── 69_3 │ │ │ │ │ └── cover │ │ │ │ ├── 1001 │ │ │ │ │ ├── 1001_1.jpg │ │ │ │ │ ├── 1001_2.jpg │ │ │ │ │ ├── 1001_3.jpg │ │ │ │ │ ├── 1001_4.jpg │ │ │ │ │ └── cover │ │ │ │ ├── 1002 │ │ │ │ │ └── cover │ │ │ │ ├── 1003 │ │ │ │ │ └── cover.jpg │ │ │ │ ├── 1004 │ │ │ │ │ └── cover.jpg │ │ │ │ └── 1005 │ │ │ │ │ └── cover.jpg │ │ │ └── System │ │ │ │ ├── foot_bg.png │ │ │ │ └── publish.png │ │ └── User │ │ │ ├── 1001 │ │ │ └── head │ │ │ └── Default │ │ │ └── head │ ├── Index │ │ ├── API.md │ │ ├── img │ │ │ ├── SchoolPig_ICON.png │ │ │ ├── banner │ │ │ │ └── 1.png │ │ │ ├── banner_list │ │ │ │ ├── 1.jpg │ │ │ │ ├── 2.jpg │ │ │ │ ├── 3.jpg │ │ │ │ ├── 4.jpg │ │ │ │ └── 5.jpg │ │ │ ├── champain.png │ │ │ ├── cheaper.png │ │ │ ├── foot_bg.png │ │ │ ├── publish.png │ │ │ ├── quality.png │ │ │ ├── school_logo.png │ │ │ ├── school_show.png │ │ │ └── user_head.png │ │ ├── index.css │ │ ├── index.css.map │ │ ├── index.html │ │ ├── index.js │ │ ├── index.jsp │ │ └── index.scss │ ├── Item │ │ ├── API.md │ │ ├── item.css │ │ ├── item.css.map │ │ ├── item.html │ │ ├── item.js │ │ ├── item.jsp │ │ └── item.scss │ ├── Login │ │ ├── img │ │ │ └── login_bg.jpg │ │ ├── login.css │ │ ├── login.html │ │ ├── login.js │ │ └── login.jsp │ ├── Publish │ │ ├── publish.css │ │ ├── publish.css.map │ │ ├── publish.html │ │ ├── publish.js │ │ ├── publish.jsp │ │ └── publish.scss │ ├── Search │ │ ├── search.css │ │ ├── search.css.map │ │ ├── search.html │ │ ├── search.js │ │ ├── search.jsp │ │ └── search.scss │ ├── User │ │ ├── center.js │ │ ├── center.scss │ │ ├── user.css │ │ ├── user.css.map │ │ ├── user.html │ │ ├── user.js │ │ ├── user.jsp │ │ ├── user.scss │ │ └── user_gloable.js │ ├── favicon.ico │ ├── lib │ │ ├── SchoolPig_ICON.png │ │ ├── SchoolPig_Logo.png │ │ ├── animate │ │ │ └── animate.css │ │ ├── bootstrap │ │ │ ├── bootstrap.min.css │ │ │ ├── bootstrap.min.js │ │ │ └── popper.min.js │ │ ├── default.jpg │ │ ├── fileinput │ │ │ ├── fileinput.css │ │ │ ├── fileinput.min.css │ │ │ ├── fileinput.min.js │ │ │ ├── theme.min.js │ │ │ └── zh.js │ │ ├── foot_bg.png │ │ ├── jquery-cookie │ │ │ └── jquery-cookie.js │ │ ├── jquery │ │ │ └── jquery-3.2.1.min.js │ │ ├── md-fonts │ │ │ ├── css │ │ │ │ ├── materialdesignicons.css │ │ │ │ ├── materialdesignicons.css.map │ │ │ │ ├── materialdesignicons.min.css │ │ │ │ └── materialdesignicons.min.css.map │ │ │ └── fonts │ │ │ │ ├── materialdesignicons-webfont.eot │ │ │ │ ├── materialdesignicons-webfont.svg │ │ │ │ ├── materialdesignicons-webfont.ttf │ │ │ │ ├── materialdesignicons-webfont.woff │ │ │ │ └── materialdesignicons-webfont.woff2 │ │ ├── normalize │ │ │ └── normalize.css │ │ ├── post.png │ │ └── xyz_tpl │ │ │ ├── footer │ │ │ ├── footer.css │ │ │ ├── footer.css.map │ │ │ ├── footer.html │ │ │ └── footer.scss │ │ │ ├── search_bar │ │ │ ├── search_bar.css │ │ │ ├── search_bar.css.map │ │ │ ├── search_bar.html │ │ │ ├── search_bar.js │ │ │ └── search_bar.scss │ │ │ ├── top_btn │ │ │ ├── top_btn.css │ │ │ ├── top_btn.css.map │ │ │ ├── top_btn.html │ │ │ ├── top_btn.js │ │ │ └── top_btn.scss │ │ │ └── topbar │ │ │ ├── README.md │ │ │ ├── topbar.css │ │ │ ├── topbar.css.map │ │ │ ├── topbar.html │ │ │ ├── topbar.js │ │ │ └── topbar.scss │ ├── sm_center │ │ ├── center.css │ │ ├── center.css.map │ │ ├── center.html │ │ ├── center.js │ │ └── center.scss │ ├── sm_center_accepter │ │ ├── accepter.css │ │ ├── accepter.css.map │ │ ├── accepter.html │ │ ├── accepter.js │ │ ├── accepter.scss │ │ └── img │ │ │ ├── banner.jpg │ │ │ └── banner.png │ ├── sm_detail │ │ ├── detail.css │ │ ├── detail.css.map │ │ ├── detail.html │ │ ├── detail.js │ │ ├── detail.scss │ │ └── img │ │ │ └── banner.png │ ├── sm_index │ │ ├── API.md │ │ ├── img │ │ │ ├── SchoolPig_ICON.png │ │ │ ├── banner │ │ │ │ └── 1.png │ │ │ ├── banner_list │ │ │ │ ├── 1.jpg │ │ │ │ ├── 2.jpg │ │ │ │ ├── 3.jpg │ │ │ │ ├── 4.jpg │ │ │ │ └── 5.jpg │ │ │ ├── champain.png │ │ │ ├── cheaper.png │ │ │ ├── foot_bg.png │ │ │ ├── publish.png │ │ │ ├── quality.png │ │ │ ├── school_logo.png │ │ │ ├── school_show.png │ │ │ └── user_head.png │ │ ├── index.css │ │ ├── index.css.map │ │ ├── index.html │ │ ├── index.js │ │ └── index.scss │ ├── sm_multiple │ │ ├── multiple.css │ │ ├── multiple.css.map │ │ ├── multiple.html │ │ ├── multiple.js │ │ └── multiple.scss │ ├── sm_publish │ │ ├── publish.css │ │ ├── publish.css.map │ │ ├── publish.html │ │ ├── publish.js │ │ └── publish.scss │ ├── sm_search │ │ ├── img │ │ │ └── publish.png │ │ ├── search.css │ │ ├── search.css.map │ │ ├── search.html │ │ ├── search.js │ │ └── search.scss │ ├── sm_single │ │ ├── single.css │ │ ├── single.css.map │ │ ├── single.html │ │ └── single.scss │ └── sm_work │ │ ├── work.css │ │ ├── work.css.map │ │ ├── work.html │ │ ├── work.js │ │ └── work.scss │ └── templates │ ├── header.html │ ├── index.html │ ├── item.html │ ├── login.html │ ├── publish.html │ ├── search.html │ ├── sm │ ├── accepter.html │ ├── center.html │ ├── detail.html │ ├── index.html │ ├── multiple.html │ ├── publish.html │ ├── search.html │ ├── single.html │ └── work.html │ └── user.html └── test └── java └── com └── pigschool └── xyzshow └── XyzShowApplicationTests.java /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.3.RELEASE 9 | 10 | 11 | com.pigschool 12 | xyz-show 13 | 0.0.1-SNAPSHOT 14 | xyz-show 15 | 校园猪 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-thymeleaf 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-web 30 | 31 | 32 | 33 | org.mybatis.spring.boot 34 | mybatis-spring-boot-starter 35 | 2.0.0 36 | 37 | 38 | com.github.pagehelper 39 | pagehelper-spring-boot-starter 40 | 1.2.5 41 | 42 | 43 | 44 | com.alibaba 45 | druid 46 | 1.0.9 47 | 48 | 49 | mysql 50 | mysql-connector-java 51 | 5.1.38 52 | runtime 53 | 54 | 55 | org.projectlombok 56 | lombok 57 | true 58 | 59 | 60 | 61 | org.springframework.boot 62 | spring-boot-starter-test 63 | test 64 | 65 | 66 | org.springframework.boot 67 | spring-boot-devtools 68 | runtime 69 | 70 | 71 | 72 | org.codehaus.jackson 73 | jackson-core-asl 74 | 1.9.13 75 | 76 | 77 | org.codehaus.jackson 78 | jackson-mapper-asl 79 | 1.9.13 80 | 81 | 82 | 83 | 84 | 85 | 86 | org.springframework.boot 87 | spring-boot-maven-plugin 88 | 89 | 90 | org.mybatis.generator 91 | mybatis-generator-maven-plugin 92 | 1.3.2 93 | 94 | 95 | mysql 96 | mysql-connector-java 97 | 5.1.38 98 | 99 | 100 | org.mybatis.generator 101 | mybatis-generator-core 102 | 1.3.2 103 | 104 | 105 | 106 | 107 | Generate MyBatis Artifacts 108 | package 109 | 110 | generate 111 | 112 | 113 | 114 | 115 | 116 | true 117 | 118 | true 119 | 120 | src/main/resources/mybatis-generator.xml 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/XyzShowApplication.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | 9 | @MapperScan(basePackages = "com.pigschool.xyzshow.mapper") 10 | @EnableAutoConfiguration 11 | @SpringBootApplication 12 | public class XyzShowApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(XyzShowApplication.class, args); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/common/CommonStatus.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.common; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | /** 7 | * @author lyf 8 | * @create 2019-03-02 13:50 9 | */ 10 | 11 | @Getter 12 | @AllArgsConstructor 13 | public enum CommonStatus { 14 | 15 | USER_REGISTER_ACCOUNT_ISSET(1007,"账户已经被注册"),/*密码错误*/ 16 | USER_PASSWORD_FAULT(1006,"密码错误"),/*密码错误*/ 17 | USER_REGISTER_FAULT(1005,"注册失败"),/*注册失败*/ 18 | USER_LOSE(1004,"用户不存在"),/*用户不存在*/ 19 | USER_LOGIN_SUCCESS(1003,"登录成功"),/*登录成功*/ 20 | USER_LOGIN_IDENTITY_EMPEY(1002,"用户身份不能为空"),/*用户身份不能为空*/ 21 | USER_LOGIN_ACCOUNT_FAULT(1001,"账号或密码错误"),/*账号或密码错误*/ 22 | EXCEPTION(3,"发成异常"),/*发成异常*/ 23 | TOKEN_LOSE(2,"token失效"),/*登录凭证失效*/ 24 | SUCCESS(1,"成功"),/*成功*/ 25 | FAULT(0,"失败");/*失败*/ 26 | 27 | private Integer status; 28 | private String text; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/common/JsonReturn.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.common; 2 | 3 | import com.alibaba.druid.support.json.JSONUtils; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | @Getter 11 | @Setter 12 | public class JsonReturn { 13 | 14 | private Integer code;//成功为1 15 | 16 | private String msg; 17 | 18 | private Object data; 19 | 20 | public JsonReturn(Integer code){ 21 | this.code = code; 22 | } 23 | 24 | public JsonReturn(Integer code,String msg,Object data){ 25 | this.code = code; 26 | this.msg = msg; 27 | this.data = data; 28 | } 29 | 30 | public static JsonReturn success(Object obj,String msg){ 31 | JsonReturn jsonReturn = new JsonReturn(1,msg,obj); 32 | return jsonReturn; 33 | } 34 | 35 | public static JsonReturn success(Object obj,CommonStatus status){ 36 | JsonReturn jsonReturn = new JsonReturn(1,status.getText(),obj); 37 | return jsonReturn; 38 | } 39 | 40 | public static JsonReturn statusObj(Object obj,CommonStatus status){ 41 | JsonReturn jsonReturn = new JsonReturn(status.getStatus(),status.getText(),obj); 42 | return jsonReturn; 43 | } 44 | 45 | public static JsonReturn success(Object obj){ 46 | JsonReturn jsonReturn = new JsonReturn(1); 47 | jsonReturn.data = obj; 48 | return jsonReturn; 49 | } 50 | 51 | public static JsonReturn success(){ 52 | return new JsonReturn(1); 53 | } 54 | 55 | public static JsonReturn fail(Integer code,String msg){ 56 | JsonReturn jsonReturn = new JsonReturn(code); 57 | jsonReturn.msg = msg; 58 | return jsonReturn; 59 | } 60 | 61 | public static JsonReturn fail(CommonStatus status) { 62 | JsonReturn jsonReturn = fail(status.getStatus(),status.getText()); 63 | return jsonReturn; 64 | } 65 | 66 | public Map toMap(){ 67 | HashMap result = new HashMap(); 68 | if (code != null){ 69 | result.put("code",code); 70 | } 71 | if (msg != null){ 72 | result.put("msg",msg); 73 | } 74 | if (data != null){ 75 | result.put("data",data); 76 | } 77 | return result; 78 | } 79 | 80 | public String toJson(){ 81 | return JSONUtils.toJSONString(toMap()); 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/config/WebConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.config; 2 | 3 | import com.pigschool.xyzshow.interceptor.LoginInterceptor; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 7 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 8 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | @Configuration 14 | public class WebConfiguration extends WebMvcConfigurationSupport { 15 | 16 | private List FilterPath = new ArrayList<>(); 17 | 18 | @Autowired 19 | private LoginInterceptor loginInterceptor; 20 | 21 | @Override 22 | public void addInterceptors(InterceptorRegistry registry) { 23 | FilterPath.add("/user/**"); 24 | FilterPath.add("/"); 25 | FilterPath.add(""); 26 | FilterPath.add("/index"); 27 | FilterPath.add("/item/**"); 28 | FilterPath.add("/publish/**"); 29 | FilterPath.add("/search/**"); 30 | FilterPath.add("/sm/**"); 31 | // addPathPatterns("/**") 表示拦截所有的请求, 32 | // excludePathPatterns("/login", "/register") 表示除了登陆与注册之外,因为登陆注册不需要登陆也可以访问 33 | registry.addInterceptor(loginInterceptor).addPathPatterns(FilterPath); 34 | super.addInterceptors(registry); 35 | } 36 | 37 | // 这个方法是用来配置静态资源的,比如html,js,css,等等 38 | @Override 39 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 40 | registry.addResourceHandler("/**") 41 | .addResourceLocations("classpath:/static/","file:D:/xyz/picture/"); 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.controller; 2 | 3 | 4 | import com.pigschool.xyzshow.common.CommonStatus; 5 | import com.pigschool.xyzshow.common.JsonReturn; 6 | import com.pigschool.xyzshow.model.XyzUser; 7 | import com.pigschool.xyzshow.service.LoginService; 8 | import com.pigschool.xyzshow.util.BzsyUtils; 9 | import com.pigschool.xyzshow.util.Md5Utils; 10 | import lombok.extern.slf4j.Slf4j; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.beans.factory.annotation.Value; 13 | import org.springframework.stereotype.Controller; 14 | import org.springframework.web.bind.annotation.*; 15 | 16 | import javax.servlet.http.HttpSession; 17 | 18 | @Slf4j 19 | @Controller 20 | @RequestMapping(value = "/login") 21 | public class LoginController { 22 | 23 | @RequestMapping(value = {"/login","/",""},method = RequestMethod.GET) 24 | public String login(XyzUser user){ 25 | return "login"; 26 | } 27 | 28 | @ResponseBody 29 | @RequestMapping(value = "/register",method = RequestMethod.POST) 30 | public JsonReturn register(XyzUser user){ 31 | String md5Pwd = Md5Utils.encryptPassword(user.getPassword(),SALT); 32 | log.info("md5Pwd="+md5Pwd); 33 | log.info("SALT="+SALT); 34 | user.setPassword(md5Pwd); 35 | JsonReturn jsonReturn = loginService.register(user); 36 | log.info("json=:"+jsonReturn.toJson()); 37 | 38 | return jsonReturn; 39 | } 40 | 41 | @ResponseBody 42 | @RequestMapping(value = "/up",method = RequestMethod.POST) 43 | public JsonReturn up(XyzUser user, HttpSession session){ 44 | XyzUser xyzUser = loginService.findByUsername(user); 45 | if (BzsyUtils.isEmpty(xyzUser)){ 46 | return JsonReturn.fail(CommonStatus.USER_LOGIN_ACCOUNT_FAULT); 47 | } 48 | if (!xyzUser.getPassword().equals(Md5Utils.encryptPassword(user.getPassword(),SALT))){ 49 | return JsonReturn.fail(CommonStatus.USER_LOGIN_ACCOUNT_FAULT); 50 | } 51 | session.setAttribute("user",xyzUser); 52 | return JsonReturn.success(); 53 | } 54 | 55 | @RequestMapping("/logout") 56 | public String logout(HttpSession session) { 57 | session.removeAttribute("user"); 58 | return "login"; 59 | } 60 | 61 | @Value("${SALT}") 62 | private String SALT; 63 | 64 | @Autowired 65 | private LoginService loginService; 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/controller/TestController.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.controller; 2 | 3 | import com.pigschool.xyzshow.common.JsonReturn; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.ResponseBody; 7 | 8 | import javax.xml.crypto.Data; 9 | import java.util.Date; 10 | 11 | /** 12 | * @author lyf 13 | * @create 2019-03-04 19:32 14 | */ 15 | @Controller 16 | @RequestMapping("/test") 17 | public class TestController { 18 | 19 | @ResponseBody 20 | @RequestMapping("/hello") 21 | public String hello(){ 22 | return "你好"; 23 | } 24 | 25 | @RequestMapping("/") 26 | public String index(){ 27 | return "index"; 28 | } 29 | 30 | @ResponseBody 31 | @RequestMapping("/exception") 32 | public String exception(){ 33 | int i = 1 / 0; 34 | return "index"; 35 | } 36 | 37 | @ResponseBody 38 | @RequestMapping("/time") 39 | public String test(){ 40 | Date date = new Date(); 41 | long time = date.getTime(); 42 | return String.valueOf(time); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/controller/UploadController.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.controller; 2 | 3 | import com.pigschool.xyzshow.common.CommonStatus; 4 | import com.pigschool.xyzshow.common.JsonReturn; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.springframework.beans.factory.annotation.Value; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.ui.Model; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | import org.springframework.web.multipart.MultipartFile; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | import java.io.File; 16 | import java.io.IOException; 17 | import java.util.HashMap; 18 | import java.util.Map; 19 | 20 | @Slf4j 21 | @Controller 22 | public class UploadController { 23 | 24 | 25 | @Value("${LOCALTION_PATH}") 26 | private String LOCALTION_PATH; 27 | 28 | @ResponseBody 29 | @RequestMapping("/upload") 30 | public JsonReturn uplaod(HttpServletRequest req, @RequestParam("smfile") MultipartFile file, Model model){ 31 | //1. 接受上传的文件 @RequestParam("file") MultipartFile file 32 | try { 33 | //2.根据时间戳创建新的文件名,这样即便是第二次上传相同名称的文件,也不会把第一次的文件覆盖了 34 | String fileName = System.currentTimeMillis() + file.getOriginalFilename(); 35 | 36 | //3.通过req.getServletContext().getRealPath("") 获取当前项目的真实路径,然后拼接前面的文件名 37 | //String destFileName = req.getServletContext().getRealPath("") + "uploaded" + File.separator + fileName; 38 | String destFileName = LOCALTION_PATH+fileName; 39 | log.info(destFileName); 40 | log.info(LOCALTION_PATH); 41 | log.info(fileName); 42 | //4.第一次运行的时候,这个文件所在的目录往往是不存在的,这里需要创建一下目录(创建到了webapp下uploaded文件夹下) 43 | File destFile = new File(destFileName); 44 | destFile.getParentFile().mkdirs(); 45 | //5.把浏览器上传的文件复制到希望的位置 46 | file.transferTo(destFile); 47 | //6.把文件名放在model里,以便后续显示用 48 | Map map = new HashMap<>(); 49 | map.put("url",destFileName); 50 | map.put("fileName",fileName); 51 | return JsonReturn.success(map); 52 | } catch (IOException e) { 53 | e.printStackTrace(); 54 | } 55 | return JsonReturn.fail(CommonStatus.FAULT); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/exception/GlobalException.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.exception; 2 | 3 | import com.pigschool.xyzshow.common.CommonStatus; 4 | import com.pigschool.xyzshow.common.JsonReturn; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.springframework.web.bind.annotation.ExceptionHandler; 7 | 8 | import java.util.Date; 9 | import java.util.HashMap; 10 | import java.util.Map; 11 | 12 | /** 13 | * 异常处理 14 | */ 15 | @Slf4j 16 | //@RestControllerAdvice 17 | public class GlobalException { 18 | 19 | @ExceptionHandler(value = Exception.class) 20 | public String globalExceptionHandler(Exception e){ 21 | Map map = new HashMap(); 22 | //发生异常进行日志记录,写入数据库或者其他处理,此处省略 23 | log.error("msg:\n"+e.getMessage()); 24 | log.error("date:\n"+new Date()); 25 | log.error("strce:\n"+e.getStackTrace()); 26 | log.error("fillInStackTrace:\n"+e.fillInStackTrace()); 27 | log.error("getCause:\n"+e.getCause()); 28 | log.error("getLocalizedMessage:\n"+e.getLocalizedMessage()); 29 | return JsonReturn.fail(CommonStatus.EXCEPTION).toJson(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.interceptor; 2 | 3 | import com.pigschool.xyzshow.model.XyzUser; 4 | import com.pigschool.xyzshow.util.BzsyUtils; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.springframework.stereotype.Component; 7 | import org.springframework.web.servlet.HandlerInterceptor; 8 | import org.springframework.web.servlet.ModelAndView; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import java.io.PrintWriter; 13 | 14 | @Component 15 | @Slf4j 16 | public class LoginInterceptor implements HandlerInterceptor { 17 | @Override 18 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 19 | XyzUser user = (XyzUser) request.getSession().getAttribute("user"); 20 | if (BzsyUtils.isEmpty(user)){ 21 | //登录拦截 并且跳转到登录页面 22 | PrintWriter out = response.getWriter(); 23 | out.print(""); 24 | return false; 25 | } 26 | return true; 27 | } 28 | 29 | @Override 30 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { 31 | 32 | } 33 | 34 | @Override 35 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/mapper/XyzContentMapper.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.mapper; 2 | 3 | import com.pigschool.xyzshow.model.XyzContent; 4 | import com.pigschool.xyzshow.model.XyzContentExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface XyzContentMapper { 9 | int countByExample(XyzContentExample example); 10 | 11 | int deleteByExample(XyzContentExample example); 12 | 13 | int deleteByPrimaryKey(Long id); 14 | 15 | int insert(XyzContent record); 16 | 17 | int insertSelective(XyzContent record); 18 | 19 | List selectByExampleWithBLOBs(XyzContentExample example); 20 | 21 | List selectByExample(XyzContentExample example); 22 | 23 | XyzContent selectByPrimaryKey(Long id); 24 | 25 | int updateByExampleSelective(@Param("record") XyzContent record, @Param("example") XyzContentExample example); 26 | 27 | int updateByExampleWithBLOBs(@Param("record") XyzContent record, @Param("example") XyzContentExample example); 28 | 29 | int updateByExample(@Param("record") XyzContent record, @Param("example") XyzContentExample example); 30 | 31 | int updateByPrimaryKeySelective(XyzContent record); 32 | 33 | int updateByPrimaryKeyWithBLOBs(XyzContent record); 34 | 35 | int updateByPrimaryKey(XyzContent record); 36 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/mapper/XyzExchangeMapper.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.mapper; 2 | 3 | import com.pigschool.xyzshow.model.XyzExchange; 4 | import com.pigschool.xyzshow.model.XyzExchangeExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface XyzExchangeMapper { 9 | int countByExample(XyzExchangeExample example); 10 | 11 | int deleteByExample(XyzExchangeExample example); 12 | 13 | int deleteByPrimaryKey(Long id); 14 | 15 | int insert(XyzExchange record); 16 | 17 | int insertSelective(XyzExchange record); 18 | 19 | List selectByExample(XyzExchangeExample example); 20 | 21 | XyzExchange selectByPrimaryKey(Long id); 22 | 23 | int updateByExampleSelective(@Param("record") XyzExchange record, @Param("example") XyzExchangeExample example); 24 | 25 | int updateByExample(@Param("record") XyzExchange record, @Param("example") XyzExchangeExample example); 26 | 27 | int updateByPrimaryKeySelective(XyzExchange record); 28 | 29 | int updateByPrimaryKey(XyzExchange record); 30 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/mapper/XyzFavoriteMapper.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.mapper; 2 | 3 | import com.pigschool.xyzshow.model.XyzFavorite; 4 | import com.pigschool.xyzshow.model.XyzFavoriteExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface XyzFavoriteMapper { 9 | int countByExample(XyzFavoriteExample example); 10 | 11 | int deleteByExample(XyzFavoriteExample example); 12 | 13 | int deleteByPrimaryKey(Long id); 14 | 15 | int insert(XyzFavorite record); 16 | 17 | int insertSelective(XyzFavorite record); 18 | 19 | List selectByExample(XyzFavoriteExample example); 20 | 21 | XyzFavorite selectByPrimaryKey(Long id); 22 | 23 | int updateByExampleSelective(@Param("record") XyzFavorite record, @Param("example") XyzFavoriteExample example); 24 | 25 | int updateByExample(@Param("record") XyzFavorite record, @Param("example") XyzFavoriteExample example); 26 | 27 | int updateByPrimaryKeySelective(XyzFavorite record); 28 | 29 | int updateByPrimaryKey(XyzFavorite record); 30 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/mapper/XyzItemMapper.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.mapper; 2 | 3 | import com.pigschool.xyzshow.model.XyzItem; 4 | import com.pigschool.xyzshow.model.XyzItemExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface XyzItemMapper { 9 | int countByExample(XyzItemExample example); 10 | 11 | int deleteByExample(XyzItemExample example); 12 | 13 | int deleteByPrimaryKey(Long id); 14 | 15 | int insert(XyzItem record); 16 | 17 | int insertSelective(XyzItem record); 18 | 19 | List selectByExample(XyzItemExample example); 20 | 21 | XyzItem selectByPrimaryKey(Long id); 22 | 23 | int updateByExampleSelective(@Param("record") XyzItem record, @Param("example") XyzItemExample example); 24 | 25 | int updateByExample(@Param("record") XyzItem record, @Param("example") XyzItemExample example); 26 | 27 | int updateByPrimaryKeySelective(XyzItem record); 28 | 29 | int updateByPrimaryKey(XyzItem record); 30 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/mapper/XyzMessageMapper.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.mapper; 2 | 3 | import com.pigschool.xyzshow.model.XyzMessage; 4 | import com.pigschool.xyzshow.model.XyzMessageExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface XyzMessageMapper { 9 | int countByExample(XyzMessageExample example); 10 | 11 | int deleteByExample(XyzMessageExample example); 12 | 13 | int deleteByPrimaryKey(Long id); 14 | 15 | int insert(XyzMessage record); 16 | 17 | int insertSelective(XyzMessage record); 18 | 19 | List selectByExample(XyzMessageExample example); 20 | 21 | XyzMessage selectByPrimaryKey(Long id); 22 | 23 | int updateByExampleSelective(@Param("record") XyzMessage record, @Param("example") XyzMessageExample example); 24 | 25 | int updateByExample(@Param("record") XyzMessage record, @Param("example") XyzMessageExample example); 26 | 27 | int updateByPrimaryKeySelective(XyzMessage record); 28 | 29 | int updateByPrimaryKey(XyzMessage record); 30 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/mapper/XyzNeedFavMapper.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.mapper; 2 | 3 | import com.pigschool.xyzshow.model.XyzNeedFav; 4 | import com.pigschool.xyzshow.model.XyzNeedFavExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface XyzNeedFavMapper { 9 | int countByExample(XyzNeedFavExample example); 10 | 11 | int deleteByExample(XyzNeedFavExample example); 12 | 13 | int deleteByPrimaryKey(Long id); 14 | 15 | int insert(XyzNeedFav record); 16 | 17 | int insertSelective(XyzNeedFav record); 18 | 19 | List selectByExample(XyzNeedFavExample example); 20 | 21 | XyzNeedFav selectByPrimaryKey(Long id); 22 | 23 | int updateByExampleSelective(@Param("record") XyzNeedFav record, @Param("example") XyzNeedFavExample example); 24 | 25 | int updateByExample(@Param("record") XyzNeedFav record, @Param("example") XyzNeedFavExample example); 26 | 27 | int updateByPrimaryKeySelective(XyzNeedFav record); 28 | 29 | int updateByPrimaryKey(XyzNeedFav record); 30 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/mapper/XyzNeedMapper.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.mapper; 2 | 3 | import com.pigschool.xyzshow.model.XyzNeed; 4 | import com.pigschool.xyzshow.model.XyzNeedExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface XyzNeedMapper { 9 | int countByExample(XyzNeedExample example); 10 | 11 | int deleteByExample(XyzNeedExample example); 12 | 13 | int deleteByPrimaryKey(Long id); 14 | 15 | int insert(XyzNeed record); 16 | 17 | int insertSelective(XyzNeed record); 18 | 19 | List selectByExample(XyzNeedExample example); 20 | 21 | XyzNeed selectByPrimaryKey(Long id); 22 | 23 | int updateByExampleSelective(@Param("record") XyzNeed record, @Param("example") XyzNeedExample example); 24 | 25 | int updateByExample(@Param("record") XyzNeed record, @Param("example") XyzNeedExample example); 26 | 27 | int updateByPrimaryKeySelective(XyzNeed record); 28 | 29 | int updateByPrimaryKey(XyzNeed record); 30 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/mapper/XyzUserMapper.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.mapper; 2 | 3 | import com.pigschool.xyzshow.model.XyzUser; 4 | import com.pigschool.xyzshow.model.XyzUserExample; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | public interface XyzUserMapper { 10 | int countByExample(XyzUserExample example); 11 | 12 | int deleteByExample(XyzUserExample example); 13 | 14 | int deleteByPrimaryKey(Long id); 15 | 16 | int insert(XyzUser record); 17 | 18 | int insertSelective(XyzUser record); 19 | 20 | List selectByExample(XyzUserExample example); 21 | 22 | XyzUser selectByPrimaryKey(Long id); 23 | 24 | int updateByExampleSelective(@Param("record") XyzUser record, @Param("example") XyzUserExample example); 25 | 26 | int updateByExample(@Param("record") XyzUser record, @Param("example") XyzUserExample example); 27 | 28 | int updateByPrimaryKeySelective(XyzUser record); 29 | 30 | int updateByPrimaryKey(XyzUser record); 31 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/model/XyzContent.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.model; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.ToString; 6 | 7 | import java.util.Date; 8 | 9 | @Getter 10 | @Setter 11 | @ToString 12 | public class XyzContent { 13 | private XyzItem item; 14 | 15 | private Long id; 16 | 17 | private Long categoryId; 18 | 19 | private String title; 20 | 21 | private String subTitle; 22 | 23 | private String titleDesc; 24 | 25 | private String url; 26 | 27 | private String pic; 28 | 29 | private String pic2; 30 | 31 | private Date created; 32 | 33 | private Date updated; 34 | 35 | private Integer sort; 36 | 37 | private String content; 38 | 39 | public Long getId() { 40 | return id; 41 | } 42 | 43 | public void setId(Long id) { 44 | this.id = id; 45 | } 46 | 47 | public Long getCategoryId() { 48 | return categoryId; 49 | } 50 | 51 | public void setCategoryId(Long categoryId) { 52 | this.categoryId = categoryId; 53 | } 54 | 55 | public String getTitle() { 56 | return title; 57 | } 58 | 59 | public void setTitle(String title) { 60 | this.title = title == null ? null : title.trim(); 61 | } 62 | 63 | public String getSubTitle() { 64 | return subTitle; 65 | } 66 | 67 | public void setSubTitle(String subTitle) { 68 | this.subTitle = subTitle == null ? null : subTitle.trim(); 69 | } 70 | 71 | public String getTitleDesc() { 72 | return titleDesc; 73 | } 74 | 75 | public void setTitleDesc(String titleDesc) { 76 | this.titleDesc = titleDesc == null ? null : titleDesc.trim(); 77 | } 78 | 79 | public String getUrl() { 80 | return url; 81 | } 82 | 83 | public void setUrl(String url) { 84 | this.url = url == null ? null : url.trim(); 85 | } 86 | 87 | public String getPic() { 88 | return pic; 89 | } 90 | 91 | public void setPic(String pic) { 92 | this.pic = pic == null ? null : pic.trim(); 93 | } 94 | 95 | public String getPic2() { 96 | return pic2; 97 | } 98 | 99 | public void setPic2(String pic2) { 100 | this.pic2 = pic2 == null ? null : pic2.trim(); 101 | } 102 | 103 | public Date getCreated() { 104 | return created; 105 | } 106 | 107 | public void setCreated(Date created) { 108 | this.created = created; 109 | } 110 | 111 | public Date getUpdated() { 112 | return updated; 113 | } 114 | 115 | public void setUpdated(Date updated) { 116 | this.updated = updated; 117 | } 118 | 119 | public Integer getSort() { 120 | return sort; 121 | } 122 | 123 | public void setSort(Integer sort) { 124 | this.sort = sort; 125 | } 126 | 127 | public String getContent() { 128 | return content; 129 | } 130 | 131 | public void setContent(String content) { 132 | this.content = content == null ? null : content.trim(); 133 | } 134 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/model/XyzExchange.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.model; 2 | 3 | import lombok.Data; 4 | import lombok.ToString; 5 | 6 | import java.util.Date; 7 | 8 | @Data 9 | @ToString 10 | public class XyzExchange { 11 | private XyzItem item; 12 | 13 | private XyzUser user; 14 | 15 | private Long id; 16 | 17 | private Long itemId; 18 | 19 | private Long userId; 20 | 21 | private String name; 22 | 23 | private Integer contactWay; 24 | 25 | private String contactInfo; 26 | 27 | private Date create; 28 | 29 | public Long getId() { 30 | return id; 31 | } 32 | 33 | public void setId(Long id) { 34 | this.id = id; 35 | } 36 | 37 | public Long getItemId() { 38 | return itemId; 39 | } 40 | 41 | public void setItemId(Long itemId) { 42 | this.itemId = itemId; 43 | } 44 | 45 | public Long getUserId() { 46 | return userId; 47 | } 48 | 49 | public void setUserId(Long userId) { 50 | this.userId = userId; 51 | } 52 | 53 | public String getName() { 54 | return name; 55 | } 56 | 57 | public void setName(String name) { 58 | this.name = name == null ? null : name.trim(); 59 | } 60 | 61 | public Integer getContactWay() { 62 | return contactWay; 63 | } 64 | 65 | public void setContactWay(Integer contactWay) { 66 | this.contactWay = contactWay; 67 | } 68 | 69 | public String getContactInfo() { 70 | return contactInfo; 71 | } 72 | 73 | public void setContactInfo(String contactInfo) { 74 | this.contactInfo = contactInfo == null ? null : contactInfo.trim(); 75 | } 76 | 77 | public Date getCreate() { 78 | return create; 79 | } 80 | 81 | public void setCreate(Date create) { 82 | this.create = create; 83 | } 84 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/model/XyzFavorite.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.model; 2 | 3 | import lombok.Data; 4 | import lombok.ToString; 5 | 6 | import java.util.Date; 7 | 8 | @Data 9 | @ToString 10 | public class XyzFavorite { 11 | private XyzItem item; 12 | 13 | private XyzUser user; 14 | 15 | private Long id; 16 | 17 | private Long userId; 18 | 19 | private Long itemId; 20 | 21 | private Long favorite; 22 | 23 | private Date created; 24 | 25 | public Long getId() { 26 | return id; 27 | } 28 | 29 | public void setId(Long id) { 30 | this.id = id; 31 | } 32 | 33 | public Long getUserId() { 34 | return userId; 35 | } 36 | 37 | public void setUserId(Long userId) { 38 | this.userId = userId; 39 | } 40 | 41 | public Long getItemId() { 42 | return itemId; 43 | } 44 | 45 | public void setItemId(Long itemId) { 46 | this.itemId = itemId; 47 | } 48 | 49 | public Long getFavorite() { 50 | return favorite; 51 | } 52 | 53 | public void setFavorite(Long favorite) { 54 | this.favorite = favorite; 55 | } 56 | 57 | public Date getCreated() { 58 | return created; 59 | } 60 | 61 | public void setCreated(Date created) { 62 | this.created = created; 63 | } 64 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/model/XyzMessage.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.model; 2 | 3 | import lombok.Data; 4 | import lombok.ToString; 5 | 6 | import java.util.Date; 7 | 8 | @Data 9 | @ToString 10 | public class XyzMessage { 11 | private XyzUser user; 12 | 13 | private Long id; 14 | 15 | private Long userId; 16 | 17 | private Long itemId; 18 | 19 | private String msg; 20 | 21 | private Date created; 22 | 23 | private String name; 24 | 25 | public Long getId() { 26 | return id; 27 | } 28 | 29 | public void setId(Long id) { 30 | this.id = id; 31 | } 32 | 33 | public Long getUserId() { 34 | return userId; 35 | } 36 | 37 | public void setUserId(Long userId) { 38 | this.userId = userId; 39 | } 40 | 41 | public Long getItemId() { 42 | return itemId; 43 | } 44 | 45 | public void setItemId(Long itemId) { 46 | this.itemId = itemId; 47 | } 48 | 49 | public String getMsg() { 50 | return msg; 51 | } 52 | 53 | public void setMsg(String msg) { 54 | this.msg = msg == null ? null : msg.trim(); 55 | } 56 | 57 | public Date getCreated() { 58 | return created; 59 | } 60 | 61 | public void setCreated(Date created) { 62 | this.created = created; 63 | } 64 | 65 | public String getName() { 66 | return name; 67 | } 68 | 69 | public void setName(String name) { 70 | this.name = name == null ? null : name.trim(); 71 | } 72 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/model/XyzNeed.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.model; 2 | 3 | import lombok.ToString; 4 | 5 | @ToString 6 | public class XyzNeed { 7 | private Long id; 8 | 9 | private String title; 10 | 11 | private String xyzDesc; 12 | 13 | private String phone; 14 | 15 | private String nick; 16 | 17 | private String price; 18 | 19 | private Integer xyzType; 20 | 21 | private Integer jzType; 22 | 23 | private Integer jzNum; 24 | 25 | private Integer jzZhusu; 26 | 27 | private Integer jzPriceType; 28 | 29 | private Integer status; 30 | 31 | private Long userId; 32 | 33 | public Long getId() { 34 | return id; 35 | } 36 | 37 | public void setId(Long id) { 38 | this.id = id; 39 | } 40 | 41 | public String getTitle() { 42 | return title; 43 | } 44 | 45 | public void setTitle(String title) { 46 | this.title = title == null ? null : title.trim(); 47 | } 48 | 49 | public String getXyzDesc() { 50 | return xyzDesc; 51 | } 52 | 53 | public void setXyzDesc(String xyzDesc) { 54 | this.xyzDesc = xyzDesc == null ? null : xyzDesc.trim(); 55 | } 56 | 57 | public String getPhone() { 58 | return phone; 59 | } 60 | 61 | public void setPhone(String phone) { 62 | this.phone = phone == null ? null : phone.trim(); 63 | } 64 | 65 | public String getNick() { 66 | return nick; 67 | } 68 | 69 | public void setNick(String nick) { 70 | this.nick = nick == null ? null : nick.trim(); 71 | } 72 | 73 | public String getPrice() { 74 | return price; 75 | } 76 | 77 | public void setPrice(String price) { 78 | this.price = price == null ? null : price.trim(); 79 | } 80 | 81 | public Integer getXyzType() { 82 | return xyzType; 83 | } 84 | 85 | public void setXyzType(Integer xyzType) { 86 | this.xyzType = xyzType; 87 | } 88 | 89 | public Integer getJzType() { 90 | return jzType; 91 | } 92 | 93 | public void setJzType(Integer jzType) { 94 | this.jzType = jzType; 95 | } 96 | 97 | public Integer getJzNum() { 98 | return jzNum; 99 | } 100 | 101 | public void setJzNum(Integer jzNum) { 102 | this.jzNum = jzNum; 103 | } 104 | 105 | public Integer getJzZhusu() { 106 | return jzZhusu; 107 | } 108 | 109 | public void setJzZhusu(Integer jzZhusu) { 110 | this.jzZhusu = jzZhusu; 111 | } 112 | 113 | public Integer getJzPriceType() { 114 | return jzPriceType; 115 | } 116 | 117 | public void setJzPriceType(Integer jzPriceType) { 118 | this.jzPriceType = jzPriceType; 119 | } 120 | 121 | public Integer getStatus() { 122 | return status; 123 | } 124 | 125 | public void setStatus(Integer status) { 126 | this.status = status; 127 | } 128 | 129 | public Long getUserId() { 130 | return userId; 131 | } 132 | 133 | public void setUserId(Long userId) { 134 | this.userId = userId; 135 | } 136 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/model/XyzNeedFav.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.model; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.ToString; 6 | 7 | @Getter 8 | @Setter 9 | @ToString 10 | public class XyzNeedFav { 11 | private XyzNeed need; 12 | 13 | private XyzUser user; 14 | 15 | private Long id; 16 | 17 | private Long userId; 18 | 19 | private Long needId; 20 | 21 | private Integer needType; 22 | 23 | public Long getId() { 24 | return id; 25 | } 26 | 27 | public void setId(Long id) { 28 | this.id = id; 29 | } 30 | 31 | public Long getUserId() { 32 | return userId; 33 | } 34 | 35 | public void setUserId(Long userId) { 36 | this.userId = userId; 37 | } 38 | 39 | public Long getNeedId() { 40 | return needId; 41 | } 42 | 43 | public void setNeedId(Long needId) { 44 | this.needId = needId; 45 | } 46 | 47 | public Integer getNeedType() { 48 | return needType; 49 | } 50 | 51 | public void setNeedType(Integer needType) { 52 | this.needType = needType; 53 | } 54 | } -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/model/vo/MessageList.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.model.vo; 2 | 3 | 4 | import com.pigschool.xyzshow.model.XyzMessage; 5 | import com.pigschool.xyzshow.model.XyzUser; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | import lombok.ToString; 10 | 11 | @Data 12 | @NoArgsConstructor 13 | @ToString 14 | public class MessageList { 15 | 16 | private XyzMessage message; 17 | 18 | private XyzUser user; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/service/IndexService.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.service; 2 | 3 | import com.pigschool.xyzshow.common.JsonReturn; 4 | import com.pigschool.xyzshow.model.*; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author lyf 10 | * @create 2019-03-05 19:24 11 | */ 12 | public interface IndexService { 13 | JsonReturn upItem(XyzItem item); 14 | 15 | List searchItem(String param); 16 | 17 | XyzItem findItemById(Long path); 18 | 19 | XyzUser findUserByUid(Long uid); 20 | 21 | int iwangt(XyzExchange exchange); 22 | 23 | int leavemessage(XyzMessage message); 24 | 25 | List findMessage(Long id); 26 | 27 | int itemfavorite(XyzFavorite favorite); 28 | 29 | XyzFavorite findFavoriteByUserIdAndItemId(Long userId, Long ItemId); 30 | 31 | int itemNofavorite(XyzFavorite favorite); 32 | 33 | int Noiwant(XyzExchange exchange); 34 | 35 | XyzExchange findExchangeByUserIdAndItemId(Long userId, Long ItemId); 36 | 37 | int useredit(XyzUser user); 38 | 39 | List findItemListByUserId(Long id); 40 | 41 | List findFavoriteByUserId(Long id); 42 | 43 | List findContentByCID(Long cid); 44 | 45 | List findExchangeByUserId(Long id); 46 | 47 | int exchangedel(Long changeId); 48 | 49 | int favdel(Long favId); 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/service/LoginService.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.service; 2 | 3 | import com.pigschool.xyzshow.common.JsonReturn; 4 | import com.pigschool.xyzshow.model.XyzUser; 5 | 6 | public interface LoginService { 7 | 8 | JsonReturn register(XyzUser user); 9 | 10 | XyzUser findByUsername(XyzUser user); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/service/SmService.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.service; 2 | 3 | import com.pigschool.xyzshow.model.XyzNeed; 4 | import com.pigschool.xyzshow.model.XyzNeedFav; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author lyf 10 | * @create 2019-03-10 13:03 11 | */ 12 | public interface SmService { 13 | int publishInsert(XyzNeed need); 14 | 15 | List search(String param); 16 | 17 | XyzNeed findNeedById(Long needId); 18 | 19 | List findNeedByType(int i); 20 | 21 | int insertFav(XyzNeedFav needFav); 22 | 23 | List findNeedByUserId(Long id); 24 | 25 | List findNeedByUserIdAndType(Long id, int i); 26 | 27 | List findNeedFavByUserIdAndType(Long userId, int type); 28 | 29 | int needfavdel(Long favId); 30 | 31 | List findNeedFavByNeedIdAndType(Long needId, int type); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/service/impl/LoginServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.service.impl; 2 | 3 | 4 | import com.pigschool.xyzshow.common.CommonStatus; 5 | import com.pigschool.xyzshow.common.JsonReturn; 6 | import com.pigschool.xyzshow.mapper.XyzUserMapper; 7 | import com.pigschool.xyzshow.model.XyzUser; 8 | import com.pigschool.xyzshow.model.XyzUserExample; 9 | import com.pigschool.xyzshow.service.LoginService; 10 | import com.pigschool.xyzshow.util.BzsyUtils; 11 | import lombok.extern.slf4j.Slf4j; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | 15 | import java.util.List; 16 | 17 | @Slf4j 18 | @Service 19 | public class LoginServiceImpl implements LoginService{ 20 | 21 | @Override 22 | public JsonReturn register(XyzUser user) { 23 | int i = userMapper.insertSelective(user); 24 | if (i <= 0){ 25 | return JsonReturn.fail(CommonStatus.FAULT); 26 | } 27 | log.info("i="+i); 28 | return JsonReturn.success(); 29 | } 30 | 31 | @Override 32 | public XyzUser findByUsername(XyzUser user) { 33 | log.info(user.toString()); 34 | XyzUserExample example = new XyzUserExample(); 35 | XyzUserExample.Criteria criteria = example.createCriteria(); 36 | criteria.andUsernameEqualTo(user.getUsername()); 37 | List list = userMapper.selectByExample(example); 38 | if (BzsyUtils.isNotEmpty(list)){ 39 | return list.get(0); 40 | } 41 | return null; 42 | } 43 | 44 | @Autowired 45 | private XyzUserMapper userMapper; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/util/BzsyUtils.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.util; 2 | 3 | import java.lang.reflect.Array; 4 | import java.util.Collection; 5 | import java.util.Map; 6 | 7 | /** 8 | * @author lyf 9 | * @create 2019-03-02 12:33 10 | */ 11 | public class BzsyUtils { 12 | 13 | /** 14 | * 是否为空,对象为空返回true 15 | * @param obj 16 | * @return 17 | */ 18 | public static boolean isNull(Object obj){ 19 | return obj == null; 20 | } 21 | 22 | /** 23 | * 是否不为空,对象不为空返回true 24 | * @param obj 25 | * @return 26 | */ 27 | public static boolean isNotNull(Object obj){ 28 | return !isNull(obj); 29 | } 30 | 31 | /** 32 | * 是否为空,对象为空返回true 33 | * @param obj 34 | * @return 35 | */ 36 | public static boolean isEmpty(Object obj){ 37 | if (obj == null) return true; 38 | else if (obj instanceof CharSequence) return ((CharSequence) obj).length() == 0; 39 | else if (obj instanceof Collection) return ((Collection) obj).isEmpty(); 40 | else if (obj instanceof Map) return ((Map) obj).isEmpty(); 41 | else if (obj.getClass().isArray()) return Array.getLength(obj) == 0; 42 | else if (obj instanceof String) {return obj == null || obj == "";} 43 | return false; 44 | } 45 | 46 | /** 47 | * 是否不为空,对象不为空返回true 48 | * @param obj 49 | * @return 50 | */ 51 | public static boolean isNotEmpty(Object obj){ 52 | return !isEmpty(obj); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/util/IDUtils.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.util; 2 | 3 | import java.util.Random; 4 | 5 | /** 6 | * 各种id生成策略 7 | *

Title: IDUtils

8 | *

Description:

9 | *

Company: www.itcast.com

10 | * @author 入云龙 11 | * @date 2015年7月22日下午2:32:10 12 | * @version 1.0 13 | */ 14 | public class IDUtils { 15 | 16 | /** 17 | * 图片名生成 18 | */ 19 | public static String genImageName() { 20 | //取当前时间的长整形值包含毫秒 21 | long millis = System.currentTimeMillis(); 22 | //long millis = System.nanoTime(); 23 | //加上三位随机数 24 | Random random = new Random(); 25 | int end3 = random.nextInt(999); 26 | //如果不足三位前面补0 27 | String str = millis + String.format("%03d", end3); 28 | 29 | return str; 30 | } 31 | 32 | /** 33 | * 商品id生成 34 | */ 35 | public static long genItemId() { 36 | //取当前时间的长整形值包含毫秒 37 | long millis = System.currentTimeMillis(); 38 | //long millis = System.nanoTime(); 39 | //加上两位随机数 40 | Random random = new Random(); 41 | int end2 = random.nextInt(99); 42 | //如果不足两位前面补0 43 | String str = millis + String.format("%02d", end2); 44 | long id = new Long(str); 45 | return id; 46 | } 47 | 48 | public static void main(String[] args) { 49 | for(int i=0;i< 100;i++) 50 | System.out.println(genItemId()); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/util/JsonHelper.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.util; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.codehaus.jackson.map.DeserializationConfig; 5 | import org.codehaus.jackson.map.ObjectMapper; 6 | import org.codehaus.jackson.map.SerializationConfig; 7 | import org.codehaus.jackson.map.annotate.JsonSerialize; 8 | import org.codehaus.jackson.map.ser.impl.SimpleFilterProvider; 9 | import org.codehaus.jackson.type.TypeReference; 10 | 11 | @Slf4j 12 | public class JsonHelper { 13 | 14 | private static ObjectMapper objectMapper = new ObjectMapper(); 15 | 16 | static { 17 | //config 18 | objectMapper.disable(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES); 19 | objectMapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false); 20 | objectMapper.setFilters(new SimpleFilterProvider().setFailOnUnknownId(false)); 21 | objectMapper.setSerializationInclusion(JsonSerialize.Inclusion.NON_EMPTY); 22 | } 23 | 24 | public static String obj2String(T src) { 25 | if (src == null){ 26 | return null; 27 | } 28 | try { 29 | return src instanceof String ? (String) src : objectMapper.writeValueAsString(src); 30 | } catch (Exception e) { 31 | log.warn("parse object to String exception, error:{}", e); 32 | return null; 33 | } 34 | } 35 | 36 | public static T string2Obj(String src, TypeReference typeReference) { 37 | if (src == null || typeReference == null) { 38 | return null; 39 | } 40 | try { 41 | return (T) (typeReference.getType().equals(String.class) ? src : objectMapper.readValue(src, typeReference)); 42 | } catch (Exception e) { 43 | log.warn("parse String to Object exception, String:{}, TypeReference:{}, error:{}", src, typeReference.getType(), e); 44 | return null; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/util/JsonUtils.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.util; 2 | 3 | import java.util.List; 4 | 5 | import com.fasterxml.jackson.core.JsonProcessingException; 6 | import com.fasterxml.jackson.databind.JavaType; 7 | import com.fasterxml.jackson.databind.JsonNode; 8 | import com.fasterxml.jackson.databind.ObjectMapper; 9 | 10 | /** 11 | * 淘淘商城自定义响应结构 12 | */ 13 | public class JsonUtils { 14 | 15 | // 定义jackson对象 16 | private static final ObjectMapper MAPPER = new ObjectMapper(); 17 | 18 | /** 19 | * 将对象转换成json字符串。 20 | *

Title: pojoToJson

21 | *

Description:

22 | * @param data 23 | * @return 24 | */ 25 | public static String objectToJson(Object data) { 26 | try { 27 | String string = MAPPER.writeValueAsString(data); 28 | return string; 29 | } catch (JsonProcessingException e) { 30 | e.printStackTrace(); 31 | } 32 | return null; 33 | } 34 | 35 | /** 36 | * 将json结果集转化为对象 37 | * 38 | * @param jsonData json数据 39 | * @param clazz 对象中的object类型 40 | * @return 41 | */ 42 | public static T jsonToPojo(String jsonData, Class beanType) { 43 | try { 44 | T t = MAPPER.readValue(jsonData, beanType); 45 | return t; 46 | } catch (Exception e) { 47 | e.printStackTrace(); 48 | } 49 | return null; 50 | } 51 | 52 | /** 53 | * 将json数据转换成pojo对象list 54 | *

Title: jsonToList

55 | *

Description:

56 | * @param jsonData 57 | * @param beanType 58 | * @return 59 | */ 60 | public static List jsonToList(String jsonData, Class beanType) { 61 | JavaType javaType = MAPPER.getTypeFactory().constructParametricType(List.class, beanType); 62 | try { 63 | List list = MAPPER.readValue(jsonData, javaType); 64 | return list; 65 | } catch (Exception e) { 66 | e.printStackTrace(); 67 | } 68 | 69 | return null; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/com/pigschool/xyzshow/util/Md5Utils.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow.util; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | 6 | import java.security.MessageDigest; 7 | 8 | public class Md5Utils { 9 | 10 | private static final Logger LOGGER = LoggerFactory.getLogger(Md5Utils.class); 11 | 12 | 13 | private static byte[] md5(String s) { 14 | MessageDigest algorithm; 15 | try { 16 | algorithm = MessageDigest.getInstance("MD5"); 17 | algorithm.reset(); 18 | algorithm.update(s.getBytes("UTF-8")); 19 | byte[] messageDigest = algorithm.digest(); 20 | return messageDigest; 21 | } catch (Exception e) { 22 | LOGGER.error("MD5 Error...", e); 23 | } 24 | return null; 25 | } 26 | 27 | private static final String toHex(byte hash[]) { 28 | if (hash == null) { 29 | return null; 30 | } 31 | StringBuffer buf = new StringBuffer(hash.length * 2); 32 | int i; 33 | 34 | for (i = 0; i < hash.length; i++) { 35 | if ((hash[i] & 0xff) < 0x10) { 36 | buf.append("0"); 37 | } 38 | buf.append(Long.toString(hash[i] & 0xff, 16)); 39 | } 40 | return buf.toString(); 41 | } 42 | 43 | public static String hash(String s) { 44 | try { 45 | return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8"); 46 | } catch (Exception e) { 47 | LOGGER.error("not supported charset...{}", e); 48 | return s; 49 | } 50 | } 51 | 52 | /** 53 | * 对密码按照用户名,密码,盐进行加密 54 | * @param username 用户名 55 | * @param password 密码 56 | * @param salt 盐 57 | * @return 58 | */ 59 | public static String encryptPassword(String username, String password, String salt) { 60 | return Md5Utils.hash(username + password + salt); 61 | } 62 | 63 | /** 64 | * 对密码按照密码,盐进行加密 65 | * @param password 密码 66 | * @param salt 盐 67 | * @return 68 | */ 69 | public static String encryptPassword(String password, String salt) { 70 | return Md5Utils.hash(password + salt); 71 | } 72 | 73 | /** 74 | * 对密码按照密码,盐进行加密,循环加密次数 75 | * @param password 密码 76 | * @param salt 盐 77 | * @param count 循环加密次数 78 | * @return 79 | */ 80 | public static String encryptPassword(String password, String salt, Integer count) { 81 | String token = password + salt; 82 | for (Integer i = 0 ; i <= count ; i++){ 83 | token = Md5Utils.hash(token); 84 | } 85 | return Md5Utils.hash(password + salt); 86 | } 87 | 88 | } -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #\u6821\u56ED\u732A\u5BC6\u7801\u52A0\u76D0 2 | SALT=xyz-salt 3 | #\u4E0A\u4F20\u8DEF\u5F84 4 | LOCALTION_PATH=D:/xyz/picture/ 5 | #\u8F6E\u64AD\u56FE 6 | LUNBOTU=16 7 | #\u6700\u65B0\u53D1\u5E03 8 | BESTNEW=19 9 | #\u7F16\u8F91\u7CBE\u9009 10 | BIANJIJINGXUAN=21 11 | #\u5E73\u53F0\u4F4E\u4EF7 12 | PINGTAIDIJIA=22 13 | #\u4F18\u8D28\u6210\u8272 14 | YOUZHICHENGSE=23 15 | #SchoolBoard 16 | SCHOOLBOARD=25 17 | #\u4F9B\u9700\u8F6E\u64AD\u56FE 18 | SMLUNBOTU=26 19 | #\u5355\u4EBA\u9700\u6C42 20 | XUQIU=27 21 | #\u5B66\u751F\u517C\u804C 22 | JIANZHI=28 23 | #\u4F17\u5305 24 | ZHONGBAO=29 -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | 4 | spring: 5 | datasource: 6 | url: jdbc:mysql://47.95.196.58:3306/schoolpig?useUnicode=true&characterEncoding=UTF-8 7 | username: root 8 | password: 123456 9 | driver-class-name: com.mysql.jdbc.Driver 10 | type: com.alibaba.druid.pool.DruidDataSource 11 | 12 | mybatis: 13 | mapper-locations: classpath:mapper/*.xml 14 | 15 | 16 | pagehelper: 17 | helperDialect: mysql 18 | reasonable: true 19 | supportMethodsArguments: true 20 | params: count=countSql 21 | -------------------------------------------------------------------------------- /src/main/resources/mybatis-generator.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 |
46 |
47 |
48 | -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/1001/1001_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/1001/1001_1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/1001/1001_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/1001/1001_2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/1001/1001_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/1001/1001_3.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/1001/1001_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/1001/1001_4.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/1001/cover: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/1001/cover -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/1002/cover: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/1002/cover -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/1003/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/1003/cover.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/1004/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/1004/cover.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/1005/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/1005/cover.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/66/66_1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/66/66_1 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/66/66_2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/66/66_2 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/66/66_3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/66/66_3 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/66/66_4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/66/66_4 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/66/cover: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/66/cover -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/67/67_1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/67/67_1 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/67/67_2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/67/67_2 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/67/cover: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/67/cover -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/68/68_1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/68/68_1 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/68/cover: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/68/cover -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/69/69_1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/69/69_1 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/69/69_2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/69/69_2 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/69/69_3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/69/69_3 -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/Item/69/cover: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/Item/69/cover -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/System/foot_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/System/foot_bg.png -------------------------------------------------------------------------------- /src/main/resources/static/Data/SecondHand/System/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/SecondHand/System/publish.png -------------------------------------------------------------------------------- /src/main/resources/static/Data/User/1001/head: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/User/1001/head -------------------------------------------------------------------------------- /src/main/resources/static/Data/User/Default/head: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Data/User/Default/head -------------------------------------------------------------------------------- /src/main/resources/static/Index/API.md: -------------------------------------------------------------------------------- 1 | # Api说明 2 | ## 第三方Api 3 | 4 | ### 一淘(etao) 5 | 6 | Api地址:http://suggest.taobao.com/sug?area=etao&code=utf-8&callback=KISSY.Suggest.callback&q=牛 7 | ```json 8 | KISSY.Suggest.callback({ 9 | "result":[ 10 | ["牛仔裤男","19290327"], 11 | ["牛仔裤女","12731467"], 12 | ... ... 13 | ] 14 | }) 15 | ``` 16 | 17 | ## 第一方Api 18 | ### 获取用户基本信息 19 | + 名称 20 | + 所在校园 21 | + ~~诚信值(划掉)~~ 22 | + 用户消息 23 | + 系统通知 24 | ``` 25 | { 26 | "name": "EsunR", 27 | "school": "安阳工学院", 28 | "userMsg": 4, 29 | "sysMsg": 4 30 | } 31 | ``` 32 | > 备注:诚信值分为三个等级,4为极好,3为良好,2为中等,1为极差 33 | 34 | ### 最新发布 35 | + 商品ID 36 | + 商品封面 37 | + 商品标题 38 | + 商品价格 39 | + 商品原价 40 | ``` 41 | { 42 | "id": 1001 43 | "cover": "../Data/SecondHand/ItemPic/1001/cover.jpg", 44 | "title": "商品标题", 45 | "price": 9.8, 46 | "oldPrice": 998 47 | } 48 | ``` 49 | 50 | ### 商品信息(复用型Api) 51 | + 商品封面 52 | + 商品价格 53 | + 商品原价 54 | + 商品标题 55 | + 发布者用户名 56 | + 发布者信用等级 57 | ``` 58 | { 59 | "id": 1001 60 | "cover": "../Data/SecondHand/ItemPic/1001/cover.jpg", 61 | "price": 9.8, 62 | "oldPrice": 998, 63 | "title": "商品标题", 64 | "sellerName": "EsunR", 65 | "sellerIntegrity": 4 66 | } 67 | ``` 68 | > 备注:接口需要设置参数,查询关键字 `key`,所展示的区域 `area` -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/SchoolPig_ICON.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/SchoolPig_ICON.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/banner/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/banner/1.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/banner_list/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/banner_list/1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/banner_list/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/banner_list/2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/banner_list/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/banner_list/3.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/banner_list/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/banner_list/4.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/banner_list/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/banner_list/5.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/champain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/champain.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/cheaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/cheaper.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/foot_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/foot_bg.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/publish.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/quality.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/quality.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/school_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/school_logo.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/school_show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/school_show.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/img/user_head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Index/img/user_head.png -------------------------------------------------------------------------------- /src/main/resources/static/Index/index.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | // 新手提示 3 | $('#dontshow').click(function () { 4 | $('#new_user_to_show').slideUp(); 5 | $.cookie('new_user', '0', { expires: 365 }); 6 | }) 7 | if (!$.cookie('new_user')) { 8 | $('#new_user_brand').slideDown(); 9 | } 10 | 11 | // 点击商品跳转 12 | $(".item").click(function () { 13 | item_id = $(this).attr('item_id'); 14 | window.location.href = '/item/'+item_id; 15 | }) 16 | 17 | $("#search .btn-outline-light").click(function () { 18 | let search = $("#search_input").val(); 19 | window.location.href = '/search?param='+ search; 20 | }) 21 | }); -------------------------------------------------------------------------------- /src/main/resources/static/Item/API.md: -------------------------------------------------------------------------------- 1 | ## 接收数据: 2 | 3 | ### 商品信息 4 | + id:商品id 5 | + title:商品标题 6 | + price:商品价格 7 | + oldPrice:商品 8 | + condition:成色 9 | + sellerId:卖家id 10 | + description:商品描述 11 | + sellerName:卖家称呼(区别于卖家昵称) 12 | + sellerContactWay:卖家联系方式(传递参数:1-QQ,2-微信,3-电话) 13 | + sellerContact:联系号码 14 | 15 | ``` 16 | { 17 | "id": 1001, 18 | "title": "棒球帽,加绒,原价99,现在只需10元!包邮!包邮!包邮!包邮!包邮!包邮!快来啊!", 19 | "price": 9.8, 20 | "oldPrice": 998, 21 | "condition": 9, 22 | "sellerId": 1001, 23 | "description": "这是一顶不是绿色的帽子。", 24 | "sellerName": "张先生", 25 | "sellerContactWay": "1", 26 | "sellerContact": "641411169" 27 | } 28 | ``` 29 | 30 | ### 卖家信息 31 | + id:卖家id 32 | + name:卖家昵称 33 | + level:信誉等级 34 | 35 | 36 | 37 | ## 备注 38 | 区分 `卖家昵称` 和 `卖家称呼` 39 | 40 | 卖家昵称:校园猪平台的网名 41 | ![卖家昵称](http://pj1wbw4gq.bkt.clouddn.com/18-12-19/25046802.jpg) 42 | 43 | 卖家称呼:通常为真实姓名 44 | ![卖家称呼](http://pj1wbw4gq.bkt.clouddn.com/18-12-19/49613157.jpg) -------------------------------------------------------------------------------- /src/main/resources/static/Item/item.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | // 计算折扣 3 | /*var percent = ((old_price - price) / old_price).toFixed(2) * 100;*/ 4 | $('.percent').eq(0).html('' + percent + "%"); 5 | 6 | // 点击“交换信息”按钮 7 | $('#change_info').click(function () { 8 | if ($('#your_name').val() && $('#contact').val()) { 9 | $('#enter_your_info').modal('hide'); 10 | $('#seller_info').modal('show'); 11 | $.ajax({ 12 | type: "post", 13 | dataType: "json", 14 | data: $('#exchange_info').serialize(), 15 | url: "/iwant", 16 | async: false, 17 | }); 18 | } else { 19 | $('#your_info_alert').fadeIn().delay('1000').fadeOut(); 20 | } 21 | }) 22 | 23 | /*留言的上传*/ 24 | $('#msg_button').click(function () { 25 | if ($("#msg_text").val=="" || $("#msg_text").val==null){ 26 | alert("内容不能为空") 27 | return; 28 | } 29 | $.ajax({ 30 | type: "post", 31 | dataType: "json", 32 | data: $('#leave_msg').serialize(), 33 | url: "/leave/message", 34 | async: false, 35 | success :function (data) { 36 | window.location.href = "/item/"+itemID; 37 | } 38 | }); 39 | }) 40 | /*收藏collection*/ 41 | $('#collection').click(function () { 42 | if (IdFavorite=="先收藏"){ 43 | $.ajax({ 44 | type: "post", 45 | dataType: "json", 46 | data: {itemId:itemID,userId:userid}, 47 | url: "/item/favorite", 48 | async: false, 49 | success :function (data) { 50 | window.location.href = "/item/"+itemID; 51 | } 52 | }); 53 | } else if (IdFavorite=="已收藏"){ 54 | $.ajax({ 55 | type: "post", 56 | dataType: "json", 57 | data: {itemId:itemID,userId:userid}, 58 | url: "/item/Nofavorite", 59 | async: false, 60 | success :function (data) { 61 | window.location.href = "/item/"+itemID; 62 | } 63 | }); 64 | } 65 | }) 66 | // 留言板消息渲染 67 | // TODO: 这条代码是当Ajax返回该物品的留言列表后执行的,如果留言列表为空就显示“没有留言”的提示,如果留言列表中有留言则不显示该提示 68 | if ($('#message_box .message').length == 0) { 69 | $('#message_null').show(); 70 | } 71 | 72 | 73 | }); -------------------------------------------------------------------------------- /src/main/resources/static/Login/img/login_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/Login/img/login_bg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/Login/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 校园猪-赚钱在校园 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 | 22 |
23 | 24 |
Welcome to
25 |
校园猪:二手市场
26 |
27 |
Hitokoto · 一言
28 |
29 |
30 |
31 | 32 |
33 | 34 | 35 |
36 |
37 |
登 录
38 |
登录校园猪后您可以发布校园需求信息,
以及浏览校园猪需求市场和二手市场,开启完整的体验。
39 |
40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 忘记密码? 48 |
49 | 50 | 快速注册 51 |
52 |
53 | 54 |
55 |
快速注册
56 |
57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 返回登录 69 |
70 |
71 | 72 |
73 | 74 |
75 |
76 | 77 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/main/resources/static/Login/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 8 | 校园猪-赚钱在校园 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 22 | 23 | 24 | 25 |
26 |
27 | 28 |
29 | 30 |
Welcome to
31 |
校园猪:二手市场
32 |
33 |
Hitokoto · 一言
34 |
35 |
36 |
37 | 38 |
39 | 40 | 41 |
42 |
43 |
登 录
44 |
登录校园猪后您可以发布校园需求信息,
以及浏览校园猪需求市场和二手市场,开启完整的体验。
45 |
46 | 47 | 48 | 49 | 50 |
51 | 52 | 53 | 忘记密码? 54 |
55 | 56 | 快速注册 57 |
58 |
59 | 60 |
61 |
快速注册
62 |
63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 返回登录 75 |
76 |
77 | 78 |
79 | 80 |
81 |
82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/main/resources/static/Publish/publish.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: rgba(0, 0, 0, 0.03); 3 | } 4 | 5 | body ul { 6 | padding: 0; 7 | list-style: none; 8 | } 9 | 10 | @media (max-width: 576px) { 11 | body #topbar { 12 | -webkit-box-shadow: none; 13 | box-shadow: none; 14 | } 15 | } 16 | 17 | #publish_banner { 18 | margin-top: 1rem; 19 | text-align: center; 20 | font-size: 3rem; 21 | background-color: #fec018; 22 | padding-top: 2rem; 23 | padding-bottom: 2rem; 24 | border-radius: 10px; 25 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 26 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 27 | } 28 | 29 | @media (max-width: 576px) { 30 | #publish_banner { 31 | margin-top: 0; 32 | border-radius: 0; 33 | } 34 | } 35 | 36 | #publish_banner .subtitle { 37 | font-size: 1rem; 38 | margin-top: 0.5rem; 39 | } 40 | 41 | #item_info { 42 | margin-top: 1rem; 43 | background-color: #fff; 44 | border-radius: 10px; 45 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 46 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 47 | padding-top: 0rem; 48 | padding-bottom: 2rem; 49 | overflow: hidden; 50 | } 51 | 52 | @media (max-width: 576px) { 53 | #item_info { 54 | margin-top: 0; 55 | border-radius: 0; 56 | } 57 | } 58 | 59 | #item_info label { 60 | color: rgba(0, 0, 0, 0.7); 61 | font-size: 1.1rem; 62 | } 63 | 64 | #item_info .step { 65 | background-color: #fec018; 66 | line-height: 4rem; 67 | margin-top: 2rem; 68 | } 69 | 70 | #item_info .step:first-child { 71 | margin-top: 0 !important; 72 | margin-bottom: 2rem; 73 | } 74 | 75 | #item_info .step div { 76 | width: 100%; 77 | text-align: center; 78 | font-size: 1.3rem; 79 | color: rgba(0, 0, 0, 0.7); 80 | font-weight: bold; 81 | } 82 | 83 | #item_info .help { 84 | padding-right: 20px; 85 | line-height: 2.2rem; 86 | text-align: justify; 87 | padding-top: 2rem; 88 | padding-bottom: 2rem; 89 | padding-left: 15px; 90 | padding-right: 15px; 91 | } 92 | 93 | #item_info .help span:not(:last-child) { 94 | background-color: #f5e2a4; 95 | padding: 0 5px; 96 | margin: 0 5px; 97 | border-radius: 5px; 98 | } 99 | 100 | #item_info .help span:last-child { 101 | position: relative; 102 | top: -5px; 103 | right: -5px; 104 | } 105 | 106 | #item_info .help .mdi { 107 | background-color: #FFF3CD !important; 108 | padding: 0 !important; 109 | } 110 | 111 | #item_info #upload_box { 112 | margin-top: 1rem; 113 | } 114 | 115 | #item_info #upload_box .box { 116 | margin-top: 1rem; 117 | } 118 | 119 | @media (min-width: 990px) { 120 | #item_info #upload_box .col-xl-3 { 121 | padding-right: 0px !important; 122 | } 123 | #item_info #upload_box .pic { 124 | width: 33%; 125 | margin: 0; 126 | } 127 | #item_info #upload_box .pic .kv-file-content { 128 | width: auto; 129 | } 130 | } 131 | 132 | @media (max-width: 768px) { 133 | #item_info #upload_box .pic { 134 | width: 100%; 135 | margin: 0; 136 | } 137 | #item_info #upload_box .pic .kv-file-content { 138 | width: auto; 139 | } 140 | } 141 | 142 | #item_info #upload_box .cover { 143 | width: 100%; 144 | margin: 0; 145 | } 146 | 147 | #item_info #upload_box .cover .kv-file-content { 148 | width: auto; 149 | } 150 | 151 | #item_info #seller_info { 152 | margin-top: 2rem; 153 | } 154 | 155 | #publish_btn { 156 | width: 20rem; 157 | display: block; 158 | margin: 0 auto; 159 | margin-top: 2rem; 160 | margin-bottom: 2rem; 161 | } 162 | /*# sourceMappingURL=publish.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/Publish/publish.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAOA,AAAA,IAAI,CAAC;EACH,gBAAgB,EAAE,mBAAmB;CAUtC;;AAXD,AAEE,IAFE,CAEF,EAAE,CAAC;EACD,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,IAAI;CACjB;;AACD,MAAM,EAAE,SAAS,EAAE,KAAK;EAN1B,AAOI,IAPA,CAOA,OAAO,CAAC;IACN,UAAU,EAAE,IAAI;GACjB;;;AAIL,AAAA,eAAe,CAAC;EACd,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,IAAI;EACf,gBAAgB,EAxBX,OAAO;EAyBZ,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;EACpB,aAAa,EAAE,IAAI;EACnB,UAAU,EA3BH,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,kBAAkB;CAoCpC;;AARC,MAAM,EAAE,SAAS,EAAE,KAAK;EAT1B,AAAA,eAAe,CAAC;IAUZ,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,CAAC;GAMnB;;;AAjBD,AAaE,eAba,CAab,SAAS,CAAC;EACR,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,MAAM;CACnB;;AAIH,AAAA,UAAU,CAAC;EACT,UAAU,EAAE,IAAI;EAChB,gBAAgB,EAAE,IAAI;EACt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,YAAY,CAAA;EACV,KAAK,EAAE,KAAK;EACZ,OAAO,EAAE,KAAK;EACd,MAAM,EAAE,MAAM;EACd,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,IAAI;CACpB", 4 | "sources": [ 5 | "publish.scss" 6 | ], 7 | "names": [], 8 | "file": "publish.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/Publish/publish.scss: -------------------------------------------------------------------------------- 1 | $main: #fec018; 2 | $shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 3 | // background-image: linear-gradient(-60deg, #ff5858 0%, #f09819 100%); 4 | $border: 1px solid rgba(0, 0, 0, 0.1); 5 | $featured: linear-gradient(120deg, #f6d365 0%, #fda085 100%); 6 | 7 | // 基础配置 8 | body { 9 | background-color: rgba(0, 0, 0, 0.03); 10 | ul { 11 | padding: 0; 12 | list-style: none; 13 | } 14 | @media (max-width: 576px) { 15 | #topbar { 16 | box-shadow: none; 17 | } 18 | } 19 | } 20 | 21 | #publish_banner { 22 | margin-top: 1rem; 23 | text-align: center; 24 | font-size: 3rem; 25 | background-color: $main; 26 | padding-top: 2rem; 27 | padding-bottom: 2rem; 28 | border-radius: 10px; 29 | box-shadow: $shadow; 30 | @media (max-width: 576px) { 31 | margin-top: 0; 32 | border-radius: 0; 33 | } 34 | .subtitle { 35 | font-size: 1rem; 36 | margin-top: 0.5rem; 37 | } 38 | } 39 | 40 | 41 | #item_info { 42 | margin-top: 1rem; 43 | background-color: #fff; 44 | border-radius: 10px; 45 | box-shadow: $shadow; 46 | padding-top: 0rem; 47 | padding-bottom: 2rem; 48 | overflow: hidden; 49 | @media (max-width: 576px) { 50 | margin-top: 0; 51 | border-radius: 0; 52 | } 53 | label { 54 | color: rgba(0, 0, 0, 0.7); 55 | font-size: 1.1rem; 56 | } 57 | .step{ 58 | &:first-child{ 59 | margin-top: 0 !important; 60 | margin-bottom: 2rem; 61 | } 62 | background-color: $main; 63 | line-height: 4rem; 64 | margin-top: 2rem; 65 | div{ 66 | width: 100%; 67 | text-align: center; 68 | font-size: 1.3rem; 69 | color: rgba(0, 0, 0, 0.7); 70 | font-weight: bold; 71 | } 72 | } 73 | .help { 74 | padding-right: 20px; 75 | line-height: 2.2rem; 76 | text-align: justify; 77 | padding-top: 2rem; 78 | padding-bottom: 2rem; 79 | padding-left: 15px; 80 | padding-right: 15px; 81 | span:not(:last-child){ 82 | background-color: rgb(245, 226, 164); 83 | padding: 0 5px; 84 | margin: 0 5px; 85 | border-radius: 5px; 86 | } 87 | span:last-child { 88 | position: relative; 89 | top: -5px; 90 | right: -5px; 91 | } 92 | .mdi{ 93 | background-color: #FFF3CD !important; 94 | padding: 0 !important; 95 | } 96 | } 97 | #upload_box { 98 | margin-top: 1rem; 99 | .box{ 100 | margin-top: 1rem; 101 | } 102 | @media (min-width: 990px) { 103 | .col-xl-3 { 104 | padding-right: 0px !important; 105 | } 106 | .pic { 107 | width: 33%; 108 | margin: 0; 109 | .kv-file-content { 110 | width: auto; 111 | } 112 | } 113 | } 114 | @media (max-width: 768px) { 115 | .pic { 116 | width: 100%; 117 | margin: 0; 118 | .kv-file-content { 119 | width: auto; 120 | } 121 | } 122 | } 123 | .cover { 124 | width: 100%; 125 | margin: 0; 126 | .kv-file-content { 127 | width: auto; 128 | } 129 | } 130 | } 131 | #seller_info{ 132 | margin-top: 2rem; 133 | } 134 | } 135 | 136 | #publish_btn{ 137 | width: 20rem; 138 | display: block; 139 | margin: 0 auto; 140 | margin-top: 2rem; 141 | margin-bottom: 2rem; 142 | } -------------------------------------------------------------------------------- /src/main/resources/static/Search/search.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAOA,AAAA,IAAI,CAAC;EACH,gBAAgB,EAAE,mBAAmB;CAUtC;;AAXD,AAEE,IAFE,CAEF,EAAE,CAAC;EACD,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,IAAI;CACjB;;AACD,MAAM,EAAE,SAAS,EAAE,KAAK;EAN1B,AAOI,IAPA,CAOA,OA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OR,cAAc,CA+EZ,OAAO,CAYL,aAAa,CAAC;EACZ,KAAK,EAAE,KAAK;CAOb;;AA1GP,AAoGQ,UApGE,CAOR,cAAc,CA+EZ,OAAO,CAYL,aAAa,CAEX,IAAI,CAAC;EACH,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,OAAO;EAChB,KAAK,EAAE,KAAK;EACZ,aAAa,EAAE,GAAG;CACnB;;AAMT,AAAA,iBAAiB,CAAC;EAChB,UAAU,EAAE,eAAe;EAC3B,UAAU,EA3KH,GAAG,CAAC,KAAK,CAAC,kBAAkB;EA4KnC,WAAW,EAAE,IAAI;EACjB,MAAM,EAAE,SAAS;EACjB,KAAK,EAAE,kBAAkB;CAO1B;;AAZD,AAME,iBANe,CAMf,MAAM,CAAC;EACL,SAAS,EAAE,MAAM;CAIlB;;AAXH,AAQI,iBARa,CAMf,MAAM,CAEJ,IAAI,CAAC;EACH,WAAW,EAAE,IAAI;CAClB", 4 | "sources": [ 5 | "search.scss" 6 | ], 7 | "names": [], 8 | "file": "search.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/Search/search.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | function renderPercent() { 3 | $('.price_box').each(function () { 4 | let price = $(this).find('.now').eq(0).text().split('¥')[1]; 5 | let old_price = $(this).find('.old').eq(0).text().split('¥')[1]; 6 | let percent = ((old_price - price) / old_price).toFixed(2) * 100; 7 | $(this).children('.percent').eq(0).text('-' + percent + '%'); 8 | }) 9 | } 10 | function renderNone() { 11 | if ($('.item').length == 0) { 12 | $('#noFound').show(); 13 | } 14 | } 15 | // TODO: 发送Ajax请求渲染搜索列表 16 | 17 | // 商品列表渲染出后再执行该方法,该方法为计算显示商品的降价幅度 18 | renderPercent(); 19 | // 如果没有查找到任何商品就执行这个方法: 20 | renderNone(); 21 | 22 | 23 | }); 24 | function item_click(id) { 25 | window.location.href = "/item/"+id; 26 | } -------------------------------------------------------------------------------- /src/main/resources/static/Search/search.scss: -------------------------------------------------------------------------------- 1 | $main: #fec018; 2 | $shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 3 | // background-image: linear-gradient(-60deg, #ff5858 0%, #f09819 100%); 4 | $border: 1px solid rgba(0, 0, 0, 0.1); 5 | $search_list: linear-gradient(120deg, #f6d365 0%, #fda085 100%); 6 | $search_list_color: #fec018; 7 | // 基础配置 8 | body { 9 | background-color: rgba(0, 0, 0, 0.03); 10 | ul { 11 | padding: 0; 12 | list-style: none; 13 | } 14 | @media (max-width: 576px) { 15 | #topbar { 16 | box-shadow: none; 17 | } 18 | } 19 | } 20 | 21 | #big_title { 22 | margin-bottom: 2rem !important; 23 | color: rgba(0, 0, 0, 0.6); 24 | font-weight: bold; 25 | border-bottom: $border; 26 | padding-bottom: 1rem; 27 | .title { 28 | font-size: 1.5rem; 29 | span { 30 | margin-left: 0.5rem; 31 | } 32 | } 33 | } 34 | 35 | #search_list { 36 | .price_box { 37 | background-image: $search_list; 38 | border-color: $search_list_color; 39 | } 40 | } 41 | 42 | #noFound { 43 | display: none; 44 | padding-left: 5px; 45 | text-align: center; 46 | margin: 5rem 0; 47 | font-weight: bold; 48 | .icon{ 49 | font-size: 5rem; 50 | color: rgba(0, 0, 0, 0.6); 51 | } 52 | .title{ 53 | color: rgba(0, 0, 0, 0.6); 54 | font-size: 1.5rem; 55 | span{ 56 | font-size: 1.1rem; 57 | font-weight: 500 !important; 58 | } 59 | } 60 | } 61 | 62 | .item_list { 63 | .row { 64 | padding: 0 10px; 65 | } 66 | .item { 67 | padding: 0 5px; 68 | } 69 | .item_innerbox { 70 | background-color: #fff; 71 | cursor: pointer; 72 | border-radius: 10px !important; 73 | overflow: hidden; 74 | box-shadow: $shadow; 75 | &:hover { 76 | border-width: 2px; 77 | border-color: rgba(0, 0, 0, 0.2); 78 | } 79 | border-radius: 5px; 80 | margin-top: 1rem; 81 | border: $border; 82 | .img_border { 83 | img { 84 | width: 100%; 85 | } 86 | } 87 | .price_box { 88 | @media (max-width: 400px) { 89 | .percent { 90 | font-size: 1rem !important; 91 | } 92 | .price { 93 | .old { 94 | font-size: 0.7rem !important; 95 | } 96 | .now { 97 | font-size: 1rem !important; 98 | } 99 | } 100 | } 101 | margin: 5px; 102 | height: 2.5rem; 103 | border-radius: 5px; 104 | border: solid 2px white; 105 | box-sizing: content-box; 106 | .percent { 107 | float: left; 108 | line-height: 2.5rem; 109 | width: 40%; 110 | text-align: center; 111 | font-size: 1.4rem; 112 | color: white; 113 | } 114 | .price { 115 | background: white; 116 | min-width: 60%; 117 | float: right; 118 | text-align: center; 119 | line-height: 2.5rem; 120 | .old { 121 | width: 50%; 122 | font-size: 1rem; 123 | color: rgba(0, 0, 0, 0.5); 124 | text-decoration: line-through; 125 | float: right; 126 | text-align: left; 127 | } 128 | .now { 129 | width: 50%; 130 | font-size: 1.4rem; 131 | float: left; 132 | } 133 | } 134 | } 135 | .item_title { 136 | padding: 0 5px; 137 | height: 3rem; 138 | @media (max-width: 576px) { 139 | font-size: 0.9rem; 140 | } 141 | a { 142 | text-align: justify; 143 | display: block; 144 | line-height: 1.5rem; 145 | } 146 | overflow: hidden; 147 | } 148 | .seller { 149 | font-size: 0.9rem; 150 | width: 100%; 151 | line-height: 2rem; 152 | padding: 5px; 153 | color: rgba(0, 0, 0, 0.6); 154 | .seller_name { 155 | .mdi { 156 | margin-right: 5px; 157 | } 158 | float: left; 159 | } 160 | .seller_level { 161 | float: right; 162 | span { 163 | background-color: #24a647; 164 | padding: 2px 5px; 165 | color: white; 166 | border-radius: 5px; 167 | } 168 | } 169 | } 170 | } 171 | } 172 | 173 | #big_title_bottom { 174 | margin-top: 3rem !important; 175 | border-top: $border; 176 | padding-top: 1rem; 177 | margin: 1rem auto; 178 | color: rgba(0, 0, 0, 0.4); 179 | .title { 180 | font-size: 1.5rem; 181 | span { 182 | margin-left: 1rem; 183 | } 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /src/main/resources/static/User/center.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/User/center.js -------------------------------------------------------------------------------- /src/main/resources/static/User/center.scss: -------------------------------------------------------------------------------- 1 | #main { 2 | margin-top: 20px; 3 | color: rgba($color: #000000, $alpha: 0.8); 4 | .part_card { 5 | margin-bottom: 20px; 6 | .item_card { 7 | margin-top: 20px; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/static/User/user_gloable.js: -------------------------------------------------------------------------------- 1 | // 显示面板 2 | function showPanel() { 3 | let part = window.location.hash; 4 | $('.nav-link').each(function () { 5 | $(this).removeClass('active').attr('aria-selected', 'false'); 6 | }); 7 | $(part + '_tab').addClass('active').attr('aria-selected', 'true'); 8 | $('.tab-pane').removeClass('show active'); 9 | $(part).addClass('show active') 10 | } 11 | 12 | // 显示用户修改的头像 13 | function showPreview(source) { 14 | var file = source.files[0]; 15 | if (window.FileReader) { 16 | var fr = new FileReader(); 17 | fr.onloadend = function (e) { 18 | document.getElementById('user_head_preview').src = e.target.result; 19 | } 20 | fr.readAsDataURL(file); 21 | } 22 | console.log(1); 23 | } 24 | 25 | 26 | // 获取商品图片相关 27 | /*function getSrc(item_id) { 28 | return '/Data/SecondHand/Item/' + item_id + '/cover'; //封面在服务器上存放的路径 29 | }*/ 30 | function renderItemPic() { 31 | $('.item_card').each(function () { 32 | item_id = $(this).attr('item_id') 33 | /*$(this).find('img').eq(0).attr('src', getSrc(item_id));*/ 34 | }) 35 | } 36 | 37 | 38 | var item_id; 39 | 40 | // 确定商品已卖出后执行的函数 41 | function publish_sold() { 42 | console.log(item_id); 43 | // TODO: 发送Ajax请求,标记商品已被卖出 44 | 45 | $('#ensure_publish_sold').modal('hide'); 46 | $('[item_id=' + item_id + ']').fadeOut(); 47 | } 48 | 49 | // 确定下架后执行的函数 50 | function publish_delete() { 51 | console.log(item_id); 52 | // TODO: 发送Ajax请求,删除商品信息 53 | 54 | $('#ensure_publish_delete').modal('hide'); 55 | $('[item_id=' + item_id + ']').fadeOut(); 56 | } 57 | 58 | // 确定删除我想要的商品时执行的函数 59 | function want_delete() { 60 | console.log(item_id); 61 | // TODO: 发送Ajax请求,从我想要的列表中删除商 62 | var changeId = $("#want_delete_Hid").val(); 63 | $.ajax({ 64 | type: "post", 65 | dataType: "json", 66 | data: {changeId: changeId}, 67 | url: "/exchange/del", 68 | success:function(data){ 69 | window.location.href = "/user#want" 70 | }, 71 | error : function () { 72 | window.location.href = "/user#want" 73 | } 74 | }); 75 | $('#ensure_want_delete').modal('hide'); 76 | $('[item_id=' + item_id + ']').fadeOut(); 77 | } 78 | 79 | // 确定删除收藏的商品时执行的函数 80 | function fav_want_delete() { 81 | console.log(item_id); 82 | // TODO: 发送Ajax请求,从我想要的列表中删除商 83 | var favId = $("#want_fav_Hid").val(); 84 | $.ajax({ 85 | type: "post", 86 | dataType: "json", 87 | data: {favId: favId}, 88 | url: "/fav/del", 89 | success:function(data){ 90 | window.location.href = "/user#collection" 91 | }, 92 | error : function () { 93 | window.location.href = "/user#collection" 94 | } 95 | }); 96 | $('#ensure_fav_delete').modal('hide'); 97 | $('[item_id=' + item_id + ']').fadeOut(); 98 | } 99 | 100 | // 渲染卖家信息 101 | function renderSellerInfo(seller_info) { 102 | $('#seller_name span').eq(0).text(seller_info.sellerName); 103 | $('#seller_contact span').eq(0).text(seller_info.sellerContact); 104 | let $contactWay = $('#seller_contact span').eq(1); 105 | switch (seller_info.sellerContactWay) { 106 | case '1': 107 | $contactWay.text('手机'); 108 | break; 109 | case '2': 110 | $contactWay.text('QQ'); 111 | break; 112 | case '3': 113 | $contactWay.text('微信'); 114 | break; 115 | } 116 | } -------------------------------------------------------------------------------- /src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/static/lib/SchoolPig_ICON.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/lib/SchoolPig_ICON.png -------------------------------------------------------------------------------- /src/main/resources/static/lib/SchoolPig_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/lib/SchoolPig_Logo.png -------------------------------------------------------------------------------- /src/main/resources/static/lib/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/lib/default.jpg -------------------------------------------------------------------------------- /src/main/resources/static/lib/fileinput/theme.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * bootstrap-fileinput v4.5.1 3 | * http://plugins.krajee.com/file-input 4 | * 5 | * Font Awesome icon theme configuration for bootstrap-fileinput. Requires font awesome assets to be loaded. 6 | * 7 | * Author: Kartik Visweswaran 8 | * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com 9 | * 10 | * Licensed under the BSD 3-Clause 11 | * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md 12 | */!function(a){"use strict";a.fn.fileinputThemes.fa={fileActionSettings:{removeIcon:'',uploadIcon:'',uploadRetryIcon:'',downloadIcon:'',zoomIcon:'',dragIcon:'',indicatorNew:'',indicatorSuccess:'',indicatorError:'',indicatorLoading:''},layoutTemplates:{fileIcon:' '},previewZoomButtonIcons:{prev:'',next:'',toggleheader:'',fullscreen:'',borderless:'',close:''},previewFileIcon:'',browseIcon:'',removeIcon:'',cancelIcon:'',uploadIcon:'',msgValidationErrorIcon:' '}}(window.jQuery); -------------------------------------------------------------------------------- /src/main/resources/static/lib/fileinput/zh.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * FileInput Chinese Translations 3 | * 4 | * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or 5 | * any HTML markup tags in the messages must not be converted or translated. 6 | * 7 | * @see http://github.com/kartik-v/bootstrap-fileinput 8 | * @author kangqf 9 | * 10 | * NOTE: this file must be saved in UTF-8 encoding. 11 | */ 12 | (function ($) { 13 | "use strict"; 14 | 15 | $.fn.fileinputLocales['zh'] = { 16 | fileSingle: '文件', 17 | filePlural: '个文件', 18 | browseLabel: '选择 …', 19 | removeLabel: '移除', 20 | removeTitle: '清除选中文件', 21 | cancelLabel: '取消', 22 | cancelTitle: '取消进行中的上传', 23 | uploadLabel: '上传', 24 | uploadTitle: '上传选中文件', 25 | msgNo: '没有', 26 | msgNoFilesSelected: '未选择文件', 27 | msgCancelled: '取消', 28 | msgPlaceholder: '选择 {files}...', 29 | msgZoomModalHeading: '详细预览', 30 | msgFileRequired: '必须选择一个文件上传.', 31 | msgSizeTooSmall: '文件 "{name}" ({size} KB) 必须大于限定大小 {minSize} KB.', 32 | msgSizeTooLarge: '文件 "{name}" ({size} KB) 超过了允许大小 {maxSize} KB.', 33 | msgFilesTooLess: '你必须选择最少 {n} {files} 来上传. ', 34 | msgFilesTooMany: '选择的上传文件个数 ({n}) 超出最大文件的限制个数 {m}.', 35 | msgFileNotFound: '文件 "{name}" 未找到!', 36 | msgFileSecured: '安全限制,为了防止读取文件 "{name}".', 37 | msgFileNotReadable: '文件 "{name}" 不可读.', 38 | msgFilePreviewAborted: '取消 "{name}" 的预览.', 39 | msgFilePreviewError: '读取 "{name}" 时出现了一个错误.', 40 | msgInvalidFileName: '文件名 "{name}" 包含非法字符.', 41 | msgInvalidFileType: '不正确的类型 "{name}". 只支持 "{types}" 类型的文件.', 42 | msgInvalidFileExtension: '不正确的文件扩展名 "{name}". 只支持 "{extensions}" 的文件扩展名.', 43 | msgFileTypes: { 44 | 'image': 'image', 45 | 'html': 'HTML', 46 | 'text': 'text', 47 | 'video': 'video', 48 | 'audio': 'audio', 49 | 'flash': 'flash', 50 | 'pdf': 'PDF', 51 | 'object': 'object' 52 | }, 53 | msgUploadAborted: '该文件上传被中止', 54 | msgUploadThreshold: '处理中...', 55 | msgUploadBegin: '正在初始化...', 56 | msgUploadEnd: '完成', 57 | msgUploadEmpty: '无效的文件上传.', 58 | msgUploadError: '上传出错', 59 | msgValidationError: '验证错误', 60 | msgLoading: '加载第 {index} 文件 共 {files} …', 61 | msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.', 62 | msgSelected: '{n} {files} 选中', 63 | msgFoldersNotAllowed: '只支持拖拽文件! 跳过 {n} 拖拽的文件夹.', 64 | msgImageWidthSmall: '图像文件的"{name}"的宽度必须是至少{size}像素.', 65 | msgImageHeightSmall: '图像文件的"{name}"的高度必须至少为{size}像素.', 66 | msgImageWidthLarge: '图像文件"{name}"的宽度不能超过{size}像素.', 67 | msgImageHeightLarge: '图像文件"{name}"的高度不能超过{size}像素.', 68 | msgImageResizeError: '无法获取的图像尺寸调整。', 69 | msgImageResizeException: '调整图像大小时发生错误。
{errors}
', 70 | msgAjaxError: '{operation} 发生错误. 请重试!', 71 | msgAjaxProgressError: '{operation} 失败', 72 | ajaxOperations: { 73 | deleteThumb: '删除文件', 74 | uploadThumb: '上传文件', 75 | uploadBatch: '批量上传', 76 | uploadExtra: '表单数据上传' 77 | }, 78 | dropZoneTitle: '请至少上传一张图片', 79 | dropZoneClickTitle: '
(或点击{files}按钮选择文件)', 80 | fileActionSettings: { 81 | removeTitle: '删除文件', 82 | uploadTitle: '上传文件', 83 | uploadRetryTitle: '重试', 84 | zoomTitle: '查看详情', 85 | dragTitle: '移动 / 重置', 86 | indicatorNewTitle: '没有上传', 87 | indicatorSuccessTitle: '上传', 88 | indicatorErrorTitle: '上传错误', 89 | indicatorLoadingTitle: '上传 ...' 90 | }, 91 | previewZoomButtonTitles: { 92 | prev: '预览上一个文件', 93 | next: '预览下一个文件', 94 | toggleheader: '缩放', 95 | fullscreen: '全屏', 96 | borderless: '无边界模式', 97 | close: '关闭当前预览' 98 | } 99 | }; 100 | })(window.jQuery); 101 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/foot_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/lib/foot_bg.png -------------------------------------------------------------------------------- /src/main/resources/static/lib/jquery-cookie/jquery-cookie.js: -------------------------------------------------------------------------------- 1 | /*! jquery.cookie v1.4.1 | MIT */ 2 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/md-fonts/fonts/materialdesignicons-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/lib/md-fonts/fonts/materialdesignicons-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/lib/md-fonts/fonts/materialdesignicons-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/lib/md-fonts/fonts/materialdesignicons-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/lib/md-fonts/fonts/materialdesignicons-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/lib/md-fonts/fonts/materialdesignicons-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/lib/md-fonts/fonts/materialdesignicons-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/lib/md-fonts/fonts/materialdesignicons-webfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/lib/post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/lib/post.png -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/footer/footer.css: -------------------------------------------------------------------------------- 1 | #footer { 2 | background-color: rgba(0, 0, 0, 0.04); 3 | margin-top: 1rem; 4 | } 5 | 6 | #footer .container .img_bg { 7 | width: 50%; 8 | display: block; 9 | margin: 1rem auto; 10 | } 11 | 12 | #footer .container .footer_text { 13 | position: absolute; 14 | top: 0; 15 | bottom: 0; 16 | right: 0; 17 | left: 0; 18 | margin: auto; 19 | height: 60%; 20 | width: 90%; 21 | } 22 | 23 | #footer .container .footer_text h1 { 24 | margin-top: 2rem; 25 | } 26 | 27 | #footer .container .footer_text h1, 28 | #footer .container .footer_text h2 { 29 | font-size: 1.5rem; 30 | color: rgba(0, 0, 0, 0.7); 31 | font-weight: 100; 32 | } 33 | 34 | #footer .container .footer_text h3 { 35 | font-size: 1rem; 36 | color: rgba(0, 0, 0, 0.5); 37 | margin-bottom: 2rem; 38 | } 39 | /*# sourceMappingURL=footer.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/footer/footer.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,AAAA,OAAO,CAAC;EACN,gBAAgB,EAAE,mBAAmB;EACrC,UAAU,EAAE,IAAI;CAgCjB;;AAlCD,AAII,OAJG,CAGL,UAAU,CACR,OAAO,CAAC;EACN,KAAK,EAAE,GAAG;EACV,OAAO,EAAE,KAAK;EACd,MAAM,EAAE,SAAS;CAClB;;AARL,AASI,OATG,CAGL,UAAU,CAMR,YAAY,CAAC;EACX,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,MAAM,EAAE,CAAC;EACT,KAAK,EAAE,CAAC;EACR,IAAI,EAAE,CAAC;EACP,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,GAAG;EACX,KAAK,EAAE,GAAG;CAeX;;AAhCL,AAkBM,OAlBC,CAGL,UAAU,CAMR,YAAY,CASV,EAAE,CAAA;EACA,UAAU,EAAE,IAAI;CACjB;;AApBP,AAqBM,OArBC,CAGL,UAAU,CAMR,YAAY,CAYV,EAAE;AArBR,OAAO,CAGL,UAAU,CAMR,YAAY,CAaV,EAAE,CAAC;EACD,SAAS,EAAE,MAAM;EACjB,KAAK,EAAE,kBAAkB;EACzB,WAAW,EAAE,GAAG;CACjB;;AA1BP,AA2BM,OA3BC,CAGL,UAAU,CAMR,YAAY,CAkBV,EAAE,CAAC;EACD,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,kBAAkB;EACzB,aAAa,EAAE,IAAI;CACpB", 4 | "sources": [ 5 | "footer.scss" 6 | ], 7 | "names": [], 8 | "file": "footer.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/footer/footer.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 7 |
8 |
9 | 15 |
16 |
17 |
18 |
-------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/footer/footer.scss: -------------------------------------------------------------------------------- 1 | #footer { 2 | background-color: rgba(0, 0, 0, 0.04); 3 | margin-top: 1rem; 4 | .container { 5 | .img_bg { 6 | width: 50%; 7 | display: block; 8 | margin: 1rem auto; 9 | } 10 | .footer_text { 11 | position: absolute; 12 | top: 0; 13 | bottom: 0; 14 | right: 0; 15 | left: 0; 16 | margin: auto; 17 | height: 60%; 18 | width: 90%; 19 | h1{ 20 | margin-top: 2rem; 21 | } 22 | h1, 23 | h2 { 24 | font-size: 1.5rem; 25 | color: rgba(0, 0, 0, 0.7); 26 | font-weight: 100; 27 | } 28 | h3 { 29 | font-size: 1rem; 30 | color: rgba(0, 0, 0, 0.5); 31 | margin-bottom: 2rem; 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/search_bar/search_bar.css: -------------------------------------------------------------------------------- 1 | #search_box { 2 | position: relative; 3 | height: 10rem; 4 | background-image: linear-gradient(120deg, #fac42e 0%, #fec018 100%); 5 | margin-bottom: 3rem; 6 | } 7 | 8 | #search_box #index_title { 9 | font-size: 1rem; 10 | text-align: center; 11 | color: rgba(0, 0, 0, 0.6); 12 | font-weight: lighter; 13 | } 14 | 15 | @media (min-width: 1000px) { 16 | #search_box #index_subtitle { 17 | font-size: 2.5rem; 18 | } 19 | } 20 | 21 | @media (max-width: 1000px) { 22 | #search_box #index_subtitle { 23 | font-size: 1.5rem; 24 | padding-top: 1rem; 25 | } 26 | } 27 | 28 | #search_box #index_subtitle { 29 | text-align: center; 30 | color: rgba(0, 0, 0, 0.7); 31 | } 32 | 33 | #search_box #publish { 34 | display: block; 35 | margin: 0 auto; 36 | margin-top: 1.3rem; 37 | border-radius: 2rem; 38 | line-height: 30px; 39 | width: 150px; 40 | -webkit-box-pack: justify; 41 | -ms-flex-pack: justify; 42 | justify-content: space-between; 43 | display: -webkit-box; 44 | display: -ms-flexbox; 45 | display: flex; 46 | } 47 | 48 | @media (min-width: 1000px) { 49 | #search_box #publish { 50 | margin-top: .9rem; 51 | } 52 | } 53 | 54 | #search_box #publish:hover a { 55 | color: #000000; 56 | } 57 | 58 | #search_box #publish img { 59 | width: 30px; 60 | border-radius: 30px; 61 | border: 1px solid #fff; 62 | } 63 | 64 | #search_box #publish a { 65 | margin-right: 8px; 66 | color: white; 67 | text-decoration: none; 68 | } 69 | 70 | #search_box #search { 71 | position: absolute; 72 | left: 0; 73 | right: 0; 74 | bottom: -1.5rem; 75 | border-radius: 2rem; 76 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 77 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 78 | padding: 0; 79 | width: 90%; 80 | } 81 | 82 | #search_box #search .input-group #search_input { 83 | border-color: rgba(0, 0, 0, 0.1); 84 | height: 3rem; 85 | border-radius: 2rem 0 0 2rem; 86 | padding-left: 1rem; 87 | } 88 | 89 | @media (min-width: 768px) { 90 | #search_box #search .input-group #search_input { 91 | padding-left: 1.5rem; 92 | } 93 | } 94 | 95 | #search_box #search .input-group button { 96 | border-color: rgba(0, 0, 0, 0.1); 97 | background-color: #fec018; 98 | border-radius: 0 2rem 2rem 0; 99 | } 100 | 101 | #search_box #search #associative_box { 102 | display: none; 103 | position: absolute; 104 | z-index: 999; 105 | } 106 | 107 | #search_box #search #associative_box #associative_list { 108 | -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); 109 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); 110 | padding: 0; 111 | background-color: #fff; 112 | width: 100%; 113 | border-radius: 5px; 114 | border: solid rgba(0, 0, 0, 0.2) 1px; 115 | overflow: hidden; 116 | } 117 | 118 | #search_box #search #associative_box #associative_list .associative_item { 119 | list-style: none; 120 | line-height: 2.5rem; 121 | padding-left: 1rem; 122 | cursor: pointer; 123 | } 124 | 125 | #search_box #search #associative_box #associative_list .associative_item:hover { 126 | background-color: rgba(0, 0, 0, 0.2); 127 | } 128 | /*# sourceMappingURL=search_bar.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/search_bar/search_bar.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAIA,AAAA,WAAW,CAAC;EACV,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,KAAK;EACb,gBAAgB,EAAE,iDAAiD;EACnE,aAAa,EAAE,IAAI;CAoGpB;;AAxGD,AAKE,WALS,CAKT,YAAY,CAAC;EACX,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,MAAM;EAClB,KAAK,EAAE,kBAAkB;EACzB,WAAW,EAAE,OAAO;CACrB;;AACD,MAAM,EAAE,SAAS,EAAE,MAAM;EAX3B,AAYI,WAZO,CAYP,eAAe,CAAC;IACd,SAAS,EAAE,MAAM;GAClB;;;AAEH,MAAM,EAAE,SAAS,EAAE,MAAM;EAhB3B,AAiBI,WAjBO,CAiBP,eAAe,CAAC;IACd,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,IAAI;GAClB;;;AApBL,AAsBE,WAtBS,CAsBT,eAAe,CAAC;EAEd,UAAU,EAAE,MAAM;EAClB,KAAK,EAAE,kBAAkB;CAC1B;;AA1BH,AA2BE,WA3BS,CA2BT,QAAQ,CAAC;EACP,OAAO,EAAE,KAAK;EACd,MAAM,EAAE,MAAM;EACd,UAAU,EAAE,MAAM;EAClB,aAAa,EAAE,IAAI;EACnB,WAAW,EAAE,IAAI;EACjB,KAAK,EAAE,KAAK;EACZ,eAAe,EAAE,aAAa;EAC9B,OAAO,EAAE,IAAI;CAmBd;;AAlBC,MAAM,EAAE,SAAS,EAAE,MAAM;EApC7B,AA2BE,WA3BS,CA2BT,QAAQ,CAAC;IAUL,UAAU,EAAE,KAAK;GAiBpB;;;AAtDH,AAwCM,WAx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,CAuDT,OAAO,CAyBL,gBAAgB,CAId,iBAAiB,CAAC;EAChB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB;EACvC,OAAO,EAAE,CAAC;EACV,gBAAgB,EAAE,IAAI;EACtB,KAAK,EAAE,IAAI;EACX,aAAa,EAAE,GAAG;EAClB,MAAM,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAAG;EACpC,QAAQ,EAAE,MAAM;CAUjB;;AArGP,AA4FQ,WA5FG,CAuDT,OAAO,CAyBL,gBAAgB,CAId,iBAAiB,CAQf,iBAAiB,CAAC;EAIhB,UAAU,EAAE,IAAI;EAChB,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,IAAI;EAClB,MAAM,EAAE,OAAO;CAChB;;AApGT,AA6FU,WA7FC,CAuDT,OAAO,CAyBL,gBAAgB,CAId,iBAAiB,CAQf,iBAAiB,AACd,MAAM,CAAC;EACN,gBAAgB,EAAE,kBAAkB;CACrC", 4 | "sources": [ 5 | "search_bar.scss" 6 | ], 7 | "names": [], 8 | "file": "search_bar.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/search_bar/search_bar.html: -------------------------------------------------------------------------------- 1 | 2 | 24 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/search_bar/search_bar.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | // 获取icon资源 3 | $('#publish img').eq(0).attr('src', '/Data/SecondHand/System/publish.png') 4 | // 搜索联想 5 | var getSearchData = function (search_str) { 6 | $.ajax({ 7 | type: "GET", 8 | url: "https://suggest.taobao.com/sug?area=etao&code=utf-8&callback=search_data&q=" + search_str, 9 | dataType: "jsonp", 10 | jsonpCallback: "search_data", 11 | success: function (data) { 12 | console.log(data); 13 | var search_res = []; 14 | data.result.forEach(element => { 15 | search_res.push(element[0]); 16 | }); 17 | $('#associative_list').empty(); 18 | if (search_res.length === 0) { 19 | $('#associative_box').hide(); 20 | } else { 21 | $('#associative_box').show(); 22 | for (let i = 0; i < search_res.length; i++) { 23 | let search_tpl = `
  • ${search_res[i]}
  • `; 24 | $('#associative_list').append(search_tpl); 25 | } 26 | } 27 | } 28 | }); 29 | } 30 | 31 | $('#search_input').bind('input propertychange', function () { 32 | let str = $('#search_input').val(); 33 | if (str.trim() !== '') { 34 | getSearchData(str); 35 | } else { 36 | $('#associative_box').hide(); 37 | } 38 | }); 39 | 40 | $('#search_input').focus(function () { 41 | if ($('#search_input').val().trim() !== '') { 42 | getSearchData($('#search_input').val()); 43 | } 44 | }) 45 | 46 | $('#search_input').blur(function () { 47 | setTimeout(() => { 48 | $('#associative_box').hide(); 49 | }, 100); 50 | }) 51 | 52 | $('#associative_list').on('click', '.associative_item', function () { 53 | $('#search_input').val($(this).text()); 54 | $('#associative_box').hide(); 55 | }) 56 | 57 | $("#search .btn-outline-light").click(function () { 58 | let search = $("#search_input").val(); 59 | window.location.href = '/search?param='+ search; 60 | }) 61 | }); 62 | 63 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/search_bar/search_bar.scss: -------------------------------------------------------------------------------- 1 | $main: #fec018; 2 | $shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 3 | $border: 1px solid #eaecef; 4 | // 搜索框 5 | #search_box { 6 | position: relative; 7 | height: 10rem; 8 | background-image: linear-gradient(120deg, #fac42e 0%, #fec018 100%); 9 | margin-bottom: 3rem; 10 | #index_title { 11 | font-size: 1rem; 12 | text-align: center; 13 | color: rgba(0, 0, 0, 0.6); 14 | font-weight: lighter; 15 | } 16 | @media (min-width: 1000px) { 17 | #index_subtitle { 18 | font-size: 2.5rem; 19 | } 20 | } 21 | @media (max-width: 1000px) { 22 | #index_subtitle { 23 | font-size: 1.5rem; 24 | padding-top: 1rem; 25 | } 26 | } 27 | #index_subtitle { 28 | // font-size: 2.5rem; 29 | text-align: center; 30 | color: rgba(0, 0, 0, 0.7); 31 | } 32 | #publish { 33 | display: block; 34 | margin: 0 auto; 35 | margin-top: 1.3rem; 36 | border-radius: 2rem; 37 | line-height: 30px; 38 | width: 150px; 39 | justify-content: space-between; 40 | display: flex; 41 | @media (min-width: 1000px) { 42 | margin-top: .9rem; 43 | } 44 | &:hover { 45 | a { 46 | color: #000000; 47 | } 48 | } 49 | img { 50 | width: 30px; 51 | border-radius: 30px; 52 | border: 1px solid #fff; 53 | } 54 | a { 55 | margin-right: 8px; 56 | color: white; 57 | text-decoration: none; 58 | } 59 | } 60 | #search { 61 | position: absolute; 62 | left: 0; 63 | right: 0; 64 | bottom: -1.5rem; 65 | border-radius: 2rem; 66 | box-shadow: $shadow; 67 | padding: 0; 68 | width: 90%; 69 | .input-group { 70 | #search_input { 71 | border-color: rgba(0, 0, 0, 0.1); 72 | height: 3rem; 73 | border-radius: 2rem 0 0 2rem; 74 | padding-left: 1rem; 75 | @media (min-width: 768px) { 76 | padding-left: 1.5rem; 77 | } 78 | } 79 | button { 80 | border-color: rgba(0, 0, 0, 0.1); 81 | background-color: $main; 82 | border-radius: 0 2rem 2rem 0; 83 | } 84 | } 85 | #associative_box { 86 | display: none; 87 | position: absolute; 88 | z-index: 999; 89 | #associative_list { 90 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); 91 | padding: 0; 92 | background-color: #fff; 93 | width: 100%; 94 | border-radius: 5px; 95 | border: solid rgba(0, 0, 0, 0.2) 1px; 96 | overflow: hidden; 97 | .associative_item { 98 | &:hover { 99 | background-color: rgba(0, 0, 0, 0.2); 100 | } 101 | list-style: none; 102 | line-height: 2.5rem; 103 | padding-left: 1rem; 104 | cursor: pointer; 105 | } 106 | } 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/top_btn/top_btn.css: -------------------------------------------------------------------------------- 1 | @-webkit-keyframes slideInUp { 2 | from { 3 | bottom: -8rem; 4 | visibility: visible; 5 | } 6 | to { 7 | -webkit-transform: translate3d(0, 0, 0); 8 | transform: translate3d(0, 0, 0); 9 | } 10 | } 11 | 12 | @keyframes slideInUp { 13 | from { 14 | bottom: -8rem; 15 | visibility: visible; 16 | } 17 | to { 18 | -webkit-transform: translate3d(0, 0, 0); 19 | transform: translate3d(0, 0, 0); 20 | } 21 | } 22 | 23 | .slideInUp { 24 | -webkit-animation-name: slideInUp; 25 | animation-name: slideInUp; 26 | } 27 | 28 | @-webkit-keyframes slideOutDown { 29 | from { 30 | -webkit-transform: translate3d(0, 0, 0); 31 | transform: translate3d(0, 0, 0); 32 | } 33 | to { 34 | visibility: hidden; 35 | bottom: -8rem; 36 | } 37 | } 38 | 39 | @keyframes slideOutDown { 40 | from { 41 | -webkit-transform: translate3d(0, 0, 0); 42 | transform: translate3d(0, 0, 0); 43 | } 44 | to { 45 | visibility: hidden; 46 | bottom: -8rem; 47 | } 48 | } 49 | 50 | .slideOutDown { 51 | -webkit-animation-name: slideOutDown; 52 | animation-name: slideOutDown; 53 | } 54 | 55 | #top_btn { 56 | position: absolute; 57 | position: fixed; 58 | bottom: .8rem; 59 | right: .8rem; 60 | width: 3.5rem; 61 | height: 3.5rem; 62 | border-radius: 10rem; 63 | font-size: 1.8rem; 64 | line-height: 3.5rem; 65 | text-align: center; 66 | color: rgba(0, 0, 0, 0.6); 67 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); 68 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); 69 | cursor: pointer; 70 | background-color: #fdc223; 71 | z-index: 999; 72 | display: none; 73 | -webkit-animation-duration: 0.6s; 74 | animation-duration: 0.6s; 75 | -webkit-animation-fill-mode: both; 76 | animation-fill-mode: both; 77 | } 78 | 79 | @media (min-width: 960px) { 80 | #top_btn { 81 | width: 4rem; 82 | height: 4rem; 83 | margin: 2.5rem; 84 | line-height: 4rem; 85 | bottom: 0.5rem; 86 | right: 0.5rem; 87 | } 88 | } 89 | /*# sourceMappingURL=top_btn.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/top_btn/top_btn.css.map: -------------------------------------------------------------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,OAAO,EAAE,GAAG;EASZ,OAAO,EAAE,IAAI;EACb,kBAAkB,EAAE,IAAI;EACxB,mBAAmB,EAAE,IAAI;CAC1B;;AAXC,MAAM,EAAE,SAAS,EAAE,KAAK;EAhB1B,AAAA,QAAQ,CAAC;IAiBL,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;GAKhB", 4 | "sources": [ 5 | "top_btn.scss" 6 | ], 7 | "names": [], 8 | "file": "top_btn.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/top_btn/top_btn.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 |
    -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/top_btn/top_btn.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | // 显示回到顶部按钮 3 | $('#top_btn').click(function () { 4 | $('html, body').animate({ 5 | scrollTop: $('body').offset().top 6 | }, 1000); 7 | }) 8 | let scrollY = 0; 9 | $(window).scroll(function () { 10 | if (window.scrollY > scrollY) { 11 | $('#top_btn').removeClass('slideOutDown').addClass('slideInUp').show(); 12 | } else { 13 | $('#top_btn').removeClass('slideInUp').addClass('slideOutDown'); 14 | } 15 | scrollY = window.scrollY; 16 | }); 17 | }); -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/top_btn/top_btn.scss: -------------------------------------------------------------------------------- 1 | // 动画库 2 | @-webkit-keyframes slideInUp { 3 | from { 4 | bottom: -8rem; 5 | visibility: visible; 6 | } 7 | 8 | to { 9 | -webkit-transform: translate3d(0, 0, 0); 10 | transform: translate3d(0, 0, 0); 11 | } 12 | } 13 | 14 | @keyframes slideInUp { 15 | from { 16 | bottom: -8rem; 17 | visibility: visible; 18 | } 19 | 20 | to { 21 | -webkit-transform: translate3d(0, 0, 0); 22 | transform: translate3d(0, 0, 0); 23 | } 24 | } 25 | 26 | .slideInUp { 27 | -webkit-animation-name: slideInUp; 28 | animation-name: slideInUp; 29 | } 30 | 31 | @-webkit-keyframes slideOutDown { 32 | from { 33 | -webkit-transform: translate3d(0, 0, 0); 34 | transform: translate3d(0, 0, 0); 35 | } 36 | 37 | to { 38 | visibility: hidden; 39 | bottom: -8rem; 40 | } 41 | } 42 | 43 | @keyframes slideOutDown { 44 | from { 45 | -webkit-transform: translate3d(0, 0, 0); 46 | transform: translate3d(0, 0, 0); 47 | } 48 | 49 | to { 50 | visibility: hidden; 51 | bottom: -8rem; 52 | } 53 | } 54 | 55 | .slideOutDown { 56 | -webkit-animation-name: slideOutDown; 57 | animation-name: slideOutDown; 58 | } 59 | 60 | // 置顶按钮 61 | #top_btn { 62 | position: absolute; 63 | position: fixed; 64 | bottom: .8rem; 65 | right: .8rem; 66 | width: 3.5rem; 67 | height: 3.5rem; 68 | border-radius: 10rem; 69 | font-size: 1.8rem; 70 | line-height: 3.5rem; 71 | text-align: center; 72 | color: rgba(0, 0, 0, 0.6); 73 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); 74 | cursor: pointer; 75 | background-color: #fdc223; 76 | z-index: 999; 77 | @media (min-width: 960px) { 78 | width: 4rem; 79 | height: 4rem; 80 | margin: 2.5rem; 81 | line-height: 4rem; 82 | bottom: 0.5rem; 83 | right: 0.5rem; 84 | } 85 | display: none; 86 | animation-duration: 0.6s; 87 | animation-fill-mode: both; 88 | } 89 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/topbar/README.md: -------------------------------------------------------------------------------- 1 | ## 说明 2 | Topbar的跳转链接在topbar.js中配置 3 | ``` 4 | let user_url = '../User/user.html' 5 | ``` 6 | 变量 `user_url` 代表User页面存放的地址 -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/topbar/topbar.css: -------------------------------------------------------------------------------- 1 | nav ul { 2 | padding: 0; 3 | list-style: none; 4 | } 5 | 6 | .nav-shadow { 7 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 8 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 9 | } 10 | 11 | #topbar { 12 | background-image: linear-gradient(120deg, #fac42e 0%, #fec018 100%); 13 | } 14 | 15 | #topbar a { 16 | color: black; 17 | text-decoration: none; 18 | } 19 | 20 | #topbar .dropdown-toggle { 21 | color: rgba(0, 0, 0, 0.6); 22 | } 23 | 24 | #topbar .navbar-toggler { 25 | margin-top: 5px; 26 | } 27 | 28 | #topbar .navbar-toggler .navbar_toggler_title { 29 | vertical-align: middle; 30 | } 31 | 32 | #topbar .nav-item .dropdown-toggle .mdi { 33 | float: left; 34 | } 35 | 36 | #topbar .nav-item span { 37 | margin-right: 0.5rem; 38 | } 39 | 40 | #topbar .title { 41 | width: 20rem; 42 | height: 24px; 43 | position: absolute; 44 | top: 0; 45 | right: 0; 46 | left: 0; 47 | bottom: 0; 48 | margin: auto; 49 | cursor: pointer; 50 | text-align: center; 51 | } 52 | 53 | #topbar .nav_btn { 54 | line-height: 40px; 55 | color: rgba(0, 0, 0, 0.6); 56 | cursor: pointer; 57 | margin-right: 1rem; 58 | } 59 | 60 | #topbar .nav_btn:hover { 61 | font-weight: bold; 62 | } 63 | 64 | #topbar #user_list { 65 | margin-right: 1rem; 66 | position: relative; 67 | height: 40px; 68 | padding-top: 5px; 69 | } 70 | 71 | #topbar #user_list #user_name { 72 | line-height: 30px; 73 | font-size: 1rem; 74 | cursor: pointer; 75 | } 76 | 77 | #topbar #user_list #user_head { 78 | width: 30px; 79 | margin-left: 15px; 80 | cursor: pointer; 81 | border-radius: 40px; 82 | -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); 83 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); 84 | } 85 | 86 | #topbar #user_list #user_info { 87 | display: none; 88 | width: 120px; 89 | height: 120px; 90 | background-color: white; 91 | position: absolute; 92 | z-index: 999; 93 | right: 0px; 94 | top: 40px; 95 | border-radius: 5px; 96 | overflow: hidden; 97 | border: 1px solid rgba(0, 0, 0, 0.15); 98 | } 99 | 100 | @media (max-width: 990px) { 101 | #topbar #user_list #user_info { 102 | opacity: 0; 103 | } 104 | } 105 | 106 | #topbar #user_list #user_info ul { 107 | width: 100%; 108 | height: 100%; 109 | } 110 | 111 | #topbar #user_list #user_info ul li { 112 | cursor: pointer; 113 | height: 40px; 114 | padding: 8px 10px; 115 | font-size: 1rem; 116 | display: -webkit-box; 117 | display: -ms-flexbox; 118 | display: flex; 119 | -webkit-box-pack: justify; 120 | -ms-flex-pack: justify; 121 | justify-content: space-between; 122 | } 123 | 124 | #topbar #user_list #user_info ul li:hover { 125 | background-color: rgba(0, 0, 0, 0.05); 126 | } 127 | 128 | #topbar #user_list #user_info ul li .badge { 129 | height: 25px; 130 | width: 25px; 131 | line-height: 19px; 132 | } 133 | 134 | #topbar #user_list #user_info ul li .badge-success { 135 | width: 36px !important; 136 | } 137 | 138 | #topbar #user_list #user_info ul li .user_leavel { 139 | width: 40px; 140 | } 141 | 142 | #user_name .name { 143 | margin-right: -10px; 144 | position: relative; 145 | color: rgba(0, 0, 0, 0.6); 146 | } 147 | 148 | #user_name .badge-primary { 149 | position: absolute; 150 | top: 0px; 151 | right: -8px; 152 | } 153 | 154 | #topbar .home_btn .mdi { 155 | font-size: 1.7rem; 156 | position: relative; 157 | top: 2px; 158 | } 159 | 160 | #topbar .home_btn .navbar_toggler_title { 161 | position: relative; 162 | top: -4px; 163 | } 164 | /*# sourceMappingURL=topbar.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/topbar/topbar.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,AAAA,GAAG,CAAC,EAAE,CAAC;EACL,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,IAAI;CACjB;;AAED,AAAA,WAAW,CAAC;EACV,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,kBAAkB;CACzC;;AAED,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B,EAAE,OAAO;EACzB,aAAa,EAAE,OAAO;EACtB,eAAe,EAAE,aAAa;CAe/B;;AA9GT,AAgGU,OAhGH,CAgDL,UAAU,CAmBR,UAAU,CAeR,EAAE,CAGA,EAAE,AAWC,MAAM,CAAC;EACN,gBAAgB,EAAE,mBAAmB;CACtC;;AAlGX,AAmGU,OAnGH,CAgDL,UAAU,CAmBR,UAAU,CAeR,EAAE,CAGA,EAAE,CAcA,MAAM,CAAC;EACL,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,IAAI;CAClB;;AAvGX,AAwGU,OAxGH,CAgDL,UAAU,CAmBR,UAAU,CAeR,EAAE,CAGA,EAAE,CAmBA,cAAc,CAAC;EACb,KAAK,EAAE,eAAe;CACvB;;AA1GX,AA2GU,OA3GH,CAgDL,UAAU,CAmBR,UAAU,CAeR,EAAE,CAGA,EAAE,CAsBA,YAAY,CAAC;EACX,KAAK,EAAE,IAAI;CACZ;;AAOX,AACE,UADQ,CACR,KAAK,CAAC;EACJ,YAAY,EAAE,KAAK;EACnB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,kBAAkB;CAC1B;;AALH,AAME,UANQ,CAMR,cAAc,CAAC;EACb,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,GAAG;EACR,KAAK,EAAE,IAAI;CACZ;;AAGH,AACE,OADK,CAAC,SAAS,CACf,IAAI,CAAC;EACH,SAAS,EAAE,MAAM;EACjB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,GAAG;CACT;;AALH,AAME,OANK,CAAC,SAAS,CAMf,qBAAqB,CAAC;EACpB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,IAAI;CACV", 4 | "sources": [ 5 | "topbar.scss" 6 | ], 7 | "names": [], 8 | "file": "topbar.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/topbar/topbar.html: -------------------------------------------------------------------------------- 1 | 2 | 70 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/topbar/topbar.js: -------------------------------------------------------------------------------- 1 | var USERID; 2 | 3 | $(document).ready(function () { 4 | // 渲染Topbar中的用户信息 5 | function renderTopbar(user_info) { 6 | // USERID = user_info.id 7 | // $('#topbar .school_name').eq(0).text(user_info.school); 8 | // $('#user_name .name').eq(0).text(user_info.name); 9 | $('#user_head').attr('src','/Data/User/Default/head') 10 | } 11 | 12 | 13 | 14 | // TODO: 将其移动到获取用户信息后的Ajax回调函数中 15 | 16 | // 返回数据示例: 17 | var user_info = { 18 | id: 1001, 19 | name: 'EsunR', 20 | school: '伦敦皇家学院', 21 | level: '3', 22 | // 后续要添加消息通知数量 23 | } 24 | // Ajax回调成功后执行 25 | renderTopbar(user_info); 26 | 27 | 28 | 29 | // 跳转主页 30 | $("#topbar .title").eq(0).click(function () { 31 | window.location.href = '/index' 32 | }) 33 | $('.home_btn').eq(0).click(function () { 34 | window.location.href = '/index' 35 | }) 36 | 37 | // 消息通知下拉动画 38 | $("#user_list").hover(function () { 39 | $("#user_info").slideDown('fast'); 40 | }, function () { 41 | $("#user_info").slideUp('fast'); 42 | }) 43 | 44 | // 聚合通知 45 | let user_msg_num = parseInt($('#user_msg').text()); 46 | let sys_msg_num = parseInt($('#user_msg').text()); 47 | $('#user_name .badge-primary').text(user_msg_num + sys_msg_num) 48 | 49 | // TODO: 跳转按钮的链接 50 | //let user_url = '/Users/'+itemid 51 | let user_url = '/user' 52 | 53 | let nav_btn_url = ['#publish', '#want', '#collection']; 54 | for (let i = 0; i < 3; i++) { 55 | $('.nav_btn').eq(i).click(function () { 56 | window.location.href = user_url + nav_btn_url[i]; 57 | }) 58 | } 59 | $('#user_name').click(function () { 60 | window.location.href = user_url + '#info' 61 | }) 62 | $('.user_list_btn').eq(0).click(function () { 63 | window.location.href = user_url + '#userMsg' 64 | }) 65 | $('.user_list_btn').eq(1).click(function () { 66 | window.location.href = user_url + '#sysMsg' 67 | }) 68 | $('.user_list_btn').eq(2).click(function () { 69 | window.location.href = '/login/logout' 70 | }) 71 | 72 | 73 | }); -------------------------------------------------------------------------------- /src/main/resources/static/lib/xyz_tpl/topbar/topbar.scss: -------------------------------------------------------------------------------- 1 | nav ul { 2 | padding: 0; 3 | list-style: none; 4 | } 5 | 6 | .nav-shadow { 7 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 8 | } 9 | 10 | #topbar { 11 | background-image: linear-gradient(120deg, #fac42e 0%, #fec018 100%); 12 | a { 13 | color: black; 14 | text-decoration: none; 15 | } 16 | .dropdown-toggle{ 17 | color: rgba(0, 0, 0, 0.6); 18 | } 19 | .navbar-toggler { 20 | margin-top: 5px; 21 | .navbar_toggler_title { 22 | vertical-align: middle; 23 | } 24 | } 25 | 26 | .nav-item { 27 | .dropdown-toggle .mdi { 28 | float: left; 29 | } 30 | span { 31 | margin-right: 0.5rem; 32 | } 33 | } 34 | 35 | .title { 36 | width: 20rem; 37 | height: 24px; 38 | position: absolute; 39 | top: 0; 40 | right: 0; 41 | left: 0; 42 | bottom: 0; 43 | margin: auto; 44 | cursor: pointer; 45 | text-align: center; 46 | } 47 | 48 | .nav_btn{ 49 | line-height: 40px; 50 | color: rgba(0, 0, 0, 0.6); 51 | cursor: pointer; 52 | margin-right: 1rem; 53 | &:hover{ 54 | font-weight: bold; 55 | } 56 | } 57 | 58 | #user_list { 59 | margin-right: 1rem; 60 | position: relative; 61 | height: 40px; 62 | padding-top: 5px; 63 | #user_name { 64 | line-height: 30px; 65 | font-size: 1rem; 66 | cursor: pointer; 67 | } 68 | #user_head { 69 | width: 30px; 70 | margin-left: 15px; 71 | cursor: pointer; 72 | border-radius: 40px; 73 | -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); 74 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); 75 | } 76 | 77 | #user_info { 78 | display: none; 79 | width: 120px; 80 | height: 120px; 81 | background-color: white; 82 | position: absolute; 83 | z-index: 999; 84 | right: 0px; 85 | top: 40px; 86 | border-radius: 5px; 87 | overflow: hidden; 88 | border: 1px solid rgba(0, 0, 0, 0.15); 89 | @media (max-width: 990px) { 90 | opacity: 0; 91 | } 92 | ul { 93 | width: 100%; 94 | height: 100%; 95 | li { 96 | cursor: pointer; 97 | height: 40px; 98 | padding: 8px 10px; 99 | font-size: 1rem; 100 | display: -webkit-box; 101 | display: -ms-flexbox; 102 | display: flex; 103 | -webkit-box-pack: justify; 104 | -ms-flex-pack: justify; 105 | justify-content: space-between; 106 | &:hover { 107 | background-color: rgba(0, 0, 0, 0.05); 108 | } 109 | .badge { 110 | height: 25px; 111 | width: 25px; 112 | line-height: 19px; 113 | } 114 | .badge-success { 115 | width: 36px !important; 116 | } 117 | .user_leavel { 118 | width: 40px; 119 | } 120 | } 121 | } 122 | } 123 | } 124 | } 125 | 126 | #user_name { 127 | .name { 128 | margin-right: -10px; 129 | position: relative; 130 | color: rgba(0, 0, 0, 0.6); 131 | } 132 | .badge-primary { 133 | position: absolute; 134 | top: 0px; 135 | right: -8px; 136 | } 137 | } 138 | 139 | #topbar .home_btn { 140 | .mdi { 141 | font-size: 1.7rem; 142 | position: relative; 143 | top: 2px; 144 | } 145 | .navbar_toggler_title { 146 | position: relative; 147 | top: -4px; 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /src/main/resources/static/sm_center/center.css: -------------------------------------------------------------------------------- 1 | #main { 2 | margin-top: 20px; 3 | color: rgba(0, 0, 0, 0.8); 4 | } 5 | 6 | #main .part_card { 7 | margin-bottom: 20px; 8 | } 9 | 10 | #main .part_card .item_card { 11 | margin-top: 20px; 12 | } 13 | /*# sourceMappingURL=center.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/sm_center/center.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,AAAA,KAAK,CAAC;EACJ,UAAU,EAAE,IAAI;EAChB,KAAK,EAAe,kBAAO;CAO5B;;AATD,AAGE,KAHG,CAGH,UAAU,CAAC;EACT,aAAa,EAAE,IAAI;CAIpB;;AARH,AAKI,KALC,CAGH,UAAU,CAER,UAAU,CAAC;EACT,UAAU,EAAE,IAAI;CACjB", 4 | "sources": [ 5 | "center.scss" 6 | ], 7 | "names": [], 8 | "file": "center.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_center/center.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_center/center.js -------------------------------------------------------------------------------- /src/main/resources/static/sm_center/center.scss: -------------------------------------------------------------------------------- 1 | #main { 2 | margin-top: 20px; 3 | color: rgba($color: #000000, $alpha: 0.8); 4 | .part_card { 5 | margin-bottom: 20px; 6 | .item_card { 7 | margin-top: 20px; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/static/sm_center_accepter/accepter.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #f7f7f7; 3 | } 4 | 5 | #banner img { 6 | width: 100%; 7 | border-radius: 10px; 8 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 9 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 10 | margin-top: 30px; 11 | } 12 | 13 | #main { 14 | margin-bottom: 30px; 15 | } 16 | 17 | #main .accepter_card { 18 | margin-top: 30px; 19 | background-color: #fff; 20 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 21 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 22 | border-radius: 10px; 23 | padding: 20px; 24 | } 25 | 26 | #main .accepter_card .card_title { 27 | font-size: 2rem; 28 | border-bottom: 1px solid rgba(0, 0, 0, 0.1); 29 | line-height: 4rem; 30 | } 31 | 32 | #main .accepter_card .accepter_item { 33 | display: -webkit-box; 34 | display: -ms-flexbox; 35 | display: flex; 36 | margin-top: 20px; 37 | font-size: 1rem; 38 | } 39 | 40 | #main .accepter_card .accepter_item .key { 41 | background-color: #007bff; 42 | color: white; 43 | border-radius: 5px; 44 | margin-right: 10px; 45 | text-align: center; 46 | font-weight: bold; 47 | padding: 5px 10px; 48 | } 49 | 50 | #main .accepter_card .accepter_item .value { 51 | line-height: 34px; 52 | } 53 | 54 | #footer { 55 | text-align: center; 56 | margin-bottom: 30px; 57 | font-size: 1.5rem; 58 | color: rgba(0, 0, 0, 0.3); 59 | } 60 | /*# sourceMappingURL=accepter.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/sm_center_accepter/accepter.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAGA,AAAA,IAAI,CAAC;EACH,gBAAgB,EAAE,OAAO;CAC1B;;AAED,AACE,OADK,CACL,GAAG,CAAC;EACF,KAAK,EAAE,IAAI;EACX,aAAa,EAAE,IAAI;EACnB,UAAU,EAXL,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,kBAAkB;EAYjC,UAAU,EAAE,IAAI;CACjB;;AAGH,AAAA,KAAK,CAAA;EACH,aAAa,EAAE,IAAI;CA8BpB;;AA/BD,AAEE,KAFG,CAEH,cAAc,CAAA;EACZ,UAAU,EAAE,IAAI;EAChB,gBAAgB,EAAE,IAAI;EACtB,UAAU,EArBL,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,kBAAkB;EAsBjC,aAAa,EAAE,IAAI;EACnB,OAAO,EAAE,IAAI;CAuBd;;AA9BH,AAQI,KARC,CAEH,cAAc,CAMZ,WAAW,CAAA;EACT,SAAS,EAAE,IAAI;EACf,aAAa,EAAE,GAAG,CAAC,KAAK,CAAC,kBAAkB;EAC3C,WAAW,EAAE,IAAI;CAClB;;AAZL,AAaI,KAbC,CAEH,cAAc,CAWZ,cAAc,CAAA;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;EAChB,SAAS,EAAE,IAAI;CAahB;;AA7BL,AAiBM,KAjBD,CAEH,cAAc,CAWZ,cAAc,CAIZ,IAAI,CAAA;EACF,gBAAgB,EAjCjB,OAAO;EAkCN,KAAK,EAAE,KAAK;EACZ,aAAa,EAAE,GAAG;EAClB,YAAY,EAAE,IAAI;EAClB,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,OAAO,EAAE,QAAQ;CAClB;;AAzBP,AA0BM,KA1BD,CAEH,cAAc,CAWZ,cAAc,CAaZ,MAAM,CAAA;EACJ,WAAW,EAAE,IAAI;CAClB;;AAKP,AAAA,OAAO,CAAA;EACL,UAAU,EAAE,MAAM;EAClB,aAAa,EAAE,IAAI;EACnB,SAAS,EAAE,MAAM;EACjB,KAAK,EAAE,kBAAkB;CAC1B", 4 | "sources": [ 5 | "accepter.scss" 6 | ], 7 | "names": [], 8 | "file": "accepter.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_center_accepter/accepter.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | 3 | }); -------------------------------------------------------------------------------- /src/main/resources/static/sm_center_accepter/accepter.scss: -------------------------------------------------------------------------------- 1 | $shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 2 | $main: #007bff; 3 | 4 | body { 5 | background-color: #f7f7f7; 6 | } 7 | 8 | #banner { 9 | img { 10 | width: 100%; 11 | border-radius: 10px; 12 | box-shadow: $shadow; 13 | margin-top: 30px; 14 | } 15 | } 16 | 17 | #main{ 18 | margin-bottom: 30px; 19 | .accepter_card{ 20 | margin-top: 30px; 21 | background-color: #fff; 22 | box-shadow: $shadow; 23 | border-radius: 10px; 24 | padding: 20px; 25 | .card_title{ 26 | font-size: 2rem; 27 | border-bottom: 1px solid rgba(0, 0, 0, 0.1); 28 | line-height: 4rem; 29 | } 30 | .accepter_item{ 31 | display: flex; 32 | margin-top: 20px; 33 | font-size: 1rem; 34 | .key{ 35 | background-color: $main; 36 | color: white; 37 | border-radius: 5px; 38 | margin-right: 10px; 39 | text-align: center; 40 | font-weight: bold; 41 | padding: 5px 10px; 42 | } 43 | .value{ 44 | line-height: 34px; 45 | } 46 | } 47 | } 48 | } 49 | 50 | #footer{ 51 | text-align: center; 52 | margin-bottom: 30px; 53 | font-size: 1.5rem; 54 | color: rgba(0, 0, 0, 0.3); 55 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_center_accepter/img/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_center_accepter/img/banner.jpg -------------------------------------------------------------------------------- /src/main/resources/static/sm_center_accepter/img/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_center_accepter/img/banner.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_detail/detail.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #f7f7f7; 3 | } 4 | 5 | #banner { 6 | position: relative; 7 | border-radius: 10px; 8 | overflow: hidden; 9 | margin-top: 20px; 10 | } 11 | 12 | #banner img { 13 | width: 100%; 14 | border-radius: 10px; 15 | } 16 | 17 | #banner .title { 18 | width: 195px; 19 | height: 90px; 20 | line-height: 90px; 21 | position: absolute; 22 | z-index: 99; 23 | top: 0; 24 | bottom: 0; 25 | left: 0; 26 | right: 0; 27 | margin: auto; 28 | color: white; 29 | font-weight: bold; 30 | font-size: 3rem; 31 | border-bottom: 5px solid white; 32 | } 33 | 34 | #main .inner { 35 | margin-top: 20px; 36 | background-color: #fff; 37 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 38 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 39 | border-radius: 10px; 40 | padding: 20px; 41 | margin-bottom: 40px; 42 | } 43 | 44 | #main .inner .big_title { 45 | line-height: 4rem; 46 | font-size: 1.5rem; 47 | } 48 | 49 | #main .inner .summary .title { 50 | font-weight: bold; 51 | color: #fff; 52 | text-align: center; 53 | width: 85px; 54 | padding: 5px 10px; 55 | background-color: #dc3545; 56 | border-radius: 5px; 57 | margin-bottom: 10px; 58 | } 59 | 60 | #main .inner .summary p { 61 | text-indent: 2em; 62 | text-align: justify; 63 | line-height: 1.7; 64 | } 65 | 66 | #main .inner .info_title { 67 | font-weight: bold; 68 | background-color: #007bff; 69 | width: 85px; 70 | padding: 5px 10px; 71 | color: #fff; 72 | border-radius: 5px; 73 | text-align: center; 74 | margin-bottom: 10px; 75 | } 76 | 77 | #main .inner .info { 78 | display: none; 79 | } 80 | 81 | #main .inner .info .info_group { 82 | display: -webkit-box; 83 | display: -ms-flexbox; 84 | display: flex; 85 | line-height: 1.7; 86 | } 87 | 88 | #main .inner .info .info_group .key { 89 | width: 85px; 90 | text-align: center; 91 | background-color: rgba(0, 0, 0, 0.08); 92 | margin-bottom: 15px; 93 | border-radius: 5px; 94 | margin-right: 20px; 95 | } 96 | 97 | #main .inner .btn_box { 98 | margin: 40px 0px; 99 | display: -webkit-box; 100 | display: -ms-flexbox; 101 | display: flex; 102 | -webkit-box-orient: horizontal; 103 | -webkit-box-direction: reverse; 104 | -ms-flex-direction: row-reverse; 105 | flex-direction: row-reverse; 106 | } 107 | 108 | #main .inner .btn_box button { 109 | margin-right: 10px; 110 | } 111 | /*# sourceMappingURL=detail.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/sm_detail/detail.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAGA,AAAA,IAAI,CAAC;EACH,gBAAgB,EAAE,OAAO;CAC1B;;AACD,AAAA,OAAO,CAAC;EACN,QAAQ,EAAE,QAAQ;EAClB,aAAa,EAAE,IAAI;EACnB,QAAQ,EAAE,MAAM;EAChB,UAAU,EAAE,IAAI;CAqBjB;;AAzBD,AAKE,OALK,CAKL,GAAG,CAAC;EACF,KAAK,EAAE,IAAI;EACX,aAAa,EAAE,IAAI;CACpB;;AARH,AASE,OATK,CASL,MAAM,CAAC;EACL,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,IAAI;EACjB,QAAQ,EA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CACpB;;AAtCL,AAuCI,KAvCC,CACH,MAAM,CAsCJ,KAAK,CAAC;EACJ,OAAO,EAAE,IAAI;CAad;;AArDL,AAyCM,KAzCD,CACH,MAAM,CAsCJ,KAAK,CAEH,WAAW,CAAC;EACV,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,GAAG;CASjB;;AApDP,AA4CQ,KA5CH,CACH,MAAM,CAsCJ,KAAK,CAEH,WAAW,CAGT,IAAI,CAAC;EACH,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,gBAAgB,EAAE,mBAAmB;EACrC,aAAa,EAAE,IAAI;EACnB,aAAa,EAAE,GAAG;EAClB,YAAY,EAAE,IAAI;CACnB;;AAnDT,AAsDI,KAtDC,CACH,MAAM,CAqDJ,QAAQ,CAAC;EACP,MAAM,EAAE,QAAQ;EAChB,OAAO,EAAE,IAAI;EACb,cAAc,EAAE,WAAW;CAI5B;;AA7DL,AA0DM,KA1DD,CACH,MAAM,CAqDJ,QAAQ,CAIN,MAAM,CAAC;EACL,YAAY,EAAE,IAAI;CACnB", 4 | "sources": [ 5 | "detail.scss" 6 | ], 7 | "names": [], 8 | "file": "detail.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_detail/detail.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | 3 | $('#single_info').css('display', 'block'); 4 | 5 | $('#work_info').css('display', 'block'); 6 | 7 | $('#multiple_info').css('display', 'block'); 8 | // 解析url,将url中的参数放在url_obj对象中 9 | /*var url = window.location.href; 10 | var url_arr = url.split('?')[1].split('&') 11 | var url_obj = {}; 12 | for (let i = 0; i < url_arr.length; i++) { 13 | let arr = url_arr[i].split('='); 14 | url_obj[arr[0]] = arr[1]; 15 | } 16 | 17 | // 解析出url后,选择性渲染信息 18 | switch (url_obj.part) { 19 | case "single": 20 | $('#single_info').css('display', 'block'); 21 | break; 22 | case "work": 23 | $('#work_info').css('display', 'block'); 24 | break; 25 | case "multiple": 26 | $('#multiple_info').css('display', 'block'); 27 | break; 28 | }*/ 29 | 30 | // 渲染薪资水平单位 31 | switch ($('#work_payWay').html()) { 32 | case ('按日结算'): 33 | $('#salary_unity').html('元/天'); 34 | break; 35 | case ('按周结算'): 36 | $('#salary_unity').html('元/周'); 37 | break; 38 | case ('按月结算'): 39 | $('#salary_unity').html('元/月'); 40 | break; 41 | case ('按工作时长结算'): 42 | $('#salary_unity').html('元/小时'); 43 | break; 44 | case ('工作完成后结算'): 45 | $('#salary_unity').html('元/工期'); 46 | break; 47 | } 48 | 49 | // 点击接受需求按钮 50 | $('#accept_btn').click(function(){ 51 | $.ajax({ 52 | type: "post", 53 | dataType: "json", 54 | data: {needId:needId,userId:userId,needType:1}, 55 | url: "/sm/need/fav", 56 | async: false, 57 | success:function (data) { 58 | alert("成功") 59 | } 60 | }); 61 | }) 62 | 63 | // 点击收藏按钮 64 | $('#collection_btn').click(function(){ 65 | $.ajax({ 66 | type: "post", 67 | dataType: "json", 68 | data: {needId:needId,userId:userId,needType:0}, 69 | url: "/sm/need/fav", 70 | async: false, 71 | success:function (data) { 72 | alert("成功") 73 | } 74 | }); 75 | }) 76 | }); -------------------------------------------------------------------------------- /src/main/resources/static/sm_detail/detail.scss: -------------------------------------------------------------------------------- 1 | $shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 2 | $main: #007bff; 3 | 4 | body { 5 | background-color: #f7f7f7; 6 | } 7 | #banner { 8 | position: relative; 9 | border-radius: 10px; 10 | overflow: hidden; 11 | margin-top: 20px; 12 | img { 13 | width: 100%; 14 | border-radius: 10px; 15 | } 16 | .title { 17 | width: 195px; 18 | height: 90px; 19 | line-height: 90px; 20 | position: absolute; 21 | z-index: 99; 22 | top: 0; 23 | bottom: 0; 24 | left: 0; 25 | right: 0; 26 | margin: auto; 27 | color: white; 28 | font-weight: bold; 29 | font-size: 3rem; 30 | border-bottom: 5px solid white; 31 | } 32 | } 33 | 34 | #main { 35 | .inner { 36 | margin-top: 20px; 37 | background-color: #fff; 38 | box-shadow: $shadow; 39 | border-radius: 10px; 40 | padding: 20px; 41 | margin-bottom: 40px; 42 | .big_title { 43 | line-height: 4rem; 44 | font-size: 1.5rem; 45 | } 46 | .summary { 47 | .title { 48 | font-weight: bold; 49 | color: #fff; 50 | text-align: center; 51 | width: 85px; 52 | padding: 5px 10px; 53 | background-color: #dc3545; 54 | border-radius: 5px; 55 | margin-bottom: 10px; 56 | } 57 | p { 58 | text-indent: 2em; 59 | text-align: justify; 60 | line-height: 1.7; 61 | } 62 | } 63 | .info_title { 64 | font-weight: bold; 65 | background-color: $main; 66 | width: 85px; 67 | padding: 5px 10px; 68 | color: #fff; 69 | border-radius: 5px; 70 | text-align: center; 71 | margin-bottom: 10px; 72 | } 73 | .info { 74 | display: none; 75 | .info_group { 76 | display: flex; 77 | line-height: 1.7; 78 | .key { 79 | width: 85px; 80 | text-align: center; 81 | background-color: rgba(0, 0, 0, 0.08); 82 | margin-bottom: 15px; 83 | border-radius: 5px; 84 | margin-right: 20px; 85 | } 86 | } 87 | } 88 | .btn_box { 89 | margin: 40px 0px; 90 | display: flex; 91 | flex-direction: row-reverse; 92 | button { 93 | margin-right: 10px; 94 | } 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/main/resources/static/sm_detail/img/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_detail/img/banner.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/API.md: -------------------------------------------------------------------------------- 1 | # Api说明 2 | ## 第三方Api 3 | 4 | ### 一淘(etao) 5 | 6 | Api地址:http://suggest.taobao.com/sug?area=etao&code=utf-8&callback=KISSY.Suggest.callback&q=牛 7 | ```json 8 | KISSY.Suggest.callback({ 9 | "result":[ 10 | ["牛仔裤男","19290327"], 11 | ["牛仔裤女","12731467"], 12 | ... ... 13 | ] 14 | }) 15 | ``` 16 | 17 | ## 第一方Api 18 | ### 获取用户基本信息 19 | + 名称 20 | + 所在校园 21 | + ~~诚信值(划掉)~~ 22 | + 用户消息 23 | + 系统通知 24 | ``` 25 | { 26 | "name": "EsunR", 27 | "school": "安阳工学院", 28 | "userMsg": 4, 29 | "sysMsg": 4 30 | } 31 | ``` 32 | > 备注:诚信值分为三个等级,4为极好,3为良好,2为中等,1为极差 33 | 34 | ### 最新发布 35 | + 商品ID 36 | + 商品封面 37 | + 商品标题 38 | + 商品价格 39 | + 商品原价 40 | ``` 41 | { 42 | "id": 1001 43 | "cover": "../Data/SecondHand/ItemPic/1001/cover.jpg", 44 | "title": "商品标题", 45 | "price": 9.8, 46 | "oldPrice": 998 47 | } 48 | ``` 49 | 50 | ### 商品信息(复用型Api) 51 | + 商品封面 52 | + 商品价格 53 | + 商品原价 54 | + 商品标题 55 | + 发布者用户名 56 | + 发布者信用等级 57 | ``` 58 | { 59 | "id": 1001 60 | "cover": "../Data/SecondHand/ItemPic/1001/cover.jpg", 61 | "price": 9.8, 62 | "oldPrice": 998, 63 | "title": "商品标题", 64 | "sellerName": "EsunR", 65 | "sellerIntegrity": 4 66 | } 67 | ``` 68 | > 备注:接口需要设置参数,查询关键字 `key`,所展示的区域 `area` -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/SchoolPig_ICON.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/SchoolPig_ICON.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/banner/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/banner/1.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/banner_list/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/banner_list/1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/banner_list/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/banner_list/2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/banner_list/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/banner_list/3.jpg -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/banner_list/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/banner_list/4.jpg -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/banner_list/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/banner_list/5.jpg -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/champain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/champain.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/cheaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/cheaper.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/foot_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/foot_bg.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/publish.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/quality.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/quality.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/school_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/school_logo.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/school_show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/school_show.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/img/user_head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_index/img/user_head.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/index.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAWA,AAAA,IAAI,CAAC;EACH,gBAAgB,EAAE,mBAAmB;CAKtC;;AAND,AAEE,IAFE,CAEF,EAAE,CAAC;EACD,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,IAAI;CACjB;;AAGH,AAAA,eAAe,CAAC;EACd,OAAO,EAAE,IAAI;CAOd;;AARD,AAEE,eAFa,CAEb,iBAAiB,CAAC;EAChB,aAAa,EAAE,CAAC;CAIjB;;AAPH,AAII,eAJW,CAEb,iBAAiB,CAEf,EAAE,CAAC;EACD,UAAU,EAAE,CAAC;CACd;;AAIL,AAAA,WAAW,CAAC;EACV,QAA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EAAE,CAAC;EACT,KAAK,EAAE,CAAC;EACR,IAAI,EAAE,CAAC;EACP,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,GAAG;EACX,KAAK,EAAE,GAAG;CAWX;;AA5BL,AAkBM,OAlBC,CAGL,UAAU,CAMR,YAAY,CASV,EAAE;AAlBR,OAAO,CAGL,UAAU,CAMR,YAAY,CAUV,EAAE,CAAC;EACD,SAAS,EAAE,MAAM;EACjB,KAAK,EAAE,kBAAkB;EACzB,WAAW,EAAE,GAAG;CACjB;;AAvBP,AAwBM,OAxBC,CAGL,UAAU,CAMR,YAAY,CAeV,EAAE,CAAC;EACD,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,kBAAkB;CAC1B", 4 | "sources": [ 5 | "index.scss" 6 | ], 7 | "names": [], 8 | "file": "index.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_index/index.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | // 新手提示 3 | $('#dontshow').click(function () { 4 | $('#new_user_to_show').slideUp(); 5 | $.cookie('sm_new_user', '0', { expires: 365 }); 6 | }) 7 | if (!$.cookie('sm_new_user')) { 8 | $('#new_user_brand').slideDown(); 9 | } 10 | 11 | }); 12 | 13 | function searchNeed() { 14 | var param = $("#search_input").val(); 15 | window.location.href = "/sm/search?param="+param; 16 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_multiple/multiple.css: -------------------------------------------------------------------------------- 1 | #main { 2 | margin-top: 20px; 3 | } 4 | 5 | #main .jumbotron { 6 | background-image: -webkit-gradient(linear, left bottom, left top, from(#48c6ef), to(#6f86d6)); 7 | background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%); 8 | color: white; 9 | border-radius: 10px; 10 | } 11 | 12 | #main .demand { 13 | margin-top: 20px; 14 | } 15 | 16 | #main .demand .card-body .btn { 17 | float: right; 18 | } 19 | 20 | #page { 21 | margin-top: 30px; 22 | } 23 | /*# sourceMappingURL=multiple.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/sm_multiple/multiple.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,AAAA,KAAK,CAAA;EACH,UAAU,EAAE,IAAI;CAcjB;;AAfD,AAEE,KAFG,CAEH,UAAU,CAAA;EACR,gBAAgB,EAAE,iDAAiD;EACnE,KAAK,EAAE,KAAK;EACZ,aAAa,EAAE,IAAI;CACpB;;AANH,AAOE,KAPG,CAOH,OAAO,CAAA;EACL,UAAU,EAAE,IAAI;CAMjB;;AAdH,AAUM,KAVD,CAOH,OAAO,CAEL,UAAU,CACR,IAAI,CAAA;EACF,KAAK,EAAE,KAAK;CACb;;AAKP,AAAA,KAAK,CAAA;EACH,UAAU,EAAE,IAAI;CACjB", 4 | "sources": [ 5 | "multiple.scss" 6 | ], 7 | "names": [], 8 | "file": "multiple.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_multiple/multiple.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | 3 | }); -------------------------------------------------------------------------------- /src/main/resources/static/sm_multiple/multiple.scss: -------------------------------------------------------------------------------- 1 | #main{ 2 | margin-top: 20px; 3 | .jumbotron{ 4 | background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%); 5 | color: white; 6 | border-radius: 10px; 7 | } 8 | .demand{ 9 | margin-top: 20px; 10 | .card-body{ 11 | .btn{ 12 | float: right; 13 | } 14 | } 15 | } 16 | } 17 | 18 | #page{ 19 | margin-top: 30px; 20 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_publish/publish.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | body { 3 | font-family: "微软雅黑"; 4 | } 5 | 6 | .title { 7 | font-size: 2.5rem; 8 | color: rgba(0, 0, 0, 0.8); 9 | /*border-bottom: 1.5px solid rgba(0,0,0,0.2);*/ 10 | } 11 | 12 | .subtitle { 13 | font-size: 1rem; 14 | font-weight: 100; 15 | color: rgba(0, 0, 0, 0.7); 16 | padding-bottom: 1rem; 17 | /*border-bottom: 1px solid rgba(0,0,0,0.2);*/ 18 | } 19 | 20 | .card { 21 | border-top: none; 22 | border-radius: 0 0.25rem 0.25rem 0.25rem; 23 | } 24 | 25 | .blockquote p { 26 | font-size: 1rem; 27 | } 28 | 29 | /*form标题定位*/ 30 | form { 31 | margin-top: 1rem; 32 | } 33 | 34 | form label { 35 | margin-left: .2rem; 36 | } 37 | 38 | .form_back_text { 39 | padding: 6px; 40 | padding-left: 0; 41 | margin-left: -.5rem; 42 | } 43 | 44 | /*提交按钮*/ 45 | .fake_submit_box { 46 | margin: 1rem 0; 47 | padding: 2rem 0; 48 | border-top: 1px dashed rgba(0, 0, 0, 0.2); 49 | padding-top: 3rem; 50 | } 51 | 52 | .fake_submit { 53 | display: block; 54 | margin: 0 auto; 55 | } 56 | 57 | /*警告框*/ 58 | #alert_box { 59 | position: fixed; 60 | bottom: -5rem; 61 | width: 100%; 62 | text-align: center; 63 | line-height: 2rem; 64 | } 65 | /*# sourceMappingURL=publish.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/sm_publish/publish.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": ";AAAA,AAAA,IAAI,CAAA;EACH,WAAW,EAAE,UAAU;CACvB;;AAED,AAAA,MAAM,CAAA;EACL,SAAS,EAAE,MAAM;EACjB,KAAK,EAAE,kBAAe;EACtB,+CAA+C;CAC/C;;AACD,AAAA,SAAS,CAAA;EACR,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,GAAG;EAChB,KAAK,EAAE,kBAAe;EACtB,cAAc,EAAE,IAAI;EACpB,6CAA6C;CAC7C;;AACD,AAAA,KAAK,CAAA;EACJ,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,yBAAyB;CACxC;;AACD,AAAA,WAAW,CAAC,CAAC,CAAA;EACZ,SAAS,EAAE,IAAI;CACf;;AAED,gBAAgB;AAChB,AAAA,IAAI,CAAA;EACH,UAAU,EAAE,IAAI;CAChB;;AACD,AAAA,IAAI,CAAC,KAAK,CAAA;EACT,WAAW,EAAE,KAAK;CAClB;;AAED,AAAA,eAAe,CAAA;EACd,OAAO,EAAE,GAAG;EACZ,YAAY,EAAE,CAAC;EACf,WAAW,EAAE,MAAM;CACnB;;AAED,YAAY;AACZ,AAAA,gBAAgB,CAAA;EACf,MAAM,EAAE,MAAM;EACd,OAAO,EAAE,MAAM;EACf,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,kBAAe;EACtC,WAAW,EAAE,IAAI;CACjB;;AACD,AAAA,YAAY,CAAA;EACX,OAAO,EAAE,KAAK;EACd,MAAM,EAAE,MAAM;CACd;;AAED,UAAU;AACV,AAAA,UAAU,CAAA;EACT,QAAQ,EAAE,KAAK;EACf,MAAM,EAAE,KAAK;EACb,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;CACjB", 4 | "sources": [ 5 | "publish.scss" 6 | ], 7 | "names": [], 8 | "file": "publish.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_publish/publish.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | //点击“以其他方式答谢”选项时,将酬金设为只读 3 | $('#single_RewardInOtherWay').click(function(){ 4 | if($('#single_RewardInOtherWay').prop("checked")){ 5 | $('#single_reward').val(''); 6 | $('#single_reward').prop({disabled:true}); 7 | }else{ 8 | $('#single_reward').prop({disabled:false}); 9 | } 10 | }) 11 | $('#nav-tab a').click(function(){ 12 | $('#nav-tab a').removeClass('bg-primary text-light'); 13 | $(this).addClass('bg-primary text-light'); 14 | }) 15 | 16 | //薪资水平单位 17 | $('#work_payWay').change(function(){ 18 | switch(this.selectedIndex){ 19 | case 1: 20 | $("#work_reward_unit").text('元 / 周'); 21 | break; 22 | case 2: 23 | $("#work_reward_unit").text('元 / 月'); 24 | break; 25 | case 3: 26 | $("#work_reward_unit").text('元 / 小时'); 27 | break; 28 | case 4: 29 | $("#work_reward_unit").text('元 / 工期'); 30 | break; 31 | default : 32 | $("#work_reward_unit").text('元 / 天'); 33 | break; 34 | } 35 | }) 36 | 37 | ///表单验证 38 | //验证input标签类型为text的控件 39 | //若文本框中的内容需要为纯数字类型,需要对文本框添加class="must_num" 40 | $(".fake_submit").click(function(){ 41 | var $verify_group = ($(this).parent().parent().parent()); 42 | var $input = $verify_group.find("input"); 43 | //定义文本框对象数组 44 | var $input_text = new Array(); 45 | //定义错误文本框对象数组 46 | var $data_wrong = new Array(); 47 | //获取text文本框,放入$input_text数组 48 | $input.each(function(){ 49 | if($(this).attr("type") == "text"){ 50 | //排除“以其他方式答谢”选项被勾选时对该文本框的验证 51 | if($(this).attr("id") == "single_reward"){ 52 | if(!$("#single_RewardInOtherWay").prop("checked")){ 53 | $input_text.push($(this)); 54 | $(this).css("border", "1px solid #ced4da"); 55 | } 56 | }else{ 57 | $input_text.push($(this)); 58 | $(this).css("border", "1px solid #ced4da"); 59 | } 60 | } 61 | }) 62 | 63 | 64 | //判断输入内容是否为数字 65 | var $input_text_must_num = $verify_group.find(".must_num"); 66 | $input_text_must_num.each(function(){ 67 | //排除“以其他方式答谢”选项被勾选时对该文本框的验证 68 | if($(this).attr("id") == "single_reward"){ 69 | if(!$("#single_RewardInOtherWay").prop("checked")){ 70 | var verify_num = $(this).val(); 71 | if(checkNumber(verify_num)){ 72 | $(this).css("border", "1px solid red"); 73 | $("#alert_box").text("填写数据必须为纯数字"); 74 | $data_wrong.push($(this)); 75 | } 76 | } 77 | } 78 | else{ 79 | var verify_num = $(this).val(); 80 | if(checkNumber(verify_num)){ 81 | $(this).css("border", "1px solid red"); 82 | $("#alert_box").text("填写数据必须为纯数字"); 83 | $data_wrong.push($(this)); 84 | } 85 | } 86 | 87 | }) 88 | ///验证字符串是否是数字 89 | function checkNumber(theObj) { 90 | var reg = /^[0-9]+.?[0-9]*$/; 91 | if(reg.test(theObj)) { 92 | return false; 93 | } 94 | return true; 95 | } 96 | 97 | //判断输入内容是否为空 98 | for(var i=0; i<$input_text.length; i++){ 99 | if($input_text[i].val()==""){ 100 | $data_wrong.push($input_text[i]); 101 | $input_text[i].css("border", "1px solid red"); 102 | $("#alert_box").text("有未填写信息"); 103 | } 104 | } 105 | 106 | 107 | if($data_wrong.length > 0){ 108 | $("#alert_box").animate({bottom: "-1rem"}, 500) 109 | .delay(1000).animate({bottom: "-5rem"}, 500); 110 | $('html, body').animate({ 111 | scrollTop: $data_wrong[0].offset().top - 50 112 | }, 500); 113 | return false; 114 | }else{ 115 | return true; 116 | } 117 | }) 118 | 119 | }) 120 | -------------------------------------------------------------------------------- /src/main/resources/static/sm_publish/publish.scss: -------------------------------------------------------------------------------- 1 | body{ 2 | font-family: "微软雅黑"; 3 | } 4 | 5 | .title{ 6 | font-size: 2.5rem; 7 | color: rgba(0,0,0,0.8); 8 | /*border-bottom: 1.5px solid rgba(0,0,0,0.2);*/ 9 | } 10 | .subtitle{ 11 | font-size: 1rem; 12 | font-weight: 100; 13 | color: rgba(0,0,0,0.7); 14 | padding-bottom: 1rem; 15 | /*border-bottom: 1px solid rgba(0,0,0,0.2);*/ 16 | } 17 | .card{ 18 | border-top: none; 19 | border-radius: 0 0.25rem 0.25rem 0.25rem; 20 | } 21 | .blockquote p{ 22 | font-size: 1rem; 23 | } 24 | 25 | /*form标题定位*/ 26 | form{ 27 | margin-top: 1rem; 28 | } 29 | form label{ 30 | margin-left: .2rem; 31 | } 32 | 33 | .form_back_text{ 34 | padding: 6px; 35 | padding-left: 0; 36 | margin-left: -.5rem; 37 | } 38 | 39 | /*提交按钮*/ 40 | .fake_submit_box{ 41 | margin: 1rem 0; 42 | padding: 2rem 0; 43 | border-top: 1px dashed rgba(0,0,0,0.2); 44 | padding-top: 3rem; 45 | } 46 | .fake_submit{ 47 | display: block; 48 | margin: 0 auto; 49 | } 50 | 51 | /*警告框*/ 52 | #alert_box{ 53 | position: fixed; 54 | bottom: -5rem; 55 | width: 100%; 56 | text-align: center; 57 | line-height: 2rem; 58 | } 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/main/resources/static/sm_search/img/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thankingfor/pigschool-/f1a9c09f6be6f7d3189d4d28ea445bd40a1ceaf2/src/main/resources/static/sm_search/img/publish.png -------------------------------------------------------------------------------- /src/main/resources/static/sm_search/search.css: -------------------------------------------------------------------------------- 1 | .demand { 2 | margin-bottom: 20px; 3 | } 4 | 5 | .footer { 6 | font-size: 1.5rem; 7 | text-align: center; 8 | color: rgba(0, 0, 0, 0.3); 9 | } 10 | /*# sourceMappingURL=search.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/sm_search/search.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,AAAA,OAAO,CAAA;EACL,aAAa,EAAE,IAAI;CACpB;;AAED,AAAA,OAAO,CAAA;EACL,SAAS,EAAE,MAAM;EACjB,UAAU,EAAE,MAAM;EAClB,KAAK,EAAe,kBAAO;CAC5B", 4 | "sources": [ 5 | "search.scss" 6 | ], 7 | "names": [], 8 | "file": "search.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_search/search.js: -------------------------------------------------------------------------------- 1 | function searchNeed() { 2 | var param = $("#search_input").val(); 3 | window.location.href = "/sm/search?param="+param; 4 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_search/search.scss: -------------------------------------------------------------------------------- 1 | .demand{ 2 | margin-bottom: 20px; 3 | } 4 | 5 | .footer{ 6 | font-size: 1.5rem; 7 | text-align: center; 8 | color: rgba($color: #000000, $alpha: 0.3) 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_single/single.css: -------------------------------------------------------------------------------- 1 | #main { 2 | margin-top: 20px; 3 | } 4 | 5 | #main .jumbotron { 6 | background-image: -webkit-gradient(linear, left bottom, left top, from(#48c6ef), to(#6f86d6)); 7 | background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%); 8 | color: white; 9 | border-radius: 10px; 10 | } 11 | 12 | #main .demand { 13 | margin-top: 20px; 14 | } 15 | 16 | #main .demand .card-body .btn { 17 | float: right; 18 | } 19 | 20 | #page { 21 | margin-top: 30px; 22 | } 23 | /*# sourceMappingURL=single.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/sm_single/single.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,AAAA,KAAK,CAAA;EACH,UAAU,EAAE,IAAI;CAcjB;;AAfD,AAEE,KAFG,CAEH,UAAU,CAAA;EACR,gBAAgB,EAAE,iDAAiD;EACnE,KAAK,EAAE,KAAK;EACZ,aAAa,EAAE,IAAI;CACpB;;AANH,AAOE,KAPG,CAOH,OAAO,CAAA;EACL,UAAU,EAAE,IAAI;CAMjB;;AAdH,AAUM,KAVD,CAOH,OAAO,CAEL,UAAU,CACR,IAAI,CAAA;EACF,KAAK,EAAE,KAAK;CACb;;AAKP,AAAA,KAAK,CAAA;EACH,UAAU,EAAE,IAAI;CACjB", 4 | "sources": [ 5 | "single.scss" 6 | ], 7 | "names": [], 8 | "file": "single.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_single/single.scss: -------------------------------------------------------------------------------- 1 | #main{ 2 | margin-top: 20px; 3 | .jumbotron{ 4 | background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%); 5 | color: white; 6 | border-radius: 10px; 7 | } 8 | .demand{ 9 | margin-top: 20px; 10 | .card-body{ 11 | .btn{ 12 | float: right; 13 | } 14 | } 15 | } 16 | } 17 | 18 | #page{ 19 | margin-top: 30px; 20 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_work/work.css: -------------------------------------------------------------------------------- 1 | #main { 2 | margin-top: 20px; 3 | } 4 | 5 | #main .jumbotron { 6 | background-image: -webkit-gradient(linear, left bottom, left top, from(#48c6ef), to(#6f86d6)); 7 | background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%); 8 | color: white; 9 | border-radius: 10px; 10 | } 11 | 12 | #main .demand { 13 | margin-top: 20px; 14 | } 15 | 16 | #main .demand .card-body .btn { 17 | float: right; 18 | } 19 | 20 | #page { 21 | margin-top: 30px; 22 | } 23 | /*# sourceMappingURL=work.css.map */ -------------------------------------------------------------------------------- /src/main/resources/static/sm_work/work.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,AAAA,KAAK,CAAA;EACH,UAAU,EAAE,IAAI;CAcjB;;AAfD,AAEE,KAFG,CAEH,UAAU,CAAA;EACR,gBAAgB,EAAE,iDAAiD;EACnE,KAAK,EAAE,KAAK;EACZ,aAAa,EAAE,IAAI;CACpB;;AANH,AAOE,KAPG,CAOH,OAAO,CAAA;EACL,UAAU,EAAE,IAAI;CAMjB;;AAdH,AAUM,KAVD,CAOH,OAAO,CAEL,UAAU,CACR,IAAI,CAAA;EACF,KAAK,EAAE,KAAK;CACb;;AAKP,AAAA,KAAK,CAAA;EACH,UAAU,EAAE,IAAI;CACjB", 4 | "sources": [ 5 | "work.scss" 6 | ], 7 | "names": [], 8 | "file": "work.css" 9 | } -------------------------------------------------------------------------------- /src/main/resources/static/sm_work/work.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | 3 | }); -------------------------------------------------------------------------------- /src/main/resources/static/sm_work/work.scss: -------------------------------------------------------------------------------- 1 | #main{ 2 | margin-top: 20px; 3 | .jumbotron{ 4 | background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%); 5 | color: white; 6 | border-radius: 10px; 7 | } 8 | .demand{ 9 | margin-top: 20px; 10 | .card-body{ 11 | .btn{ 12 | float: right; 13 | } 14 | } 15 | } 16 | } 17 | 18 | #page{ 19 | margin-top: 30px; 20 | } -------------------------------------------------------------------------------- /src/main/resources/templates/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/main/resources/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 校园猪-赚钱在校园 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
    22 |
    23 | 24 |
    25 | 26 |
    Welcome to
    27 |
    校园猪 | SchoolPig
    28 |
    29 |
    Hitokoto · 一言
    30 |
    31 |
    32 |
    33 | 34 |
    35 | 36 | 37 |
    38 |
    39 |
    登 录
    40 |
    登录校园猪后您可以发布校园需求信息,
    以及浏览校园猪需求市场和二手市场,开启完整的体验。
    41 |
    42 | 43 | 44 | 45 | 46 | 47 | 48 |
    49 | 50 | 51 | 忘记密码? 52 |
    53 | 54 | 快速注册 55 |
    56 |
    57 | 58 |
    59 |
    快速注册
    60 |
    61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 返回登录 73 |
    74 |
    75 | 76 |
    77 | 78 |
    79 |
    80 | 81 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /src/main/resources/templates/sm/accepter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 查看需求接受者 23 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 48 | 49 |
    50 | 51 |
    52 |
    接受者
    53 |
    54 |
    55 |
    电话
    56 |
    [[${fav.user.phone}]]
    57 |
    58 |
    59 |
    姓名
    60 |
    [[${fav.user.reName}]]
    61 |
    62 |
    63 |
    64 | 65 |
    66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/main/resources/templates/sm/multiple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 单人需求 23 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
    47 | 48 |
    49 |
    50 |

    众包

    51 |
    52 |

    在下面这个单元分类里,你可以找到关于“众包”的内容。在这里你可以接到来自社会各地的众包任务,人多力量大,参与到一个大型的项目中,最终获得自己相应的收益。

    53 | 返回首页 54 |
    55 |
    56 | 57 |
    58 |
    59 |
    60 |
    分类:众包
    61 |
    62 |

    [[${need.title}]]

    63 |
    64 |

    [[${need.xyzDesc}]]

    65 | 查看详情 66 |
    67 |
    68 |
    69 |
    70 | 71 |
    72 | 73 | 74 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/main/resources/templates/sm/single.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 单人需求 23 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
    47 | 48 |
    49 |
    50 |

    单人需求

    51 |
    52 |

    在下面这个单元分类里,你可以找到关于“单人需求”的内容。这些需求只需要一个人完成,如果你完成了一个单人需求,将获得需求者所支付的酬劳。

    53 | 返回首页 54 |
    55 |
    56 | 57 |
    58 |
    59 |
    60 |
    分类:单人需求
    61 |
    62 |

    [[${need.title}]]

    63 |
    64 |

    [[${need.xyzDesc}]]

    65 | 查看详情 66 |
    67 |
    68 |
    69 |
    70 | 71 |
    72 | 73 | 74 | 75 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /src/main/resources/templates/sm/work.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 学生兼职 23 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
    47 | 48 |
    49 |
    50 |

    学生兼职

    51 |
    52 |

    在下面这个单元分类里,你可以找到关于“学生兼职”的内容。在这里你可以找到可靠的校园兼职相关的信息,丰富你的大学生活。

    53 | 返回首页 54 |
    55 |
    56 | 57 |
    58 |
    59 |
    60 |
    分类:学生兼职
    61 |
    62 |

    [[${need.title}]]

    63 |
    64 |

    [[${need.xyzDesc}]]

    65 | 查看详情 66 |
    67 |
    68 |
    69 |
    70 | 71 |
    72 | 73 | 74 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/test/java/com/pigschool/xyzshow/XyzShowApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.pigschool.xyzshow; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class XyzShowApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | --------------------------------------------------------------------------------