Commit 6cea8000 by 侯昆
2 parents efff46e6 e741f194
Showing 869 changed files with 1887 additions and 256 deletions
...@@ -85,7 +85,11 @@ ...@@ -85,7 +85,11 @@
<artifactId>springfox-swagger-ui</artifactId> <artifactId>springfox-swagger-ui</artifactId>
</dependency> </dependency>
<!--接口文档--> <!--接口文档-->
<dependency>
<groupId>com.baidu</groupId>
<artifactId>adapter-ueditor</artifactId>
<version>1.0</version>
</dependency>
</dependencies> </dependencies>
......
...@@ -33,7 +33,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -33,7 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
* @date 2017/12/6 * @date 2017/12/6
*/ */
@RestController @RestController
@RequestMapping("/theme") @RequestMapping("/api/theme")
public class ThemeController extends BaseController { public class ThemeController extends BaseController {
@Autowired @Autowired
......
...@@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author 石磊 * @author 石磊
* @date 2017/12/6 * @date 2017/12/6
*/ */
@RequestMapping("/word") @RequestMapping("/api/word")
@RestController @RestController
public class WordController extends BaseController { public class WordController extends BaseController {
......
/* 前后端通信相关的配置,注释只允许使用多行方式 */
{
"formData":{},
"fileManagerCategoryAction":"filecategory",
"fileManagerCategoryList":[
{
"id":1,
"pid":0,
"type":"image",
"title":"Title"
}
],
/* 上传图片配置项 */
"physicalPath":"/data/www/uploads/niushilan/",
"imageActionName": "uploadimage", /* 执行上传图片的action名称 */
"imageFieldName": "upfile", /* 提交的图片表单名称 */
"imageMaxSize": 2048000, /* 上传大小限制,单位B */
"imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上传图片格式显示 */
"imageCompressEnable": true, /* 是否压缩图片,默认是true */
"imageCompressBorder": 1600, /* 图片压缩最长边限制 */
"imageInsertAlign": "none", /* 插入的图片浮动方式 */
"imageUrlPrefix": "", /* 图片访问路径前缀 */
"imagePathFormat": "/admin/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
/* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
/* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
/* {time} 会替换成时间戳 */
/* {yyyy} 会替换成四位年份 */
/* {yy} 会替换成两位年份 */
/* {mm} 会替换成两位月份 */
/* {dd} 会替换成两位日期 */
/* {hh} 会替换成两位小时 */
/* {ii} 会替换成两位分钟 */
/* {ss} 会替换成两位秒 */
/* 非法字符 \ : * ? " < > | */
/* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */
/* 涂鸦图片上传配置项 */
"scrawlActionName": "uploadscrawl", /* 执行上传涂鸦的action名称 */
"scrawlFieldName": "upfile", /* 提交的图片表单名称 */
"scrawlPathFormat": "/admin/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
"scrawlMaxSize": 2048000, /* 上传大小限制,单位B */
"scrawlUrlPrefix": "", /* 图片访问路径前缀 */
"scrawlInsertAlign": "none",
/* 截图工具上传 */
"snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */
"snapscreenPathFormat": "/admin/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
"snapscreenUrlPrefix": "", /* 图片访问路径前缀 */
"snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */
/* 抓取远程图片配置 */
"catcherLocalDomain": ["127.0.0.1", "localhost", "img.baidu.com"],
"catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */
"catcherFieldName": "source", /* 提交的图片列表表单名称 */
"catcherPathFormat": "/admin/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
"catcherUrlPrefix": "", /* 图片访问路径前缀 */
"catcherMaxSize": 2048000, /* 上传大小限制,单位B */
"catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */
/* 上传视频配置 */
"videoActionName": "uploadvideo", /* 执行上传视频的action名称 */
"videoFieldName": "upfile", /* 提交的视频表单名称 */
"videoPathFormat": "/uploads/video/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
"videoUrlPrefix": "", /* 视频访问路径前缀 */
"videoMaxSize": 102400000, /* 上传大小限制,单位B,默认100MB */
"videoAllowFiles": [
".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* 上传视频格式显示 */
/* 上传文件配置 */
"fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */
"fileFieldName": "upfile", /* 提交的文件表单名称 */
"filePathFormat": "/file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
"fileUrlPrefix": "", /* 文件访问路径前缀 */
"fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */
"fileAllowFiles": [
".png", ".jpg", ".jpeg", ".gif", ".bmp",
".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
], /* 上传文件格式显示 */
/* 列出指定目录下的图片 */
"imageManagerActionName": "listimage", /* 执行图片管理的action名称 */
"imageManagerListPath": "/ueditor/jsp/admin/image/", /* 指定要列出图片的目录 */
"imageManagerListSize": 20, /* 每次列出文件数量 */
"imageManagerUrlPrefix": "", /* 图片访问路径前缀 */
"imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */
"imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */
/* 列出指定目录下的文件 */
"fileManagerActionName": "listfile", /* 执行文件管理的action名称 */
"fileManagerListPath": "/ueditor/jsp/uploads/file/", /* 指定要列出文件的目录 */
"fileManagerUrlPrefix": "", /* 文件访问路径前缀 */
"fileManagerListSize": 20, /* 每次列出文件数量 */
"fileManagerAllowFiles": [
".png", ".jpg", ".jpeg", ".gif", ".bmp",
".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
] /* 列出的文件类型 */
}
\ No newline at end of file \ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8"
import="com.baidu.ueditor.ActionEnter"
pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%
request.setCharacterEncoding( "utf-8" );
response.setHeader("Content-Type" , "text/html");
/*服务器物理根路径*/
String rootPath = application.getRealPath("/");
out.write( new ActionEnter(request, rootPath ).exec() );
%>
\ No newline at end of file \ No newline at end of file
package com.dookay.cihai.core;
import com.dookay.coral.common.core.CoralCommonCoreMarker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author houkun
*/
@SpringBootApplication(scanBasePackageClasses = {
CoralCommonCoreMarker.class,
CiHaiCoreApplication.class
})
public class CiHaiCoreApplication {
public static void main(String[] args) {
SpringApplication.run(CiHaiCoreApplication.class, args);
}
}
package com.dookay.cihai.core;
import com.dookay.coral.bulider.utils.CoreUtils;
/**
* @author Luxor
* @version v0.0.1
* @since 2017/10/31
*/
public class Generator {
public static void main(String[] args) throws Exception {
CoreUtils.generate("/generator.xml");
}
}
package com.dookay.cihai.core.theme.domain;
import lombok.Data;
import java.io.Serializable;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;
/**
* 专题
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
@Data
@Table(name = "t_theme")
public class ThemeDomain implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@Id
private Long id;
/**
*
*/
private String title;
/**
*
*/
private String introduce;
/**
*
*/
private String basicInfo;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
}
package com.dookay.cihai.core.theme.domain;
import lombok.Data;
import java.io.Serializable;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;
/**
* 专题词条关系
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
@Data
@Table(name = "t_theme_word")
public class ThemeWordDomain implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@Id
private Long id;
/**
*
*/
private Long wordId;
/**
*
*/
private Long themeId;
/**
*
*/
private Date createTime;
}
package com.dookay.cihai.core.theme.mapper;
import com.dookay.coral.common.core.persistence.Mapper;
import com.dookay.cihai.core.theme.domain.ThemeDomain;
/**
* 专题
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
public interface ThemeMapper extends Mapper<ThemeDomain> {
}
package com.dookay.cihai.core.theme.mapper;
import com.dookay.coral.common.core.persistence.Mapper;
import com.dookay.cihai.core.theme.domain.ThemeWordDomain;
/**
* 专题词条关系
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
public interface ThemeWordMapper extends Mapper<ThemeWordDomain> {
}
package com.dookay.cihai.core.theme.query;
import com.dookay.coral.common.core.persistence.Query;
import tk.mybatis.mapper.entity.Example;
import com.dookay.coral.common.core.persistence.criteria.QueryCriteria;
import com.dookay.cihai.core.theme.domain.ThemeDomain;
/**
* 专题
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
public class ThemeQuery extends Query {
@Override
public QueryCriteria toCriteria() {
QueryCriteria queryCriteria = new QueryCriteria(ThemeDomain.class);
Example.Criteria criteria = queryCriteria.createCriteria();
//todo 写查询逻辑
return queryCriteria;
}
}
package com.dookay.cihai.core.theme.query;
import com.dookay.coral.common.core.persistence.Query;
import tk.mybatis.mapper.entity.Example;
import com.dookay.coral.common.core.persistence.criteria.QueryCriteria;
import com.dookay.cihai.core.theme.domain.ThemeWordDomain;
/**
* 专题词条关系
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
public class ThemeWordQuery extends Query {
@Override
public QueryCriteria toCriteria() {
QueryCriteria queryCriteria = new QueryCriteria(ThemeWordDomain.class);
Example.Criteria criteria = queryCriteria.createCriteria();
//todo 写查询逻辑
return queryCriteria;
}
}
package com.dookay.cihai.core.theme.service;
import com.dookay.coral.common.core.service.IBaseService;
import com.dookay.cihai.core.theme.domain.ThemeDomain;
/**
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
public interface IThemeService extends IBaseService<ThemeDomain> {
}
package com.dookay.cihai.core.theme.service;
import com.dookay.coral.common.core.service.IBaseService;
import com.dookay.cihai.core.theme.domain.ThemeWordDomain;
/**
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
public interface IThemeWordService extends IBaseService<ThemeWordDomain> {
}
package com.dookay.cihai.core.theme.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dookay.coral.common.core.service.impl.BaseServiceImpl;
import com.dookay.cihai.core.theme.mapper.ThemeMapper;
import com.dookay.cihai.core.theme.domain.ThemeDomain;
import com.dookay.cihai.core.theme.service.IThemeService;
/**
* 专题
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
@SuppressWarnings("ALL")
@Service("themeService")
public class ThemeServiceImpl extends BaseServiceImpl<ThemeDomain> implements IThemeService {
@Autowired
private ThemeMapper themeMapper;
}
package com.dookay.cihai.core.theme.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dookay.coral.common.core.service.impl.BaseServiceImpl;
import com.dookay.cihai.core.theme.mapper.ThemeWordMapper;
import com.dookay.cihai.core.theme.domain.ThemeWordDomain;
import com.dookay.cihai.core.theme.service.IThemeWordService;
/**
* 专题词条关系
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
@SuppressWarnings("ALL")
@Service("themeWordService")
public class ThemeWordServiceImpl extends BaseServiceImpl<ThemeWordDomain> implements IThemeWordService {
@Autowired
private ThemeWordMapper themeWordMapper;
}
package com.dookay.cihai.core.word.domain;
import lombok.Data;
import java.io.Serializable;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;
/**
* 词条
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
@Data
@Table(name = "t_word")
public class WordDomain implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@Id
private Long id;
/**
*
*/
private String word;
/**
*
*/
private String body;
/**
*
*/
private String baikePoster;
/**
*
*/
private String baikeVoice;
/**
*
*/
private String baikeDescription;
/**
*
*/
private String baikeParaphrase;
/**
*
*/
private String baikePhotos;
/**
*
*/
private String baikeVideo;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 拼音
*/
private String wordSpell;
}
package com.dookay.cihai.core.word.mapper;
import com.dookay.coral.common.core.persistence.Mapper;
import com.dookay.cihai.core.word.domain.WordDomain;
/**
* 词条
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
public interface WordMapper extends Mapper<WordDomain> {
}
package com.dookay.cihai.core.word.query;
import com.dookay.coral.common.core.persistence.Query;
import tk.mybatis.mapper.entity.Example;
import com.dookay.coral.common.core.persistence.criteria.QueryCriteria;
import com.dookay.cihai.core.word.domain.WordDomain;
/**
* 词条
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
public class WordQuery extends Query {
@Override
public QueryCriteria toCriteria() {
QueryCriteria queryCriteria = new QueryCriteria(WordDomain.class);
Example.Criteria criteria = queryCriteria.createCriteria();
//todo 写查询逻辑
return queryCriteria;
}
}
package com.dookay.cihai.core.word.service;
import com.dookay.coral.common.core.service.IBaseService;
import com.dookay.cihai.core.word.domain.WordDomain;
/**
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
public interface IWordService extends IBaseService<WordDomain> {
}
package com.dookay.cihai.core.word.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dookay.coral.common.core.service.impl.BaseServiceImpl;
import com.dookay.cihai.core.word.mapper.WordMapper;
import com.dookay.cihai.core.word.domain.WordDomain;
import com.dookay.cihai.core.word.service.IWordService;
/**
* 词条
* @author wangwei
* @since 2017年12月06日
* @version V1.0
*/
@SuppressWarnings("ALL")
@Service("wordService")
public class WordServiceImpl extends BaseServiceImpl<WordDomain> implements IWordService {
@Autowired
private WordMapper wordMapper;
}
<context schema="cihai">
<project>cihai-core</project>
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://192.168.2.24:3306/cihai?characterEncoding=utf8"
uName="root" password="dookay100001"/>
<!-- 数据类型 -->
<javaTypeResolver>
<property name="int" value="Integer"/>
<property name="tinyint" value="Integer"/>
<property name="bigint" value="Long"/>
<property name="char" value="String"/>
<property name="varchar" value="String"/>
<property name="text" value="String"/>
<property name="float" value="Float"/>
<property name="double" value="Double"/>
<property name="decimal" value="Double"/>
<property name="smallint" value="Integer"/>
<property name="timestamp" value="Date"/>
<property name="datetime" value="Date"/>
<property name="date" value="Date"/>
<property name="bit" value="Boolean"/>
<property name="time" value="Time"/>
<property name="smallint" value="Boolean"/>
</javaTypeResolver>
<table tableName="t_word" domainObjectName="Word"
packageName="com.dookay.cihai.core.word" desc="词条" author="wangwei">
</table>
<table tableName="t_theme" domainObjectName="Theme"
packageName="com.dookay.cihai.core.theme" desc="专题" author="wangwei">
</table>
<table tableName="t_theme_word" domainObjectName="ThemeWord"
packageName="com.dookay.cihai.core.theme" desc="专题词条关系" author="wangwei">
</table>
</context>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.dookay.cihai.core.theme.mapper.ThemeMapper" >
<!-- 公共查询语句 -->
<sql id="selectSql">
select
<trim suffixOverrides="," >
a.`id` as 'id',
a.`title` as 'title',
a.`introduce` as 'introduce',
a.`basic_info` as 'basicInfo',
a.`create_time` as 'createTime',
a.`update_time` as 'updateTime',
</trim>
from
`t_theme` as a
</sql>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.dookay.cihai.core.theme.mapper.ThemeWordMapper" >
<!-- 公共查询语句 -->
<sql id="selectSql">
select
<trim suffixOverrides="," >
a.`id` as 'id',
a.`word_id` as 'wordId',
a.`theme_id` as 'themeId',
a.`create_time` as 'createTime',
</trim>
from
`t_theme_word` as a
</sql>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.dookay.cihai.core.word.mapper.WordMapper" >
<!-- 公共查询语句 -->
<sql id="selectSql">
select
<trim suffixOverrides="," >
a.`id` as 'id',
a.`word` as 'word',
a.`body` as 'body',
a.`baike_poster` as 'baikePoster',
a.`baike_voice` as 'baikeVoice',
a.`baike_description` as 'baikeDescription',
a.`baike_paraphrase` as 'baikeParaphrase',
a.`baike_photos` as 'baikePhotos',
a.`baike_video` as 'baikeVideo',
a.`create_time` as 'createTime',
a.`update_time` as 'updateTime',
</trim>
from
`t_word` as a
</sql>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.dookay.cihai.core.word.mapper.WordThemeMapper" >
<!-- 公共查询语句 -->
<sql id="selectSql">
select
<trim suffixOverrides="," >
a.`id` as 'id',
a.`title` as 'title',
a.`introduce` as 'introduce',
a.`basic_info` as 'basicInfo',
a.`create_time` as 'createTime',
a.`update_time` as 'updateTime',
</trim>
from
`t_word_theme` as a
</sql>
</mapper>
\ No newline at end of file \ No newline at end of file
...@@ -73,7 +73,16 @@ ...@@ -73,7 +73,16 @@
<groupId>com.fasterxml.jackson.datatype</groupId> <groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId> <artifactId>jackson-datatype-jsr310</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.jfinal</groupId>
<artifactId>jfinal-weixin</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>com.jfinal</groupId>
<artifactId>jfinal</artifactId>
<version>2.2</version>
</dependency>
</dependencies> </dependencies>
......
package com.dookay.cihai.jsp; package com.dookay.cihai.wechat;
import com.dookay.cihai.core.CihaiCoreApplication;
import com.dookay.coral.common.core.CoralCommonCoreMarker; import com.dookay.coral.common.core.CoralCommonCoreMarker;
import com.dookay.coral.common.web.CoralCommonWebMarker; import com.dookay.coral.common.web.CoralCommonWebMarker;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
...@@ -21,13 +22,14 @@ import org.springframework.cache.annotation.EnableCaching; ...@@ -21,13 +22,14 @@ import org.springframework.cache.annotation.EnableCaching;
scanBasePackageClasses = { scanBasePackageClasses = {
CoralCommonCoreMarker.class, CoralCommonCoreMarker.class,
CoralCommonWebMarker.class, CoralCommonWebMarker.class,
CihaiCoreMarker.class, CihaiCoreApplication.class,
CihaiJspApplication.class, CihaiJspApplication.class,
}) })
@MapperScan(basePackageClasses = CihaiCoreMarker.class) @MapperScan(basePackageClasses = CihaiCoreApplication.class)
@ServletComponentScan(basePackageClasses = { @ServletComponentScan(basePackageClasses = {
CoralCommonWebMarker.class, CoralCommonWebMarker.class,
CihaiJspApplication.class CihaiJspApplication.class,
CihaiCoreApplication.class
}) })
@EnableCaching @EnableCaching
public class CihaiJspApplication extends SpringBootServletInitializer { public class CihaiJspApplication extends SpringBootServletInitializer {
......
package com.dookay.cihai.wechat.config;
import com.dookay.cihai.wechat.interceptor.WechatMsgInterceptor;
import com.jfinal.weixin.sdk.api.ApiConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* Web config
*
* @author houkun
*/
@Configuration
public class JspMvcConfig extends WebMvcConfigurerAdapter {
@Autowired
private WechatConfig wechatConfig;
@Override
public void addInterceptors(InterceptorRegistry registry) {
WechatMsgInterceptor interceptor = new WechatMsgInterceptor();
interceptor.setApiConfig(new ApiConfig(wechatConfig.getToken(), wechatConfig.getAppId(), wechatConfig.getAppSecret()));
registry.addInterceptor(interceptor).addPathPatterns("/wechat/*");
super.addInterceptors(registry);
}
}
package com.dookay.cihai.wechat.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@ConfigurationProperties("coral.wechat.WechatConfig")
@Data
@Component
public class WechatConfig {
private String token = null;
private String appId = null;
private String appSecret = null;
private String encodingAesKey = null;
private boolean messageEncrypt = false; // 消息加密与否
}
/*****************************************
* *
* @dookay.com Internet make it happen *
* ----------- ----------------------- *
* dddd ddddd Internet make it happen *
* o o o Internet make it happen *
* k k k Internet make it happen *
* a a a Internet make it happen *
* yyyy yyyyy Internet make it happen *
* ----------- ----------------------- *
* NO BUG ENJOY LIFE *
* *
****************************************/
package com.dookay.cihai.wechat.controller;
import com.dookay.cihai.core.word.service.IWordService;
import com.dookay.coral.common.web.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
/**
* @author 石磊
* @date 2017/12/6
*/
@Controller
@RequestMapping(value = "/")
public class HomeController extends BaseController {
@Autowired
private IWordService wordService;
/**
* @author 石磊
* @date 2017/12/6
* @description home
*/
@RequestMapping(method = RequestMethod.GET)
public ModelAndView index() {
ModelAndView mv = new ModelAndView("portal/home/index");
return mv;
}
/**
* @author 石磊
* @date 2017/12/6
* @description 搜索
*/
@RequestMapping(value="/serach",method = RequestMethod.GET)
public ModelAndView search(String keyword) {
ModelAndView mv = new ModelAndView("");
return mv;
}
}
/*****************************************
* *
* @dookay.com Internet make it happen *
* ----------- ----------------------- *
* dddd ddddd Internet make it happen *
* o o o Internet make it happen *
* k k k Internet make it happen *
* a a a Internet make it happen *
* yyyy yyyyy Internet make it happen *
* ----------- ----------------------- *
* NO BUG ENJOY LIFE *
* *
****************************************/
package com.dookay.cihai.wechat.controller;
import com.dookay.coral.common.web.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
/**
* @author 石磊
* @date 2017/12/6
*/
@Controller
@RequestMapping("/wechat")
public class WechatController extends BaseController{
@RequestMapping(value = "/jsConfig", method = RequestMethod.GET)
public ModelAndView jsConfig() {
ModelAndView view = new ModelAndView("include/js_sdk");
return view;
}
}
package com.dookay.cihai.wechat.interceptor;
import com.jfinal.kit.StrKit;
import com.jfinal.weixin.sdk.api.ApiConfig;
import com.jfinal.weixin.sdk.api.ApiConfigKit;
import com.jfinal.weixin.sdk.kit.SignatureCheckKit;
import org.apache.log4j.Logger;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 微信 Msg 拦截器
* 1:通过 WeChatMsgController.getApiConfig() 得到 ApiConfig
* 对象,并将其绑定到当前线程之上(利用了 ApiConfigKit 中的 ThreadLocal 对象)
* 2:响应开发者中心服务器配置 URL 与 Token 请求
* 3:签名检测
* @author : kezhan
* @since : 2017年1月4日
* @version : v0.0.1
*/
public class WechatMsgInterceptor implements HandlerInterceptor {
private static Logger log = Logger.getLogger(WechatMsgInterceptor.class);
private ApiConfig apiConfig;
public ApiConfig getApiConfig() {
return apiConfig;
}
public void setApiConfig(ApiConfig apiConfig) {
this.apiConfig = apiConfig;
}
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
response.setHeader("Content-type", "text/html;charset=UTF-8");
ApiConfigKit.setThreadLocalApiConfig(apiConfig);
if (isConfigServerRequest(request)) { // 如果是服务器配置请求,则配置服务器并返回
if (configServer(request, response)) {
ApiConfigKit.removeThreadLocalApiConfig();
return false;
}
if (checkSignature(request, response)) { // 签名检测
return true;
} else {
log.info("签名验证失败,请确定是微信服务器在发送消息过来...");
}
}
return true;
}
@Override
public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {
}
public void afterCompletion(
HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
throws Exception {
ApiConfigKit.removeThreadLocalApiConfig();// 结束后删除当前线程
}
/**
* **********************以下为签名验证工具包,占位私有不分割**********************
*/
/**
* 是否为开发者中心保存服务器配置的请求
* @param request
* @return
* @author : kezhan
* @since : 2017年1月4日
*/
private boolean isConfigServerRequest(HttpServletRequest request) {
return StrKit.notBlank(request.getParameter("echostr"));
}
/**
* 配置开发者中心微信服务器所需的 url 与 token
* @param request
* @param response
* @return true 为config server 请求,false 正式消息交互请求
* @author : kezhan
* @since : 2017年1月4日
*/
public boolean configServer(HttpServletRequest request, HttpServletResponse response) {
try {
// 通过 echostr 判断请求是否为配置微信服务器回调所需的 url 与 token
String echostr = request.getParameter("echostr");
String signature = request.getParameter("signature");
String timestamp = request.getParameter("timestamp");
String nonce = request.getParameter("nonce");
if (SignatureCheckKit.me.checkSignature(signature, timestamp, nonce)) {
response.getWriter().print(echostr);
return true;
} else {
log.error("验证失败:configServer");
return false;
}
} catch (Exception e) {
log.error("验证异常:configServer" + e.getMessage());
return false;
}
}
/**
* 检测签名
* @param request
* @param response
* @return
* @throws Exception
* @author : kezhan
* @since : 2017年1月4日
*/
private boolean checkSignature(HttpServletRequest request, HttpServletResponse response)
throws Exception {
String signature = request.getParameter("signature");
String timestamp = request.getParameter("timestamp");
String nonce = request.getParameter("nonce");
if (StrKit.isBlank(signature) || StrKit.isBlank(timestamp) || StrKit.isBlank(nonce)) {
return false;
}
if (SignatureCheckKit.me.checkSignature(signature, timestamp, nonce)) {
return true;
} else {
log.error(
"check signature failure: " + " signature = "
+ request.getParameter("signature") + " timestamp = "
+ request.getParameter("timestamp") + " nonce = "
+ request.getParameter("nonce"));
return false;
}
}
}
debug=true debug=false
# 数据库连接 # 数据库连接
spring.datasource.url=jdbc:mysql://localhost:3306/test spring.datasource.url=jdbc:mysql://192.168.2.24:3306/cihai
spring.datasource.username=root spring.datasource.username=root
# 加密后的密码 # 加密后的密码
spring.datasource.password=Lvv/S6CDCaeRONtvcUDlHrty4nYxnQFAIcT43dJOqCenmj9x/dDzX9i3S9H5AdskVo8KNR5hJAOHw6SmjjlXLg== spring.datasource.password=AmwpshLB35Fgazrs4rCfGlwNBZOTD34ezY/zS751V+7iSJHjr3tDNkpOfnW/y0fjFcMTNX0ycMt3KIUnDi8JYg==
# 加密时的公钥 # 加密时的公钥
public-key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKIR34/oer1hySHvAOf/1XGzImWZucYu5Kv4sxerDESPP0qdI5HRL+E1S5lH7Hpt1BYOoZhHMgZ6qfqxAC2rpKkCAwEAAQ== public-key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKgof5ExfKmEZEjq+GuqEoHA8tkIftarLRzUDAxdQzJQtF57DF63gPJJkIZLcKa2t8jt5JC2SRdxERg1A/kx0BMCAwEAAQ==
# 日志 # 日志
logging.level.root=info logging.level.root=info
logging.level.com.dookay.core=trace logging.level.com.dookay.core=trace
# redis # redis
spring.redis.host=127.0.0.1 spring.redis.host=192.168.2.27
spring.redis.password=lyd123456
# 文件存储
coral.web.resource.mapping.uploads-inner=/uploads/*
coral.web.resource.mapping.uploads-mapping=/data/www/uploads/cihai
coral.web.resource.mapping.uploads-inner=/uploads/**
coral.web.resource.mapping.uploads-mapping=file:/data/www/uploads/demo/
coral.web.view.form.interval-milli-second=10000
\ No newline at end of file \ No newline at end of file
#wechat config
#AppID
coral.wechat.WechatConfig.appId=wx319ed3575ffe9ff8
#AppSecret
coral.wechat.WechatConfig.appSecret=eed9c0728fb20521bb61be4ac6e4e67d
#Token(令牌)
coral.wechat.WechatConfig.token=eGgg3CoOihZQwCf1sr8jU8zmBfx4u5WT
#EncodingAESKey(消息加解密密钥)
coral.wechat.WechatConfig.encodingAESKey=agkC7tsPUoOtbbUyxxcCLVJZVqVOCTeJgxUCXAx87op
# 是否加密
coral.wechat.WechatConfig.messageEncrypt=false
# 微信授权回调地址
\ No newline at end of file \ No newline at end of file
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--添加此行消除额外空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--添加此行消除额外空格--%>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="coral-list"/>
</jsp:include>
<jsp:useBean id="coralList" scope="request" type="com.dookay.coral.common.web.component.list.CoralListModelContainer<com.dookay.core.domain.CountryDomain>"/>
<h1>coralList</h1>
<%--排序器--%>
<p><a class="${cl:isCurrentOrder("id-desc") ? "active" : ""}" href="${cl:sortUrl("id-desc")}">id-desc</a></p>
<p><a class="${cl:isCurrentOrder("id-asc") ? "active" : ""}" href="${cl:sortUrl("id-asc")}">id-asc</a></p>
<p><a class="${cl:isCurrentOrder("countryCode-desc") ? "active" : ""}" href="${cl:sortUrl("countryCode-desc")}">countryCode-desc</a></p>
<p>currentOrder: ${coralList.sorterModel.orderBy}</p>
<%--排序器--%>
<%--单选--%>
<p>
<c:forEach var="item" items="${cl:singleSelect('id').items}">
<span><a class="${item.selected ? "active" :""}" href="${cl:singleSelectUrl("id", item)}">${item.text}</a></span>
</c:forEach>
<span><a class="${cl:noneSelectByField("id") ? "active" :""}" href="${cl:unSelectUrl("id")}">全部</a></span>
</p>
<%--单选--%>
<form>
<%--多选--%>
<h3>countryCode:</h3>
<c:forEach var="item" items="${cl:multiSelect('countryCode').items}">
<input type="checkbox" name="countryCode"
value="${item.value}" ${item.selected ? "checked" : ""} /> ${item.text}
</c:forEach>
<%--多选--%>
<%--搜索--%>
<h3>countryName</h3>
<input type="text" name="countryName" value="${cl:searchSelect("countryName").selected}">
<%--搜索--%>
<%--范围选择--%>
<input type="date" name="createTimeGt" value="${cl:rangeSelect("createTime").selected.min}">
<input type="date" name="createTimeLt" value="${cl:rangeSelect("createTime").selected.max}">
<%--范围选择--%>
<%--隐藏域,保存分页和排序信息--%>
<cl:filterHidden/>
<%--隐藏域,保存分页和排序信息--%>
<input type="submit" value="提交">
</form>
<table>
<tr>
<th>id</th>
<th>code</th>
<th>name</th>
</tr>
<c:choose>
<c:when test="${cl:isEmpty()}">
<%--无内容--%>
<tr>
<td colspan="3">无数据</td>
</tr>
<%--无内容--%>
</c:when>
<c:otherwise>
<%--有内容--%>
<c:forEach var="country" items="${coralList.resultList}">
<tr>
<td>${country.id}</td>
<td>${country.countryCode}</td>
<td>${country.countryName}</td>
</tr>
</c:forEach>
<%--有内容--%>
</c:otherwise>
</c:choose>
</table>
<%--翻页器--%>
<p>
<c:forEach var="page" items="${coralList.pageModel.pages}">
<span>
<c:choose>
<c:when test="${page != null}">
<a href="${page.url}">${page.pageIndex}</a>
</c:when>
<c:otherwise>
<span>...</span>
</c:otherwise>
</c:choose>
</span>
</c:forEach>
<span>当前第${coralList.pageModel.currentPage.pageIndex}页,共${coralList.pageModel.totalPage}页,${coralList.pageModel.totalRecord}条记录</span>
</p>
<%--翻页器--%>
<style>
a.active {
color: red;
}
</style>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
\ No newline at end of file \ No newline at end of file
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--添加此行消除额外空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--添加此行消除额外空格--%>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="user-list"/>
</jsp:include>
<jsp:useBean id="coralList" scope="request" type="com.dookay.coral.common.web.component.list.CoralListModelContainer<com.dookay.core.domain.UserInfoDomain>"/>
<h1>coralList</h1>
<%--排序器--%>
<p><a class="${cl:isCurrentOrder("id-desc") ? "active" : ""}" href="${cl:sortUrl("id-desc")}">id-desc</a></p>
<p><a class="${cl:isCurrentOrder("id-asc") ? "active" : ""}" href="${cl:sortUrl("id-asc")}">id-asc</a></p>
<p>currentOrder: ${coralList.sorterModel.orderBy}</p>
<%--排序器--%>
<form>
<%--多选--%>
<h3>countryCode:</h3>
<c:forEach var="item" items="${cl:multiSelect('username').items}">
<input type="checkbox" name="username"
value="${item.value}" ${item.selected ? "checked" : ""} /> ${item.text}
</c:forEach>
<%--多选--%>
<%--隐藏域,保存分页和排序信息--%>
<cl:filterHidden/>
<%--隐藏域,保存分页和排序信息--%>
<input type="submit" value="提交">
</form>
<table>
<tr>
<th>id</th>
<th>username</th>
</tr>
<c:choose>
<c:when test="${cl:isEmpty()}">
<%--无内容--%>
<tr>
<td colspan="3">无数据</td>
</tr>
<%--无内容--%>
</c:when>
<c:otherwise>
<%--有内容--%>
<c:forEach var="user" items="${coralList.resultList}">
<tr>
<td>${user.id}</td>
<td>${user.username}</td>
</tr>
</c:forEach>
<%--有内容--%>
</c:otherwise>
</c:choose>
</table>
<%--翻页器--%>
<p>
<c:forEach var="page" items="${coralList.pageModel.pages}">
<span>
<c:choose>
<c:when test="${page != null}">
<a href="${page.url}">${page.pageIndex}</a>
</c:when>
<c:otherwise>
<span>...</span>
</c:otherwise>
</c:choose>
</span>
</c:forEach>
<span>当前第${coralList.pageModel.currentPage.pageIndex}页,共${coralList.pageModel.totalPage}页,${coralList.pageModel.totalRecord}条记录</span>
</p>
<%--翻页器--%>
<style>
a.active {
color: red;
}
</style>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
\ No newline at end of file \ No newline at end of file
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--添加此行消除额外空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--添加此行消除额外空格--%>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="form-index"/>
</jsp:include>
<p>普通html表单需手动添加csrf</p>
<%--@elvariable id="_csrf" type="org.springframework.security.web.csrf.CsrfToken"--%>
<input name="${_csrf.parameterName}" value="${_csrf.token}">
<%--@elvariable id="simpleForm" type="com.dookay.jsp.demo.form.form.SimpleForm"--%>
<form:form action="/form/simple" modelAttribute="simpleForm" cssClass="j_ajaxForm">
<p>
姓名:<form:input path="name"/>
</p>
<p>
手机号:<form:input path="mobile"/>
</p>
<p>
<form:button>提交</form:button>
</p>
</form:form>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
\ No newline at end of file \ No newline at end of file
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
<%@ page trimDirectiveWhitespaces="true" %> <%@ page trimDirectiveWhitespaces="true" %>
<%--添加此行消除额外空格--%> <%--添加此行消除额外空格--%>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="${ctx}/static/js/vendor.js"></script>
<script src="${ctx}/static/js/routes.js"></script>
<script src="${ctx}/static/js/index.js"></script>
<script src="${ctx}/static/js/backend.js"></script> <script src="${ctx}/static/js/backend.js"></script>
<script src="${ctx}/static/js/validator/jquery.validator.min.js"></script>
<script src="${ctx}/static/js/validator/local/zh-CN.js"></script>
<script src="${ctx}/static/js/layer/layer.js"></script> <script src="${ctx}/static/js/layer/layer.js"></script>
<script> <script>
$(function () { $(function () {
......
...@@ -6,9 +6,12 @@ ...@@ -6,9 +6,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-CN"> <html lang="zh-CN">
<head> <head>
<meta charset="UTF-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="generator" content="www.dookay.com"> <meta name="generator" content="www.dookay.com">
<title>cihai ${param.pageTitle}</title> <title>辞海-${param.pageTitle}</title>
<link rel="stylesheet" href="${ctx}/static/css/vendor.css">
</head> </head>
<body> <body>
<%--
注意:所有的JS接口只能在公众号绑定的域名下调用,公众号开发者需要先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”。
如果发现在 Android 不能分享自定义内容,请到官网下载最新的包覆盖安装,Android 自定义分享接口需升级至 6.0.2.58 版本及以上。
完整 JS-SDK 文档地址:http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html
使用方法:
需要调用的地方加入下面的内容
//-----------------------------------------------------------------------------//
//下面为配置的覆盖,应该考虑更优的参数覆盖方式
<script type="text/javascript">
var shareData = {
title: shareTitle,
desc: config.content,
link: shareURL,
imgUrl: shareIMG
};
</script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="http://xxxx/js_sdk.jsp"></script>
//-----------------------------------------------------------------------------//
--%>
<%@page import="com.jfinal.kit.PropKit"%>
<%@page import="com.jfinal.weixin.sdk.api.ApiConfigKit"%>
<%@page import="com.jfinal.weixin.sdk.api.ApiConfig"%>
<%@page import="com.jfinal.kit.HashKit"%>
<%@page import="java.util.Map.Entry"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.UUID"%>
<%@page import="java.util.TreeMap"%>
<%@page import="com.jfinal.weixin.sdk.api.JsTicket"%>
<%@page import="com.jfinal.weixin.sdk.api.JsTicketApi.JsApiType"%>
<%@page import="com.jfinal.weixin.sdk.api.JsTicketApi"%>
<%@page import="com.jfinal.kit.StrKit"%>
<%@ page language="java" contentType="application/x-javascript; charset=utf-8" isELIgnored="false"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--微信环境内展示 --%>
<%
// 1.拼接url(当前网页的URL,不包含#及其后面部分)
String _wxShareUrl = request.getHeader("Referer");
String appId="wx319ed3575ffe9ff8";
if (StrKit.notBlank(_wxShareUrl)) {
_wxShareUrl = _wxShareUrl.split("#")[0];
} else {
return;
}
// 先从参数中获取,获取不到时从配置文件中找
// 方便测试 1.9添加参数&test=true
String isTest = request.getParameter("test");
if (null == isTest || !isTest.equals("true")) {
isTest = "false";
}
String _wxJsApiTicket = "";
try {
JsTicket jsTicket = JsTicketApi.getTicket(JsApiType.jsapi);
_wxJsApiTicket = jsTicket.getTicket();
} finally {
ApiConfigKit.removeThreadLocalApiConfig();
}
Map<String, String> _wxMap = new TreeMap<String, String>();
//noncestr
String _wxNoncestr = UUID.randomUUID().toString().replace("-", "");
//timestamp
String _wxTimestamp = (System.currentTimeMillis() / 1000) + "";
//参数封装
_wxMap.put("noncestr", _wxNoncestr);
_wxMap.put("timestamp", _wxTimestamp );
_wxMap.put("jsapi_ticket", _wxJsApiTicket);
_wxMap.put("url", _wxShareUrl);
// 加密获取signature
StringBuilder _wxBaseString = new StringBuilder();
for (Entry<String, String> param : _wxMap.entrySet()) {
_wxBaseString.append(param.getKey()).append("=").append(param.getValue()).append("&");
}
String _wxSignString = _wxBaseString.substring(0, _wxBaseString.length() - 1);
// signature
String _wxSignature = HashKit.sha1(_wxSignString);
%>
<%--兼容新老版本 --%>
wx.config({
debug: <%=isTest %>,
appId: '<%=appId %>',
timestamp: '<%=_wxTimestamp %>',
nonceStr: '<%=_wxNoncestr %>',
signature: '<%=_wxSignature %>',
jsApiList: [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'hideMenuItems',
'showMenuItems',
'hideAllNonBaseMenuItem',
'showAllNonBaseMenuItem',
'translateVoice',
'startRecord',
'stopRecord',
'onRecordEnd',
'playVoice',
'pauseVoice',
'stopVoice',
'uploadVoice',
'downloadVoice',
'chooseImage',
'previewImage',
'uploadImage',
'downloadImage',
'getNetworkType',
'openLocation',
'getLocation',
'hideOptionMenu',
'showOptionMenu',
'closeWindow',
'scanQRCode',
'chooseWXPay',
'openProductSpecificView',
'addCard',
'chooseCard',
'openCard'
]
});
<%
// 测试模式
if (isTest.equals("true")) {
%>
wx.error(function (res) {
alert(res.errMsg);
});
<%
}
%>
<%-- 默认分享数据 --%>
var shareData = typeof(shareData) === 'undefined' ? {
title: '扶妙乐科技',
desc: '扶妙乐科技是致力于打造国内领先水准的超级健身网络平台',
link: '',
imgUrl: ''
} : shareData;
<%--新版微信--%>
wx.ready(function () {
wx.onMenuShareAppMessage(shareData);
wx.onMenuShareTimeline(shareData);
wx.onMenuShareWeibo(shareData);
wx.onMenuShareQQ(shareData);
});
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="coral-list"/>
</jsp:include>
<h1>index</h1>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="首页"/>
</jsp:include>
<div class="loading" id="loading">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="64px" height="64px" viewBox="0 0 128 128" xml:space="preserve">
<g>
<path d="M78.75 16.18V1.56a64.1 64.1 0 0 1 47.7 47.7H111.8a49.98 49.98 0 0 0-33.07-33.08zM16.43 49.25H1.8a64.1 64.1 0 0 1 47.7-47.7V16.2a49.98 49.98 0 0 0-33.07 33.07zm33.07 62.32v14.62A64.1 64.1 0 0 1 1.8 78.5h14.63a49.98 49.98 0 0 0 33.07 33.07zm62.32-33.07h14.62a64.1 64.1 0 0 1-47.7 47.7v-14.63a49.98 49.98 0 0 0 33.08-33.07z"
fill="#494949" fill-opacity="1" />
<animateTransform attributeName="transform" type="rotate" from="0 64 64" to="-90 64 64" dur="400ms" repeatCount="indefinite"></animateTransform>
</g>
</svg>
</div>
<div id="app">
<div class="statusbar"></div>
<div class="view view-main view-init ios-edges" data-url="/">
<div class="page bg-blank">
<div class="toolbar tabbar tabbar-labels toolbar-index">
<div class="toolbar-inner">
<a class="tab-link notiy-circle" href="#">
<span class="icon icon-word"></span>
</a>
<a class="tab-link" href="#">
<span class="icon icon-class"></span>
</a>
<a class="tab-link" href="#">
<span class="icon icon-my"></span>
</a>
</div>
</div>
<div class="page-content">
<h1 class="brand-index">辞海</h1>
<div class="search-area search-index">
<div class="search-area-brand">
<img src="${ctx}/static/images/logo-zhiyun.png">
</div>
<form class="search-area-inner">
<input class="form-control" type="text" placeholder="1,786,069 个语词">
<a class="search-area-voice" type="button">
<span class="icon icon-microphone"></span>
</a>
<button class="search-area-image" type="button">
<span class="icon icon-camera"></span>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="/wechat/jsConfig"></script>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<script>
$(function () {
function touchstart(){
alert('d');
e.preventDefault();
}
$('#voice').click(function (e) {
e.preventDefault();
})
})
</script>
\ No newline at end of file \ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>index</title>
<link rel="stylesheet" href="css/vendor.css">
</head>
<body>
<div class="loading" id="loading">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="64px" height="64px" viewBox="0 0 128 128" xml:space="preserve">
<g>
<path d="M78.75 16.18V1.56a64.1 64.1 0 0 1 47.7 47.7H111.8a49.98 49.98 0 0 0-33.07-33.08zM16.43 49.25H1.8a64.1 64.1 0 0 1 47.7-47.7V16.2a49.98 49.98 0 0 0-33.07 33.07zm33.07 62.32v14.62A64.1 64.1 0 0 1 1.8 78.5h14.63a49.98 49.98 0 0 0 33.07 33.07zm62.32-33.07h14.62a64.1 64.1 0 0 1-47.7 47.7v-14.63a49.98 49.98 0 0 0 33.08-33.07z"
fill="#494949" fill-opacity="1" />
<animateTransform attributeName="transform" type="rotate" from="0 64 64" to="-90 64 64" dur="400ms" repeatCount="indefinite"></animateTransform>
</g>
</svg>
</div>
<div id="app">
<div class="statusbar"></div>
<div class="view view-main view-init ios-edges" data-url="/">
<div class="page bg-blank">
<div class="toolbar tabbar tabbar-labels toolbar-index">
<div class="toolbar-inner">
<a class="tab-link notiy-circle" href="#">
<span class="icon icon-word"></span>
</a>
<a class="tab-link" href="#">
<span class="icon icon-class"></span>
</a>
<a class="tab-link" href="#">
<span class="icon icon-my"></span>
</a>
</div>
</div>
<div class="page-content">
<h1 class="brand-index">辞海</h1>
<div class="search-area search-index">
<div class="search-area-brand">
<img src="images/logo-zhiyun.png">
</div>
<form class="search-area-inner">
<input class="form-control" type="text" placeholder="1,786,069 个语词">
<a class="search-area-voice" type="button">
<span class="icon icon-microphone"></span>
</a>
<button class="search-area-image" type="button">
<span class="icon icon-camera"></span>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
<script src="js/vendor.js"></script>
<script src="js/routes.js"></script>
<script src="js/index.js"></script>
</body>
</html>
\ No newline at end of file \ No newline at end of file
var $ = Dom7;
var myApp = new Framework7({
root: '#app',
theme: 'ios',
routes: routes,
});
var $loading = $('#loading');
$loading.addClass('fade-out');
setTimeout(function () {
$loading.remove();
},300);
$('.search-area-inner').on('click', function () {
wx.startRecord();
myApp.dialog.create({
title: '正在录音...',
buttons: [
{
text: '完成',
onClick:function () {
wx.stopRecord({
success: function (res) {
var localId = res.localId;
wx.translateVoice({
localId: localId, // 需要识别的音频的本地Id,由录音相关接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
myApp.view.main.router.load({
url:'/home/search?keyword='+res.translateResult
});
}
});
}
});
}
}
]
}).open();
});
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
var routes = [
// 首页
{
path: '/',
url: './index.html',
name: 'index'
},
// 2-1字语词义
{
path: '/word/',
url: './2-1字语词义.html',
name: 'word-home'
},
// 2-2字百科义
{
path: '/word-wiki/',
url: './2-2字百科义.html',
name: 'word-wiki'
},
// 专题
{
path: '/special/',
url: './专题.html',
name: 'special'
}
];
\ No newline at end of file \ No newline at end of file
var $ = Dom7;
var app = new Framework7({
root: '#app',
theme: 'ios',
routes: routes
});
var numSwiper = new Swiper('.num-swiper', {
loop: false,
slidesPerView: 4,
slidesPerGroup: 1,
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
}
});
var numContentSwiper = new Swiper('.num-content-swiper', {
loop: false,
});
numContentSwiper.on('slideChange', function (swiper) {
numSwiper.slideTo(numContentSwiper.realIndex);
$('.num-swiper .swiper-slide').eq(numContentSwiper.realIndex).addClass('active').siblings().removeClass('active');
});
$('.num-swiper .swiper-slide').click(function () {
$(this).addClass("active").siblings().removeClass("active");
numContentSwiper.slideTo($(this).index());
});
var picSwiper = new Swiper('.pic-swiper', {
loop: false,
slidesPerView : 1.5,
spaceBetween : 15
});
var topicSwiper = new Swiper('.topic-swiper', {
loop: false,
pagination: {
el: '.swiper-pagination',
type: 'bullets',
clickable: true
}
});
//关系图
var DIR = 'img/soft-scraps-icons/';
var nodes = null;
var edges = null;
var network = null;
// Called when the Visualization API is loaded.
function draw() {
// create people.
// value corresponds with the age of the person
var DIR = 'images/special-pic-0';
nodes = [
{id: 1, shape: 'circularImage', image: DIR + '1.png'},
{id: 2, shape: 'circularImage', image: DIR + '2.png'},
{id: 3, shape: 'circularImage', image: DIR + '1.png'},
{id: 4, shape: 'circularImage', image: DIR + '2.png', label: "pictures by this guy!"},
{id: 5, shape: 'circularImage', image: DIR + '1.png'},
{id: 6, shape: 'circularImage', image: DIR + '2.png'},
{id: 7, shape: 'circularImage', image: DIR + '1.png'},
{id: 8, shape: 'circularImage', image: DIR + '2.png'},
{id: 9, shape: 'circularImage', image: DIR + '1.png'},
{id: 10, shape: 'circularImage', image: DIR + '2.png'},
{id: 11, shape: 'circularImage', image: DIR + '1.png'},
{id: 12, shape: 'circularImage', image: DIR + '2.png'},
{id: 13, shape: 'circularImage', image: DIR + '1.png'},
{id: 14, shape: 'circularImage', image: DIR + '2.png'},
{
id: 15,
shape: 'circularImage',
image: DIR + 'missing.png',
brokenImage: DIR + 'missingBrokenImage.png',
label: "when images\nfail\nto load"
},
{
id: 16,
shape: 'circularImage',
image: DIR + 'anotherMissing.png',
brokenImage: DIR + '9.png',
label: "fallback image in action"
}
];
// create connections between people
// value corresponds with the amount of contact between two people
edges = [
{from: 1, to: 2},
{from: 2, to: 3},
{from: 2, to: 4},
{from: 4, to: 5},
{from: 4, to: 10},
{from: 4, to: 6},
{from: 6, to: 7},
{from: 7, to: 8},
{from: 8, to: 9},
{from: 8, to: 10},
{from: 10, to: 11},
{from: 11, to: 12},
{from: 12, to: 13},
{from: 13, to: 14},
{from: 9, to: 16}
];
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var options = {
nodes: {
borderWidth: 4,
size: 30,
color: {
border: '#222222',
background: '#666666'
},
font: {color: '#eeeeee'}
},
edges: {
color: 'lightgray'
}
};
network = new vis.Network(container, data, options);
}
draw();
$('.js-read-more').click(function () {
if($(this).hasClass('active')){
$('.special-content .txt-content').css('height','190px');
$(this).removeClass('active')
}else{
$('.special-content .txt-content').css('height','auto');
$(this).addClass('active')
}
});
\ No newline at end of file \ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
var $ = Dom7;
var app = new Framework7({
root: '#app',
theme: 'ios',
routes: routes
});
var swiper = new Swiper('.swiper-container', {
loop: true,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
});
$(".js-word-tab li").click(function () {
$(this).addClass("active").siblings().removeClass("active");
$(".js-tab-con .tab-panel").eq($(this).index()).addClass("active").siblings().removeClass("active");
});
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>九回运动场</title> <title>辞海管理后台</title>
</head> </head>
<body> <body>
<div id="dk-app"></div> <div id="dk-app"></div>
......
/*
* 图片上传
*/
.list-img ul{
float: left;
padding-left: 0;
margin-top: -10px;
margin-bottom: 0;
}
.list-img li{
float: left;
position: relative;
width: 90px;
height: 90px;
margin-right: 10px;
margin-top: 10px;
border-radius: 3px;
background-color: #eee;
overflow: hidden;
}
.list-img .pic{
display: table;
width: 100%;
height: 100%;
}
.list-img .pic .inner{
width: 100%;
height: 100%;
display: table-cell;
vertical-align: middle;
}
.list-img .pic img{
width: 100%;
}
.list-img .opt{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1;
padding: 3px 20px 0;
color: #fff;
text-align: center;
line-height: 20px;
background-color:rgba(0,0,0,.5);
}
.list-img .opt a{
display: block;
margin-top:6px;
}
.list-img li:hover .opt{
opacity: 1;
}
.list-img .upload{
float: left;
display: block;
border:1px solid #ddd;
border-radius: 3px;
width: 90px;
height: 90px;
line-height: 90px;
text-align: center;
}
.list-img .upload .ion{
margin-top: 19px;
font-size: 50px;
color: #ccc;
}
.list-img .upload:hover{
background-color: #fafafa;
}
.list-file li{
padding: 5px 10px;
margin-bottom: 10px;
border-radius: 3px;
background-color: #fafafa;
}
.list-file li .ion{
display: inline-block;
font-size: 16px;
line-height: 18px;
width: 20px;
}
.list-file li a{
margin-left: 5px;
}
.list-file li .opt{
float: right;
}
.list-file li:hover .opt{
opacity: 1;
}
.list-img-multiple .upload{
float: none;
margin-top: 10px;
}
.list-img-multiple ul{
float: none;
}
.list-img-multiple li{
float: none;
width: auto;
height: auto;
overflow: visible;
background: none;
margin-right: 0;
}
.list-img-multiple li:last-child{
padding-bottom: 10px;
}
.list-img-multiple .left{
width: 90px;
float: left;
}
.list-img-multiple .pic-wraper{
width: 90px;
height: 90px;
margin-bottom: 5px;
overflow: hidden;
border-radius: 3px;
background-color: #eee;
}
.list-img-multiple .info-form{
margin-left: 100px;
}
.list-img-multiple .info-form textarea{
height: 60px;
resize: none;
}
.list-img-multiple .info-form .form-control{
margin-top: 10px;
}
.list-img-multiple .opt{
position: static;
opacity: 1;
background: none;
text-align: left;
padding:5px 0 0;
line-height: normal;
height: 30px;
}
.list-img-multiple .opt a{
margin-top:0;
margin-right: 10px;
display: inline-block;
}
.list-img-multiple .upload-sort{
position: absolute;
right: -10px;
top: 0;
bottom: 0;
z-index: 1;
width: 26px;
text-align: center;
cursor: move;
background-color: #eee;
opacity: .1;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.list-img-multiple .upload-sort:before{
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
display: block;
width: 6px;
background-color: #fff;
}
.list-img-multiple li:hover .upload-sort{
opacity: 1;
}
.list-img-multiple .upload-sort .ion{
position: absolute;
top: 50%;
left: 4px;
margin-top: -13px;
vertical-align: middle;
font-size: 22px;
line-height: 26px;
}
.list-img-multiple li:last-child .upload-sort{bottom: 10px;}
.list-img-multiple .drag-start{
background-color: #fafafa;
}
.list-img-multiple .opt .upload_move_up,
.list-img-multiple .opt .upload_move_down{
margin-right: 0;
margin-left: 5px;
opacity: .2;
margin-top: 3px;
-webkit-transition: opacity .15s linear;
-o-transition: opacity .15s linear;
transition: opacity .15s linear;
}
.list-img-multiple li:hover .opt .upload_move_up,
.list-img-multiple li:hover .opt .upload_move_down{
-webkit-transition: opacity .15s linear;
-o-transition: opacity .15s linear;
transition: opacity .15s linear;
opacity: 1;
}
.list-img-multiple li:first-child .upload_move_up{
opacity: .1;
}
.list-img-multiple li:last-child .upload_move_down{
opacity: .1;
}
.list-img-multiple li:first-child:hover .opt .upload_move_up,
.list-img-multiple li:last-child:hover .opt .upload_move_down{
opacity: .1;
}
/*
* 缩略图背景图片
*/
.thumbnail-bg{
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.thumbnail-bg-narrow{
background-size: contain;
}
/*
* 带手机的布局
*/
.dk-game-design{
position: relative;
min-height: 750px;
}
.dk-game-design .dk-game-design-left{
position: absolute;
left: 0;
top: 10px;
width: 345px;
}
.dk-game-design .dk-game-design-phone{
position: relative;
width: 345px;
height: 732px;
}
.dk-game-design .dk-game-design-phone>img{
position: absolute;
left:0;
right: 0;
bottom: 0;
top:0;
z-index: 1;
}
.dk-game-design .dk-game-design-phone-content{
position: absolute;
z-index: 2;
left: 12px;
right: 13px;
top: 77px;
bottom: 86px;
}
.dk-game-design .dk-game-design-form{
margin-left: 385px;
}
.dk-game-design-upload{
min-height: 840px;
}
.dk-game-design-upload .dk-game-design-left .upload_change,
.dk-game-design-upload .dk-game-design-left .upload_btn{
position: absolute;
z-index: 3;
bottom: -74px;
left: 50%;
margin-left: -41px;
}
.dk-game-design-upload .dk-game-design-left .upload_change{
bottom: -160px;
}
.dk-game-design-element{
margin: 10px 0;
padding: 15px 5px 0;
border-radius: 4px;
background-color: #fcfcfc;
}
.dk-game-design-element .upload.upload_btn{
margin-bottom: 10px;
}
.dk-store-edit-element {
padding-left: 15px;
padding-right: 15px;
}
.dk-nav-tabs-tools-wrapper .nav{
min-height: 42px;
}
.dk-nav-tabs-tools-wrapper .dk-nav-tabs-tools{
float: right;
margin-top: -38px;
}
.setting-data {
width: 100%
}
.setting-data th, .setting-data td {
height: 200px;;
text-align: center;
border: 1px solid #999;
width: 14%;
font-size: 18px;
}
.setting-data .setting-data-ul {
margin: 5px 0 0 0;
padding: 0;
}
.setting-data .setting-data-ul li {
list-style: none;
font-size: 14px;
}
.setting-data .time-add {
font-size: 14px;
color: #666;
}
.none{display: none;}
This diff could not be displayed because it is too large.

8.29 KB | W: | H:

2.32 KB | W: | H:

vue/admin-vue/src/assets/images/logo.png
vue/admin-vue/src/assets/images/logo.png
vue/admin-vue/src/assets/images/logo.png
vue/admin-vue/src/assets/images/logo.png
  • 2-up
  • Swipe
  • Onion skin
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!