mirror of
https://gitee.com/EMF/solon-manager.git
synced 2025-12-06 08:48:33 +08:00
feat: cms管理端、移动端。可用。
This commit is contained in:
parent
03d9312f54
commit
18cc3dd549
@ -1,6 +1,7 @@
|
||||
package vip.fuck.sm.plugins.cms;
|
||||
|
||||
import com.jfinal.kit.PropKit;
|
||||
import com.jfinal.template.Engine;
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.core.AppContext;
|
||||
import org.noear.solon.core.Plugin;
|
||||
@ -9,6 +10,8 @@ import org.noear.solon.web.staticfiles.StaticConfig;
|
||||
import org.noear.solon.web.staticfiles.StaticMappings;
|
||||
import org.noear.solon.web.staticfiles.repository.ClassPathStaticRepository;
|
||||
import org.noear.solon.web.staticfiles.repository.FileStaticRepository;
|
||||
import vip.fuck.sm.plugins.cms.template.method.CommonMethod;
|
||||
import vip.fuck.sm.plugins.cms.util.RenderManager;
|
||||
|
||||
|
||||
public class CmsPlugin implements Plugin {
|
||||
@ -19,5 +22,10 @@ public class CmsPlugin implements Plugin {
|
||||
context.beanScan(CmsPlugin.class);
|
||||
StaticMappings.add(CommonAttribute.CMS_ADMIN_STAITC_REQ_PATH,
|
||||
new ClassPathStaticRepository(CommonAttribute.CMS_ADMIN_STAITC_CLASSPATH));
|
||||
StaticMappings.add(CommonAttribute.CMS_STAITC_REQ_PATH,
|
||||
new ClassPathStaticRepository(CommonAttribute.CMS_STAITC_CLASSPATH));
|
||||
StaticMappings.add("/cms/templates/",
|
||||
new ClassPathStaticRepository("/templates/cms/templates/"));
|
||||
Engine.use().addSharedStaticMethod(CommonMethod.class);
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@ public final class CommonAttribute {
|
||||
|
||||
/** 后台页面 */
|
||||
public static final String ADMIN_PATH="/cms/admin/view/";
|
||||
public static final String FRONT_PATH="/cms/";
|
||||
|
||||
/** 后台错误页面 */
|
||||
public static final String ADMIN_ERROR_VIEW = ADMIN_PATH+"error/500.html";
|
||||
@ -61,7 +62,9 @@ public final class CommonAttribute {
|
||||
/** JSON时间格式 */
|
||||
public static final String JSON_DATE_PATTERN = "yyyy-MM-dd HH:mm:ss";
|
||||
public static final String CMS_ADMIN_STAITC_REQ_PATH = "/cms/admin/static/";
|
||||
public static final String CMS_STAITC_REQ_PATH = "/cms/static/";
|
||||
public static final String CMS_ADMIN_STAITC_CLASSPATH = "/templates/cms/admin/static/";
|
||||
public static final String CMS_STAITC_CLASSPATH = "/templates/cms/static/";
|
||||
|
||||
/**
|
||||
* 不可实例化
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package vip.fuck.sm.plugins.cms.config;
|
||||
|
||||
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
||||
import com.jfinal.plugin.activerecord.DbKit;
|
||||
import com.jfinal.plugin.activerecord.solon.annotation.Db;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import org.noear.solon.Solon;
|
||||
@ -13,14 +14,16 @@ import javax.sql.DataSource;
|
||||
|
||||
@Configuration
|
||||
public class Configxv {
|
||||
@Bean(value = "cmsDb")
|
||||
@Bean(value = "main")
|
||||
public DataSource ca(@Inject("${cms.jdbc}")
|
||||
HikariDataSource dataSource) {
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Bean
|
||||
public void cx(@Db("cmsDb") ActiveRecordPlugin arp){
|
||||
public void cx(@Db("main") ActiveRecordPlugin arp){
|
||||
|
||||
_MappingKit.mapping(arp);
|
||||
//启用开发或调试模式(可以打印sql)
|
||||
|
||||
@ -53,6 +53,7 @@ public class AdminController extends BaseController {
|
||||
/**
|
||||
* 检查用户名是否存在
|
||||
*/
|
||||
@Mapping("checkUsername")
|
||||
public void checkUsername() {
|
||||
String username = getPara("username");
|
||||
if (StringUtils.isEmpty(username)) {
|
||||
@ -65,6 +66,7 @@ public class AdminController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("add")
|
||||
public void add() {
|
||||
setAttr("roles", new Role().dao().findAll());
|
||||
render(getView("admin/add"));
|
||||
@ -73,6 +75,7 @@ public class AdminController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("save")
|
||||
public void save() {
|
||||
Admin admin = getModel(Admin.class,"",true);
|
||||
if (new Admin().dao().usernameExists(admin.getUsername())) {
|
||||
@ -96,6 +99,7 @@ public class AdminController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
setAttr("admin", new Admin().dao().findById(id));
|
||||
@ -106,6 +110,7 @@ public class AdminController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
Admin admin = getModel(Admin.class,"",true);
|
||||
Admin pAdmin = new Admin().dao().findById(admin.getId());
|
||||
@ -134,6 +139,7 @@ public class AdminController extends BaseController {
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
@Mapping("reset")
|
||||
public void reset(){
|
||||
Integer id = getParaToInt("id");
|
||||
Admin admin = new Admin().dao().findById(id);
|
||||
@ -146,6 +152,7 @@ public class AdminController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -2,22 +2,31 @@ package vip.fuck.sm.plugins.cms.controller.admin;
|
||||
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.db.Session;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.hutool.json.ObjectMapper;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
import org.noear.solon.core.AppContext;
|
||||
import org.noear.solon.core.handle.*;
|
||||
import org.noear.solon.core.util.KeyValues;
|
||||
import org.noear.solon.core.util.MultiMap;
|
||||
import org.noear.solon.data.cache.CacheService;
|
||||
import org.smartboot.http.server.HttpRequest;
|
||||
import vip.fuck.sm.plugins.cms.CommonAttribute;
|
||||
import vip.fuck.sm.plugins.cms.entity.Admin;
|
||||
import vip.fuck.sm.plugins.cms.entity.Role;
|
||||
import vip.fuck.sm.plugins.cms.entity.Site;
|
||||
|
||||
import java.io.File;
|
||||
@ -34,6 +43,11 @@ import java.util.*;
|
||||
*/
|
||||
public class BaseController {
|
||||
|
||||
protected Date getParaToDate(String dn) {
|
||||
String ds = this.getPara(dn);
|
||||
return DateUtil.parse(ds).toJdkDate();
|
||||
}
|
||||
|
||||
protected void renderError(int errorStatus){
|
||||
// todo renderError
|
||||
}
|
||||
@ -117,7 +131,11 @@ public class BaseController {
|
||||
}
|
||||
|
||||
protected Integer getParaToInt(String name){
|
||||
if(Context.current().paramNames().contains(name)){
|
||||
return Context.current().paramAsInt(name);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected Integer getParaToInt(String name,Integer dv){
|
||||
@ -187,9 +205,17 @@ public class BaseController {
|
||||
*/
|
||||
// @NotAction
|
||||
protected Site getCurrentSite() {
|
||||
Site currentSite = Context.current().session(Site.ADMIN_SESSION_SITE,Site.class);
|
||||
return currentSite;
|
||||
Site session = Context.current().session(Site.ADMIN_SESSION_SITE, Site.class);
|
||||
if(session == null){
|
||||
Site aDefault = new Site().dao().findDefault();
|
||||
Context.current().sessionSet(Site.ADMIN_SESSION_SITE, aDefault);
|
||||
return aDefault;
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
@Inject
|
||||
CacheService cacheService;
|
||||
|
||||
/**
|
||||
* 获取当前管理员
|
||||
@ -198,8 +224,12 @@ public class BaseController {
|
||||
*/
|
||||
// @NotAction
|
||||
protected Admin getCurrentAdmin() {
|
||||
Admin currentAdmin = Context.current().session(Admin.SESSION_ADMIN,Admin.class);
|
||||
return currentAdmin;
|
||||
Object session = Context.current().session(Admin.SESSION_ADMIN);
|
||||
if( session instanceof JSONObject){
|
||||
JSONObject ADMIN = (JSONObject) session;
|
||||
return new Admin().dao().findById(ADMIN.get("id"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -209,6 +239,11 @@ public class BaseController {
|
||||
*/
|
||||
// @NotAction
|
||||
public ModelAndView getView(String view){
|
||||
Site currSite = getCurrentSite();
|
||||
if (ObjectUtil.isEmpty(currSite)) {
|
||||
Site currentSite = new Site().dao().findById(1);
|
||||
getSession().sessionSet(Site.ADMIN_SESSION_SITE, currentSite);
|
||||
}
|
||||
return new ModelAndView(CommonAttribute.ADMIN_PATH+view+CommonAttribute.VIEW_EXTENSION);
|
||||
}
|
||||
|
||||
@ -220,9 +255,43 @@ public class BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
public void render(ModelAndView view){
|
||||
|
||||
|
||||
public void render(ModelAndView view,Object... kv){
|
||||
try {
|
||||
if(ObjectUtil.isNotEmpty(kv)){
|
||||
if(kv.length%2 != 0){
|
||||
throw new RuntimeException("设置模型参数失败,应成对");
|
||||
}
|
||||
for (int i = 0; i < kv.length; i++) {
|
||||
if(i%2 == 0 ){
|
||||
Object kk = kv[i];
|
||||
if(kk == null){
|
||||
throw new RuntimeException("设置模型参数失败,键不能空");
|
||||
}
|
||||
if(!(kk instanceof String)){
|
||||
throw new RuntimeException("设置模型参数失败,键必须是字符:"+kk);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Context current = Context.current();
|
||||
SessionState s = getSession();
|
||||
JSONObject session = JSONUtil.createObj();
|
||||
if(ObjectUtil.isNotEmpty(s.sessionKeys())){
|
||||
for (String sessionKey : s.sessionKeys()) {
|
||||
session.set(sessionKey,s.sessionGet(sessionKey));
|
||||
}
|
||||
}
|
||||
view.put("session",session);
|
||||
if(kv!=null){
|
||||
|
||||
for (int i = 0; i < kv.length; i+=2) {
|
||||
String key = Objects.toString(kv[i]);
|
||||
Object val = kv[i+1];
|
||||
view.put(key,val);
|
||||
}
|
||||
}
|
||||
current.render(view);
|
||||
} catch (Throwable e) {
|
||||
throw new RuntimeException(e);
|
||||
@ -238,7 +307,6 @@ public class BaseController {
|
||||
* 设置列表参数
|
||||
*
|
||||
*/
|
||||
// @NotAction
|
||||
protected void setListQuery(){
|
||||
Map<String, List<String>> paraMap = Context.current().paramMap().toValuesMap();
|
||||
String listQuery = "";
|
||||
|
||||
@ -3,11 +3,14 @@ package vip.fuck.sm.plugins.cms.controller.admin;
|
||||
|
||||
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import org.noear.solon.data.cache.CacheService;
|
||||
import vip.fuck.sm.plugins.cms.Feedback;
|
||||
|
||||
import vip.fuck.sm.plugins.cms.util.CacheUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
@ -21,11 +24,15 @@ import java.util.HashMap;
|
||||
@Mapping("/admin/cache")
|
||||
public class CacheController extends BaseController {
|
||||
|
||||
@Inject
|
||||
CacheService cacheService;
|
||||
|
||||
/**
|
||||
* 清除缓存
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
CacheUtils.clearAll();
|
||||
// todo 清除缓存
|
||||
renderJson(Feedback.success(new HashMap<>()));
|
||||
}
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
setAttr("categoryTree", new Category().dao().findTree(null,getCurrentSite().getId()));
|
||||
@ -46,6 +47,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("/add")
|
||||
public void add() {
|
||||
setAttr("categoryTree", new Category().dao().findTree(null,getCurrentSite().getId()));
|
||||
setAttr("models",new Model().dao().findNormalList());
|
||||
@ -55,6 +57,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 检查目录
|
||||
*/
|
||||
@Mapping("/checkCat")
|
||||
public void checkCat(){
|
||||
String cat = getPara("cat");
|
||||
if(StringUtils.isBlank(cat)){
|
||||
@ -78,6 +81,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 内容模型模板
|
||||
*/
|
||||
@Mapping("/modelTemplate")
|
||||
public void modelTemplate(){
|
||||
Integer modelId = getParaToInt("modelId");
|
||||
Model model = new Model().dao().findById(modelId);
|
||||
@ -90,6 +94,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("/save")
|
||||
public void save() {
|
||||
Category category = getModel(Category.class,"",true);
|
||||
String[] chunkValues = getParaValues("chunkValues");
|
||||
@ -118,6 +123,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("/edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
Category category = new Category().dao().findById(id);
|
||||
@ -136,6 +142,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("/update")
|
||||
public void update() {
|
||||
Category category = getModel(Category.class,"",true);
|
||||
String[] chunkValues = getParaValues("chunkValues");
|
||||
@ -162,6 +169,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 修改状态
|
||||
*/
|
||||
@Mapping("/updateStatus")
|
||||
public void updateStatus(){
|
||||
Integer status = BooleanUtils.toInteger(getParaToBoolean("status"));
|
||||
Integer id = getParaToInt("id");
|
||||
@ -177,6 +185,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
@Mapping("/updateSort")
|
||||
public void updateSort(){
|
||||
String sortArray = getPara("sortArray");
|
||||
JSONArray jsonArray = JSONArray.parseArray(sortArray);
|
||||
@ -194,6 +203,7 @@ public class CategoryController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("/delete")
|
||||
public void delete() {
|
||||
Integer id = getParaToInt("id");
|
||||
Category category = new Category().dao().findById(id);
|
||||
|
||||
@ -29,6 +29,7 @@ public class CompanyController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping
|
||||
public void index(){
|
||||
Company company = new Company().dao().findBySiteId(getCurrentSite().getId());
|
||||
setAttr("company", company);
|
||||
@ -38,6 +39,7 @@ public class CompanyController extends BaseController {
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Mapping("/update")
|
||||
public void update(){
|
||||
Company company = getModel(Company.class,"",true);
|
||||
company.update();
|
||||
|
||||
@ -32,6 +32,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping
|
||||
public void index(){
|
||||
setAttr("categoryTree", new Category().dao().findTree(null,getCurrentSite().getId()));
|
||||
render(getView("content/index"));
|
||||
@ -40,6 +41,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@Mapping("/tag")
|
||||
public void tag(){
|
||||
setAttr("tags",new Tag().findAll());
|
||||
render(getView("content/tag"));
|
||||
@ -48,6 +50,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("/add")
|
||||
public void add() {
|
||||
Category category = new Category().dao().findById(getParaToInt("categoryId"));
|
||||
List<ModelField> modelFields = new ModelField().dao().findList(category.getModelId());
|
||||
@ -60,6 +63,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("/save")
|
||||
public void save() {
|
||||
Content content = getModel(Content.class,"",true);
|
||||
String[] chunkValues = getParaValues("chunkValues");
|
||||
@ -116,6 +120,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("/edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
Content content = new Content().dao().findById(id);
|
||||
@ -131,6 +136,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("/update")
|
||||
public void update() {
|
||||
Content content = getModel(Content.class,"",true);
|
||||
String[] chunkValues = getParaValues("chunkValues");
|
||||
@ -185,6 +191,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 修改状态
|
||||
*/
|
||||
@Mapping("/updateStatus")
|
||||
public void updateStatus(){
|
||||
Integer status = BooleanUtils.toInteger(getParaToBoolean("value"));
|
||||
Integer id = getParaToInt("id");
|
||||
@ -198,6 +205,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 修改是否置顶
|
||||
*/
|
||||
@Mapping("/updateIsTop")
|
||||
public void updateIsTop(){
|
||||
Boolean isTop = getParaToBoolean("value");
|
||||
Integer id = getParaToInt("id");
|
||||
@ -211,6 +219,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 修改是否推荐
|
||||
*/
|
||||
@Mapping("/updateIsRecommend")
|
||||
public void updateIsRecommend(){
|
||||
Boolean isRecommend = getParaToBoolean("value");
|
||||
Integer id = getParaToInt("id");
|
||||
@ -224,6 +233,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 修改是否头条
|
||||
*/
|
||||
@Mapping("/updateIsHeadline")
|
||||
public void updateIsHeadline(){
|
||||
Boolean isHeadline = getParaToBoolean("value");
|
||||
Integer id = getParaToInt("id");
|
||||
@ -237,6 +247,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
@Mapping("/updateSort")
|
||||
public void updateSort(){
|
||||
String sortArray = getPara("sortArray");
|
||||
JSONArray jsonArray = JSONArray.parseArray(sortArray);
|
||||
@ -254,6 +265,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
@Mapping("/data")
|
||||
public void data() {
|
||||
setListQuery();
|
||||
String title = getPara("title");
|
||||
@ -271,6 +283,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("/delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -24,6 +24,7 @@ public class DatabaseController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping
|
||||
public void index() {
|
||||
List<String> backups = BackupUtils.getFiles();
|
||||
Collections.reverse(backups);
|
||||
@ -34,6 +35,7 @@ public class DatabaseController extends BaseController {
|
||||
/**
|
||||
* 备份
|
||||
*/
|
||||
@Mapping("/backup")
|
||||
public void backup(){
|
||||
BackupUtils.backup();
|
||||
renderJson(Feedback.success(new HashMap<>()));
|
||||
@ -42,6 +44,7 @@ public class DatabaseController extends BaseController {
|
||||
/**
|
||||
* 还原
|
||||
*/
|
||||
@Mapping("/restore")
|
||||
public void restore(){
|
||||
String name = getPara("name");
|
||||
BackupUtils.restore(name);
|
||||
@ -52,6 +55,7 @@ public class DatabaseController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("/delete")
|
||||
public void delete() {
|
||||
String name = getPara("name");
|
||||
BackupUtils.delete(name);
|
||||
|
||||
@ -26,6 +26,7 @@ public class DivController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping
|
||||
public void index(){
|
||||
setListQuery();
|
||||
Integer pageNumber = getParaToInt("pageNumber");
|
||||
@ -39,6 +40,7 @@ public class DivController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("/add")
|
||||
public void add() {
|
||||
render(getView("div/add"));
|
||||
}
|
||||
@ -46,6 +48,7 @@ public class DivController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("/save")
|
||||
public void save() {
|
||||
Div div = getModel(Div.class,"",true);
|
||||
div.setCreateDate(new Date());
|
||||
@ -59,6 +62,7 @@ public class DivController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("/edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
Div div = new Div().dao().findById(id);
|
||||
@ -69,6 +73,7 @@ public class DivController extends BaseController {
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Mapping("/update")
|
||||
public void update() {
|
||||
Div div = getModel(Div.class,"",true);
|
||||
div.setUpdateDate(new Date());
|
||||
@ -79,6 +84,7 @@ public class DivController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("/delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -32,30 +32,37 @@ public class DivDataController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index(){
|
||||
setListQuery();
|
||||
setAttr("divs", new Div().dao().findAll());
|
||||
render(getView("div_data/index"));
|
||||
render(getView("div_data/index"),"divs", new Div().dao().findAll());
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("/add")
|
||||
public void add(){
|
||||
Integer divId = getParaToInt("divId");
|
||||
Div div = new Div().dao().findById(divId);
|
||||
List<DivField> divFields = new DivField().dao().findList(divId);
|
||||
Div divData = new Div();
|
||||
setAttr("divFields",divFields);
|
||||
setAttr("div", div);
|
||||
setAttr("divId", divId);
|
||||
Record divData = new Record();
|
||||
setAttr("divData", divData);
|
||||
render(getView("div_data/add"));
|
||||
setAttr("divId", divId);
|
||||
render(getView("div_data/add"),
|
||||
"divFields",divFields,
|
||||
"div", div,
|
||||
"divId", divId,
|
||||
"divData", divData
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("/save")
|
||||
public void save(){
|
||||
Integer divId = getParaToInt("divId");
|
||||
Div div = new Div().dao().findById(divId);
|
||||
@ -74,22 +81,26 @@ public class DivDataController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("/edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
Integer divId = getParaToInt("divId");
|
||||
Div div = new Div().dao().findById(divId);
|
||||
List<DivField> divFields = new DivField().dao().findList(divId);
|
||||
Record divData = Db.findById(div.getTableName(), id);
|
||||
setAttr("divFields",divFields);
|
||||
setAttr("div", div);
|
||||
setAttr("divData", divData);
|
||||
setAttr("divId", divId);
|
||||
render(getView("div_data/edit"));
|
||||
|
||||
render(getView("div_data/edit"),
|
||||
"divFields",divFields,
|
||||
"div", div,
|
||||
"divData", divData,
|
||||
"divId", divId
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("/update")
|
||||
public void update() {
|
||||
Integer id = getParaToInt("id");
|
||||
Integer divId = getParaToInt("divId");
|
||||
@ -109,6 +120,7 @@ public class DivDataController extends BaseController {
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
@Mapping("/data")
|
||||
public void data() {
|
||||
setListQuery();
|
||||
Integer divId = getParaToInt("divId");
|
||||
@ -118,17 +130,23 @@ public class DivDataController extends BaseController {
|
||||
}
|
||||
Div div = new Div().dao().findById(divId);
|
||||
List<DivField> divFields = new DivField().dao().findList(divId);
|
||||
setAttr("divFields", divFields);
|
||||
// setAttr("divFields", divFields);
|
||||
String orderBySql = DbUtils.getOrderBySql("createDate desc");
|
||||
Page<Record> page = Db.paginate(pageNumber, PAGE_SIZE, "select *", "from "+div.getTableName()+" where 1=1 "+orderBySql);
|
||||
setAttr("page", page);
|
||||
setAttr("divId", divId);
|
||||
render(getView("div_data/data"));
|
||||
// setAttr("page", page);
|
||||
// setAttr("divId", divId);
|
||||
render(getView("div_data/data"),
|
||||
"divFields", divFields,
|
||||
"page", page,
|
||||
"divData",new Div(),
|
||||
"divId", divId
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("/delete")
|
||||
public void delete() {
|
||||
Integer divId = getParaToInt("divId");
|
||||
Div div = new Div().dao().findById(divId);
|
||||
|
||||
@ -19,6 +19,7 @@ public class ErrorController extends BaseController {
|
||||
/**
|
||||
* 权限错误
|
||||
*/
|
||||
@Mapping("/unauthorized")
|
||||
public void unauthorized() {
|
||||
render(CommonAttribute.ADMIN_UNAUTHORIZED_VIEW);
|
||||
}
|
||||
@ -26,6 +27,7 @@ public class ErrorController extends BaseController {
|
||||
/**
|
||||
* 异常
|
||||
*/
|
||||
@Mapping("/exception")
|
||||
public void exception() {
|
||||
render(CommonAttribute.ADMIN_ERROR_VIEW);
|
||||
}
|
||||
|
||||
@ -39,6 +39,7 @@ public class FileController extends BaseController {
|
||||
/**
|
||||
* 上传
|
||||
*/
|
||||
@Mapping("/upload")
|
||||
public void upload() {
|
||||
UploadedFile uploadFile = getFile();
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
|
||||
@ -27,6 +27,7 @@ public class FriendLinkController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
String name = getPara("name");
|
||||
@ -44,6 +45,7 @@ public class FriendLinkController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("/add")
|
||||
public void add() {
|
||||
setAttr("gids", new FriendLink().dao().findGids(getCurrentSite().getId()));
|
||||
render(getView("friend_link/add"));
|
||||
@ -52,6 +54,7 @@ public class FriendLinkController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("/save")
|
||||
public void save() {
|
||||
FriendLink friendLink = getModel(FriendLink.class,"",true);
|
||||
if(friendLink.getGid()==null){
|
||||
@ -72,6 +75,7 @@ public class FriendLinkController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("/edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
setAttr("friendLink", new FriendLink().dao().findById(id));
|
||||
@ -82,6 +86,7 @@ public class FriendLinkController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("/update")
|
||||
public void update() {
|
||||
FriendLink friendLink = getModel(FriendLink.class,"",true);
|
||||
friendLink.setUpdateDate(new Date());
|
||||
@ -92,6 +97,7 @@ public class FriendLinkController extends BaseController {
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
@Mapping("/updateSort")
|
||||
public void updateSort(){
|
||||
String sortArray = getPara("sortArray");
|
||||
JSONArray jsonArray = JSONArray.parseArray(sortArray);
|
||||
@ -109,6 +115,7 @@ public class FriendLinkController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("/delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -26,6 +26,7 @@ public class GuestbookController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
String name = getPara("name");
|
||||
@ -41,6 +42,7 @@ public class GuestbookController extends BaseController {
|
||||
/**
|
||||
* 回复
|
||||
*/
|
||||
@Mapping("/reply")
|
||||
public void reply(){
|
||||
Integer guestbookId = getParaToInt("guestbookId");
|
||||
Guestbook guestbook = new Guestbook().dao().findById(guestbookId);
|
||||
@ -51,6 +53,7 @@ public class GuestbookController extends BaseController {
|
||||
/**
|
||||
* 修改回复
|
||||
*/
|
||||
@Mapping("/updateReply")
|
||||
public void updateReply(){
|
||||
String replyContent = getPara("replyContent");
|
||||
Integer guestbookId = getParaToInt("guestbookId");
|
||||
@ -63,6 +66,7 @@ public class GuestbookController extends BaseController {
|
||||
/**
|
||||
* 修改状态
|
||||
*/
|
||||
@Mapping("/updateStatus")
|
||||
public void updateStatus(){
|
||||
Integer status = BooleanUtils.toInteger(getParaToBoolean("status"));
|
||||
Integer id = getParaToInt("id");
|
||||
@ -77,6 +81,7 @@ public class GuestbookController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("/delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -34,6 +34,7 @@ public class HtmlController extends BaseController {
|
||||
/**
|
||||
* 生成静态
|
||||
*/
|
||||
@Mapping()
|
||||
public void index(){
|
||||
setAttr("defaultStartDate", DateUtils.addDays(new Date(), -7));
|
||||
setAttr("defaultEndDate", new Date());
|
||||
@ -44,6 +45,7 @@ public class HtmlController extends BaseController {
|
||||
/**
|
||||
* 生成静态
|
||||
*/
|
||||
@Mapping("generate")
|
||||
public void generate() {
|
||||
Config config = SystemUtils.getConfig();
|
||||
if(config.getSiteModel()!= Config.SiteModel.HTML.ordinal()){
|
||||
@ -113,9 +115,7 @@ public class HtmlController extends BaseController {
|
||||
renderJson(Feedback.success(data));
|
||||
}
|
||||
|
||||
protected Date getParaToDate(String dn) {
|
||||
String ds = this.getPara(dn);
|
||||
return DateUtil.parse(ds).toJdkDate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -6,6 +6,12 @@
|
||||
package vip.fuck.sm.plugins.cms.controller.admin;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.jfinal.plugin.activerecord.Model;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Get;
|
||||
@ -13,9 +19,16 @@ import org.noear.solon.annotation.Mapping;
|
||||
import org.noear.solon.annotation.Param;
|
||||
import vip.fuck.sm.plugins.cms.Feedback;
|
||||
import vip.fuck.sm.plugins.cms.entity.Admin;
|
||||
import vip.fuck.sm.plugins.cms.entity.Role;
|
||||
import vip.fuck.sm.plugins.cms.entity.base.BaseModel;
|
||||
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Controller - 管理员登录
|
||||
@ -56,9 +69,46 @@ public class LoginController extends BaseController {
|
||||
renderJson(Feedback.error("用户名密码错误!"));
|
||||
return;
|
||||
}
|
||||
getSession().sessionSet(Admin.SESSION_ADMIN, admin);
|
||||
Set<Class<?>> models = new HashSet<>();
|
||||
JSONObject a = toJSONObject(admin,models);
|
||||
getSession().sessionSet(Admin.SESSION_ADMIN, a);
|
||||
renderJson(Feedback.success(new HashMap<>()));
|
||||
}
|
||||
|
||||
public static JSONObject toJSONObject( Model m,Set<Class<?>> models){
|
||||
JSONObject json = JSONUtil.createObj();
|
||||
if(ObjectUtil.isNotNull(json) && ObjectUtil.isNotNull(m)){
|
||||
if(models.contains(m.getClass())){
|
||||
return json;
|
||||
}else{
|
||||
models.add(m.getClass());
|
||||
}
|
||||
for (String pn : m._getAttrNames()) {
|
||||
json.set(pn,m.get(pn));
|
||||
}
|
||||
Field[] fs = ReflectUtil.getFields(m.getClass());
|
||||
Method[] ms = ReflectUtil.getMethods(m.getClass());
|
||||
for (Field f : fs) {
|
||||
Object value = ReflectUtil.getFieldValue(m, f);
|
||||
if(value instanceof Model){
|
||||
value = toJSONObject((Model) value,models);
|
||||
}
|
||||
json.set(f.getName(),value);
|
||||
}
|
||||
for (Method f : ms) {
|
||||
if(f.getName().startsWith("get") && f.getReturnType() != Void.class && f.getParameterTypes().length ==0 ){
|
||||
System.out.println(m.getClass().getName()+"."+ f.getName()+"();");
|
||||
Object value = ReflectUtil.invoke(m, f);
|
||||
if(value instanceof Model){
|
||||
value = toJSONObject((Model) value,models);
|
||||
}
|
||||
String mk = StrUtil.lowerFirst(StrUtil.removePrefix(f.getName(),"get"));
|
||||
json.set(mk,value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -20,6 +20,7 @@ public class LogoutController extends BaseController{
|
||||
/**
|
||||
* 退出
|
||||
*/
|
||||
@Mapping()
|
||||
public void index(){
|
||||
getSession().sessionRemove(Admin.SESSION_ADMIN);
|
||||
getSession().sessionRemove(Site.ADMIN_SESSION_SITE);
|
||||
|
||||
@ -26,6 +26,7 @@ public class MenuController extends BaseController{
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
setAttr("menuTree", new Menu().dao().findTree());
|
||||
@ -36,6 +37,7 @@ public class MenuController extends BaseController{
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("add")
|
||||
public void add() {
|
||||
setAttr("menuTree", new Menu().dao().findTree());
|
||||
render(getView("menu/add"));
|
||||
@ -45,6 +47,7 @@ public class MenuController extends BaseController{
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("save")
|
||||
public void save() {
|
||||
Menu menu = getModel(Menu.class,"",true);
|
||||
if(menu.getIsShow()==null){
|
||||
@ -60,6 +63,7 @@ public class MenuController extends BaseController{
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
Long id = getParaToLong("id");
|
||||
Menu menu = new Menu().dao().findById(id);
|
||||
@ -71,6 +75,7 @@ public class MenuController extends BaseController{
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
Menu menu = getModel(Menu.class,"",true);
|
||||
if(menu.getIsShow()==null){
|
||||
@ -85,6 +90,7 @@ public class MenuController extends BaseController{
|
||||
/**
|
||||
* 修改是否显示
|
||||
*/
|
||||
@Mapping("updateIsShow")
|
||||
public void updateIsShow(){
|
||||
Boolean isShow = getParaToBoolean("value");
|
||||
Integer id = getParaToInt("id");
|
||||
@ -98,6 +104,7 @@ public class MenuController extends BaseController{
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
@Mapping("updateSort")
|
||||
public void updateSort(){
|
||||
String sortArray = getPara("sortArray");
|
||||
JSONArray jsonArray = JSONArray.parseArray(sortArray);
|
||||
@ -115,6 +122,7 @@ public class MenuController extends BaseController{
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
Long id = getParaToLong("id");
|
||||
Menu menu = new Menu().dao().findById(id);
|
||||
|
||||
@ -31,6 +31,7 @@ public class ModelController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping
|
||||
public void index() {
|
||||
setListQuery();
|
||||
String name = getPara("name");
|
||||
@ -46,6 +47,7 @@ public class ModelController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("/add")
|
||||
public void add() {
|
||||
render(getView("model/add"));
|
||||
}
|
||||
@ -53,6 +55,7 @@ public class ModelController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("/save")
|
||||
public void save() {
|
||||
Model model = getModel(Model.class,"",true);
|
||||
model.setCreateDate(new Date());
|
||||
@ -64,6 +67,7 @@ public class ModelController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("/edit")
|
||||
public void edit() {
|
||||
Long id = getParaToLong("id");
|
||||
setAttr("model", new Model().dao().findById(id));
|
||||
@ -73,6 +77,7 @@ public class ModelController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("/update")
|
||||
public void update() {
|
||||
Model model = getModel(Model.class,"",true);
|
||||
model.setUpdateDate(new Date());
|
||||
@ -83,6 +88,7 @@ public class ModelController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("/delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -32,6 +32,7 @@ public class NavController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
setAttr("navTree", new Nav().dao().findTree(getCurrentSite().getId()));
|
||||
@ -41,6 +42,7 @@ public class NavController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("add")
|
||||
public void add() {
|
||||
setAttr("navTree", new Nav().dao().findTree(getCurrentSite().getId()));
|
||||
render(getView("nav/add"));
|
||||
@ -49,6 +51,7 @@ public class NavController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("save")
|
||||
public void save() {
|
||||
Nav nav = getModel(Nav.class,"",true);
|
||||
nav.setSiteId(getCurrentSite().getId());
|
||||
@ -62,6 +65,7 @@ public class NavController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
Nav nav = new Nav().dao().findById(id);
|
||||
@ -73,6 +77,7 @@ public class NavController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
Nav nav = getModel(Nav.class,"",true);
|
||||
nav.setValue();
|
||||
@ -84,6 +89,7 @@ public class NavController extends BaseController {
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
@Mapping("updateSort")
|
||||
public void updateSort(){
|
||||
String sortArray = getPara("sortArray");
|
||||
JSONArray jsonArray = JSONArray.parseArray(sortArray);
|
||||
@ -101,6 +107,7 @@ public class NavController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
Integer id = getParaToInt("id");
|
||||
Nav nav = new Nav().dao().findById(id);
|
||||
|
||||
@ -27,6 +27,7 @@ public class ProfileController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
setAttr("admin", new Admin().dao().findById(getCurrentAdmin().getId()));
|
||||
render(getView("profile/edit"));
|
||||
@ -35,6 +36,7 @@ public class ProfileController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
String currentPassword = getPara("currentPassword");
|
||||
String password = getPara("password");
|
||||
|
||||
@ -29,6 +29,7 @@ public class RoleController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
Integer pageNumber = getParaToInt("pageNumber");
|
||||
@ -42,6 +43,7 @@ public class RoleController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("add")
|
||||
public void add() {
|
||||
setAttr("sites", new Site().dao().findAll());
|
||||
setAttr("rootMenus", new Menu().dao().findRoots());
|
||||
@ -51,6 +53,7 @@ public class RoleController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("save")
|
||||
public void save() {
|
||||
Role role = getModel(Role.class,"",true);
|
||||
String[] permissions = getParaValues("permissions");
|
||||
@ -75,6 +78,7 @@ public class RoleController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
Long id = getParaToLong("id");
|
||||
setAttr("role", new Role().dao().findById(id));
|
||||
@ -88,6 +92,7 @@ public class RoleController extends BaseController {
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
Role role = getModel(Role.class,"",true);
|
||||
String[] permissions = getParaValues("permissions");
|
||||
@ -112,6 +117,7 @@ public class RoleController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
Long ids[] = getParaValuesToLong("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -8,6 +8,7 @@ package vip.fuck.sm.plugins.cms.controller.admin;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Get;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.Config;
|
||||
import vip.fuck.sm.plugins.cms.Feedback;
|
||||
@ -34,6 +35,8 @@ public class SetupController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Get
|
||||
@Mapping()
|
||||
public void index(){
|
||||
Config config = SystemUtils.getConfig();
|
||||
setAttr("config", config);
|
||||
@ -43,6 +46,7 @@ public class SetupController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update(){
|
||||
Map<String,String> setupMap = new Setup().getSetupMap();
|
||||
Set<String> keys = setupMap.keySet();
|
||||
|
||||
@ -30,6 +30,7 @@ public class SiteController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
Integer pageNumber = getParaToInt("pageNumber");
|
||||
@ -43,6 +44,7 @@ public class SiteController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("add")
|
||||
public void add() {
|
||||
setAttr("templates", TemplateUtils.getTemplates());
|
||||
render(getView("site/add"));
|
||||
@ -51,6 +53,7 @@ public class SiteController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("save")
|
||||
public void save() {
|
||||
Site site = getModel(Site.class,"",true);
|
||||
if(StringUtils.isBlank(site.getPcTemplate())){
|
||||
@ -76,6 +79,7 @@ public class SiteController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
Long id = getParaToLong("id");
|
||||
setAttr("site", new Site().dao().findById(id));
|
||||
@ -86,6 +90,7 @@ public class SiteController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
Site site = getModel(Site.class,"",true);
|
||||
site.setUpdateDate(new Date());
|
||||
@ -96,6 +101,7 @@ public class SiteController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
@ -111,6 +117,7 @@ public class SiteController extends BaseController {
|
||||
/**
|
||||
* 设置为默认站点
|
||||
*/
|
||||
@Mapping("setDefault")
|
||||
public void setDefault(){
|
||||
Long id = getParaToLong("id");
|
||||
Site defaultSite = new Site().dao().findDefault();
|
||||
|
||||
@ -27,6 +27,7 @@ public class SlideController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index(){
|
||||
setListQuery();
|
||||
Integer pageNumber = getParaToInt("pageNumber");
|
||||
@ -42,6 +43,7 @@ public class SlideController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("add")
|
||||
public void add() {
|
||||
setAttr("gids", new Slide().dao().findGids(getCurrentSite().getId()));
|
||||
render(getView("slide/add"));
|
||||
@ -50,6 +52,7 @@ public class SlideController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("save")
|
||||
public void save() {
|
||||
Slide slide = getModel(Slide.class,"",true);
|
||||
if(slide.getGid()==null){
|
||||
@ -70,6 +73,7 @@ public class SlideController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
setAttr("slide", new Slide().dao().findById(id));
|
||||
@ -80,6 +84,7 @@ public class SlideController extends BaseController {
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
Slide slide = getModel(Slide.class,"",true);
|
||||
slide.setUpdateDate(new Date());
|
||||
@ -90,6 +95,7 @@ public class SlideController extends BaseController {
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
@Mapping("updateSort")
|
||||
public void updateSort(){
|
||||
String sortArray = getPara("sortArray");
|
||||
JSONArray jsonArray = JSONArray.parseArray(sortArray);
|
||||
@ -107,6 +113,7 @@ public class SlideController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
Long ids[] = getParaValuesToLong("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -25,6 +25,7 @@ public class TagController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
String name = getPara("name");
|
||||
@ -41,6 +42,7 @@ public class TagController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("add")
|
||||
public void add() {
|
||||
render(getView("tag/add"));
|
||||
}
|
||||
@ -48,6 +50,7 @@ public class TagController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("save")
|
||||
public void save() {
|
||||
Tag tag = getModel(Tag.class,"",true);
|
||||
tag.setSiteId(getCurrentSite().getId());
|
||||
@ -60,6 +63,7 @@ public class TagController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
setAttr("tag", new Tag().dao().findById(id));
|
||||
@ -69,6 +73,7 @@ public class TagController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
Tag tag = getModel(Tag.class,"",true);
|
||||
tag.setUpdateDate(new Date());
|
||||
@ -79,6 +84,7 @@ public class TagController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -31,6 +31,7 @@ public class TemplateController extends BaseController {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
String directory = getPara("directory");
|
||||
@ -46,6 +47,7 @@ public class TemplateController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("add")
|
||||
public void add() {
|
||||
String directory = getPara("directory");
|
||||
setAttr("directory", directory);
|
||||
@ -55,6 +57,7 @@ public class TemplateController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("save")
|
||||
public void save() {
|
||||
String fileName = getPara("fileName");
|
||||
String content = getPara("content");
|
||||
@ -77,6 +80,7 @@ public class TemplateController extends BaseController {
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
@Mapping("view")
|
||||
public void view() {
|
||||
String fileName = getPara("fileName");
|
||||
String directory = getPara("directory");
|
||||
@ -96,6 +100,7 @@ public class TemplateController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
String fileName = getPara("fileName");
|
||||
String directory = getPara("directory");
|
||||
@ -118,6 +123,7 @@ public class TemplateController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
String fileName = getPara("fileName");
|
||||
String directory = getPara("directory");
|
||||
@ -139,6 +145,7 @@ public class TemplateController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
String fileName = getPara("fileName");
|
||||
String directory = getPara("directory");
|
||||
|
||||
@ -29,6 +29,7 @@ public class WebController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping
|
||||
public void index(){
|
||||
Web web = new Web().dao().findBySiteId(getCurrentSite().getId());
|
||||
setAttr("web", web);
|
||||
@ -38,6 +39,7 @@ public class WebController extends BaseController {
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update(){
|
||||
Web web = getModel(Web.class,"",true);
|
||||
web.update();
|
||||
|
||||
@ -25,6 +25,7 @@ public class WechatMenuController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
List<WechatMenu> wechatMenus = new WechatMenu().dao().findRoots();
|
||||
setAttr("wechatMenus", wechatMenus);
|
||||
@ -34,6 +35,7 @@ public class WechatMenuController extends BaseController {
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
String data = getPara("data");
|
||||
JSONArray jsonArray = JSONArray.parseArray(data);
|
||||
@ -95,7 +97,7 @@ public class WechatMenuController extends BaseController {
|
||||
renderJson(Feedback.success(new HashMap<>()));
|
||||
}
|
||||
|
||||
// todo @NotAction
|
||||
|
||||
public WechatMenu updateData(JSONObject jsonObject,Integer parentId){
|
||||
Long id = jsonObject.getLong("id");
|
||||
String name = jsonObject.getString("name");
|
||||
|
||||
@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.Feedback;
|
||||
import vip.fuck.sm.plugins.cms.controller.admin.BaseController;
|
||||
@ -24,12 +25,14 @@ import java.util.List;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@Mapping("/admin/div/div_field")
|
||||
public class DivFieldController extends BaseController {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
setListQuery();
|
||||
Integer divId = getParaToInt("divId");
|
||||
@ -42,6 +45,7 @@ public class DivFieldController extends BaseController {
|
||||
/**
|
||||
* 检查名称是否存在
|
||||
*/
|
||||
@Mapping("checkName")
|
||||
public void checkName() {
|
||||
Integer divId = getParaToInt("divId");
|
||||
String name = getPara("name");
|
||||
@ -56,6 +60,7 @@ public class DivFieldController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("add")
|
||||
public void add() {
|
||||
Integer divId = getParaToInt("divId");
|
||||
setAttr("div", new Div().dao().findById(divId));
|
||||
@ -68,6 +73,7 @@ public class DivFieldController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("save")
|
||||
public void save() {
|
||||
DivField divField = getModel(DivField.class,"",true);
|
||||
divField.setCreateDate(new Date());
|
||||
@ -83,6 +89,7 @@ public class DivFieldController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
setAttr("divField", new DivField().dao().findById(id));
|
||||
@ -92,6 +99,7 @@ public class DivFieldController extends BaseController {
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Mapping("update")
|
||||
public void update() {
|
||||
DivField divField = getModel(DivField.class,"",true);
|
||||
divField.setUpdateDate(new Date());
|
||||
@ -102,6 +110,7 @@ public class DivFieldController extends BaseController {
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
@Mapping("updateSort")
|
||||
public void updateSort(){
|
||||
String sortArray = getPara("sortArray");
|
||||
JSONArray jsonArray = JSONArray.parseArray(sortArray);
|
||||
@ -119,6 +128,7 @@ public class DivFieldController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.Feedback;
|
||||
import vip.fuck.sm.plugins.cms.controller.admin.BaseController;
|
||||
@ -25,11 +26,13 @@ import java.util.List;
|
||||
*
|
||||
*/
|
||||
@Mapping("/admin/model/model_field")
|
||||
@Controller
|
||||
public class ModelFieldController extends BaseController {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@Mapping
|
||||
public void index() {
|
||||
setListQuery();
|
||||
Integer modelId = getParaToInt("modelId");
|
||||
@ -42,6 +45,7 @@ public class ModelFieldController extends BaseController {
|
||||
/**
|
||||
* 检查名称是否存在
|
||||
*/
|
||||
@Mapping("/checkName")
|
||||
public void checkName() {
|
||||
Integer modelId = getParaToInt("modelId");
|
||||
String name = getPara("name");
|
||||
@ -56,6 +60,7 @@ public class ModelFieldController extends BaseController {
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@Mapping("/add")
|
||||
public void add() {
|
||||
Integer modelId = getParaToInt("modelId");
|
||||
setAttr("model", new Model().dao().findById(modelId));
|
||||
@ -65,6 +70,7 @@ public class ModelFieldController extends BaseController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("/save")
|
||||
public void save() {
|
||||
ModelField modelField = getModel(ModelField.class,"",true);
|
||||
modelField.setCreateDate(new Date());
|
||||
@ -77,6 +83,7 @@ public class ModelFieldController extends BaseController {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@Mapping("/edit")
|
||||
public void edit() {
|
||||
Integer id = getParaToInt("id");
|
||||
setAttr("modelField", new ModelField().dao().findById(id));
|
||||
@ -86,6 +93,7 @@ public class ModelFieldController extends BaseController {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@Mapping("/update")
|
||||
public void update() {
|
||||
ModelField modelField = getModel(ModelField.class,"",true);
|
||||
modelField.setUpdateDate(new Date());
|
||||
@ -96,6 +104,7 @@ public class ModelFieldController extends BaseController {
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
@Mapping("/updateSort")
|
||||
public void updateSort(){
|
||||
String sortArray = getPara("sortArray");
|
||||
JSONArray jsonArray = JSONArray.parseArray(sortArray);
|
||||
@ -113,6 +122,7 @@ public class ModelFieldController extends BaseController {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Mapping("/delete")
|
||||
public void delete() {
|
||||
Integer ids[] = getParaValuesToInt("ids");
|
||||
if(ArrayUtils.isNotEmpty(ids)){
|
||||
|
||||
@ -4,16 +4,18 @@ import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.controller.admin.BaseController;
|
||||
|
||||
|
||||
@Controller
|
||||
@Mapping("/common/captcha")
|
||||
public class CaptchaController extends BaseController {
|
||||
|
||||
@Mapping("image")
|
||||
public void image(){
|
||||
renderCaptcha();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Mapping("check")
|
||||
public void check(){
|
||||
renderJson(validateCaptcha("captcha"));
|
||||
}
|
||||
|
||||
@ -2,15 +2,18 @@ package vip.fuck.sm.plugins.cms.controller.common;
|
||||
|
||||
|
||||
import com.jfinal.kit.PathKit;
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.controller.admin.BaseController;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@Controller
|
||||
@Mapping("/common/down")
|
||||
public class DownController extends BaseController {
|
||||
|
||||
@Mapping("file")
|
||||
public void file(){
|
||||
String fileKey = getPara("fileKey");
|
||||
renderFile(new File(PathKit.getWebRootPath()+fileKey));
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
|
||||
|
||||
@ -10,13 +11,15 @@ import org.noear.solon.annotation.Mapping;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Mapping("/ajax")
|
||||
@Controller
|
||||
@Mapping("/cms/ajax")
|
||||
public class AjaxController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* HTML
|
||||
*/
|
||||
@Mapping("/html")
|
||||
public void html(){
|
||||
keepPara();
|
||||
String html = getPara("html");
|
||||
|
||||
@ -2,10 +2,17 @@ package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.noear.solon.core.handle.Context;
|
||||
import org.noear.solon.core.handle.ModelAndView;
|
||||
import vip.fuck.sm.plugins.cms.CommonAttribute;
|
||||
import vip.fuck.sm.plugins.cms.entity.Company;
|
||||
import vip.fuck.sm.plugins.cms.entity.Site;
|
||||
import vip.fuck.sm.plugins.cms.entity.Web;
|
||||
import vip.fuck.sm.plugins.cms.util.DeviceUtils;
|
||||
import vip.fuck.sm.plugins.cms.util.JFinal;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
@ -26,16 +33,44 @@ public class BaseController extends vip.fuck.sm.plugins.cms.controller.admin.Ba
|
||||
|
||||
|
||||
|
||||
public void render(String view){
|
||||
try {
|
||||
Context.current().renderAndReturn(getView(view));
|
||||
} catch (Throwable e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public ModelAndView getView(String view){
|
||||
Site currSite = getCurrentSite();
|
||||
if (ObjectUtil.isEmpty(currSite)) {
|
||||
Site currentSite = new Site().dao().findById(1);
|
||||
getSession().sessionSet(Site.ADMIN_SESSION_SITE, currentSite);
|
||||
}
|
||||
String pcTemplate = currSite.getPcTemplate();
|
||||
String mobileTemplate = currSite.getMobileTemplate();
|
||||
if(ObjectUtil.isEmpty(pcTemplate)){
|
||||
currSite.setPcTemplate("");
|
||||
}
|
||||
if(ObjectUtil.isEmpty(mobileTemplate)){
|
||||
currSite.setMobileTemplate("");
|
||||
}
|
||||
ModelAndView modelAndView = new ModelAndView(CommonAttribute.FRONT_PATH + view + CommonAttribute.VIEW_EXTENSION);
|
||||
modelAndView.put("base", JFinal.getContextPath());
|
||||
modelAndView.put("currentSite",currSite);
|
||||
modelAndView.put("currentCategory", JSONUtil.createObj());
|
||||
modelAndView.put(Web.CURRENT_WEB, new Web().dao().findBySiteId(currSite.getId()));
|
||||
modelAndView.put(Company.CURRENT_COMPANY, new Company().dao().findBySiteId(currSite.getId()));
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前站点
|
||||
*
|
||||
* @return 当前站点
|
||||
*/
|
||||
// @NotAction
|
||||
protected Site getCurrentSite() {
|
||||
Site currentSite = getAttr(Site.CURRENT_SITE,Site.class);
|
||||
return currentSite;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前模板
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.entity.Category;
|
||||
import vip.fuck.sm.plugins.cms.entity.Model;
|
||||
@ -12,12 +13,14 @@ import vip.fuck.sm.plugins.cms.entity.Model;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Mapping("/category")
|
||||
@Controller
|
||||
@Mapping("/cms/category")
|
||||
public class CategoryController extends BaseController {
|
||||
|
||||
/**
|
||||
* 栏目
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
Integer id = getParaToInt("id");
|
||||
Category category = new Category().dao().findById(id);
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.entity.Category;
|
||||
import vip.fuck.sm.plugins.cms.entity.Content;
|
||||
@ -17,12 +18,14 @@ import vip.fuck.sm.plugins.cms.entity.Content;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Mapping("/content")
|
||||
@Controller
|
||||
@Mapping("/cms/content")
|
||||
public class ContentController extends BaseController {
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
Integer id = getParaToInt("id");
|
||||
Content content = new Content().dao().findById(id);
|
||||
@ -35,6 +38,7 @@ public class ContentController extends BaseController {
|
||||
/**
|
||||
* 点击数
|
||||
*/
|
||||
@Mapping("visits")
|
||||
public void visits() {
|
||||
Integer id = getParaToInt("id");
|
||||
if (id == null) {
|
||||
|
||||
@ -4,6 +4,7 @@ package vip.fuck.sm.plugins.cms.controller.front;
|
||||
import com.jfinal.plugin.activerecord.Db;
|
||||
import com.jfinal.plugin.activerecord.Page;
|
||||
import com.jfinal.plugin.activerecord.Record;
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.Config;
|
||||
import vip.fuck.sm.plugins.cms.entity.Div;
|
||||
@ -16,9 +17,11 @@ import vip.fuck.sm.plugins.cms.util.SystemUtils;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Mapping("/api/dev/data")
|
||||
@Controller
|
||||
@Mapping("/api/cms/dev/data")
|
||||
public class DevOpenController extends BaseController{
|
||||
|
||||
@Mapping("/listByDivId")
|
||||
public void listByDivId(){
|
||||
setListQuery();
|
||||
Integer divId = getParaToInt("divId");
|
||||
@ -114,7 +117,7 @@ public class DevOpenController extends BaseController{
|
||||
renderJson(rel );
|
||||
}
|
||||
|
||||
// @NotAction todo
|
||||
|
||||
private void joinImageDomain(Record record ,List<DivField> divFields){
|
||||
if(record==null || divFields==null){
|
||||
return;
|
||||
@ -133,23 +136,24 @@ public class DevOpenController extends BaseController{
|
||||
if(v.startsWith("/static/")){
|
||||
record.set(columnName,config.getDomain()+v);
|
||||
}else{
|
||||
record.set(columnName,config.getDomain()+"/static/images/nopic.jpg");
|
||||
record.set(columnName,config.getDomain()+"/cms/static/images/nopic.jpg");
|
||||
}
|
||||
} else if (isRichText) {
|
||||
String s = HtmlUtils.replaceHtmlTag(v,"img","src",
|
||||
"src=\""+config.getDomain(),
|
||||
"\" onerror=\"javascript:this.src='"+config.getDomain()+"/static/images/nopic.jpg';\"");
|
||||
"\" onerror=\"javascript:this.src='"+config.getDomain()+"/cms/static/images/nopic.jpg';\"");
|
||||
record.set(columnName,s);
|
||||
}
|
||||
}else if(o ==null ||Objects.equals("",o)){
|
||||
if(isUploadImg){
|
||||
record.set(columnName,config.getDomain()+"/static/images/nopic.jpg");
|
||||
record.set(columnName,config.getDomain()+"/cms/static/images/nopic.jpg");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Mapping("/getByDivIdAndId")
|
||||
public void getByDivIdAndId(){
|
||||
Integer id = getParaToInt("id");
|
||||
Integer divId = getParaToInt("divId");
|
||||
|
||||
@ -3,6 +3,7 @@ package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
import com.jfinal.plugin.activerecord.Db;
|
||||
import com.jfinal.plugin.activerecord.Record;
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.Feedback;
|
||||
import vip.fuck.sm.plugins.cms.entity.Div;
|
||||
@ -19,13 +20,15 @@ import java.util.List;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Mapping("/div")
|
||||
@Controller
|
||||
@Mapping("/cms/div")
|
||||
public class DivController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@Mapping("/save")
|
||||
public void save(){
|
||||
Integer id = getParaToInt("id");
|
||||
Div div = new Div().dao().findById(id);
|
||||
|
||||
@ -2,6 +2,7 @@ package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
|
||||
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.Feedback;
|
||||
import vip.fuck.sm.plugins.cms.entity.Guestbook;
|
||||
@ -17,13 +18,20 @@ import java.util.HashMap;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Mapping("/guestbook")
|
||||
@Controller
|
||||
@Mapping("/cms/guestbook")
|
||||
public class GuestbookController extends BaseController {
|
||||
|
||||
@Mapping()
|
||||
public void index() {
|
||||
render(getView("/templates/"+getCurrentTemplate()+"/guestbook"));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 留言
|
||||
*/
|
||||
@Mapping("/save")
|
||||
public void save(){
|
||||
if(!validateCaptcha("captcha")){
|
||||
renderJson(Feedback.error("验证码错误!"));
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import org.noear.solon.annotation.Path;
|
||||
import org.noear.solon.core.handle.ModelAndView;
|
||||
|
||||
|
||||
/**
|
||||
@ -10,16 +13,24 @@ import org.noear.solon.annotation.Mapping;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Mapping("/")
|
||||
@Controller
|
||||
@Mapping("/cms/")
|
||||
public class IndexController extends BaseController {
|
||||
|
||||
/**
|
||||
* 首页
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
render("/templates/"+getCurrentTemplate()+"/index.shtm");
|
||||
render(getView("/templates/"+getCurrentTemplate()+"/index"));
|
||||
}
|
||||
|
||||
@Mapping("/{pn}")
|
||||
public void about(@Path("pn") String pn) {
|
||||
render(getView("/templates/"+getCurrentTemplate()+"/"+pn));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
|
||||
|
||||
@ -10,13 +11,15 @@ import org.noear.solon.annotation.Mapping;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Mapping("/page")
|
||||
@Controller
|
||||
@Mapping("/cms/page")
|
||||
public class PageController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 页面
|
||||
*/
|
||||
@Mapping()
|
||||
public void index(){
|
||||
keepPara();
|
||||
String html = getPara(0);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
|
||||
|
||||
@ -10,13 +11,15 @@ import org.noear.solon.annotation.Mapping;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Mapping("/search")
|
||||
@Controller
|
||||
@Mapping("/cms/search")
|
||||
public class SearchController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
String keyword = getPara("keyword");
|
||||
Integer pageNumber = getParaToInt("pageNumber");
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package vip.fuck.sm.plugins.cms.controller.front;
|
||||
|
||||
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Mapping;
|
||||
import vip.fuck.sm.plugins.cms.entity.Tag;
|
||||
|
||||
@ -11,12 +12,14 @@ import vip.fuck.sm.plugins.cms.entity.Tag;
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Mapping("/tag")
|
||||
@Controller
|
||||
@Mapping("/cms/tag")
|
||||
public class TagController extends BaseController {
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@Mapping()
|
||||
public void index() {
|
||||
Integer id = getParaToInt("id");
|
||||
Tag tag = new Tag().dao().findById(id);
|
||||
|
||||
@ -187,7 +187,7 @@ public class Category extends BaseCategory<Category> {
|
||||
*/
|
||||
public List<Category> findParents(Integer categoryId,Boolean recursive,Integer start, Integer count,Integer siteId){
|
||||
Category category = findById(categoryId);
|
||||
if(categoryId == null || category.getParentId() == null){
|
||||
if( category == null || categoryId == null || category.getParentId() == null){
|
||||
return Collections.emptyList();
|
||||
}
|
||||
String filterSql = " and siteId="+siteId+" and status="+Status.NORMAL.ordinal();
|
||||
|
||||
@ -3,6 +3,7 @@ package vip.fuck.sm.plugins.cms.entity;
|
||||
|
||||
import com.jfinal.plugin.activerecord.Page;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.noear.solon.Solon;
|
||||
import vip.fuck.sm.plugins.cms.entity.base.BaseSite;
|
||||
import vip.fuck.sm.plugins.cms.util.DbUtils;
|
||||
import vip.fuck.sm.plugins.cms.util.JFinal;
|
||||
@ -88,7 +89,7 @@ public class Site extends BaseSite<Site> {
|
||||
* 获取地址
|
||||
*/
|
||||
public String getUrl(){
|
||||
String contextPath = JFinal.me().getContextPath();
|
||||
String contextPath = JFinal.getContextPath();
|
||||
if(Type.CAT.ordinal()==getType()){
|
||||
String cat = getCat(); //目录
|
||||
if(StringUtils.isBlank(cat)){
|
||||
|
||||
@ -97,7 +97,7 @@ public class Tag extends BaseTag<Tag> {
|
||||
* @return 路径
|
||||
*/
|
||||
public String getPath() {
|
||||
String url = JFinal.me().getContextPath();
|
||||
String url = JFinal.getContextPath();
|
||||
String param = "";
|
||||
Site site = new Site().dao().findById(getSiteId());
|
||||
String siteCat = site.getCat();
|
||||
|
||||
@ -9,9 +9,6 @@ import com.jfinal.plugin.activerecord.Model;
|
||||
@SuppressWarnings({"serial", "unchecked"})
|
||||
public abstract class BaseAdmin<M extends BaseAdmin<M>> extends Model<M> implements IBean {
|
||||
|
||||
{
|
||||
use("cmsDb");
|
||||
}
|
||||
|
||||
public M setId(Integer id) {
|
||||
set("id", id);
|
||||
|
||||
@ -51,6 +51,7 @@ public class ContentPageDirective extends BaseDirective {
|
||||
Integer tagId = getParameter(TAG_ID_PARAMETER_NAME, Integer.class, scope);
|
||||
String keyword = getParameter(KEYWORD_PARAMETER_NAME, String.class, scope);
|
||||
Integer pageNumber = getParameter(PAGE_NUMBER_PARAMETER_NAME, Integer.class, scope);
|
||||
pageNumber = pageNumber==null||pageNumber<=1?1:pageNumber;
|
||||
Integer pageSize = getParameter(PAGE_SIZE_PARAMETER_NAME, Integer.class, scope);
|
||||
String condition = getCondition(scope);
|
||||
String orderBy = getOrderBy(scope);
|
||||
|
||||
@ -6,6 +6,9 @@
|
||||
package vip.fuck.sm.plugins.cms.template.directive;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.jfinal.plugin.activerecord.Db;
|
||||
import com.jfinal.plugin.activerecord.Page;
|
||||
import com.jfinal.plugin.activerecord.Record;
|
||||
@ -15,6 +18,10 @@ import com.jfinal.template.stat.Scope;
|
||||
import org.noear.solon.annotation.Component;
|
||||
import vip.fuck.sm.plugins.cms.TemplateVariable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 模板指令 - SQL分页
|
||||
*
|
||||
@ -43,11 +50,27 @@ public class SqlPageDirective extends BaseDirective {
|
||||
public void exec(Env env, Scope scope, Writer writer) {
|
||||
scope = new Scope(scope);
|
||||
Integer pageNumber = getParameter(PAGE_NUMBER_PARAMETER_NAME, Integer.class, scope);
|
||||
if(pageNumber == null || pageNumber<=1){
|
||||
pageNumber = 1;
|
||||
}
|
||||
Integer pageSize = getParameter(PAGE_SIZE_PARAMETER_NAME, Integer.class, scope);
|
||||
String select = getParameter(SELECT_PARAMETER_NAME, String.class, scope);
|
||||
String from = getParameter(FROM_PARAMETER_NAME, String.class, scope);
|
||||
Page<Record> page = Db.paginate(pageNumber, pageSize, select,from);
|
||||
scope.setLocal(VARIABLE_NAME,page);
|
||||
JSONObject res = JSONUtil.parseObj(page);
|
||||
if(page.getList()!=null){
|
||||
List<JSONObject> collect = page.getList().stream().map(it -> {
|
||||
JSONObject obj = JSONUtil.createObj();
|
||||
Map<String, Object> columns = it.getColumns();
|
||||
if(ObjectUtil.isNotEmpty(columns)){
|
||||
columns.forEach(obj::set);
|
||||
}
|
||||
return obj;
|
||||
}).collect(Collectors.toList());
|
||||
res.set("list",collect);
|
||||
}
|
||||
// scope.setLocal(VARIABLE_NAME,page);
|
||||
scope.setLocal(VARIABLE_NAME,res);
|
||||
stat.exec(env, scope, writer);
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package vip.fuck.sm.plugins.cms.template.method;
|
||||
import com.jfinal.kit.StrKit;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.noear.solon.annotation.Component;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@ -96,7 +96,7 @@ public class HtmlUtils {
|
||||
delete(content);
|
||||
Map<String, Object> model = new HashMap<String, Object>();
|
||||
Site site = new Site().dao().findById(content.getSiteId());
|
||||
model.put("base", JFinal.me().getContextPath());
|
||||
model.put("base", JFinal.getContextPath());
|
||||
model.put(Site.CURRENT_SITE, site);
|
||||
model.put(Web.CURRENT_WEB, new Web().dao().findBySiteId(site.getId()));
|
||||
model.put(Company.CURRENT_COMPANY, new Company().dao().findBySiteId(site.getId()));
|
||||
@ -125,7 +125,7 @@ public class HtmlUtils {
|
||||
}
|
||||
Map<String, Object> model = new HashMap<String, Object>();
|
||||
Site site = new Site().dao().findById(category.getSiteId());
|
||||
model.put("base", JFinal.me().getContextPath());
|
||||
model.put("base", JFinal.getContextPath());
|
||||
model.put(Site.CURRENT_SITE, site);
|
||||
model.put(Web.CURRENT_WEB, new Web().dao().findBySiteId(site.getId()));
|
||||
model.put(Company.CURRENT_COMPANY, new Company().dao().findBySiteId(site.getId()));
|
||||
@ -244,7 +244,7 @@ public class HtmlUtils {
|
||||
Site site = new Site().dao().findById(siteId);
|
||||
int generateCount = 0;
|
||||
Map<String, Object> model = new HashMap<String, Object>();
|
||||
model.put("base", JFinal.me().getContextPath());
|
||||
model.put("base", JFinal.getContextPath());
|
||||
model.put(Site.CURRENT_SITE, site);
|
||||
model.put(Web.CURRENT_WEB, new Web().dao().findBySiteId(site.getId()));
|
||||
model.put(Company.CURRENT_COMPANY, new Company().dao().findBySiteId(site.getId()));
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
package vip.fuck.sm.plugins.cms.util;
|
||||
|
||||
public class JFinal {
|
||||
public static JFinal me(){
|
||||
return null;
|
||||
}
|
||||
import org.noear.solon.Solon;
|
||||
|
||||
public String getContextPath() {
|
||||
return null;
|
||||
public class JFinal {
|
||||
|
||||
public static String getContextPath() {
|
||||
String contextPath = Solon.cfg().get("server.contextPath","/");
|
||||
String port = Solon.cfg().get("server.port","");
|
||||
String schema = Solon.cfg().get("server.schema");
|
||||
String domain = Solon.cfg().get("server.domain","localhost");
|
||||
return String.format("%s%s:%s/%s/cms/",schema,domain,port, contextPath);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,8 @@ package vip.fuck.sm.plugins.cms.util;
|
||||
|
||||
import com.jfinal.plugin.ehcache.CacheKit;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.noear.solon.Solon;
|
||||
import org.noear.solon.data.cache.CacheService;
|
||||
import vip.fuck.sm.plugins.cms.Config;
|
||||
import vip.fuck.sm.plugins.cms.entity.Setup;
|
||||
|
||||
@ -35,7 +37,8 @@ public final class SystemUtils {
|
||||
*/
|
||||
public static Config getConfig() {
|
||||
String cacheKey = "config";
|
||||
Config config = CacheKit.get(Config.CACHE_NAME,cacheKey);
|
||||
CacheService cache = Solon.context().getBean(CacheService.class);
|
||||
Config config = cache.get(Config.CACHE_NAME+":"+cacheKey,Config.class);
|
||||
if (config == null) {
|
||||
Map<String,String> setupMap = new Setup().dao().getSetupMap();
|
||||
config = new Config();
|
||||
@ -50,7 +53,7 @@ public final class SystemUtils {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
CacheKit.put(Config.CACHE_NAME,cacheKey,config);
|
||||
cache.store(Config.CACHE_NAME+":"+cacheKey,config,60*60*24*3);
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- 公共页面 -->
|
||||
#include("/cms/admin/view/include/common.shtm")
|
||||
<!-- 公共页面 /-->
|
||||
</head>
|
||||
<body class="hold-transition skin-purple sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 页面头部 -->
|
||||
#include("/cms/admin/view/include/header.shtm")
|
||||
<!-- 页面头部 /-->
|
||||
<!-- 导航侧栏 -->
|
||||
#include("/cms/admin/view/include/menu.shtm")
|
||||
<!-- 导航侧栏 /-->
|
||||
<!-- 内容区域 -->
|
||||
<div class="content-wrapper" id="contentDiv">
|
||||
<!-- 正文区域 -->
|
||||
<section class="content">
|
||||
<form id="inputForm" action="#(base)/admin/div/div_field/save" method="post">
|
||||
<input type="hidden" name="divId" id="divId" value="#(div.id)" />
|
||||
<!--表单信息-->
|
||||
<div class="panel panel-default" style="padding-bottom: 10px;">
|
||||
<div class="panel-heading">自定义表字段信息</div>
|
||||
<div class="row data-type">
|
||||
<div class="col-md-2 title">字段描述</div>
|
||||
<div class="col-md-10 data">
|
||||
<input type="text" class="form-control" placeholder="例如:客户姓名" name="alias" value="">
|
||||
</div>
|
||||
<div class="col-md-2 title">UI控件</div>
|
||||
<div class="col-md-10 data">
|
||||
<input type="radio" id="ui_type_text_input" value="text_input" name="uiType" #if('text_input' == divField.uiType) checked #end />
|
||||
<label for="ui_type_text_input">单行文本</label>
|
||||
|
||||
<input type="radio" id="ui_type_ui_rich_text" value="rich_text" name="uiType" #if('rich_text' == divField.uiType) checked #end />
|
||||
<label for="ui_type_ui_rich_text">图文详情</label>
|
||||
|
||||
<input type="radio" id="ui_type_ui_textarea" value="textarea" name="uiType" #if('textarea' == divField.uiType) checked #end />
|
||||
<label for="ui_type_ui_textarea">多行文本</label>
|
||||
|
||||
<input type="radio" id="ui_type_ui_number" value="number" name="uiType" #if('number' == divField.uiType) checked #end />
|
||||
<label for="ui_type_ui_number">数值</label>
|
||||
|
||||
<input type="radio" id="ui_type_ui_single_img_upload" value="single_img_upload" name="uiType" #if('single_img_upload' == divField.uiType) checked #end />
|
||||
<label for="ui_type_ui_single_img_upload">单图上传</label>
|
||||
</div>
|
||||
<div class="col-md-2 title">字段名称</div>
|
||||
<div class="col-md-10 data">
|
||||
<input type="text" class="form-control" placeholder="必须英文字母开头、数字组成。如:khxm" id="name" name="name" value="">
|
||||
</div>
|
||||
<div class="col-md-2 title">排序</div>
|
||||
<div class="col-md-10 data">
|
||||
<input type="text" class="form-control" placeholder="排序" name="sort" value="">
|
||||
</div>
|
||||
</div>
|
||||
<!--工具栏-->
|
||||
<div class="box-tools text-center">
|
||||
<button type="submit" class="btn bg-maroon">保存</button>
|
||||
<button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
|
||||
</div>
|
||||
<!--工具栏/-->
|
||||
</div>
|
||||
<!--表单信息/-->
|
||||
</form>
|
||||
</section>
|
||||
<!-- 正文区域 /-->
|
||||
</div>
|
||||
<!-- 内容区域 /-->
|
||||
<!-- 底部导航 -->
|
||||
#include("/cms/admin/view/include/footer.shtm")
|
||||
<!-- 底部导航 /-->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!---->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// 激活导航位置
|
||||
setSidebarActive("admin-div");
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$().ready(function() {
|
||||
|
||||
var $inputForm = $("#inputForm");
|
||||
|
||||
// 表单验证
|
||||
$inputForm.validate({
|
||||
rules: {
|
||||
alias: "required",
|
||||
name: {
|
||||
required: true,
|
||||
pattern: /^[a-zA-Z][a-zA-Z0-9]*$/
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
pattern: "非法字符"
|
||||
}
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
$.ajax({
|
||||
url: "#(base)/admin/div/div_field/checkName",
|
||||
type: "POST",
|
||||
data: {"name":$("#name").val(),"divId":$("#divId").val()},
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
success: function(response) {
|
||||
if (response) {
|
||||
form.submit();
|
||||
}else{
|
||||
swal({title:'', text:'字段名称已存在',icon: 'error'});
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@ -0,0 +1,95 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- 公共页面 -->
|
||||
#include("/cms/admin/view/include/common.shtm")
|
||||
<!-- 公共页面 /-->
|
||||
</head>
|
||||
<body class="hold-transition skin-purple sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 页面头部 -->
|
||||
#include("/cms/admin/view/include/header.shtm")
|
||||
<!-- 页面头部 /-->
|
||||
<!-- 导航侧栏 -->
|
||||
#include("/cms/admin/view/include/menu.shtm")
|
||||
<!-- 导航侧栏 /-->
|
||||
<!-- 内容区域 -->
|
||||
<div class="content-wrapper" id="contentDiv">
|
||||
<!-- 正文区域 -->
|
||||
<section class="content">
|
||||
<form id="inputForm" action="#(base)/admin/div/div_field/update" method="post">
|
||||
<input type="hidden" name="id" value="#(divField.id)" />
|
||||
<!--表单信息-->
|
||||
<div class="panel panel-default" style="padding-bottom: 10px;">
|
||||
<div class="panel-heading">自定义表字段信息</div>
|
||||
<div class="row data-type">
|
||||
<div class="col-md-2 title">字段描述</div>
|
||||
<div class="col-md-10 data">
|
||||
<input type="text" class="form-control" placeholder="例如:客户姓名" name="alias" value="#(divField.alias)">
|
||||
</div>
|
||||
<div class="col-md-2 title">UI控件</div>
|
||||
<div class="col-md-10 data">
|
||||
<input type="radio" id="ui_type_text_input" value="text_input" name="uiType" #if('text_input' == divField.uiType) checked #end />
|
||||
<label for="ui_type_text_input">单行文本</label>
|
||||
|
||||
<input type="radio" id="ui_type_ui_rich_text" value="rich_text" name="uiType" #if('rich_text' == divField.uiType) checked #end />
|
||||
<label for="ui_type_ui_rich_text">图文详情</label>
|
||||
|
||||
<input type="radio" id="ui_type_ui_textarea" value="textarea" name="uiType" #if('textarea' == divField.uiType) checked #end />
|
||||
<label for="ui_type_ui_textarea">多行文本</label>
|
||||
|
||||
<input type="radio" id="ui_type_ui_number" value="number" name="uiType" #if('number' == divField.uiType) checked #end />
|
||||
<label for="ui_type_ui_number">数值</label>
|
||||
|
||||
<input type="radio" id="ui_type_ui_single_img_upload" value="single_img_upload" name="uiType" #if('single_img_upload' == divField.uiType) checked #end />
|
||||
<label for="ui_type_ui_single_img_upload">单图上传</label>
|
||||
</div>
|
||||
<div class="col-md-2 title">字段名称</div>
|
||||
<div class="col-md-10 data text">
|
||||
#(divField.name)
|
||||
</div>
|
||||
<div class="col-md-2 title">排序</div>
|
||||
<div class="col-md-10 data">
|
||||
<input type="text" class="form-control" placeholder="排序" name="sort" value="#(divField.sort)">
|
||||
</div>
|
||||
</div>
|
||||
<!--工具栏-->
|
||||
<div class="box-tools text-center">
|
||||
<button type="submit" class="btn bg-maroon">保存</button>
|
||||
<button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
|
||||
</div>
|
||||
<!--工具栏/-->
|
||||
</div>
|
||||
<!--表单信息/-->
|
||||
</form>
|
||||
</section>
|
||||
<!-- 正文区域 /-->
|
||||
</div>
|
||||
<!-- 内容区域 /-->
|
||||
<!-- 底部导航 -->
|
||||
#include("/cms/admin/view/include/footer.shtm")
|
||||
<!-- 底部导航 /-->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!---->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// 激活导航位置
|
||||
setSidebarActive("admin-div");
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$().ready(function() {
|
||||
|
||||
var $inputForm = $("#inputForm");
|
||||
|
||||
// 表单验证
|
||||
$inputForm.validate({
|
||||
rules: {
|
||||
alias: "required"
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- 公共页面 -->
|
||||
#include("/cms/admin/view/include/common.shtm")
|
||||
<!-- 公共页面 /-->
|
||||
</head>
|
||||
<body class="hold-transition skin-purple sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 页面头部 -->
|
||||
#include("/cms/admin/view/include/header.shtm")
|
||||
<!-- 页面头部 /-->
|
||||
<!-- 导航侧栏 -->
|
||||
#include("/cms/admin/view/include/menu.shtm")
|
||||
<!-- 导航侧栏 /-->
|
||||
<!-- 内容区域 -->
|
||||
<div class="content-wrapper" id="contentDiv">
|
||||
<!-- 正文区域 -->
|
||||
<section class="content">
|
||||
<!-- .box-body -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">自定义表字段</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<!-- 数据表格 -->
|
||||
<div class="table-box">
|
||||
<!--工具栏-->
|
||||
<div class="pull-left">
|
||||
<div class="form-group form-inline">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default" onclick='location.href="#(base)/admin/div"' style="margin-right: 20px;"><i class="fa fa-arrow-left"></i> 返回</button>
|
||||
<button type="button" class="btn btn-default" onclick='location.href="#(base)/admin/div/div_field/add?divId=#(divId)"'><i class="fa fa-file-o"></i> 新建</button>
|
||||
<button type="button" class="btn btn-default disabled" id="deleteButton" url="#(base)/admin/div/div_field/delete"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
<button type="button" class="btn btn-default" id="refreshButton"><i class="fa fa-refresh"></i> 刷新</button>
|
||||
<button type="button" class="btn btn-default" id="sortButton" url="#(base)/admin/div/div_field/updateSort"><i class="fa fa-sort"></i> 排序</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--工具栏/-->
|
||||
<!--数据列表-->
|
||||
<table id="listTable" class="table table-bordered table-striped table-hover dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="40"><input type="checkbox" id="selectAll" /></th>
|
||||
<th>ID</th>
|
||||
<th>描述</th>
|
||||
<th>名称</th>
|
||||
<th>创建时间</th>
|
||||
<th width="40">排序</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="listTr">
|
||||
#for(divField : divFields)
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids" value="#(divField.id)" /></td>
|
||||
<td>#(divField.id)</td>
|
||||
<td>#(divField.alias)</td>
|
||||
<td>#(divField.name)</td>
|
||||
<td>#date(divField.createDate,'yyyy-MM-dd HH:mm:ss')</td>
|
||||
<td><input type="text" class="form-control" name="sorts" value="#(divField.sort)" data-oldsort="#(divField.sort)" data-id="#(divField.id)"/></td>
|
||||
<td>
|
||||
<button type="button" class="btn bg-olive btn-xs" onclick='location.href="#(base)/admin/div/div_field/edit?id=#(divField.id)"'>编辑</button>
|
||||
</td>
|
||||
</tr>
|
||||
#end
|
||||
</tbody>
|
||||
</table>
|
||||
<!--数据列表/-->
|
||||
</div>
|
||||
<!-- 数据表格 /-->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</section>
|
||||
<!-- 正文区域 /-->
|
||||
</div>
|
||||
<!-- 内容区域 /-->
|
||||
<!-- 底部导航 -->
|
||||
#include("/cms/admin/view/include/footer.shtm")
|
||||
<!-- 底部导航 /-->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!---->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// 激活导航位置
|
||||
setSidebarActive("admin-div");
|
||||
});
|
||||
</script>
|
||||
@ -0,0 +1,42 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
<h2 class="text-center my-4 fs-sm-28 fs-24">#(currentCategory.name)</h2>
|
||||
<div class="content">#(currentCategory.introduction)</div>
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
|
||||
<!-- 图文列表 -->
|
||||
#content_page(categoryId = currentCategory.id,pageNumber = pageNumber,pageSize = 8)
|
||||
<div class="row">
|
||||
#for(content : contentPage.list)
|
||||
<div class="col-12 col-sm-6 col-lg-3 text-center">
|
||||
<figure class="figure">
|
||||
<div class="card-img-200">
|
||||
<a href="#(content.path)"><img src="#(content.ico)" class="w-100" alt="#(content.title)"></a>
|
||||
</div>
|
||||
<figcaption class="figure-caption text-center lh-2"><a href="#(content.path)">#(abbreviate(content.title,15,''))</a></figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
#end
|
||||
</div>
|
||||
<!-- page start -->
|
||||
#page(pageNumber = contentPage.pageNumber,totalPages = contentPage.totalPage,pattern = currentCategory.path+"?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
<!-- page end -->
|
||||
|
||||
#end
|
||||
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,51 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
|
||||
<h2 class="text-center fs-sm-28 fs-24">#(currentContent.title)</h2>
|
||||
<div class="text-center border-bottom text-secondary pb-2 mb-3">
|
||||
时间:#date(currentContent.createDate,'yyyy-MM-dd') 访问量:<script src="#(currentSite.url)/content/visits?id=#(currentContent.id)"></script>
|
||||
</div>
|
||||
<div class="content mb-3">#(currentContent.introduction)</div>
|
||||
|
||||
<div class="text-secondary lh-2">
|
||||
<p>上一篇:#if(currentContent.lastContent??)<a href="#(currentContent.lastContent.path)">#(abbreviate(currentContent.lastContent.title,15,''))</a>#else无#end</p>
|
||||
<p>下一篇:#if(currentContent.nextContent??)<a href="#(currentContent.nextContent.path)">#(abbreviate(currentContent.nextContent.title,15,''))</a>#else无#end</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,2 @@
|
||||
#set(tpath=base+"/templates/"+currentSite.pcTemplate)
|
||||
|
||||
@ -0,0 +1,144 @@
|
||||
|
||||
<div class="footer mt-3 pt-5 border-top text-secondary bg-light">
|
||||
<div class="container">
|
||||
<div class="row pb-5">
|
||||
<div class="col-12 col-md-5">
|
||||
<h5>#(currentCompany.name)</h5>
|
||||
<ul class="lh-2">
|
||||
<li>营业执照:#(currentCompany.blicense) </li>
|
||||
<li>备案号码:<a href="http://beian.miit.gov.cn/" target="_blank">#(currentWeb.icp)</a> </li>
|
||||
<li>地址:#(currentCompany.address) </li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 col-md-5">
|
||||
<div class="mt-4 d-block d-md-none"></div>
|
||||
|
||||
<h5>联系我们</h5>
|
||||
<ul class="lh-2">
|
||||
<li>电话:#(currentCompany.phone) </li>
|
||||
<li>邮箱:#(currentCompany.email) </li>
|
||||
<li>Q Q:#(currentCompany.qq) </li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 text-center d-none d-md-block">
|
||||
<p class="code"><img src="#(tpath)/static/images/mobileqr.png"></p>
|
||||
<p class="small">扫一扫 手机访问</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="copyright border-top lh-3 text-center d-none d-md-block">
|
||||
#(currentWeb.copyright)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 占位 -->
|
||||
<div style="height:49px;" class="d-block d-sm-none"></div>
|
||||
|
||||
<!-- 手机底部导航 -->
|
||||
<div class="container-fluid bg-info fixed-bottom d-block d-sm-none">
|
||||
<div class="row">
|
||||
<div class="col-4 p-0 text-center border-right">
|
||||
<a href="tel:#(currentCompany.mobile)" class="text-light d-block pt-3 pb-3"><i class="fa fa-phone" aria-hidden="true"></i> 电话咨询</a>
|
||||
</div>
|
||||
<div class="col-4 p-0 text-center border-right">
|
||||
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=#(currentCompany.qq)&site=qq&menu=yes" class="text-light d-block pt-3 pb-3"><i class="fa fa-qq" aria-hidden="true"></i> 在线咨询</a>
|
||||
</div>
|
||||
<div class="col-4 p-0 text-center">
|
||||
#category(id=104)
|
||||
<a href="#(category.path)" class="text-light d-block pt-3 pb-3"><i class="fa fa-location-arrow" aria-hidden="true"></i> #(category.name)</a>
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 在线客服 -->
|
||||
<div class="online d-none d-md-block">
|
||||
<dl>
|
||||
<dt style="width:150px;">
|
||||
<h3><i class="fa fa-commenting-o"></i>在线咨询<span class="remove"><i class="fa fa-remove"></i></span></h3>
|
||||
<p>
|
||||
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=#(currentCompany.qq)&site=qq&menu=yes">
|
||||
<img border="0" src="http://wpa.qq.com/pa?p=2:#(currentCompany.qq):52" alt="点击这里给我发消息" title="点击这里给我发消息"/>
|
||||
售前咨询专员
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=#(currentCompany.qq)&site=qq&menu=yes">
|
||||
<img border="0" src="http://wpa.qq.com/pa?p=2:#(currentCompany.qq):52" alt="点击这里给我发消息" title="点击这里给我发消息"/>
|
||||
售后服务专员
|
||||
</a>
|
||||
</p>
|
||||
</dt>
|
||||
<dd><i class="fa fa-commenting-o"></i></dd>
|
||||
<dd>在线咨询</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt style="width:300px;">
|
||||
<h3><i class="fa fa-volume-control-phone"></i>免费通话<span class="remove"><i class="fa fa-remove"></i></span></h3>
|
||||
<p>24小时免费咨询</p>
|
||||
<p>请输入您的联系电话,座机请加区号</p>
|
||||
<form onsubmit="return subform(this);">
|
||||
<p><input type="text" name="tel" id="tel" autocomplete="off" placeholder="请输入您的电话号码" required maxlength="30"></p>
|
||||
<p><button type="submit">免费通话</button></p>
|
||||
</form>
|
||||
</dt>
|
||||
<dd><i class="fa fa-volume-control-phone" aria-hidden="true"></i></dd>
|
||||
<dd>免费通话</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt style="width:200px;">
|
||||
<h3><i class="fa fa-weixin" aria-hidden="true"></i>微信扫一扫<span class="remove"><i class="fa fa-remove"></i></span></h3>
|
||||
<p><img src="#(currentCompany.weixin) " width="100%"></p>
|
||||
</dt>
|
||||
<dd><i class="fa fa-weixin" aria-hidden="true"></i></dd>
|
||||
<dd>微信联系</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="scroll-top">
|
||||
<dd><i class="fa fa-chevron-up"></i></dd>
|
||||
<dd>返回顶部</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<script src="#(tpath)/static/js/popper.min.js"></script>
|
||||
<script src="#(tpath)/static/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="#(tpath)/static/js/wow.min.js"></script>
|
||||
<script src="#(tpath)/static/js/aoyun.js?v=v1.2.2"></script>
|
||||
<script>
|
||||
//ajax提交表单
|
||||
function subform(obj){
|
||||
var url='#(currentSite.url)/div/save?id=2';
|
||||
var tel=$(obj).find("#tel").val();
|
||||
|
||||
var reg = /^(1|0)[\d\-]+$/;
|
||||
if (!reg.test(tel)) {
|
||||
alert('电话号码错误!');
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
tel: tel
|
||||
},
|
||||
success: function (response, status) {
|
||||
if(response.type=="success"){
|
||||
alert("您的来电已收到,我们会尽快联系您!");
|
||||
$(obj)[0].reset();
|
||||
}else{
|
||||
alert(response.data);
|
||||
}
|
||||
},
|
||||
error:function(xhr,status,error){
|
||||
alert('返回数据异常!');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
#(currentWeb.statistical)
|
||||
@ -0,0 +1,159 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
|
||||
<h5 class="border-bottom border-info pb-2"><i class="fa fa-sliders" aria-hidden="true"></i> 留言记录</h5>
|
||||
|
||||
<!-- 留言记录 -->
|
||||
#sql_page(select = "select * ",from=" from cms_guestbook order by createDate desc",pageNumber = pageNumber,pageSize = 5)
|
||||
#for(record : recordPage.list)
|
||||
<div class="media border-bottom pb-3 pt-3">
|
||||
<img class="mr-3" src="#(tpath)/static/images/user.png" height="25">
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0">#(record.contact):</h5>
|
||||
<p>#(record.content)</p>
|
||||
<p>
|
||||
<span class="badge badge-light text-secondary font-weight-normal">#if(record.mobile?? && record.mobile.length()==11)#(record.mobile.substring(1,3))****#(record.mobile.substring(8))#else #(record.mobile??"") #end</span>
|
||||
<span class="badge badge-light text-secondary font-weight-normal">#date(record.createDate,'yyyy-MM-dd')</span>
|
||||
</p>
|
||||
<div class="media mt-3 border-top-dashed pt-3">
|
||||
<img class="mr-3" src="#(tpath)/static/images/user.png" height="25">
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0">管理员回复:</h5>
|
||||
<p>#(record.replyContent)</p>
|
||||
<p><span class="badge badge-light text-secondary font-weight-normal">#date(record.replyDate,'yyyy-MM-dd')</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
|
||||
<!-- page start -->
|
||||
#page(pageNumber = recordPage.pageNumber,totalPages = recordPage.totalPage,pattern = currentCategory.path+"?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
<!-- page end -->
|
||||
|
||||
#end
|
||||
|
||||
<!-- 留言表单 -->
|
||||
<div class="row">
|
||||
<div class="col-lg-3"></div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<form class="my-4" onsubmit="return submsg(this);">
|
||||
<div class="form-group">
|
||||
<label for="contacts">联系人</label>
|
||||
<div>
|
||||
<input type="text" name="contact" required id="contact" class="form-control" placeholder="请输入联系人">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="mobile">手 机</label>
|
||||
<div>
|
||||
<input type="text" name="mobile" required id="mobile" class="form-control" placeholder="请输入联系人手机">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content" >内 容</label>
|
||||
<div>
|
||||
<textarea name="content" id="content" class="form-control" placeholder="请输入留言内容"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="checkcode">验证码</label>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<input type="text" name="captcha" id="captcha" required class="form-control" placeholder="请输入验证码">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<img title="点击刷新" style="height:33px;" id="captchaImage" src="#(currentSite.url)/common/captcha/image" onclick="this.src='#(currentSite.url)/common/captcha/image?'+Math.round(Math.random()*10);" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-info mb-2">提交留言</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-lg-3"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
//ajax提交留言
|
||||
function submsg(obj){
|
||||
var url='#(currentSite.url)/guestbook/save';
|
||||
var contact=$(obj).find("#contact").val();
|
||||
var mobile=$(obj).find("#mobile").val();
|
||||
var content=$(obj).find("#content").val();
|
||||
var captcha=$(obj).find("#captcha").val();
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
contact: contact,
|
||||
mobile: mobile,
|
||||
content: content,
|
||||
captcha: captcha
|
||||
},
|
||||
success: function (response, status) {
|
||||
if(response.type=="success"){
|
||||
alert("谢谢您的反馈,我们会尽快联系您!");
|
||||
$(obj)[0].reset();
|
||||
}else{
|
||||
alert(response.msg);
|
||||
}
|
||||
},
|
||||
error:function(xhr,status,error){
|
||||
alert('返回数据异常!');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,31 @@
|
||||
<!-- 头部导航 -->
|
||||
<nav class="navbar navbar-light bg-light fixed-top navbar-expand-lg shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand my-1" href="#(currentSite.url)/">
|
||||
<img src="#(currentWeb.logo)" class="logo-sm-height" height="50">
|
||||
</a>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item #if(target??) #else active #end">
|
||||
<a class="nav-link" href="#(currentSite.url)/" >首页</a>
|
||||
</li>
|
||||
#nav_root_list()
|
||||
#for(nav : navs)
|
||||
<li class="nav-item #if(target?? && target==nav.url) active #end">
|
||||
<a class="nav-link" href="#(currentSite.url)/#(nav.url)">#(nav.name)</a>
|
||||
</li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!--占位导航栏-->
|
||||
<div style="height:71px;" class="head-sm-height"></div>
|
||||
|
||||
@ -0,0 +1,155 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<!-- 幻灯片 -->
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
#slide_list(count=5,gid=1)
|
||||
#for(slide : slides)
|
||||
<div class="swiper-slide">
|
||||
<a href="#(slide.image)">
|
||||
<img src="#(slide.image)" class="d-block w-100" >
|
||||
</a>
|
||||
<div class="container">
|
||||
<div class="position-absolute text-light" style="top:30%;">
|
||||
<h1 class="fs-20 fs-sm-32 wow slideInUp">#(slide.title)</h1>
|
||||
<h4 class="fs-14 fs-sm-20 wow slideInUp">#(slide.subtitle)</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
<div class="swiper-button-prev d-none d-md-block"></div><!--左箭头-->
|
||||
<div class="swiper-button-next d-none d-md-block"></div><!--右箭头-->
|
||||
<div class="swiper-pagination"></div>
|
||||
</div>
|
||||
|
||||
<!--产品推荐-->
|
||||
#category(id=104)
|
||||
<div class="bg-white py-5">
|
||||
<div class="container">
|
||||
<div class="text-center fs-26 fs-sm-28 text-success wow fadeInDown">#(category.name)</div>
|
||||
<div class="text-center fs-14 fs-sm-16 mb-4 text-secondary wow fadeInUp" data-wow-delay="1s">- #(category.subname) -</div>
|
||||
|
||||
<div class="row">
|
||||
#content_list(categoryId=104,count=4)
|
||||
#for(content : contents)
|
||||
<div class="col-12 col-sm-6 col-lg-3 wow zoomIn" data-wow-delay="#(for.index+1)00ms" data-wow-duration="1s">
|
||||
<div class="card">
|
||||
<div class="card-img-150"><a href="#(content.path)"><img class="card-img-top" src="#(content.ico)" alt="#(content.title)"></a></div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><a href="#(content.path)">#(abbreviate(content.title,12,''))</a></h5>
|
||||
<p class="card-text">
|
||||
#if(content.isTop)
|
||||
<span class="badge badge-danger">置顶</span>
|
||||
#else if(content.isRecommend)
|
||||
<span class="badge badge-warning">推荐</span>
|
||||
#else if(content.isHeadline)
|
||||
<span class="badge badge-info">头条</span>
|
||||
#end
|
||||
#(abbreviate(content.text,50,''))
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
<div class="text-center mt-4 wow fadeInDown" data-wow-delay="1s"><h4><a href="#(category.path)" class="text-secondary fs-14 fs-sm-16">查看更多</a></h4></div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
|
||||
<!-- 关于我们 -->
|
||||
#category(id=100)
|
||||
<div class="bg-light py-5">
|
||||
<div class="container">
|
||||
<div class="text-center fs-26 fs-sm-28 text-info wow fadeInDown">#(category.name)</div>
|
||||
<div class="text-center fs-14 fs-sm-16 mb-4 text-secondary wow fadeInUp" data-wow-delay="1s">- #(category.subname) -</div>
|
||||
<div class="row text-secondary mb-5 px-3 lh-2 wow fadeInDown" data-wow-delay="500ms" style="text-indent:30px;">
|
||||
#(abbreviate(category.text,442,''))
|
||||
</div>
|
||||
<div class="text-center wow fadeInDown" data-wow-delay="1s"><h4><a href="#(category.path)" class="text-secondary fs-14 fs-sm-16">查看更多</a></h4></div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
|
||||
<!-- 新闻动态 -->
|
||||
#category(id=102)
|
||||
<div class="bg-white py-5">
|
||||
<div class="container">
|
||||
<div class="text-center fs-26 fs-sm-28 text-warning wow fadeInDown">#(category.name)</div>
|
||||
<div class="text-center fs-14 fs-sm-16 mb-5 text-secondary wow fadeInUp" data-wow-delay="1s">- #(category.subname) -</div>
|
||||
|
||||
<div class="row">
|
||||
#content_list(categoryId=category.id,count=4)
|
||||
#for(content : contents)
|
||||
<div class="col-12 col-lg-6 mb-3 wow fadeInUp" data-wow-delay="500ms">
|
||||
<div class="media mb-3">
|
||||
<div class="media-body">
|
||||
<h5><a href="#(content.path)" title="#(content.title)">#(abbreviate(content.title,20,''))</a></h5>
|
||||
<p><a href="#(content.path)" class="text-secondary lh-2">#(abbreviate(content.text,60,'')) #date(content.createDate,'yyyy-MM-dd')</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
<div class="text-center wow fadeInDown" data-wow-delay="1s"><h4><a href="#(category.path)" class="text-secondary fs-14 fs-sm-16">查看更多</a></h4></div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
|
||||
<script src="#(tpath)/static/swiper-4.3.5/js/swiper.min.js"></script>
|
||||
<script>
|
||||
var mySwiper = new Swiper ('.swiper-container', {
|
||||
direction: 'horizontal',
|
||||
loop: true,
|
||||
speed: 1500,
|
||||
autoplay : {
|
||||
delay:3500,
|
||||
disableOnInteraction: false
|
||||
},
|
||||
|
||||
|
||||
// 如果需要分页器
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
clickable :true,
|
||||
},
|
||||
|
||||
// 如果需要前进后退按钮
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,65 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
|
||||
<!-- 列表内容 -->
|
||||
#content_page(categoryId = currentCategory.id,pageNumber = pageNumber,pageSize = 10)
|
||||
<div class="row">
|
||||
#for(content : contentPage.list)
|
||||
<div class="mb-3 col-12 col-sm-6 col-lg-3">
|
||||
<div class="card bg-light">
|
||||
<div class="card-header">招聘职位:#(content.title)</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">#(abbreviate(content.title,50,''))</p>
|
||||
<a class="btn btn-info mt-2" href="#(content.path)">查看详情</a>
|
||||
</div>
|
||||
<div class="card-footer">发布日期:#date(content.createDate,'yyyy-MM-dd')</div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
</div>
|
||||
|
||||
<!-- page start -->
|
||||
#page(pageNumber = contentPage.pageNumber,totalPages = contentPage.totalPage,pattern = currentCategory.path+"?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
<!-- page end -->
|
||||
|
||||
#end
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,51 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
|
||||
<h2 class="text-center fs-sm-28 fs-24">#(currentContent.title)</h2>
|
||||
<div class="text-center border-bottom text-secondary pb-2 mb-3">
|
||||
时间:#date(currentContent.createDate,'yyyy-MM-dd') 访问量:<script src="#(currentSite.url)/content/visits?id=#(currentContent.id)"></script>
|
||||
</div>
|
||||
<div class="content mb-3">#(currentContent.introduction)</div>
|
||||
<div class="text-secondary lh-2">
|
||||
<p>上一篇:#if(currentContent.lastContent??)<a href="#(currentContent.lastContent.path)">#(abbreviate(currentContent.lastContent.title,15,''))</a>#else无#end</p>
|
||||
<p>下一篇:#if(currentContent.nextContent??)<a href="#(currentContent.nextContent.path)">#(abbreviate(currentContent.nextContent.title,15,''))</a>#else无#end</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,71 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
|
||||
<!-- 列表内容 -->
|
||||
#content_page(categoryId = currentCategory.id,pageNumber = pageNumber,pageSize = 10)
|
||||
<ul>
|
||||
#for(content : contentPage.list)
|
||||
<li class="lh-3 border-bottom-dashed">
|
||||
<i class="fa fa-gg"></i>
|
||||
<a href="#(content.path)">
|
||||
<span class="d-none d-md-inline">#(abbreviate(content.title,30,''))</span><!-- PC端 -->
|
||||
<span class="d-inline d-md-none">#(abbreviate(content.title,11,''))</span><!-- 移动端 -->
|
||||
#if(content.isTop)
|
||||
<span class="badge badge-danger">置顶</span>
|
||||
#else if(content.isRecommend)
|
||||
<span class="badge badge-warning">推荐</span>
|
||||
#else if(content.isHeadline)
|
||||
<span class="badge badge-info">头条</span>
|
||||
#end
|
||||
<span class="float-right">#date(content.createDate,'yyyy-MM-dd')</span>
|
||||
</a>
|
||||
</li>
|
||||
#end
|
||||
</ul>
|
||||
|
||||
<!-- page start -->
|
||||
#page(pageNumber = contentPage.pageNumber,totalPages = contentPage.totalPage,pattern = currentCategory.path+"?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
<!-- page end -->
|
||||
|
||||
#end
|
||||
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,52 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
|
||||
<h2 class="text-center fs-sm-28 fs-20 mt-3">#(currentContent.title)</h2>
|
||||
<div class="text-center border-bottom text-secondary pb-2 mb-3">
|
||||
时间:#date(currentContent.createDate,'yyyy-MM-dd') 访问量:<script src="#(currentSite.url)/content/visits?id=#(currentContent.id)"></script>
|
||||
</div>
|
||||
<div class="content mb-3">#(currentContent.introduction)</div>
|
||||
<div class="text-secondary lh-2">
|
||||
<p>上一篇:#if(currentContent.lastContent??)<a href="#(currentContent.lastContent.path)">#(abbreviate(currentContent.lastContent.title,15,''))</a>#else无#end</p>
|
||||
<p>下一篇:#if(currentContent.nextContent??)<a href="#(currentContent.nextContent.path)">#(abbreviate(currentContent.nextContent.title,15,''))</a>#else无#end</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
<!-- 分页 -->
|
||||
#if(totalPages>1)
|
||||
<nav aria-label="page navigation" class="my-4">
|
||||
<div class="pagination justify-content-center">
|
||||
<a class="page-item page-link" href="#(pattern)1">首页</a>
|
||||
#if(hasPrevious)
|
||||
<a class="page-item page-link" href="#(pattern)#(previousPageNumber)">上一页</a>
|
||||
#end
|
||||
#for(segmentPageNumber : segment)
|
||||
#if(segmentPageNumber != pageNumber)
|
||||
<a href="#(pattern)#(segmentPageNumber)" class="page-item page-link">#(segmentPageNumber)</a>
|
||||
#else
|
||||
<a href="javascript:;" class="page-item page-link">#(segmentPageNumber)</a>
|
||||
#end
|
||||
#end
|
||||
<!-- 数字条,小屏幕时自动隐藏-->
|
||||
#if(hasNext)
|
||||
<a class="page-item page-link" href="#(pattern)#(nextPageNumber)">下一页</a>
|
||||
#end
|
||||
<a class="page-item page-link" href="#(pattern)#(totalPages)">尾页</a>
|
||||
</div>
|
||||
</nav>
|
||||
#else
|
||||
<!-- <div class="text-center my-5 text-secondary">本分类下无任何数据!</div> -->
|
||||
#end
|
||||
@ -0,0 +1,2 @@
|
||||
<!-- 当前位置 -->
|
||||
<div class="text-right position mb-3 d-none d-md-block">当前位置:<a href="#(currentSite.url)/">首页</a> > #if(currentCategory??)#category_parent_list(categoryId=currentCategory.id)#for(category : categorys)<a href="#(category.path)">#(category.name)</a> > #end#end<a href="#(currentCategory.path)">#(currentCategory.name)</a>#else#if(position??)#(position)#end#end</div>
|
||||
@ -0,0 +1,86 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
|
||||
<!-- 图文列表 -->
|
||||
#content_page(categoryId = currentCategory.id,pageNumber = pageNumber,pageSize = 8)
|
||||
<div class="row">
|
||||
#for(content : contentPage.list)
|
||||
<div class="col-12 col-sm-6 col-lg-3 wow zoomIn" data-wow-delay="#(for.index+1)00ms" data-wow-duration="1s">
|
||||
<div class="card">
|
||||
<div class="card-img-150"><a href="#(content.path)"><img class="card-img-top" src="#(content.ico)" alt="#(content.title)"></a></div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><a href="#(content.path)">#(abbreviate(content.title,12,''))</a></h5>
|
||||
<p class="card-text">
|
||||
#if(content.isTop)
|
||||
<span class="badge badge-danger">置顶</span>
|
||||
#else if(content.isRecommend)
|
||||
<span class="badge badge-warning">推荐</span>
|
||||
#else if(content.isHeadline)
|
||||
<span class="badge badge-info">头条</span>
|
||||
#end
|
||||
#(abbreviate(content.text,50,''))
|
||||
</p>
|
||||
<!-- <p>
|
||||
<a href="javascript:;"><span class="badge badge-secondary">tag</span></a>
|
||||
</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
</div>
|
||||
|
||||
<!-- page start -->
|
||||
#page(pageNumber = contentPage.pageNumber,totalPages = contentPage.totalPage,pattern = currentCategory.path+"?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
<!-- page end -->
|
||||
|
||||
#end
|
||||
|
||||
<!-- 搜索-->
|
||||
<form class="form-inline mb-5 justify-content-center" action="#(currentSite.url)/search" method="get">
|
||||
<div class="form-group mx-sm-3 mb-2">
|
||||
<input type="text" name="keyword" class="form-control" placeholder="请输入关键字">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-info mb-2">搜索</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -0,0 +1,167 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.shtm")
|
||||
<!-- position end -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6 mb-5">
|
||||
<div class="view">
|
||||
<a class="arrow-left" href="#"></a>
|
||||
<a class="arrow-right" href="#"></a>
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper" >
|
||||
<div class="swiper-slide">
|
||||
<img src="#(currentContent.ico)">
|
||||
</div>
|
||||
#if(currentContent.pics??)
|
||||
#for(pic : currentContent.pics)
|
||||
<div class="swiper-slide">
|
||||
<img src="#(pic)">
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preview mt-3">
|
||||
<a class="arrow-left" href="#"></a>
|
||||
<a class="arrow-right" href="#"></a>
|
||||
<div class="swiper-container" >
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide active-nav swiper-slide-active">
|
||||
<img src="#(currentContent.ico)">
|
||||
</div>
|
||||
#if(currentContent.pics??)
|
||||
#for(pic : currentContent.pics)
|
||||
<div class="swiper-slide">
|
||||
<img src="#(pic)">
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-lg-6 mb-3 pr-3">
|
||||
<h2 class="border-bottom pb-2 fs-sm-28 fs-20">#(currentContent.title)</h2>
|
||||
<div class="text-secondary my-3 border-bottom-dashed lh-3">
|
||||
上架时间:#date(currentContent.publishDate,'yyyy-MM-dd')
|
||||
</div>
|
||||
<div class="text-secondary my-3 border-bottom-dashed lh-3">
|
||||
浏览次数:<script src="#(currentSite.url)/content/visits?id=#(currentContent.id)"></script>
|
||||
</div>
|
||||
|
||||
<div class="text-secondary my-3 border-bottom-dashed lh-3">
|
||||
产品类型:
|
||||
</div>
|
||||
|
||||
<div class="text-secondary my-3 border-bottom-dashed lh-3">
|
||||
产品颜色:
|
||||
</div>
|
||||
<div class="text-secondary my-3 border-bottom-dashed lh-3">
|
||||
产品价格:¥
|
||||
</div>
|
||||
<div class="my-3 lh-3">
|
||||
<a href="http://wpa.qq.com/msgrd?v=3&uin=#(currentCompany.qq)&site=qq&menu=yes" class="btn btn-danger">马上咨询</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 class="border-bottom border-info pb-2 mb-2"><i class="fa fa-sliders" aria-hidden="true"></i> 产品详情</h5>
|
||||
<div class="content">#(currentContent.introduction)</div>
|
||||
|
||||
<div class="text-secondary lh-2">
|
||||
<p>上一篇:#if(currentContent.lastContent??)<a href="#(currentContent.lastContent.path)">#(abbreviate(currentContent.lastContent.title,15,''))</a>#else无#end</p>
|
||||
<p>下一篇:#if(currentContent.nextContent??)<a href="#(currentContent.nextContent.path)">#(abbreviate(currentContent.nextContent.title,15,''))</a>#else无#end</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="#(tpath)/static/swiper-4.3.5/js/swiper.min.js"></script>
|
||||
<script>
|
||||
var viewSwiper = new Swiper('.view .swiper-container', {
|
||||
on:{
|
||||
slideChangeTransitionStart: function() {
|
||||
updateNavPosition()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
$('.view .arrow-left,.preview .arrow-left').on('click', function(e) {
|
||||
e.preventDefault()
|
||||
if (viewSwiper.activeIndex == 0) {
|
||||
viewSwiper.slideTo(viewSwiper.slides.length - 1, 1000);
|
||||
return
|
||||
}
|
||||
viewSwiper.slidePrev()
|
||||
})
|
||||
$('.view .arrow-right,.preview .arrow-right').on('click', function(e) {
|
||||
e.preventDefault()
|
||||
if (viewSwiper.activeIndex == viewSwiper.slides.length - 1) {
|
||||
viewSwiper.slideTo(0, 1000);
|
||||
return
|
||||
}
|
||||
viewSwiper.slideNext()
|
||||
})
|
||||
|
||||
var previewSwiper = new Swiper('.preview .swiper-container', {
|
||||
//visibilityFullFit: true,
|
||||
slidesPerView: 'auto',
|
||||
allowTouchMove: false,
|
||||
on:{
|
||||
tap: function() {
|
||||
viewSwiper.slideTo(previewSwiper.clickedIndex)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function updateNavPosition() {
|
||||
$('.preview .active-nav').removeClass('active-nav')
|
||||
var activeNav = $('.preview .swiper-slide').eq(viewSwiper.activeIndex).addClass('active-nav')
|
||||
if (!activeNav.hasClass('swiper-slide-visible')) {
|
||||
if (activeNav.index() > previewSwiper.activeIndex) {
|
||||
var thumbsPerNav = Math.floor(previewSwiper.width / activeNav.width()) - 1
|
||||
previewSwiper.slideTo(activeNav.index() - thumbsPerNav)
|
||||
} else {
|
||||
previewSwiper.slideTo(activeNav.index())
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,71 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JreCms-永久开源免费的JAVA企业网站开发建设管理系统</title>
|
||||
<meta name="keywords" content="cms,免费cms,开源cms,企业cms,建站cms">
|
||||
<meta name="description" content="JreCms是一套全新内核且永久开源免费的JAVA企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的JAVA CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="#(tpath)/static/bootstrap/css/bootstrap.min.css" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/aoyun.css?v=v1.3.5" >
|
||||
<link rel="stylesheet" href="#(tpath)/static/swiper-4.3.5/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="#(tpath)/static/css/animate.css">
|
||||
<script src="#(tpath)/static/js/jquery-1.12.4.min.js" ></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
|
||||
<!-- top start -->
|
||||
#include("top.shtm")
|
||||
<!-- top end -->
|
||||
|
||||
<div class="container pages">
|
||||
|
||||
<!-- position start -->
|
||||
#include("position.html", position="搜索")
|
||||
<!-- position end -->
|
||||
|
||||
#content_page(categoryId = 104,keyword = keyword,pageNumber = pageNumber,pageSize = 12)
|
||||
<div class="row">
|
||||
#for(content : contentPage.list)
|
||||
<div class="col-12 col-sm-6 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="card-img-150"><a href="#(content.path)"><img class="card-img-top" src="#(content.ico)" alt="#(content.title)"></a></div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><a href="#(content.path)">#(abbreviate(content.title,12,''))</a></h5>
|
||||
<p class="card-text">#(abbreviate(content.text,50,''))</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
</div>
|
||||
|
||||
<!-- page start -->
|
||||
#page(pageNumber = contentPage.pageNumber,totalPages = contentPage.totalPage,pattern = currentSite.url+"/search?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
<!-- page end -->
|
||||
|
||||
#end
|
||||
|
||||
<!-- 搜索-->
|
||||
<form class="form-inline mb-5 justify-content-center" action="#(currentSite.url)/search" method="get">
|
||||
<div class="form-group mx-sm-3 mb-2">
|
||||
<input type="text" name="keyword" class="form-control" placeholder="请输入关键字">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-info mb-2">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,7 @@
|
||||
<!-- 头部大屏 -->
|
||||
<div class="jumbotron jumbotron-fluid mb-2" style="#if(currentCategory?? && currentCategory.image??)background:#e9ecef url(#(currentCategory.image)) #else background:#e9ecef url(#(tpath)/static/images/top.jpg)#end;background-size:cover;no-repeat">
|
||||
<div class="container text-light">
|
||||
<h1 class="fs-18 fs-sm-26 wow fadeInDown">#if(currentCategory??)#(currentCategory.name)#end</h1>
|
||||
<p class="fs-14 fs-sm-18 wow fadeInDown">#if(currentCategory??)#(currentCategory.subname)#end</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,47 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>关于我们</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>#(currentCategory.name)</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentCategory.categoryId)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">您当前位置:<a href="#(currentSite.url)/">首页</a> >> #(currentCategory.name)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
<div class="content">#(currentCategory.introduction)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,2 @@
|
||||
#set(tpath=base+"/templates/"+currentSite.pcTemplate)
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
<div class="contact bg">
|
||||
<div class="newstitle"><h3>联系我们</h3></div>
|
||||
<div class="blank10 clear"></div>
|
||||
<div class="contactus"><p><span style="line-height:1.5;">百度技术有限责任公司</span></p><p>
|
||||
地 址:北京市海淀区上地十街10号</p><p>
|
||||
邮 编:100085</p><p>
|
||||
总 机: (+86 10) 5992 8888</p><p>
|
||||
传 真: (+86 10) 5992 0000</p><p><br/></p></div>
|
||||
</div>
|
||||
@ -0,0 +1,13 @@
|
||||
<!--底部信息-->
|
||||
<div class="clear blank10"></div>
|
||||
<div class="footer">
|
||||
<div class="footnav">
|
||||
<a href="#(currentSite.url)/">首页</a>
|
||||
#category_root_list()
|
||||
#for(category : categorys)
|
||||
<a href="#(category.path)">#(category.name)</a>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
<div class="copyright">Powered by <a href="http://www.jrecms.com" target="_blank">JreCms</a>Copyright © 2012-2016</div>
|
||||
</div>
|
||||
@ -0,0 +1,109 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>留言</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="blank10 clear"></div>
|
||||
<div class="mainbody ">
|
||||
<div class=" bg">
|
||||
|
||||
<div class="newstitle">
|
||||
您当前位置:<a href="#(currentSite.url)/">首页</a> >> 留言
|
||||
</div>
|
||||
<div class="item-list">
|
||||
<form id="inputForm" action="#(currentSite.url)/guestbook/save" method="post">
|
||||
<table width="100%" class="table_form ">
|
||||
<tr>
|
||||
<th width="100"></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><font color="red">*</font>联系人:</th>
|
||||
<td><input type="text" value="" class="input-text" name="contact" id="contact" style='width:150px;'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> <font color="red">*</font> 手机:</th>
|
||||
<td><input type="text" value="" class="input-text" name="mobile" id="mobile" style='width:150px;'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> <font color="red">*</font> 留言内容:</th>
|
||||
<td><textarea style="width:400px;height:90px;" name="content" id="content"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> <font color="red">*</font> 验证码:</th>
|
||||
<td><input type="text" value="" class="input-text" name="captcha" id="captcha" style='width:150px;'><img id="captchaImage" src="#(currentSite.url)/common/captcha/image" title="点击更换验证码" style="height: 28px;"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th > </th>
|
||||
<td ><input type="submit" class="button" value="提 交" name="submit"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear blank10"></div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var $captchaImage = $("#captchaImage");
|
||||
|
||||
// 更换验证码
|
||||
$captchaImage.click(function() {
|
||||
$captchaImage.attr("src", "#(currentSite.url)/common/captcha/image?timestamp=" + new Date().getTime());
|
||||
});
|
||||
|
||||
$("#inputForm").submit(function() {
|
||||
var contact = $("#contact").val();
|
||||
if(contact == ""){
|
||||
alert("请输入联系人");
|
||||
return false;
|
||||
}
|
||||
var mobile = $("#mobile").val();
|
||||
if(mobile == ""){
|
||||
alert("请输入手机");
|
||||
return false;
|
||||
}
|
||||
var content = $("#content").val();
|
||||
if(content == ""){
|
||||
alert("请输入 留言内容");
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: $("#inputForm").attr("method"),
|
||||
dataType: "json",
|
||||
url: $("#inputForm").attr("action"),
|
||||
data: $("#inputForm").serialize(),
|
||||
error: function (data) { },
|
||||
success: function (data){
|
||||
if(data.type=="error"){
|
||||
alert(data.msg);
|
||||
}else{
|
||||
alert("留言成功!");
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@ -0,0 +1,62 @@
|
||||
<!-- header-->
|
||||
<div class="header">
|
||||
<a href="#(currentSite.url)/"><img src="#(currentWeb.logo)" alt="#(currentWeb.siteName)" /></a>
|
||||
<div class="tel">电话:<span>#(currentCompany.phone)</span>
|
||||
<span style="margin-left: 20px;">
|
||||
站点:
|
||||
<a href="#(base)/default_cn" style="color: #009944;">中文</a>
|
||||
<a href="#(base)/default_en" style="color: #009944;">英文</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nav-bg">
|
||||
<ul id="nav" class="nav clearfix">
|
||||
<li class="nLi on">
|
||||
<h3><a href="#(currentSite.url)/">首页</a></h3>
|
||||
</li>
|
||||
#category_root_list()
|
||||
#for(category : categorys)
|
||||
<li class="nLi on">
|
||||
<h3><a href="#(category.path)">#(category.name)</a></h3>
|
||||
</li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
jQuery("#nav").slide({ type:"menu", titCell:".nLi", targetCell:".sub",effect:"slideDown",delayTime:300,triggerTime:0,returnDefault:true});
|
||||
</script>
|
||||
</div>
|
||||
<div class="nav-bg-bottom clear"></div>
|
||||
<div class="banner">
|
||||
<!-- banner start -->
|
||||
<div id="slideBox" class="slideBox">
|
||||
<div class="hd">
|
||||
<ul>
|
||||
#slide_list(gid=1)
|
||||
#for(slide : slides)
|
||||
<li>#(for.index+1)</li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bd">
|
||||
<ul>
|
||||
#slide_list(gid=1)
|
||||
#for(slide : slides)
|
||||
<li><a href="javascript:;" target="_blank"><img src="#(slide.image)" /></a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 下面是前/后按钮代码,如果不需要删除即可 -->
|
||||
<a class="prev" href="javascript:void(0)"></a>
|
||||
<a class="next" href="javascript:void(0)"></a>
|
||||
</div>
|
||||
<!-- banner end -->
|
||||
<script id="jsID" type="text/javascript">
|
||||
jQuery(".slideBox").slide({mainCell:".bd ul",effect:"leftLoop",autoPlay:true,delayTime:1000,interTime:4000});
|
||||
</script>
|
||||
</div>
|
||||
<div class="blank20 clear"></div>
|
||||
@ -0,0 +1,99 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>首页</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w740 fl">
|
||||
<!-- indexnewslist-->
|
||||
#category(id =2)
|
||||
<div class="newwarp bg">
|
||||
<div class="newstitle"><h3>#(category.name)</h3><a href="#(category.path)" class="more">更多>></a></div>
|
||||
#content_list(categoryId=category.id,count=1)
|
||||
#for(content : contents)
|
||||
<div class="newsfocus">
|
||||
<div><a href="#(content.path)"><img src="#(content.ico)" /></a></div>
|
||||
<h3><a href="#(content.path)" title="#(content.title)">#(abbreviate(content.title,34,"..."))</a></h3>
|
||||
<p>#(abbreviate(content.text,34,"..."))</p>
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
<ul class="indexnewslist">
|
||||
#content_list(categoryId=category.id,start=1,count=3)
|
||||
#for(content : contents)
|
||||
<li><span>#date(content.createDate, "yyyy-MM-dd")</span>· <a href="#(content.path)">#(abbreviate(content.title,34,"..."))</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
#end
|
||||
|
||||
<!-- aboutus-->
|
||||
<div class="aboutus bg">
|
||||
#category(id =5)
|
||||
<div class="newstitle"><h3>#(category.name)</h3>
|
||||
<a href="#(category.path)" class="more">更多>></a>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#(abbreviate(category.text,200,"..."))
|
||||
#end
|
||||
</div>
|
||||
<!-- /aboutus-->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<!-- 联系我们 start -->
|
||||
<div class="w210 fr">
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<!-- 联系我们 end -->
|
||||
<div class="blank10 clear"></div>
|
||||
#category(id = 1)
|
||||
<div class="picMarquee-left bg">
|
||||
<div class="hd">
|
||||
<h3>#(category.name)</h3>
|
||||
<a class="next"></a>
|
||||
<a class="prev"></a>
|
||||
</div>
|
||||
<div class="bd">
|
||||
<ul class="picList">
|
||||
#content_list(categoryId=category.id,count=10)
|
||||
#for(content : contents)
|
||||
<li>
|
||||
<div class="pic"><a href="#(content.path)" target="_blank"><img src="#(content.ico)" /></a></div>
|
||||
</li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div> <div class="blank10 clear"></div>
|
||||
|
||||
</div>
|
||||
#end
|
||||
<script type="text/javascript">
|
||||
jQuery(".picMarquee-left").slide({mainCell:".bd ul",autoPlay:true,effect:"leftMarquee",vis:6,interTime:50,trigger:"click"});
|
||||
</script>
|
||||
<div class="blank10 clear"></div>
|
||||
|
||||
<div class="link bg">友情连接:
|
||||
#friend_link_list()
|
||||
#for(friendLink : friendLinks)
|
||||
<a href="#(friendLink.url)" target="_blank">#(friendLink.name)</a>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,49 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>文章内容页</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>文章分类</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentContent.category.id)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">您当前位置:<a href="#(currentSite.url)/">首页</a> >> #(currentContent.category.name)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
<h2>#(currentContent.title)</h2>
|
||||
<div class="info">时间:#date(currentContent.createDate,"yyyy-MM-dd") 点击:<script src="#(currentSite.url)/content/visits?id=#(currentContent.id)"></script>次</div>
|
||||
<div class="content">#(currentContent.introduction)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,65 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>文章列表页</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>文章分类</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentCategory.id)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">您当前位置:<a href="#(currentSite.url)/">首页</a> >> 文章列表</div>
|
||||
<div class="blank10 clear"></div>
|
||||
<!--列表开始-->
|
||||
<div class="newslist">
|
||||
#content_page(categoryId = currentCategory.id,pageNumber = pageNumber,pageSize = 9)
|
||||
<ul class="noborder">
|
||||
#for(content : contentPage.list)
|
||||
<li><span class="date">#date(content.createDate,"yyyy-MM-dd")</span> <a href="#(content.path)">· #(content.title)</a></li>
|
||||
#end
|
||||
</ul>
|
||||
<div class="listpage" >
|
||||
#page(pageNumber = contentPage.pageNumber,totalPages = contentPage.totalPage,pattern = currentCategory.path+"?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
</div>
|
||||
#end
|
||||
</div>
|
||||
<!--列表结束-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,21 @@
|
||||
<div class="pageBtn">
|
||||
#if(totalPages>1)
|
||||
#if(hasPrevious)
|
||||
<a href="#(pattern)#(previousPageNumber)" class="page_prev">上一页</a>
|
||||
#else
|
||||
<a href="javascript:;" class="page_prev on">上一页</a>
|
||||
#end
|
||||
#for(segmentPageNumber : segment)
|
||||
#if(segmentPageNumber != pageNumber)
|
||||
<a href="#(pattern)#(segmentPageNumber)">#(segmentPageNumber)</a>
|
||||
#else
|
||||
<a href="javascript:;" class="page_num on">#(segmentPageNumber)</a>
|
||||
#end
|
||||
#end
|
||||
#if(hasNext)
|
||||
<a href="#(pattern)#(nextPageNumber)" class="page_next">下一页</a>
|
||||
#else
|
||||
<a href="javascript:;" class="page_next on">下一页</a>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
@ -0,0 +1,49 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>商品内容页</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>产品分类</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentContent.categoryId)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">您当前位置:<a href="#(currentSite.url)/">首页</a> >> #(currentContent.category.name)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
<h2>#(currentContent.title)</h2>
|
||||
<div class="info">时间:#date(currentContent.createDate,"yyyy-MM-dd") 点击:<script src="#(currentSite.url)/content/visits?id=#(currentContent.id)"></script>次</div>
|
||||
<div class="content">#(currentContent.introduction)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,70 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>商品列表页</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>产品分类</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentCategory.id)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">您当前位置:<a href="#(currentSite.url)/">首页</a> >> 商品列表</div>
|
||||
<div class="blank10 clear"></div>
|
||||
|
||||
<!--列表开始-->
|
||||
<div class="piclist">
|
||||
#content_page(categoryId = currentCategory.id,pageNumber = pageNumber,pageSize = 9)
|
||||
<ul class="noborder">
|
||||
#for(content : contentPage.list)
|
||||
<li>
|
||||
<div><a href="#(content.path)"><img src="#(content.ico)" /></a></div>
|
||||
<div class="picname"><a href="#(content.path)">#(content.title)</a></div>
|
||||
</li>
|
||||
#end
|
||||
|
||||
</ul>
|
||||
<div class="listpage" >
|
||||
#page(pageNumber = contentPage.pageNumber,totalPages = contentPage.totalPage,pattern = currentCategory.path+"?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
</div>
|
||||
#end
|
||||
</div>
|
||||
<!--列表结束-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,63 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>视频内容页</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/videojs/video-js.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
<script src="#(tpath)/static/videojs/video.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>视频分类</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentContent.categoryId)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">您当前位置:<a href="#(currentSite.url)/">首页</a> >> #(currentContent.category.name)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
<h2>#(currentContent.title)</h2>
|
||||
<div class="info">时间:#date(currentContent.createDate,"yyyy-MM-dd") 点击:<script src="#(currentSite.url)/content/visits?id=#(currentContent.id)"></script>次</div>
|
||||
<div class="content">
|
||||
<div style="margin: 0 auto;width: 434px;">
|
||||
<video width="434" height="290" class="video-js vjs-default-skin" controls preload="none" data-setup="{}" poster="#(currentContent.getAttribute('videoPic'))">
|
||||
<source src="#(currentContent.getAttribute('videoFile'))" type="video/mp4" id="mongofile"/>
|
||||
<track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
|
||||
<track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
|
||||
</video>
|
||||
</div>
|
||||
<a href="#(currentSite.url)/common/down/file?fileKey=#(currentContent.getAttribute('videoFile'))">下载</a>
|
||||
<div>
|
||||
#(currentContent.introduction)
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,70 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>视频列表页</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>视频分类</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentCategory.id)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">您当前位置:<a href="#(currentSite.url)/">首页</a> >> 视频列表</div>
|
||||
<div class="blank10 clear"></div>
|
||||
|
||||
<!--列表开始-->
|
||||
<div class="piclist">
|
||||
#content_page(categoryId = currentCategory.id,pageNumber = pageNumber,pageSize = 9)
|
||||
<ul class="noborder">
|
||||
#for(content : contentPage.list)
|
||||
<li>
|
||||
<div><a href="#(content.path)"><img src="#(content.ico)" /></a></div>
|
||||
<div class="picname"><a href="#(content.path)">#(content.title)</a></div>
|
||||
</li>
|
||||
#end
|
||||
|
||||
</ul>
|
||||
<div class="listpage" >
|
||||
#page(pageNumber = contentPage.pageNumber,totalPages = contentPage.totalPage,pattern = currentCategory.path+"?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
</div>
|
||||
#end
|
||||
</div>
|
||||
<!--列表结束-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,47 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>about us</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>#(currentCategory.name)</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentCategory.categoryId)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">position:<a href="#(currentSite.url)/">home</a> >> #(currentCategory.name)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
<div class="content">#(currentCategory.introduction)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,2 @@
|
||||
#set(tpath=base+"/templates/"+currentSite.pcTemplate)
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
<div class="contact bg">
|
||||
<div class="newstitle"><h3>Contact us</h3></div>
|
||||
<div class="blank10 clear"></div>
|
||||
<div class="contactus"><p><span style="line-height:1.5;">Baidu Technology Co., Ltd.</span></p><p>
|
||||
Address:10 Shangdi Tenth Street, Haidian District, Beijing</p><p>
|
||||
Zipcode:100085</p><p>
|
||||
Phone: (+86 10) 5992 8888</p><p>
|
||||
Fax: (+86 10) 5992 0000</p><p><br/></p></div>
|
||||
</div>
|
||||
@ -0,0 +1,13 @@
|
||||
<!--底部信息-->
|
||||
<div class="clear blank10"></div>
|
||||
<div class="footer">
|
||||
<div class="footnav">
|
||||
<a href="#(currentSite.url)/">home</a>
|
||||
#category_root_list()
|
||||
#for(category : categorys)
|
||||
<a href="#(category.path)">#(category.name)</a>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
<div class="copyright">Powered by <a href="http://www.jrecms.com" target="_blank">JreCms</a>Copyright © 2012-2016</div>
|
||||
</div>
|
||||
@ -0,0 +1,109 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Leaving</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="blank10 clear"></div>
|
||||
<div class="mainbody ">
|
||||
<div class=" bg">
|
||||
|
||||
<div class="newstitle">
|
||||
position:<a href="#(currentSite.url)/">home</a> >> Leaving
|
||||
</div>
|
||||
<div class="item-list">
|
||||
<form id="inputForm" action="#(currentSite.url)/guestbook/save" method="post">
|
||||
<table width="100%" class="table_form ">
|
||||
<tr>
|
||||
<th width="100"></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><font color="red">*</font>contact:</th>
|
||||
<td><input type="text" value="" class="input-text" name="contact" id="contact" style='width:150px;'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> <font color="red">*</font>mobile:</th>
|
||||
<td><input type="text" value="" class="input-text" name="mobile" id="mobile" style='width:150px;'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> <font color="red">*</font>content:</th>
|
||||
<td><textarea style="width:400px;height:90px;" name="content" id="content"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> <font color="red">*</font>captcha:</th>
|
||||
<td><input type="text" value="" class="input-text" name="captcha" id="captcha" style='width:150px;'><img id="captchaImage" src="#(currentSite.url)/common/captcha/image" title="点击更换验证码" style="height: 28px;"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th > </th>
|
||||
<td ><input type="submit" class="button" value="submit" name="submit"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear blank10"></div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var $captchaImage = $("#captchaImage");
|
||||
|
||||
// 更换验证码
|
||||
$captchaImage.click(function() {
|
||||
$captchaImage.attr("src", "#(currentSite.url)/common/captcha/image?timestamp=" + new Date().getTime());
|
||||
});
|
||||
|
||||
$("#inputForm").submit(function() {
|
||||
var contact = $("#contact").val();
|
||||
if(contact == ""){
|
||||
alert("Please enter contact.");
|
||||
return false;
|
||||
}
|
||||
var mobile = $("#mobile").val();
|
||||
if(mobile == ""){
|
||||
alert("Please enter mobile");
|
||||
return false;
|
||||
}
|
||||
var content = $("#content").val();
|
||||
if(content == ""){
|
||||
alert("Please enter your content");
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: $("#inputForm").attr("method"),
|
||||
dataType: "json",
|
||||
url: $("#inputForm").attr("action"),
|
||||
data: $("#inputForm").serialize(),
|
||||
error: function (data) { },
|
||||
success: function (data){
|
||||
if(data.type=="error"){
|
||||
alert(data.msg);
|
||||
}else{
|
||||
alert("Guestbook Sucess!");
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@ -0,0 +1,65 @@
|
||||
<!-- header-->
|
||||
<div class="header">
|
||||
<a href="#(currentSite.url)/"><img src="#(currentWeb.logo)" alt="#(currentWeb.siteName)" /></a>
|
||||
<div class="tel">tel:<span>#(currentCompany.phone)</span>
|
||||
<span style="margin-left: 20px;">
|
||||
site:
|
||||
<a href="#(base)/default_cn" style="color: #009944;">Chinese</a>
|
||||
<a href="#(base)/default_en" style="color: #009944;">English</a>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-bg">
|
||||
<ul id="nav" class="nav clearfix">
|
||||
<li class="nLi on">
|
||||
<h3><a href="#(currentSite.url)/">home</a></h3>
|
||||
</li>
|
||||
#category_root_list()
|
||||
#for(category : categorys)
|
||||
<li class="nLi on">
|
||||
<h3><a href="#(category.path)">#(category.name)</a></h3>
|
||||
</li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
jQuery("#nav").slide({ type:"menu", titCell:".nLi", targetCell:".sub",effect:"slideDown",delayTime:300,triggerTime:0,returnDefault:true});
|
||||
</script>
|
||||
</div>
|
||||
<div class="nav-bg-bottom clear"></div>
|
||||
<div class="banner">
|
||||
<!-- banner start -->
|
||||
<div id="slideBox" class="slideBox">
|
||||
<div class="hd">
|
||||
<ul>
|
||||
#slide_list(gid=1)
|
||||
#for(slide : slides)
|
||||
<li>#(for.index+1)</li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bd">
|
||||
<ul>
|
||||
#slide_list(gid=1)
|
||||
#for(slide : slides)
|
||||
<li><a href="javascript:;" target="_blank"><img src="#(slide.image)" /></a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 下面是前/后按钮代码,如果不需要删除即可 -->
|
||||
<a class="prev" href="javascript:void(0)"></a>
|
||||
<a class="next" href="javascript:void(0)"></a>
|
||||
</div>
|
||||
<!-- banner end -->
|
||||
<script id="jsID" type="text/javascript">
|
||||
jQuery(".slideBox").slide({mainCell:".bd ul",effect:"leftLoop",autoPlay:true,delayTime:1000,interTime:4000});
|
||||
</script>
|
||||
</div>
|
||||
<div class="blank20 clear"></div>
|
||||
@ -0,0 +1,99 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>home</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w740 fl">
|
||||
<!-- indexnewslist-->
|
||||
#category(id =12)
|
||||
<div class="newwarp bg">
|
||||
<div class="newstitle"><h3>#(category.name)</h3><a href="#(category.path)" class="more">more>></a></div>
|
||||
#content_list(categoryId=category.id,count=1)
|
||||
#for(content : contents)
|
||||
<div class="newsfocus">
|
||||
<div><a href="#(content.path)"><img src="#(content.ico)" /></a></div>
|
||||
<h3><a href="#(content.path)" title="#(content.title)">#(abbreviate(content.title,34,"..."))</a></h3>
|
||||
<p>#(abbreviate(content.text,34,"..."))</p>
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
<ul class="indexnewslist">
|
||||
#content_list(categoryId=category.id,start=1,count=3)
|
||||
#for(content : contents)
|
||||
<li><span>#date(content.createDate, "yyyy-MM-dd")</span>· <a href="#(content.path)">#(abbreviate(content.title,34,"..."))</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
#end
|
||||
|
||||
<!-- aboutus-->
|
||||
<div class="aboutus bg">
|
||||
#category(id =15)
|
||||
<div class="newstitle"><h3>#(category.name)</h3>
|
||||
<a href="#(category.path)" class="more">more>></a>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#(abbreviate(category.text,200,"..."))
|
||||
#end
|
||||
</div>
|
||||
<!-- /aboutus-->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<!-- 联系我们 start -->
|
||||
<div class="w210 fr">
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<!-- 联系我们 end -->
|
||||
<div class="blank10 clear"></div>
|
||||
#category(id = 11)
|
||||
<div class="picMarquee-left bg">
|
||||
<div class="hd">
|
||||
<h3>#(category.name)</h3>
|
||||
<a class="next"></a>
|
||||
<a class="prev"></a>
|
||||
</div>
|
||||
<div class="bd">
|
||||
<ul class="picList">
|
||||
#content_list(categoryId=category.id,count=10)
|
||||
#for(content : contents)
|
||||
<li>
|
||||
<div class="pic"><a href="#(content.path)" target="_blank"><img src="#(content.ico)" /></a></div>
|
||||
</li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div> <div class="blank10 clear"></div>
|
||||
|
||||
</div>
|
||||
#end
|
||||
<script type="text/javascript">
|
||||
jQuery(".picMarquee-left").slide({mainCell:".bd ul",autoPlay:true,effect:"leftMarquee",vis:6,interTime:50,trigger:"click"});
|
||||
</script>
|
||||
<div class="blank10 clear"></div>
|
||||
|
||||
<div class="link bg">friendly links:
|
||||
#friend_link_list()
|
||||
#for(friendLink : friendLinks)
|
||||
<a href="#(friendLink.url)" target="_blank">#(friendLink.name)</a>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,49 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Article Detail</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>Article Category</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentContent.category.id)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">position:<a href="#(currentSite.url)/">home</a> >> #(currentContent.category.name)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
<h2>#(currentContent.title)</h2>
|
||||
<div class="info">date:#date(currentContent.createDate,"yyyy-MM-dd") click:<script src="#(currentSite.url)/content/visits?id=#(currentContent.id)"></script>次</div>
|
||||
<div class="content">#(currentContent.introduction)</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,65 @@
|
||||
<!-- common start -->
|
||||
#include("common.shtm")
|
||||
<!-- common end -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Article List</title>
|
||||
<link rel="stylesheet" type="text/css" href="#(tpath)/static/css/css.css">
|
||||
<script src="#(tpath)/static/js/jquery.min.js"></script>
|
||||
<script src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- header start -->
|
||||
#include("header.shtm")
|
||||
<!-- header end -->
|
||||
<div class="mainbody">
|
||||
<div class="w210 fl">
|
||||
<div class="sidenav bg">
|
||||
<div class="title"><s></s>Article Category</div>
|
||||
<div class="leftbox">
|
||||
<ul>
|
||||
#category_children_list(categoryId=currentCategory.id)
|
||||
#for(category : categorys)
|
||||
<li><s></s><a class="select" href="#(category.path)">#(category.name)</a></li>
|
||||
#end
|
||||
#end
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
#include("contact.shtm")
|
||||
</div>
|
||||
<div class="w740 fr">
|
||||
<div class="page bg">
|
||||
<div class="newstitle">position:<a href="#(currentSite.url)/">home</a> >> Article List</div>
|
||||
<div class="blank10 clear"></div>
|
||||
<!--列表开始-->
|
||||
<div class="newslist">
|
||||
#content_page(categoryId = currentCategory.id,pageNumber = pageNumber,pageSize = 9)
|
||||
<ul class="noborder">
|
||||
#for(content : contentPage.list)
|
||||
<li><span class="date">#date(content.createDate,"yyyy-MM-dd")</span> <a href="#(content.path)">· #(content.title)</a></li>
|
||||
#end
|
||||
</ul>
|
||||
<div class="listpage" >
|
||||
#page(pageNumber = contentPage.pageNumber,totalPages = contentPage.totalPage,pattern = currentCategory.path+"?pageNumber=")
|
||||
#include("page.shtm")
|
||||
#end
|
||||
</div>
|
||||
#end
|
||||
</div>
|
||||
<!--列表结束-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="blank10 clear"></div>
|
||||
</div>
|
||||
<!-- footer start -->
|
||||
#include("footer.shtm")
|
||||
<!-- footer end -->
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user