Compare commits
70 Commits
@ -0,0 +1,59 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "admins")
|
||||||
|
public class Admins implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "username")
|
||||||
|
private String username;
|
||||||
|
@Column(name = "pwd")
|
||||||
|
private String pwd;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username == null ? "" : username.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPwd() {
|
||||||
|
return pwd;
|
||||||
|
}
|
||||||
|
public void setPwd(String pwd) {
|
||||||
|
this.pwd = pwd == null ? "" : pwd.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Admins;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface AdminsMapper extends MapperBase<Admins> {
|
||||||
|
Admins login(Admins admins);
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package com.spring.service;
|
||||||
|
|
||||||
|
import com.base.IServiceBase;
|
||||||
|
import com.spring.entity.Admins;
|
||||||
|
|
||||||
|
public interface AdminsService extends IServiceBase<Admins> {
|
||||||
|
public Admins login(String username, String password);
|
||||||
|
public boolean updatePassword(int id, String newPassword);
|
||||||
|
}
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="app">
|
|
||||||
<router-view/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
html,body,#app{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -0,0 +1,255 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.spring.util.JsonResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 控制器基类
|
||||||
|
*/
|
||||||
|
abstract public class BaseController {
|
||||||
|
@Autowired
|
||||||
|
protected HttpServletRequest request; // 注入
|
||||||
|
@Autowired
|
||||||
|
protected HttpServletResponse response; // 注入
|
||||||
|
@Autowired
|
||||||
|
protected HttpSession session; // 注入
|
||||||
|
|
||||||
|
protected ModelAndView mView;
|
||||||
|
|
||||||
|
protected Map<Object,Object> _var;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 控制器
|
||||||
|
*/
|
||||||
|
public BaseController()
|
||||||
|
{
|
||||||
|
//request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||||
|
//response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
|
||||||
|
mView = new ModelAndView();
|
||||||
|
_var = new LinkedHashMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 往模板中写入数据
|
||||||
|
* @param name
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
|
protected void assign(String name , Object value)
|
||||||
|
{
|
||||||
|
request.setAttribute(name , value);
|
||||||
|
_var.put(name , value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出框
|
||||||
|
* @param message
|
||||||
|
* @param code
|
||||||
|
* @param jumpUrl
|
||||||
|
* @param jumpTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showMessage( String message , int code , Object data , String jumpUrl , int jumpTime)
|
||||||
|
{
|
||||||
|
if(isAjax())
|
||||||
|
{
|
||||||
|
JsonResult jsonResult = new JsonResult(code , message , data);
|
||||||
|
return renderString(response , JSON.toJSONString(jsonResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
assign("message" , message == null ? data : message);
|
||||||
|
assign("code" , code);
|
||||||
|
assign("jumpUrl" , jumpUrl);
|
||||||
|
assign("jumpTime" , jumpTime);
|
||||||
|
|
||||||
|
return "message";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将写入json写到前端
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String json()
|
||||||
|
{
|
||||||
|
return jsonResult(_var);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String jsonReturn(String message , int code , Object data)
|
||||||
|
{
|
||||||
|
JsonResult result = new JsonResult(code , message , data);
|
||||||
|
return renderString(response , JSON.toJSONString(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String jsonResult(Object data)
|
||||||
|
{
|
||||||
|
return jsonReturn(null , 0 , data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String jsonError(String msg)
|
||||||
|
{
|
||||||
|
return jsonReturn(msg , 1 , null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getRequestAttributeMap()
|
||||||
|
{
|
||||||
|
//Map<Object,Object> map = new LinkedHashMap();
|
||||||
|
Enumeration<String> names = request.getAttributeNames();
|
||||||
|
|
||||||
|
while (names.hasMoreElements())
|
||||||
|
{
|
||||||
|
String key = names.nextElement();
|
||||||
|
if(!_var.containsKey(key)){
|
||||||
|
// 没有,则写入
|
||||||
|
_var.put(key , request.getAttribute(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _var;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJson()
|
||||||
|
{
|
||||||
|
Map<Object,Object> map = new LinkedHashMap();
|
||||||
|
Enumeration<String> names = request.getAttributeNames();
|
||||||
|
|
||||||
|
while (names.hasMoreElements())
|
||||||
|
{
|
||||||
|
String key = names.nextElement();
|
||||||
|
Object value = request.getAttribute(key);
|
||||||
|
map.put(key , value);
|
||||||
|
}
|
||||||
|
return renderString(response , JSON.toJSONString(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字符串渲染到客户端
|
||||||
|
*
|
||||||
|
* @param response 渲染对象
|
||||||
|
* @param string 待渲染的字符串
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
public String renderString(HttpServletResponse response, String string)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
request.getSession();
|
||||||
|
OutputStream stream = response.getOutputStream();
|
||||||
|
response.setContentType("application/json");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
stream.write(string.getBytes());
|
||||||
|
stream.flush();
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return "success";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean isAjax()
|
||||||
|
{
|
||||||
|
String accept = request.getHeader("accept");
|
||||||
|
if (accept != null && accept.indexOf("application/json") != -1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String xRequestedWith = request.getHeader("X-Requested-With");
|
||||||
|
if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String ajax = request.getParameter("format");
|
||||||
|
if ("json".equalsIgnoreCase(ajax))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测是否登录
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected boolean checkLogin()
|
||||||
|
{
|
||||||
|
if(request.getSession().getAttribute("username") == null || "".equals(request.getSession().getAttribute("username")))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出错误信息
|
||||||
|
* @param message
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showError(String message)
|
||||||
|
{
|
||||||
|
return showMessage(message , 1 ,null, "javascript:history(-1);" , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出错误信息
|
||||||
|
* @param message
|
||||||
|
* @param code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showError(String message , int code)
|
||||||
|
{
|
||||||
|
return showMessage(message , code , null,"javascript:history(-1);" , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出错误信息
|
||||||
|
* @param message
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showError(String message , String url)
|
||||||
|
{
|
||||||
|
return showMessage(message , 1 ,null, url , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出成功信息
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showSuccess(Object data )
|
||||||
|
{
|
||||||
|
return showMessage(null , 0 ,data, request.getHeader("referer") , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出成功信息
|
||||||
|
* @param data
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showSuccess(String data , String url)
|
||||||
|
{
|
||||||
|
return showMessage(null , 0 ,data, url , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
package com.spring.util;
|
||||||
|
|
||||||
|
import net.jntoo.annotation.QueryCollect;
|
||||||
|
import net.jntoo.db.Collect;
|
||||||
|
import util.Request;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据库jntoo-query.jar要求写代码
|
||||||
|
*/
|
||||||
|
@QueryCollect
|
||||||
|
public class CollectList extends Collect {
|
||||||
|
|
||||||
|
protected HttpServletRequest request;
|
||||||
|
|
||||||
|
public CollectList(Long count, Integer pagesize) {
|
||||||
|
super(count , pagesize);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CollectList(Long count, Integer pagesize, Integer page)
|
||||||
|
{
|
||||||
|
super(count, pagesize, page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取url 规则
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected String getRequestUrlPath() {
|
||||||
|
request = Request.getRequest();
|
||||||
|
String queryString = request.getQueryString();
|
||||||
|
if(queryString == null){
|
||||||
|
queryString = "";
|
||||||
|
}
|
||||||
|
StringBuffer buffer = new StringBuffer(queryString.length()+16);
|
||||||
|
String requestURI = request.getRequestURI();
|
||||||
|
buffer.append(requestURI).append("?");
|
||||||
|
Map<String,String[]> param = request.getParameterMap();
|
||||||
|
String name = "";
|
||||||
|
String value = "";
|
||||||
|
boolean isSearchPage = false;
|
||||||
|
int page = -1;
|
||||||
|
|
||||||
|
for (Map.Entry<String, String[]> entry : param.entrySet()) {
|
||||||
|
try{
|
||||||
|
name = entry.getKey();
|
||||||
|
String[] values = entry.getValue();
|
||||||
|
|
||||||
|
if(name.equals("page")){
|
||||||
|
page = Integer.valueOf(values[0]).intValue();
|
||||||
|
buffer.append(name).append("=").append("{page}").append("&");
|
||||||
|
isSearchPage = true;
|
||||||
|
} else if (null == values) {
|
||||||
|
buffer.append(name).append("=").append("&");
|
||||||
|
} else if (values.length>1) {
|
||||||
|
for (int i = 0; i < values.length; i++) { //用于请求参数中有多个相同名称
|
||||||
|
value = URLEncoder.encode(values[i] , "UTF-8");
|
||||||
|
buffer.append(name).append("=").append(value).append("&");
|
||||||
|
}
|
||||||
|
//value = value.substring(0, value.length() - 1);
|
||||||
|
} else {
|
||||||
|
value = URLEncoder.encode(values[0] , "UTF-8");
|
||||||
|
buffer.append(name).append("=").append(value).append("&");//用于请求参数中请求参数名唯一
|
||||||
|
}
|
||||||
|
}catch (UnsupportedEncodingException e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.page == -1){
|
||||||
|
this.page = page;
|
||||||
|
}
|
||||||
|
this.page = Math.max(this.page , 1);
|
||||||
|
|
||||||
|
if(!isSearchPage){
|
||||||
|
buffer.append("page={page}&");
|
||||||
|
}
|
||||||
|
String result = buffer.toString();
|
||||||
|
return result.substring(0 , result.length()-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页渲染完成后处理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void readerReady() {
|
||||||
|
String info = getInfo();
|
||||||
|
HashMap map = new HashMap();
|
||||||
|
map.put("info" , info);
|
||||||
|
request.setAttribute("page" , map);
|
||||||
|
request.setAttribute("totalCount" , count);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "difangmeishi")
|
||||||
|
public class Difangmeishi implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "meishibianhao")
|
||||||
|
private String meishibianhao;
|
||||||
|
@Column(name = "mingcheng")
|
||||||
|
private String mingcheng;
|
||||||
|
@Column(name = "fujinjingdian")
|
||||||
|
private String fujinjingdian;
|
||||||
|
@Column(name = "fenlei")
|
||||||
|
private String fenlei;
|
||||||
|
@Column(name = "tupian")
|
||||||
|
private String tupian;
|
||||||
|
@Column(name = "jiage")
|
||||||
|
private Double jiage;
|
||||||
|
@Column(name = "meishijianjie")
|
||||||
|
private String meishijianjie;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getMeishibianhao() {
|
||||||
|
return meishibianhao;
|
||||||
|
}
|
||||||
|
public void setMeishibianhao(String meishibianhao) {
|
||||||
|
this.meishibianhao = meishibianhao == null ? "" : meishibianhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMingcheng() {
|
||||||
|
return mingcheng;
|
||||||
|
}
|
||||||
|
public void setMingcheng(String mingcheng) {
|
||||||
|
this.mingcheng = mingcheng == null ? "" : mingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFujinjingdian() {
|
||||||
|
return fujinjingdian;
|
||||||
|
}
|
||||||
|
public void setFujinjingdian(String fujinjingdian) {
|
||||||
|
this.fujinjingdian = fujinjingdian == null ? "" : fujinjingdian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFenlei() {
|
||||||
|
return fenlei;
|
||||||
|
}
|
||||||
|
public void setFenlei(String fenlei) {
|
||||||
|
this.fenlei = fenlei == null ? "" : fenlei.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTupian() {
|
||||||
|
return tupian;
|
||||||
|
}
|
||||||
|
public void setTupian(String tupian) {
|
||||||
|
this.tupian = tupian == null ? "" : tupian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getJiage() {
|
||||||
|
return jiage;
|
||||||
|
}
|
||||||
|
public void setJiage(Double jiage) {
|
||||||
|
this.jiage = jiage == null ? 0.0f : jiage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMeishijianjie() {
|
||||||
|
return meishijianjie;
|
||||||
|
}
|
||||||
|
public void setMeishijianjie(String meishijianjie) {
|
||||||
|
this.meishijianjie = meishijianjie == null ? "" : meishijianjie.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Difangmeishi;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface DifangmeishiMapper extends MapperBase<Difangmeishi> {
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "diqu")
|
||||||
|
public class Diqu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "diqumingcheng")
|
||||||
|
private String diqumingcheng;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getDiqumingcheng() {
|
||||||
|
return diqumingcheng;
|
||||||
|
}
|
||||||
|
public void setDiqumingcheng(String diqumingcheng) {
|
||||||
|
this.diqumingcheng = diqumingcheng == null ? "" : diqumingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Diqu;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface DiquMapper extends MapperBase<Diqu> {
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package com.base;
|
||||||
|
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Service基本类接口
|
||||||
|
* @param <E>
|
||||||
|
*/
|
||||||
|
public interface IServiceBase<E> {
|
||||||
|
public List<E> select();
|
||||||
|
public List<E> select(E y);
|
||||||
|
public E find(Object id);
|
||||||
|
public E findEntity(E id);
|
||||||
|
public List<E> selectPage(E obj, int page, int pageSize);
|
||||||
|
public List<E> selectPageExample(Example obj , int page , int pageSize);
|
||||||
|
public int delete(Object id);
|
||||||
|
public int insert(E y);
|
||||||
|
public int update(E y);
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import util.*;
|
||||||
|
import java.util.*;
|
||||||
|
import dao.CommDAO;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
import com.alibaba.fastjson.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页控制器
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class IndexController extends BaseController{
|
||||||
|
|
||||||
|
// 首页
|
||||||
|
@RequestMapping(value = {"/" , "index"})
|
||||||
|
public String Index()
|
||||||
|
{
|
||||||
|
|
||||||
|
ArrayList<HashMap> bhtList = Query.make("lunbotu").order("id desc").limit(5).select();
|
||||||
|
assign("bhtList" , bhtList);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<HashMap> jingdianxinxilist1 = Query.make("jingdianxinxi").limit(4).order("liulanliang desc").select();
|
||||||
|
assign("jingdianxinxilist1" , jingdianxinxilist1);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<HashMap> difangmeishilist2 = Query.make("difangmeishi").limit(4).order("id desc").select();
|
||||||
|
assign("difangmeishilist2" , difangmeishilist2);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<HashMap> lvyouxianlulist3 = Query.make("lvyouxianlu").limit(4).order("id desc").select();
|
||||||
|
assign("lvyouxianlulist3" , lvyouxianlulist3);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<HashMap> xinwenxinxilist4 = Query.make("xinwenxinxi").limit(4).order("id desc").select();
|
||||||
|
assign("xinwenxinxilist4" , xinwenxinxilist4);
|
||||||
|
if(isAjax())
|
||||||
|
{
|
||||||
|
return json();
|
||||||
|
}
|
||||||
|
return "index";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,131 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "jingdianxinxi")
|
||||||
|
public class Jingdianxinxi implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "jingdianbianhao")
|
||||||
|
private String jingdianbianhao;
|
||||||
|
@Column(name = "jingdianmingcheng")
|
||||||
|
private String jingdianmingcheng;
|
||||||
|
@Column(name = "suoshudiqu")
|
||||||
|
private String suoshudiqu;
|
||||||
|
@Column(name = "tupian")
|
||||||
|
private String tupian;
|
||||||
|
@Column(name = "kaifangshijian")
|
||||||
|
private String kaifangshijian;
|
||||||
|
@Column(name = "fujinmeishi")
|
||||||
|
private String fujinmeishi;
|
||||||
|
@Column(name = "dizhi")
|
||||||
|
private String dizhi;
|
||||||
|
@Column(name = "piaojia")
|
||||||
|
private Double piaojia;
|
||||||
|
@Column(name = "liulanliang")
|
||||||
|
private Integer liulanliang;
|
||||||
|
@Column(name = "miaoshu")
|
||||||
|
private String miaoshu;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getJingdianbianhao() {
|
||||||
|
return jingdianbianhao;
|
||||||
|
}
|
||||||
|
public void setJingdianbianhao(String jingdianbianhao) {
|
||||||
|
this.jingdianbianhao = jingdianbianhao == null ? "" : jingdianbianhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJingdianmingcheng() {
|
||||||
|
return jingdianmingcheng;
|
||||||
|
}
|
||||||
|
public void setJingdianmingcheng(String jingdianmingcheng) {
|
||||||
|
this.jingdianmingcheng = jingdianmingcheng == null ? "" : jingdianmingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuoshudiqu() {
|
||||||
|
return suoshudiqu;
|
||||||
|
}
|
||||||
|
public void setSuoshudiqu(String suoshudiqu) {
|
||||||
|
this.suoshudiqu = suoshudiqu == null ? "" : suoshudiqu.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTupian() {
|
||||||
|
return tupian;
|
||||||
|
}
|
||||||
|
public void setTupian(String tupian) {
|
||||||
|
this.tupian = tupian == null ? "" : tupian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKaifangshijian() {
|
||||||
|
return kaifangshijian;
|
||||||
|
}
|
||||||
|
public void setKaifangshijian(String kaifangshijian) {
|
||||||
|
this.kaifangshijian = kaifangshijian == null ? "" : kaifangshijian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFujinmeishi() {
|
||||||
|
return fujinmeishi;
|
||||||
|
}
|
||||||
|
public void setFujinmeishi(String fujinmeishi) {
|
||||||
|
this.fujinmeishi = fujinmeishi == null ? "" : fujinmeishi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDizhi() {
|
||||||
|
return dizhi;
|
||||||
|
}
|
||||||
|
public void setDizhi(String dizhi) {
|
||||||
|
this.dizhi = dizhi == null ? "" : dizhi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getPiaojia() {
|
||||||
|
return piaojia;
|
||||||
|
}
|
||||||
|
public void setPiaojia(Double piaojia) {
|
||||||
|
this.piaojia = piaojia == null ? 0.0f : piaojia;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLiulanliang() {
|
||||||
|
return liulanliang;
|
||||||
|
}
|
||||||
|
public void setLiulanliang(Integer liulanliang) {
|
||||||
|
this.liulanliang = liulanliang == null ? 0 : liulanliang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMiaoshu() {
|
||||||
|
return miaoshu;
|
||||||
|
}
|
||||||
|
public void setMiaoshu(String miaoshu) {
|
||||||
|
this.miaoshu = miaoshu == null ? "" : miaoshu.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Jingdianxinxi;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface JingdianxinxiMapper extends MapperBase<Jingdianxinxi> {
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
package com.spring.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Json 数据返回格式
|
||||||
|
*/
|
||||||
|
public class JsonResult {
|
||||||
|
private Integer code;
|
||||||
|
private String msg;
|
||||||
|
private Object data;
|
||||||
|
|
||||||
|
public JsonResult(Integer code , String msg , Object data)
|
||||||
|
{
|
||||||
|
this.code = code;
|
||||||
|
this.msg = msg;
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JsonResult(Object data)
|
||||||
|
{
|
||||||
|
this.data = data;
|
||||||
|
setCode(0);
|
||||||
|
setMsg("");
|
||||||
|
}
|
||||||
|
|
||||||
|
public JsonResult(String msg)
|
||||||
|
{
|
||||||
|
this.msg = msg;
|
||||||
|
setData(null);
|
||||||
|
setCode(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(Object data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "liuyanban")
|
||||||
|
public class Liuyanban implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "xingming")
|
||||||
|
private String xingming;
|
||||||
|
@Column(name = "lianxidianhua")
|
||||||
|
private String lianxidianhua;
|
||||||
|
@Column(name = "liuyanneirong")
|
||||||
|
private String liuyanneirong;
|
||||||
|
@Column(name = "liuyanren")
|
||||||
|
private String liuyanren;
|
||||||
|
@Column(name = "huifuneirong")
|
||||||
|
private String huifuneirong;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getXingming() {
|
||||||
|
return xingming;
|
||||||
|
}
|
||||||
|
public void setXingming(String xingming) {
|
||||||
|
this.xingming = xingming == null ? "" : xingming.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLianxidianhua() {
|
||||||
|
return lianxidianhua;
|
||||||
|
}
|
||||||
|
public void setLianxidianhua(String lianxidianhua) {
|
||||||
|
this.lianxidianhua = lianxidianhua == null ? "" : lianxidianhua.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiuyanneirong() {
|
||||||
|
return liuyanneirong;
|
||||||
|
}
|
||||||
|
public void setLiuyanneirong(String liuyanneirong) {
|
||||||
|
this.liuyanneirong = liuyanneirong == null ? "" : liuyanneirong.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiuyanren() {
|
||||||
|
return liuyanren;
|
||||||
|
}
|
||||||
|
public void setLiuyanren(String liuyanren) {
|
||||||
|
this.liuyanren = liuyanren == null ? "" : liuyanren.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHuifuneirong() {
|
||||||
|
return huifuneirong;
|
||||||
|
}
|
||||||
|
public void setHuifuneirong(String huifuneirong) {
|
||||||
|
this.huifuneirong = huifuneirong == null ? "" : huifuneirong.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Liuyanban;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface LiuyanbanMapper extends MapperBase<Liuyanban> {
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "lunbotu")
|
||||||
|
public class Lunbotu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "title")
|
||||||
|
private String title;
|
||||||
|
@Column(name = "image")
|
||||||
|
private String image;
|
||||||
|
@Column(name = "url")
|
||||||
|
private String url;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title == null ? "" : title.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage() {
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
public void setImage(String image) {
|
||||||
|
this.image = image == null ? "" : image.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url == null ? "" : url.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Lunbotu;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface LunbotuMapper extends MapperBase<Lunbotu> {
|
||||||
|
}
|
||||||
@ -0,0 +1,135 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "lvyouxianlu")
|
||||||
|
public class Lvyouxianlu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "xianlubianhao")
|
||||||
|
private String xianlubianhao;
|
||||||
|
@Column(name = "xianlumingcheng")
|
||||||
|
private String xianlumingcheng;
|
||||||
|
@Column(name = "tupian")
|
||||||
|
private String tupian;
|
||||||
|
@Column(name = "chufadi")
|
||||||
|
private String chufadi;
|
||||||
|
@Column(name = "tujingdi")
|
||||||
|
private String tujingdi;
|
||||||
|
@Column(name = "zhongdian")
|
||||||
|
private String zhongdian;
|
||||||
|
@Column(name = "jiage")
|
||||||
|
private Double jiage;
|
||||||
|
@Column(name = "liulanliang")
|
||||||
|
private Integer liulanliang;
|
||||||
|
@Column(name = "xianlutese")
|
||||||
|
private String xianlutese;
|
||||||
|
@Column(name = "xianlujianjie")
|
||||||
|
private String xianlujianjie;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getYudingCount()
|
||||||
|
{
|
||||||
|
return Query.make("yuding").where("lvyouxianluid" , id).count();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getXianlubianhao() {
|
||||||
|
return xianlubianhao;
|
||||||
|
}
|
||||||
|
public void setXianlubianhao(String xianlubianhao) {
|
||||||
|
this.xianlubianhao = xianlubianhao == null ? "" : xianlubianhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlumingcheng() {
|
||||||
|
return xianlumingcheng;
|
||||||
|
}
|
||||||
|
public void setXianlumingcheng(String xianlumingcheng) {
|
||||||
|
this.xianlumingcheng = xianlumingcheng == null ? "" : xianlumingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTupian() {
|
||||||
|
return tupian;
|
||||||
|
}
|
||||||
|
public void setTupian(String tupian) {
|
||||||
|
this.tupian = tupian == null ? "" : tupian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChufadi() {
|
||||||
|
return chufadi;
|
||||||
|
}
|
||||||
|
public void setChufadi(String chufadi) {
|
||||||
|
this.chufadi = chufadi == null ? "" : chufadi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTujingdi() {
|
||||||
|
return tujingdi;
|
||||||
|
}
|
||||||
|
public void setTujingdi(String tujingdi) {
|
||||||
|
this.tujingdi = tujingdi == null ? "" : tujingdi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZhongdian() {
|
||||||
|
return zhongdian;
|
||||||
|
}
|
||||||
|
public void setZhongdian(String zhongdian) {
|
||||||
|
this.zhongdian = zhongdian == null ? "" : zhongdian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getJiage() {
|
||||||
|
return jiage;
|
||||||
|
}
|
||||||
|
public void setJiage(Double jiage) {
|
||||||
|
this.jiage = jiage == null ? 0.0f : jiage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLiulanliang() {
|
||||||
|
return liulanliang;
|
||||||
|
}
|
||||||
|
public void setLiulanliang(Integer liulanliang) {
|
||||||
|
this.liulanliang = liulanliang == null ? 0 : liulanliang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlutese() {
|
||||||
|
return xianlutese;
|
||||||
|
}
|
||||||
|
public void setXianlutese(String xianlutese) {
|
||||||
|
this.xianlutese = xianlutese == null ? "" : xianlutese.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlujianjie() {
|
||||||
|
return xianlujianjie;
|
||||||
|
}
|
||||||
|
public void setXianlujianjie(String xianlujianjie) {
|
||||||
|
this.xianlujianjie = xianlujianjie == null ? "" : xianlujianjie.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Lvyouxianlu;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface LvyouxianluMapper extends MapperBase<Lvyouxianlu> {
|
||||||
|
}
|
||||||
@ -1,108 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="MKPlayer" id="MKPlayer" @click.stop.prevent>
|
|
||||||
<div class="notification" v-show="message!=''" v-text="message">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="MKPlayer-play-message" :class="{active:openMusicList}">
|
|
||||||
<!-- 播放列表 -->
|
|
||||||
<div class="MKPlayer-play-disc">
|
|
||||||
<div class="mkdisc">
|
|
||||||
<a class="mkloop" style="display: inline-block">
|
|
||||||
<i class="mkicon mkicon-disc"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="mklyric" :style="{transform:scrollTopText}">
|
|
||||||
<ul>
|
|
||||||
<li v-for="(v,k,index) in lyricList" :data-on="index" class="lrc-item" :class="{mkactive:k==lastLyric}" v-text="v"></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="MKPlayer-play-list" :class="{mkempty:musicList.length==0}">
|
|
||||||
<div class="MKPlayer-play-header">
|
|
||||||
<div class="mkheader">播放列表 <span v-html="musicList.length"></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="mkempty-text">
|
|
||||||
暂无音乐
|
|
||||||
</div>
|
|
||||||
<div class="MKPlayer-play-music">
|
|
||||||
<div class="mkmusic-row clearfix" v-for="(v,k) in musicList" :class="{active:v.id == music.id}">
|
|
||||||
<div class="mkmusic-icon">
|
|
||||||
<i class="mkicon mkicon-play-o"></i>
|
|
||||||
</div>
|
|
||||||
<div class="mkmusic-title" @click="playIndex(k)">
|
|
||||||
<div class="mkmusic-hover-icon">
|
|
||||||
<i class="mkicon mkicon-collect" title="收藏" @click.prevent.stop="collect(v)"></i>
|
|
||||||
<i class="mkicon mkicon-download" title="下载" @click.prevent.stop="download(v)"></i>
|
|
||||||
<i class="mkicon mkicon-like" title="喜欢" @click.prevent.stop="like(v)"></i>
|
|
||||||
</div>
|
|
||||||
<div class="mkgeming" v-html="v.name"></div>
|
|
||||||
</div>
|
|
||||||
<div class="mkmusic-name" v-text="v.artist"></div>
|
|
||||||
<div class="mkmusic-album" v-text="v.album"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="MKPlayer-bottom">
|
|
||||||
<div class="MKPlayer-bottom-btn">
|
|
||||||
<a href="javascript:;">
|
|
||||||
<i class="mkicon mkicon-prev" @click.stop.prevent="prevMusic"></i>
|
|
||||||
</a>
|
|
||||||
<a href="javascript:;" class="MKPlayer-play" :class="{active:playState}">
|
|
||||||
<i class="mkicon mkicon-play text-active" @click.stop.prevent="playMusic"></i>
|
|
||||||
<i class="mkicon mkicon-pause" @click.stop.prevent="pauseMusic"></i>
|
|
||||||
</a>
|
|
||||||
<a href="javascript:;">
|
|
||||||
<i class="mkicon mkicon-next" data-func="next" @click.stop.prevent="nextMusic"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="MKPlayer-info">
|
|
||||||
<a href="javascript:;" :class="'MKPlayer-play-type '+ orderby[playOrderby]" @click="updateOrderby">
|
|
||||||
<i class="mkicon mkicon-list-cycle" data-type="mklist"></i>
|
|
||||||
<i class="mkicon mkicon-random" data-type="mkrandom"></i>
|
|
||||||
<i class="mkicon mkicon-single-cycle" data-type="mksingle"></i>
|
|
||||||
</a>
|
|
||||||
<a href="javascript:;">
|
|
||||||
<i class="mkicon mkicon-gedan" @click="gedanClick"></i><span style="font-size: 14px">{{musicList.length}}</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="MKPlayer-volume">
|
|
||||||
<div class="MKPlayer-volume-left">
|
|
||||||
<i class="mkicon" :class="{'mkicon-volume':!mkmute ,'mkicon-mute':mkmute }" @click="setMute"></i>
|
|
||||||
</div>
|
|
||||||
<mk-progress v-model="volume" @changed="onVolumeChange" :lock="false"></mk-progress>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--进度条 -->
|
|
||||||
<div class="MKPlayer-progress">
|
|
||||||
<div class="MKPlayer-music-info clearfix">
|
|
||||||
<span v-text="progressTime" style="float: right"></span>
|
|
||||||
<span v-text="music.name"></span>
|
|
||||||
<span v-text="music.artist"></span>
|
|
||||||
</div>
|
|
||||||
<mk-progress v-model="musicProsess" @changed="onMusicProsess" :lock="!playState"></mk-progress>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
@import "./asset/icon/MKPlayer";
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "MKPlayer",
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {},
|
|
||||||
methods: {},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "meishifenlei")
|
||||||
|
public class Meishifenlei implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "fenleimingcheng")
|
||||||
|
private String fenleimingcheng;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getFenleimingcheng() {
|
||||||
|
return fenleimingcheng;
|
||||||
|
}
|
||||||
|
public void setFenleimingcheng(String fenleimingcheng) {
|
||||||
|
this.fenleimingcheng = fenleimingcheng == null ? "" : fenleimingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Meishifenlei;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface MeishifenleiMapper extends MapperBase<Meishifenlei> {
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
import dao.CommDAO;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import util.Request;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class PaymentController extends BaseController{
|
||||||
|
/**
|
||||||
|
* 处理支付
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@RequestMapping("/payment")
|
||||||
|
public String payment()
|
||||||
|
{
|
||||||
|
String id,biao;
|
||||||
|
if(request.getParameter("out_trade_no")!=null)
|
||||||
|
{
|
||||||
|
String[] out_trade_no = request.getParameter("out_trade_no").split("\\-");
|
||||||
|
id = out_trade_no[2];
|
||||||
|
biao = out_trade_no[1];
|
||||||
|
|
||||||
|
}else{
|
||||||
|
id =request.getParameter("id");
|
||||||
|
biao =request.getParameter("biao");
|
||||||
|
}
|
||||||
|
|
||||||
|
String sql = "update " + biao + " set iszf='是' where id='" + id + "'";
|
||||||
|
new CommDAO().commOper(sql);
|
||||||
|
HashMap order = Query.make(biao).find(id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if("yuding".equals(biao))
|
||||||
|
{
|
||||||
|
Query.execute("update yuding set zhuangtai='预定成功' where id='"+order.get("id")+"'");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
String referer = Request.get("referer").equals("") ? "sy.do" : Request.get("referer");
|
||||||
|
return showSuccess("支付成功",referer);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package dao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 继承自库中jntoo-query.jar
|
||||||
|
*/
|
||||||
|
public class Query extends net.jntoo.db.Query {
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.spring.util;
|
||||||
|
|
||||||
|
import com.spring.BootApplication;
|
||||||
|
import net.jntoo.annotation.JdbcConnection;
|
||||||
|
import net.jntoo.annotation.RequestJdbcConnection;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
import java.sql.Connection;
|
||||||
|
|
||||||
|
@JdbcConnection
|
||||||
|
public class QueryConnection {
|
||||||
|
|
||||||
|
static private Connection conn = null;
|
||||||
|
// 让jntoo-query 获取链接
|
||||||
|
@RequestJdbcConnection
|
||||||
|
public Connection getConnect()
|
||||||
|
{
|
||||||
|
try{
|
||||||
|
if(conn == null || conn.isClosed()){
|
||||||
|
DataSource source = BootApplication.content.getBean(DataSource.class);
|
||||||
|
Connection connection = source.getConnection();
|
||||||
|
|
||||||
|
//System.out.println(connection);
|
||||||
|
conn = connection;
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
System.err.println("链接数据库出错");
|
||||||
|
}
|
||||||
|
return conn;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package util.tld;
|
||||||
|
|
||||||
|
import dao.CommDAO;
|
||||||
|
|
||||||
|
import javax.servlet.jsp.JspException;
|
||||||
|
import javax.servlet.jsp.PageContext;
|
||||||
|
import javax.servlet.jsp.tagext.JspFragment;
|
||||||
|
import javax.servlet.jsp.tagext.SimpleTagSupport;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* jsp 页面ssm:sql 执行SQL语句
|
||||||
|
*/
|
||||||
|
public class QuerySql extends SimpleTagSupport {
|
||||||
|
|
||||||
|
private String var;
|
||||||
|
private String type;
|
||||||
|
public String getVar() {
|
||||||
|
return var;
|
||||||
|
}
|
||||||
|
public void setVar(String var) {
|
||||||
|
this.var = var;
|
||||||
|
}
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doTag() throws JspException, IOException {
|
||||||
|
JspFragment jf = this.getJspBody();
|
||||||
|
PageContext context = (PageContext)jf.getJspContext();
|
||||||
|
StringWriter sw = new StringWriter();
|
||||||
|
jf.invoke(sw);
|
||||||
|
String sql = sw.getBuffer().toString();
|
||||||
|
|
||||||
|
|
||||||
|
if(type.equals("select")){
|
||||||
|
List<HashMap> list = new CommDAO().select(sql);
|
||||||
|
context.setAttribute(var , list , PageContext.REQUEST_SCOPE);
|
||||||
|
}else if(type.equals("find")){
|
||||||
|
HashMap list = new CommDAO().find(sql);
|
||||||
|
context.setAttribute(var , list , PageContext.REQUEST_SCOPE);
|
||||||
|
}
|
||||||
|
//jf.invoke(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,119 @@
|
|||||||
|
package com.base;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.spring.util.CollectList;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
import util.Request;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽象Service基本类实现接口
|
||||||
|
* @param <E>
|
||||||
|
*/
|
||||||
|
abstract public class ServiceBase<E> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 虚函数,派生类必须继承
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
abstract protected Mapper<E> getDao();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<E> select() {
|
||||||
|
return getDao().select(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据实体类搜索数据
|
||||||
|
* @param y
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<E> select(E y) {
|
||||||
|
return getDao().select(y);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主键获取实体类
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public E find(Object id) {
|
||||||
|
return getDao().selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据实体类获取实体类
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public E findEntity(E id)
|
||||||
|
{
|
||||||
|
return getDao().selectOne(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索分页
|
||||||
|
* @param obj
|
||||||
|
* @param page
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<E> selectPage(E obj, int page, int pageSize) {
|
||||||
|
//int count = dao.selectCount(obj);
|
||||||
|
|
||||||
|
PageHelper.startPage(page , pageSize , true);
|
||||||
|
List<E> list = select(obj);
|
||||||
|
PageInfo<E> pageInfo = new PageInfo<E>(list);
|
||||||
|
new CollectList(pageInfo.getTotal() , pageSize , page);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据Example搜索分页
|
||||||
|
* @param obj
|
||||||
|
* @param page
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<E> selectPageExample(Example obj , int page , int pageSize)
|
||||||
|
{
|
||||||
|
PageHelper.startPage(page , pageSize , true);
|
||||||
|
List<E> list = getDao().selectByExample(obj);
|
||||||
|
PageInfo<E> pageInfo = new PageInfo<E>(list);
|
||||||
|
new CollectList(pageInfo.getTotal() , pageSize , page);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主键删除一行数据
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int delete(Object id)
|
||||||
|
{
|
||||||
|
return getDao().deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入实体类
|
||||||
|
* @param y
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int insert(E y) {
|
||||||
|
return getDao().insertSelective(y);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新实体类
|
||||||
|
* @param y
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int update(E y) {
|
||||||
|
return getDao().updateByPrimaryKeySelective(y);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,127 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "shoucangjilu")
|
||||||
|
public class Shoucangjilu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
private Integer xwid;
|
||||||
|
|
||||||
|
private String biao;
|
||||||
|
|
||||||
|
private String ziduan;
|
||||||
|
private String biaoti;
|
||||||
|
private String url;
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBiaoti() {
|
||||||
|
return biaoti;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBiaoti(String biaoti) {
|
||||||
|
this.biaoti = biaoti;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return username
|
||||||
|
*/
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param username
|
||||||
|
*/
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username == null ? null : username.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return xwid
|
||||||
|
*/
|
||||||
|
public Integer getXwid() {
|
||||||
|
return xwid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param xwid
|
||||||
|
*/
|
||||||
|
public void setXwid(Integer xwid) {
|
||||||
|
this.xwid = xwid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return biao
|
||||||
|
*/
|
||||||
|
public String getBiao() {
|
||||||
|
return biao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param biao
|
||||||
|
*/
|
||||||
|
public void setBiao(String biao) {
|
||||||
|
this.biao = biao == null ? null : biao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ziduan
|
||||||
|
*/
|
||||||
|
public String getZiduan() {
|
||||||
|
return ziduan;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ziduan
|
||||||
|
*/
|
||||||
|
public void setZiduan(String ziduan) {
|
||||||
|
this.ziduan = ziduan == null ? null : ziduan.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return addtime
|
||||||
|
*/
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param addtime
|
||||||
|
*/
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
import com.spring.entity.Shoucangjilu;
|
||||||
|
import com.spring.service.ShoucangjiluService;
|
||||||
|
import dao.Query;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
import util.Info;
|
||||||
|
import util.Request;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收藏控制器
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class ShoucangjiluController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
protected ShoucangjiluService service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加入收藏
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/collect")
|
||||||
|
public String collect()
|
||||||
|
{
|
||||||
|
if(!checkLogin()){
|
||||||
|
return showError("您尚未登录请登录后在操作");
|
||||||
|
}
|
||||||
|
int id=Request.getInt("id");
|
||||||
|
String biao=request.getParameter("biao");
|
||||||
|
String ziduan=request.getParameter("ziduan");
|
||||||
|
Shoucangjilu scjl = new Shoucangjilu();
|
||||||
|
scjl.setXwid(id);
|
||||||
|
scjl.setBiao(biao);
|
||||||
|
scjl.setBiaoti(Query.make(biao).where("id" , id).value(ziduan));
|
||||||
|
scjl.setUrl(request.getHeader("referer"));
|
||||||
|
scjl.setZiduan(ziduan);
|
||||||
|
scjl.setAddtime(Info.getDateStr());
|
||||||
|
scjl.setUsername(request.getSession().getAttribute("username").toString());
|
||||||
|
service.insert(scjl);
|
||||||
|
return showSuccess("收藏成功" , request.getHeader("referer"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看收藏列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/shoucangjilu_list")
|
||||||
|
public String index()
|
||||||
|
{
|
||||||
|
int page = Math.max(Integer.valueOf(Request.get("page" , "1")) , 1);
|
||||||
|
Example example = new Example(Shoucangjilu.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
|
||||||
|
criteria.andEqualTo("username" , request.getSession().getAttribute("username"));
|
||||||
|
List<Shoucangjilu> list = service.selectPageExample(example , page , 15);
|
||||||
|
if(isAjax()){
|
||||||
|
return json();
|
||||||
|
}
|
||||||
|
return "shoucangjilu_list";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看我的收藏
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/shoucangjilu_list2")
|
||||||
|
public String index2()
|
||||||
|
{
|
||||||
|
int page = Math.max(Integer.valueOf(Request.get("page" , "1")) , 1);
|
||||||
|
Example example = new Example(Shoucangjilu.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
criteria.andEqualTo("username" , request.getSession().getAttribute("username"));
|
||||||
|
List<Shoucangjilu> list = service.selectPageExample(example , page , 15);
|
||||||
|
assign("list" , list);
|
||||||
|
if(isAjax()){
|
||||||
|
return json();
|
||||||
|
}
|
||||||
|
return "shoucangjilu_list";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收藏
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/shoucangjilu_delete")
|
||||||
|
public String delete()
|
||||||
|
{
|
||||||
|
String id = Request.get("id");
|
||||||
|
service.delete(id);
|
||||||
|
return showSuccess("删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Shoucangjilu;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表shoucangjilu的mapper
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface ShoucangjiluMapper extends MapperBase<Shoucangjilu> {
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
package util;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
/**
|
||||||
|
* 日期处理类
|
||||||
|
*/
|
||||||
|
public class Timer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取某日期的上个月开始日期
|
||||||
|
* @param currentDate
|
||||||
|
* @param format
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getPrevMonthStartDate(String currentDate , String format){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
Calendar c = Calendar.getInstance();
|
||||||
|
try {
|
||||||
|
c.setTime(sdf.parse(currentDate));
|
||||||
|
c.add(Calendar.MONTH, -1);
|
||||||
|
//设置为1号,当前日期既为本月第一天
|
||||||
|
c.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return c.getTime();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取某日期的上个月结束日期
|
||||||
|
* @param date
|
||||||
|
* @param format
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getPrevMonthEndDate(String date , String format){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
Calendar c = Calendar.getInstance();
|
||||||
|
try {
|
||||||
|
c.setTime(sdf.parse(date));
|
||||||
|
c.add(Calendar.MONTH , -1);
|
||||||
|
c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||||
|
c.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
c.set(Calendar.MINUTE, 59);
|
||||||
|
c.set(Calendar.SECOND, 59);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return c.getTime();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取某日期的 当前月开始日期
|
||||||
|
* @param currentDate
|
||||||
|
* @param format
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getMonthStartDate(String currentDate , String format){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
Calendar c = Calendar.getInstance();
|
||||||
|
try {
|
||||||
|
c.setTime(sdf.parse(currentDate));
|
||||||
|
c.add(Calendar.MONTH, 0);
|
||||||
|
//设置为1号,当前日期既为本月第一天
|
||||||
|
c.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return c.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取某日期的 当前月结束日期
|
||||||
|
* @param date
|
||||||
|
* @param format
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getMonthEndDate(String date , String format)
|
||||||
|
{
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
Calendar c = Calendar.getInstance();
|
||||||
|
try {
|
||||||
|
c.setTime(sdf.parse(date));
|
||||||
|
c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||||
|
c.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
c.set(Calendar.MINUTE, 59);
|
||||||
|
c.set(Calendar.SECOND, 59);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return c.getTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.spring.config;
|
||||||
|
import com.spring.interceptor.TokenInterceptor;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
|
||||||
|
public class TokenConfig implements WebMvcConfigurer {
|
||||||
|
@Override
|
||||||
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
|
//注册TokenInterceptor拦截器
|
||||||
|
InterceptorRegistration registration = registry.addInterceptor(new TokenInterceptor());
|
||||||
|
registration.addPathPatterns("/**"); //所有路径都被拦截
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传控制器
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class UploadController extends BaseController{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
* @param fujian
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/upload_re")
|
||||||
|
public String Upload(MultipartFile fujian) throws Exception
|
||||||
|
{
|
||||||
|
String fileName = fujian.getOriginalFilename();
|
||||||
|
String suffixName = fileName.substring(fileName.lastIndexOf("."));
|
||||||
|
fileName = UUID.randomUUID()+suffixName;
|
||||||
|
String filePath = getFolder("upload");
|
||||||
|
// String filePath="upload/20210423/";
|
||||||
|
try{
|
||||||
|
|
||||||
|
File file = new File( getPhysicalPath(filePath)+"/"+fileName);
|
||||||
|
//将资源保存到本地文件夹下
|
||||||
|
String localPath ="bysj-server/src/main/webapp/upload/20210423";
|
||||||
|
|
||||||
|
File localFile=new File(localPath);
|
||||||
|
if(!localFile.exists()){
|
||||||
|
localFile.mkdirs();
|
||||||
|
}
|
||||||
|
//获取本地路径
|
||||||
|
File localStaticFile=new File(localFile.getAbsolutePath()+"\\"+fileName);
|
||||||
|
System.out.println("localStaticFile====>"+localStaticFile);
|
||||||
|
System.out.println("本地存储真实位置:"+localFile.getAbsolutePath()+"\\"+fileName);
|
||||||
|
FileUtils.copyInputStreamToFile(fujian.getInputStream(),localStaticFile);
|
||||||
|
fujian.transferTo(file);
|
||||||
|
System.out.println("setAttributefilePath=====fileName:"+filePath+"/"+fileName);
|
||||||
|
request.setAttribute("url",filePath+fileName);
|
||||||
|
if(isAjax())
|
||||||
|
{
|
||||||
|
return jsonResult(request.getAttribute("url"));
|
||||||
|
}
|
||||||
|
return "upload";
|
||||||
|
}catch (Exception e){
|
||||||
|
return showError(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getFolder(String path) {
|
||||||
|
SimpleDateFormat formater = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
path += "/" + "20210423" +"/";
|
||||||
|
File dir = new File(this.getPhysicalPath(path));
|
||||||
|
|
||||||
|
if (!dir.exists()) {
|
||||||
|
try {
|
||||||
|
dir.mkdirs();
|
||||||
|
} catch (Exception e) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据传入的虚拟路径获取物理路径
|
||||||
|
*
|
||||||
|
* @param path
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getPhysicalPath(String path) {
|
||||||
|
String servletPath = this.request.getServletPath();
|
||||||
|
System.out.println("servletPath===>"+servletPath);
|
||||||
|
String realPath = this.request.getSession().getServletContext()
|
||||||
|
.getRealPath(servletPath);
|
||||||
|
System.out.println("realPath===>"+realPath);
|
||||||
|
return new File(realPath).getParent() +"/" +path;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "xinwenfenlei")
|
||||||
|
public class Xinwenfenlei implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "fenleimingcheng")
|
||||||
|
private String fenleimingcheng;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getFenleimingcheng() {
|
||||||
|
return fenleimingcheng;
|
||||||
|
}
|
||||||
|
public void setFenleimingcheng(String fenleimingcheng) {
|
||||||
|
this.fenleimingcheng = fenleimingcheng == null ? "" : fenleimingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Xinwenfenlei;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface XinwenfenleiMapper extends MapperBase<Xinwenfenlei> {
|
||||||
|
}
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "xinwenxinxi")
|
||||||
|
public class Xinwenxinxi implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "biaoti")
|
||||||
|
private String biaoti;
|
||||||
|
@Column(name = "fenlei")
|
||||||
|
private String fenlei;
|
||||||
|
@Column(name = "tupian")
|
||||||
|
private String tupian;
|
||||||
|
@Column(name = "tianjiaren")
|
||||||
|
private String tianjiaren;
|
||||||
|
@Column(name = "dianjilv")
|
||||||
|
private Integer dianjilv;
|
||||||
|
@Column(name = "neirong")
|
||||||
|
private String neirong;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getBiaoti() {
|
||||||
|
return biaoti;
|
||||||
|
}
|
||||||
|
public void setBiaoti(String biaoti) {
|
||||||
|
this.biaoti = biaoti == null ? "" : biaoti.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFenlei() {
|
||||||
|
return fenlei;
|
||||||
|
}
|
||||||
|
public void setFenlei(String fenlei) {
|
||||||
|
this.fenlei = fenlei == null ? "" : fenlei.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTupian() {
|
||||||
|
return tupian;
|
||||||
|
}
|
||||||
|
public void setTupian(String tupian) {
|
||||||
|
this.tupian = tupian == null ? "" : tupian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTianjiaren() {
|
||||||
|
return tianjiaren;
|
||||||
|
}
|
||||||
|
public void setTianjiaren(String tianjiaren) {
|
||||||
|
this.tianjiaren = tianjiaren == null ? "" : tianjiaren.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDianjilv() {
|
||||||
|
return dianjilv;
|
||||||
|
}
|
||||||
|
public void setDianjilv(Integer dianjilv) {
|
||||||
|
this.dianjilv = dianjilv == null ? 0 : dianjilv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNeirong() {
|
||||||
|
return neirong;
|
||||||
|
}
|
||||||
|
public void setNeirong(String neirong) {
|
||||||
|
this.neirong = neirong == null ? "" : neirong.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Xinwenxinxi;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface XinwenxinxiMapper extends MapperBase<Xinwenxinxi> {
|
||||||
|
}
|
||||||
@ -0,0 +1,113 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "yonghu")
|
||||||
|
public class Yonghu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "yonghuming")
|
||||||
|
private String yonghuming;
|
||||||
|
@Column(name = "mima")
|
||||||
|
private String mima;
|
||||||
|
@Column(name = "xingming")
|
||||||
|
private String xingming;
|
||||||
|
@Column(name = "xingbie")
|
||||||
|
private String xingbie;
|
||||||
|
@Column(name = "shouji")
|
||||||
|
private String shouji;
|
||||||
|
@Column(name = "youxiang")
|
||||||
|
private String youxiang;
|
||||||
|
@Column(name = "shenfenzheng")
|
||||||
|
private String shenfenzheng;
|
||||||
|
@Column(name = "touxiang")
|
||||||
|
private String touxiang;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getYonghuming() {
|
||||||
|
return yonghuming;
|
||||||
|
}
|
||||||
|
public void setYonghuming(String yonghuming) {
|
||||||
|
this.yonghuming = yonghuming == null ? "" : yonghuming.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMima() {
|
||||||
|
return mima;
|
||||||
|
}
|
||||||
|
public void setMima(String mima) {
|
||||||
|
this.mima = mima == null ? "" : mima.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXingming() {
|
||||||
|
return xingming;
|
||||||
|
}
|
||||||
|
public void setXingming(String xingming) {
|
||||||
|
this.xingming = xingming == null ? "" : xingming.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXingbie() {
|
||||||
|
return xingbie;
|
||||||
|
}
|
||||||
|
public void setXingbie(String xingbie) {
|
||||||
|
this.xingbie = xingbie == null ? "" : xingbie.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShouji() {
|
||||||
|
return shouji;
|
||||||
|
}
|
||||||
|
public void setShouji(String shouji) {
|
||||||
|
this.shouji = shouji == null ? "" : shouji.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getYouxiang() {
|
||||||
|
return youxiang;
|
||||||
|
}
|
||||||
|
public void setYouxiang(String youxiang) {
|
||||||
|
this.youxiang = youxiang == null ? "" : youxiang.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShenfenzheng() {
|
||||||
|
return shenfenzheng;
|
||||||
|
}
|
||||||
|
public void setShenfenzheng(String shenfenzheng) {
|
||||||
|
this.shenfenzheng = shenfenzheng == null ? "" : shenfenzheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTouxiang() {
|
||||||
|
return touxiang;
|
||||||
|
}
|
||||||
|
public void setTouxiang(String touxiang) {
|
||||||
|
this.touxiang = touxiang == null ? "" : touxiang.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Yonghu;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface YonghuMapper extends MapperBase<Yonghu> {
|
||||||
|
Yonghu login(Yonghu yonghu);
|
||||||
|
}
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "youqinglianjie")
|
||||||
|
public class Youqinglianjie implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "wangzhanmingcheng")
|
||||||
|
private String wangzhanmingcheng;
|
||||||
|
@Column(name = "wangzhi")
|
||||||
|
private String wangzhi;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getWangzhanmingcheng() {
|
||||||
|
return wangzhanmingcheng;
|
||||||
|
}
|
||||||
|
public void setWangzhanmingcheng(String wangzhanmingcheng) {
|
||||||
|
this.wangzhanmingcheng = wangzhanmingcheng == null ? "" : wangzhanmingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWangzhi() {
|
||||||
|
return wangzhi;
|
||||||
|
}
|
||||||
|
public void setWangzhi(String wangzhi) {
|
||||||
|
this.wangzhi = wangzhi == null ? "" : wangzhi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Youqinglianjie;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface YouqinglianjieMapper extends MapperBase<Youqinglianjie> {
|
||||||
|
}
|
||||||
@ -0,0 +1,174 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "yuding")
|
||||||
|
public class Yuding implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "lvyouxianluid")
|
||||||
|
private Integer lvyouxianluid;
|
||||||
|
@Column(name = "xianlubianhao")
|
||||||
|
private String xianlubianhao;
|
||||||
|
@Column(name = "xianlumingcheng")
|
||||||
|
private String xianlumingcheng;
|
||||||
|
@Column(name = "chufadi")
|
||||||
|
private String chufadi;
|
||||||
|
@Column(name = "tujingdi")
|
||||||
|
private String tujingdi;
|
||||||
|
@Column(name = "zhongdian")
|
||||||
|
private String zhongdian;
|
||||||
|
@Column(name = "jiage")
|
||||||
|
private Double jiage;
|
||||||
|
@Column(name = "dingdanhao")
|
||||||
|
private String dingdanhao;
|
||||||
|
@Column(name = "yudingshijian")
|
||||||
|
private String yudingshijian;
|
||||||
|
@Column(name = "yudingrenxingming")
|
||||||
|
private String yudingrenxingming;
|
||||||
|
@Column(name = "lianxifangshi")
|
||||||
|
private String lianxifangshi;
|
||||||
|
@Column(name = "zhuangtai")
|
||||||
|
private String zhuangtai;
|
||||||
|
@Column(name = "beizhu")
|
||||||
|
private String beizhu;
|
||||||
|
@Column(name = "yudingren")
|
||||||
|
private String yudingren;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
private String iszf;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getLvyouxianluid() {
|
||||||
|
return lvyouxianluid;
|
||||||
|
}
|
||||||
|
public void setLvyouxianluid(Integer lvyouxianluid) {
|
||||||
|
this.lvyouxianluid = lvyouxianluid == null ? 0 : lvyouxianluid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlubianhao() {
|
||||||
|
return xianlubianhao;
|
||||||
|
}
|
||||||
|
public void setXianlubianhao(String xianlubianhao) {
|
||||||
|
this.xianlubianhao = xianlubianhao == null ? "" : xianlubianhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlumingcheng() {
|
||||||
|
return xianlumingcheng;
|
||||||
|
}
|
||||||
|
public void setXianlumingcheng(String xianlumingcheng) {
|
||||||
|
this.xianlumingcheng = xianlumingcheng == null ? "" : xianlumingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChufadi() {
|
||||||
|
return chufadi;
|
||||||
|
}
|
||||||
|
public void setChufadi(String chufadi) {
|
||||||
|
this.chufadi = chufadi == null ? "" : chufadi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTujingdi() {
|
||||||
|
return tujingdi;
|
||||||
|
}
|
||||||
|
public void setTujingdi(String tujingdi) {
|
||||||
|
this.tujingdi = tujingdi == null ? "" : tujingdi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZhongdian() {
|
||||||
|
return zhongdian;
|
||||||
|
}
|
||||||
|
public void setZhongdian(String zhongdian) {
|
||||||
|
this.zhongdian = zhongdian == null ? "" : zhongdian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getJiage() {
|
||||||
|
return jiage;
|
||||||
|
}
|
||||||
|
public void setJiage(Double jiage) {
|
||||||
|
this.jiage = jiage == null ? 0.0f : jiage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDingdanhao() {
|
||||||
|
return dingdanhao;
|
||||||
|
}
|
||||||
|
public void setDingdanhao(String dingdanhao) {
|
||||||
|
this.dingdanhao = dingdanhao == null ? "" : dingdanhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getYudingshijian() {
|
||||||
|
return yudingshijian;
|
||||||
|
}
|
||||||
|
public void setYudingshijian(String yudingshijian) {
|
||||||
|
this.yudingshijian = yudingshijian == null ? "" : yudingshijian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getYudingrenxingming() {
|
||||||
|
return yudingrenxingming;
|
||||||
|
}
|
||||||
|
public void setYudingrenxingming(String yudingrenxingming) {
|
||||||
|
this.yudingrenxingming = yudingrenxingming == null ? "" : yudingrenxingming.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLianxifangshi() {
|
||||||
|
return lianxifangshi;
|
||||||
|
}
|
||||||
|
public void setLianxifangshi(String lianxifangshi) {
|
||||||
|
this.lianxifangshi = lianxifangshi == null ? "" : lianxifangshi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZhuangtai() {
|
||||||
|
return zhuangtai;
|
||||||
|
}
|
||||||
|
public void setZhuangtai(String zhuangtai) {
|
||||||
|
this.zhuangtai = zhuangtai == null ? "" : zhuangtai.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBeizhu() {
|
||||||
|
return beizhu;
|
||||||
|
}
|
||||||
|
public void setBeizhu(String beizhu) {
|
||||||
|
this.beizhu = beizhu == null ? "" : beizhu.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getYudingren() {
|
||||||
|
return yudingren;
|
||||||
|
}
|
||||||
|
public void setYudingren(String yudingren) {
|
||||||
|
this.yudingren = yudingren == null ? "" : yudingren.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
public String getIszf() {
|
||||||
|
return iszf;
|
||||||
|
}
|
||||||
|
public void setIszf(String iszf) {
|
||||||
|
this.iszf = iszf == null ? "" : iszf.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Yuding;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface YudingMapper extends MapperBase<Yuding> {
|
||||||
|
}
|
||||||
@ -1,123 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="admins-add" v-loading="loading">
|
|
||||||
<el-card class="box-card">
|
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<span class="title"> 添加管理员</span>
|
|
||||||
</div>
|
|
||||||
<div class="form-database-form">
|
|
||||||
|
|
||||||
|
|
||||||
<el-form :model="form" ref="formModel" label-width="130px" status-icon validate-on-rule-change>
|
|
||||||
<el-form-item label="帐号" prop="username" required :rules="[{required:true, message:'请填写帐号'}, {validator:rule.checkRemote, message:'内容重复了', checktype:'insert', module:'admins', col:'username', trigger:'blur'}]">
|
|
||||||
<el-input placeholder="输入帐号" style="width:250px;" v-model="form.username" /> </el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="密码" prop="pwd" required :rules="[{required:true, message:'请填写密码'}]">
|
|
||||||
<el-input placeholder="输入密码" style="width:250px;" v-model="form.pwd" /> </el-form-item>
|
|
||||||
|
|
||||||
<el-form-item v-if="btnText">
|
|
||||||
<el-button type="primary" @click="submit">{{ btnText }}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" scoped lang="scss">
|
|
||||||
.admins-add{
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import api from '@/api'
|
|
||||||
import rule from '@/utils/rule'
|
|
||||||
import { extend } from '@/utils/extend'
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name:'admins-add',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
rule,
|
|
||||||
loading:false,
|
|
||||||
form:{
|
|
||||||
username:'',
|
|
||||||
pwd:'',
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
isRead:{
|
|
||||||
type:Boolean,
|
|
||||||
default:true
|
|
||||||
},
|
|
||||||
btnText:{
|
|
||||||
type:String,
|
|
||||||
default:'提交'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {},
|
|
||||||
methods: {
|
|
||||||
submit(){
|
|
||||||
this.$refs.formModel.validate().then(res=>{
|
|
||||||
if(this.loading)return;
|
|
||||||
this.loading = true;
|
|
||||||
var form = this.form;
|
|
||||||
|
|
||||||
this.$post(api.admins.insert , form).then(res=>{
|
|
||||||
this.loading = false;
|
|
||||||
if(res.code == api.code.OK){
|
|
||||||
this.$message.success('添加成功');
|
|
||||||
this.$emit('success' , res.data);
|
|
||||||
this.$refs.formModel.resetFields();
|
|
||||||
this.loadInfo();
|
|
||||||
}else{
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
}
|
|
||||||
}).catch(err=>{
|
|
||||||
this.loading = false;
|
|
||||||
this.$message.error(err.message);
|
|
||||||
})
|
|
||||||
|
|
||||||
}).catch(err=>{
|
|
||||||
console.log(err.message);
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
loadInfo(){
|
|
||||||
|
|
||||||
var form = this.form;
|
|
||||||
// 获取模块得数据
|
|
||||||
this.loading = true;
|
|
||||||
this.$post(api.admins.create , {
|
|
||||||
id:this.$route.query.id
|
|
||||||
}).then(res=>{
|
|
||||||
this.loading = false;
|
|
||||||
if(res.code == api.code.OK){
|
|
||||||
extend(this , res.data);
|
|
||||||
}else{
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
this.$router.go(-1);
|
|
||||||
}
|
|
||||||
}).catch(err=>{
|
|
||||||
this.$message.error(err.message);
|
|
||||||
this.$router.go(-1);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.loadInfo();
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
<template>
|
|
||||||
<span>
|
|
||||||
{{ weizhi.address }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {empty, isObject} from "@/utils/extend";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-address-name",
|
|
||||||
props:{
|
|
||||||
address:[String,Object],
|
|
||||||
},
|
|
||||||
computed:{
|
|
||||||
weizhi(){
|
|
||||||
if(empty(this.address))
|
|
||||||
{
|
|
||||||
return {
|
|
||||||
address:''
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if(isObject(this.address))
|
|
||||||
{
|
|
||||||
return this.address;
|
|
||||||
}
|
|
||||||
try{
|
|
||||||
var result = eval("("+this.address+")");
|
|
||||||
return result
|
|
||||||
}catch (e) {
|
|
||||||
return {
|
|
||||||
address:''
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@ -1,100 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="">
|
|
||||||
|
|
||||||
<baidu-map :center="{lng:data.lng,lat:data.lat}" @ready="readyBaidu" :zoom="data.zoom" class="baidumap" style="height: 250px" ref="baiduMap">
|
|
||||||
<bm-view class="map" style=";height: 250px"></bm-view>
|
|
||||||
<bm-control :offset="{width: '10px', height: '10px'}" v-if="initMap">
|
|
||||||
<el-input v-model="address" style="width: 250px" placeholder="请输入地名" />
|
|
||||||
</bm-control>
|
|
||||||
|
|
||||||
<bm-local-search v-if="initMap" class="localSearch" style="width: 350px;height: 250px;overflow: hidden auto" :auto-viewport="true" :keyword.sync="address"
|
|
||||||
@infohtmlset="searchComplete"></bm-local-search>
|
|
||||||
</baidu-map>
|
|
||||||
{{value}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
.baidumap{
|
|
||||||
display: flex;
|
|
||||||
.localSearch{
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.map{
|
|
||||||
flex-grow: 1;
|
|
||||||
img{
|
|
||||||
max-width: none;
|
|
||||||
max-height: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import jdk from '@/utils/extend'
|
|
||||||
export default {
|
|
||||||
name: "e-baidu-address",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
initMap:false,
|
|
||||||
address:''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
value:[String,Object],
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
data(){
|
|
||||||
var result = this.value;
|
|
||||||
try{
|
|
||||||
if( !jdk.isObject(result) )
|
|
||||||
{
|
|
||||||
result = JSON.parse(result);
|
|
||||||
}
|
|
||||||
}catch (e) {
|
|
||||||
result = {
|
|
||||||
address:'',
|
|
||||||
lng:114.053703,
|
|
||||||
lat:22.673854,
|
|
||||||
zoom:15
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
readyBaidu({BMap, map}){
|
|
||||||
this.initMap = true;
|
|
||||||
this.$BMap = BMap;
|
|
||||||
this.address = this.data.address;
|
|
||||||
},
|
|
||||||
|
|
||||||
searchComplete(e){
|
|
||||||
this.showPointValue(e)
|
|
||||||
},
|
|
||||||
showPointValue(p)
|
|
||||||
{
|
|
||||||
var $this = this;
|
|
||||||
var bmap = $this.$refs.baiduMap.map;
|
|
||||||
var point = p.point;
|
|
||||||
|
|
||||||
var obj = {
|
|
||||||
lng:point.lng,
|
|
||||||
lat:point.lat,
|
|
||||||
zoom:bmap.getZoom(),
|
|
||||||
title:p.title,
|
|
||||||
address:p.address || this.address
|
|
||||||
};
|
|
||||||
this.$emit('input' , JSON.stringify(obj));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,97 +0,0 @@
|
|||||||
<template>
|
|
||||||
<span class="e-audio">
|
|
||||||
<a :href="formatImageSrc(src)" download target="_blank">下载</a>
|
|
||||||
<span class="mkicon" @click="playAudio" :class="{'mkicon-play':!playState,'mkicon-pause':playState}"></span>
|
|
||||||
<span>{{currTime}}</span>
|
|
||||||
/
|
|
||||||
<span>{{endTime}}</span>
|
|
||||||
<audio :src="formatImageSrc(src)" @canplay="canplay" @timeupdate="updateTime" preload="auto" ref="audio" @play="play" @pause="pause" @ended="pause" @error="pause"></audio>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
.e-audio{
|
|
||||||
.mkicon{
|
|
||||||
font-size: 16px;
|
|
||||||
color: #888888;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import './asset/icon/MKPlayer.scss'
|
|
||||||
import {formatImageSrc} from "@/utils/utils";
|
|
||||||
|
|
||||||
function formatTime(time) {
|
|
||||||
var hour, minute, second;
|
|
||||||
hour = (parseInt(time / 3600, 10));
|
|
||||||
if (hour <10) hour = '0' + hour;
|
|
||||||
|
|
||||||
minute = (parseInt((time % 3600) / 60, 10));
|
|
||||||
if (minute < 10) minute = '0' + minute;
|
|
||||||
|
|
||||||
second = (parseInt(time % 60, 10));
|
|
||||||
if (second < 10) second = '0' + second;
|
|
||||||
|
|
||||||
if (hour > 0) {
|
|
||||||
return hour + ":" + minute + ":" + second;
|
|
||||||
} else {
|
|
||||||
return minute + ":" + second;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-audio",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
playState:false,
|
|
||||||
currentTime:0,
|
|
||||||
duration:0,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
src:String
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
currTime(){
|
|
||||||
return formatTime(this.currentTime)
|
|
||||||
},
|
|
||||||
endTime(){
|
|
||||||
return formatTime(this.duration)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
formatImageSrc,
|
|
||||||
canplay(){
|
|
||||||
this.updateTime()
|
|
||||||
},
|
|
||||||
updateTime(){
|
|
||||||
this.duration = this.$refs.audio.duration
|
|
||||||
this.currentTime = this.$refs.audio.currentTime
|
|
||||||
},
|
|
||||||
playAudio(){
|
|
||||||
if(this.playState){
|
|
||||||
this.$refs.audio.pause();
|
|
||||||
this.playState = false;
|
|
||||||
}else{
|
|
||||||
this.$refs.audio.play();
|
|
||||||
this.playState = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
play(){
|
|
||||||
this.playState = true;
|
|
||||||
},
|
|
||||||
pause(){
|
|
||||||
this.playState = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,211 +0,0 @@
|
|||||||
<template>
|
|
||||||
<article class="single_blog">
|
|
||||||
<figure>
|
|
||||||
<div class="blog_thumb" v-if="image" @click="$gotoUrl">
|
|
||||||
<a href="javascript:;" class="img-box" :class="['pb'+imageHeight , (isScale?'img-scale':'')]">
|
|
||||||
<div class="img" :style="{'background-image':'url('+$getImage(image)+')'}"></div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<figcaption class="blog_content">
|
|
||||||
<h4 class="post_title">
|
|
||||||
<a href="javascript:;" @click="$gotoUrl"> {{ title }} </a>
|
|
||||||
</h4>
|
|
||||||
<div class="articles_date">
|
|
||||||
<span><i class="fa fa-calendar" aria-hidden="true"></i> {{ formatTime }}</span>
|
|
||||||
<span v-if="sendUser"><i class="fa fa-user" aria-hidden="true"></i> {{ sendUser }}</span>
|
|
||||||
</div>
|
|
||||||
<p class="post_desc">
|
|
||||||
{{ contents }}
|
|
||||||
</p>
|
|
||||||
<a href="javascript:;" class="btn-see" @click="$gotoUrl"> {{btnText}} </a>
|
|
||||||
<span class="article-price" v-if="price">¥ {{ price }}</span>
|
|
||||||
</figcaption>
|
|
||||||
</figure>
|
|
||||||
</article>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import gotoUrl from "../mixins/gotoUrl";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-module-blog",
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
to:[String,Object],
|
|
||||||
replace:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
},
|
|
||||||
title:String,
|
|
||||||
price:[String,Number],
|
|
||||||
content:[String,Number],
|
|
||||||
sendUser:String,
|
|
||||||
time:String,
|
|
||||||
image:String,
|
|
||||||
imageHeight:{
|
|
||||||
type:[String,Number],
|
|
||||||
default:80
|
|
||||||
},
|
|
||||||
btnText:{
|
|
||||||
type:String,
|
|
||||||
default:'+ 查看详情'
|
|
||||||
},
|
|
||||||
isScale:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
},
|
|
||||||
len:{
|
|
||||||
type:Number,
|
|
||||||
default:30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mixins:[gotoUrl],
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
contents() {
|
|
||||||
if (this.content) {
|
|
||||||
return this.content.replace(/<[^>]+>/g, "")
|
|
||||||
.replace(/\ \;/ig,'')
|
|
||||||
.replace(/\s+/ig , '')
|
|
||||||
.replace(/(\n|\r)/ig , '')
|
|
||||||
.substr(0, this.len);
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
formatTime () {
|
|
||||||
if ( this.time ) {
|
|
||||||
return this.time.substr(0,10);
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
imageSrc(){
|
|
||||||
return this.image ? this.image.split(',')[0] : '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style type="text/scss" scoped lang="scss">
|
|
||||||
.single_blog{
|
|
||||||
padding: 10px;
|
|
||||||
background: #ffffff;
|
|
||||||
figure{
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
.blog_content {
|
|
||||||
padding-top: 20px;
|
|
||||||
position: relative;
|
|
||||||
.post_title {
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
font-size: 16px;
|
|
||||||
text-transform: capitalize;
|
|
||||||
line-height: 30px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
.articles_date {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.articles_date span {
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
p.post_desc {
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 24px;
|
|
||||||
height: 48px;
|
|
||||||
overflow: hidden;
|
|
||||||
color: #9a9a9a;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
> a.btn-see {
|
|
||||||
font-size: 14px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: 600;
|
|
||||||
display: inline-block;
|
|
||||||
border: 1px solid #454545;
|
|
||||||
line-height: 20px;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 15px;
|
|
||||||
margin-top: 24px;
|
|
||||||
text-decoration: none;
|
|
||||||
color: rgba(91,40,158,0.8);
|
|
||||||
width: 100px;
|
|
||||||
}
|
|
||||||
> a:hover {
|
|
||||||
color: #fff;
|
|
||||||
background: #F53737;
|
|
||||||
border-color: #F53737;
|
|
||||||
}
|
|
||||||
.article-price{
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
bottom: 10px;
|
|
||||||
color: #F53737;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.blog_carousel:hover .owl-nav div {
|
|
||||||
opacity: 1;
|
|
||||||
visibility: visible;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
.blog_carousel:hover .owl-nav div.owl-next {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
.blog_carousel .owl-nav.disabled {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.blog_carousel .owl-nav div {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
transform: translatey(-50%);
|
|
||||||
font-size: 18px;
|
|
||||||
-webkit-transition: 0.3s;
|
|
||||||
transition: 0.3s;
|
|
||||||
opacity: 0;
|
|
||||||
visibility: hidden;
|
|
||||||
width: 62px;
|
|
||||||
height: 62px;
|
|
||||||
line-height: 60px;
|
|
||||||
text-align: center;
|
|
||||||
background: rgba(255, 255, 255, 0.75);
|
|
||||||
border-radius: 50%;
|
|
||||||
left: 25px;
|
|
||||||
border: 1px solid #e5e5e5;
|
|
||||||
}
|
|
||||||
.blog_carousel .owl-nav div:hover {
|
|
||||||
color: #fff;
|
|
||||||
background: #F53737;
|
|
||||||
border-color: #F53737;
|
|
||||||
}
|
|
||||||
.blog_carousel .owl-nav div.owl-next {
|
|
||||||
right: 15px;
|
|
||||||
left: auto;
|
|
||||||
}
|
|
||||||
@media only screen and (max-width: 767px) {
|
|
||||||
.blog_carousel .owl-nav div {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-checkbox-group v-model="select" @change="changeSelect">
|
|
||||||
<el-checkbox v-for="v in list" :label="v"> {{ v.zimu }} 、 {{ v.title }} </el-checkbox>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import {findObject} from "@/utils/utils";
|
|
||||||
import {each} from "@/utils/extend";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "t-checkbox",
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
select:[],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
obj:Object,
|
|
||||||
paper:String,
|
|
||||||
daan:String
|
|
||||||
},
|
|
||||||
computed:{
|
|
||||||
list(){
|
|
||||||
if(!this.paper){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
return eval("("+this.paper+")")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
changeSelect(val){
|
|
||||||
var daan = [];
|
|
||||||
var zimu = [];
|
|
||||||
var defen = 0;
|
|
||||||
each(this.select , (i,o)=>{
|
|
||||||
daan.push(o.title);
|
|
||||||
zimu.push(o.zimu);
|
|
||||||
defen +=Math.floor( o.point === undefined ? o.defen : o.point);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.obj.zimu = zimu.join(","),
|
|
||||||
this.obj[this.daan] = daan.join(","),
|
|
||||||
this.obj.defen = defen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-tooltip class="item" effect="dark" :content="isCollect ? '已收藏':'收藏'" placement="top-start">
|
|
||||||
<el-button v-if="isCollect" icon="el-icon-star-on" type="danger" circle></el-button>
|
|
||||||
<el-button @click="collect" v-else icon="el-icon-star-off" type="warning" circle></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "e-collect",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
value:[Boolean,Number],
|
|
||||||
module:String,
|
|
||||||
id:[String,Number],
|
|
||||||
ziduan:[String,Number],
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
isCollect(){
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
collect(){
|
|
||||||
this.$collect(this.module , this.ziduan , this.id).then(res=>{
|
|
||||||
this.$emit('input' , true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,84 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="e-container">
|
|
||||||
<slot></slot>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
@media screen and (min-width: 1100px){
|
|
||||||
.e-container{
|
|
||||||
width: 980px;
|
|
||||||
margin:0 auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media screen and (min-width: 1200px){
|
|
||||||
.e-container{
|
|
||||||
width: 1100px;
|
|
||||||
margin:0 auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media screen and (min-width: 1300px){
|
|
||||||
.e-container{
|
|
||||||
width: 1200px;
|
|
||||||
margin:0 auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
.e-container{
|
|
||||||
padding: 0px 8px;
|
|
||||||
}
|
|
||||||
#app{
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
#project-box .info{
|
|
||||||
float: none!important;
|
|
||||||
}
|
|
||||||
#project-box .entry-content{
|
|
||||||
float: none!important;
|
|
||||||
width: 100% !important;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
.el-form{
|
|
||||||
.el-form-item__label{
|
|
||||||
width: 100% !important;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
.el-form-item__content{
|
|
||||||
width: 100%!important;
|
|
||||||
margin-left: 0px!important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p{
|
|
||||||
white-space:pre-wrap;
|
|
||||||
}
|
|
||||||
.Home >div>div>.el-carousel{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.goods-info {
|
|
||||||
.gallery-list{
|
|
||||||
float: none!important;
|
|
||||||
width: 100% !important;
|
|
||||||
height: 350px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-right-content{
|
|
||||||
margin-left: 0px!important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.hjlgf{
|
|
||||||
.row1{
|
|
||||||
float: none!important;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
.row2{
|
|
||||||
margin-left: 0px!important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "e-container",
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail" v-if="address.lng">
|
|
||||||
<baidu-map class="map" :center="{lng: address.lng, lat: address.lat}" :zoom="15">
|
|
||||||
<bm-info-window :position="{lng: address.lng, lat: address.lat}"
|
|
||||||
title="位置信息"
|
|
||||||
:show="infoWindow"
|
|
||||||
@close="infoWindowClose" @open="infoWindowOpen">
|
|
||||||
<p v-text="address.address"></p>
|
|
||||||
<el-button type="primary" @click="open">导航</el-button>
|
|
||||||
</bm-info-window>
|
|
||||||
<bm-marker :position="{lng:address.lng,lat:address.lat}" :dragging="false" animation="BMAP_ANIMATION_BOUNCE"></bm-marker>
|
|
||||||
</baidu-map>
|
|
||||||
<a :href="daohangUrl" ref="daohang" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" scoped lang="scss">
|
|
||||||
.detail {
|
|
||||||
width: 100%;
|
|
||||||
height: 350px;
|
|
||||||
.map {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
img{
|
|
||||||
max-width: none;
|
|
||||||
max-height: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import {isObject} from "@/utils/extend";
|
|
||||||
export default {
|
|
||||||
name: "e-baidu-address-detail",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
daohangUrl:'',
|
|
||||||
infoWindow: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
map:[Object,String]
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
address(){
|
|
||||||
var map = this.map;
|
|
||||||
console.log(map)
|
|
||||||
if(!map){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
if(!isObject(map)){
|
|
||||||
map = JSON.parse(map);
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
infoWindowClose () {
|
|
||||||
this.infoWindow = false
|
|
||||||
},
|
|
||||||
infoWindowOpen () {
|
|
||||||
this.infoWindow = true
|
|
||||||
},
|
|
||||||
open(){
|
|
||||||
var obj = this.address;
|
|
||||||
var url = "http://api.map.baidu.com/marker?location="+obj.lat+","+obj.lng+"&title=目的地&content="+obj.address+"&output=html&src=webapp.baidu.openAPIdemo&output=html";
|
|
||||||
var a = document.createElement('a');
|
|
||||||
a.href = url;
|
|
||||||
a.target = '_blank';
|
|
||||||
a.click();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
<template>
|
|
||||||
<jt-tinymce @input="$emit('input' , $event)" :upload-image="uploadFile" :value="value"></jt-tinymce>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import JtTinymce from "@/components/Tinymce/index";
|
|
||||||
import api from "@/api";
|
|
||||||
import {formatImageSrc} from "@/utils/utils";
|
|
||||||
export default {
|
|
||||||
name: "e-editor",
|
|
||||||
components: {JtTinymce},
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
value:String
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {},
|
|
||||||
methods: {
|
|
||||||
uploadFile(file , success , error)
|
|
||||||
{
|
|
||||||
api.attachment.upload(file).then(file=>{
|
|
||||||
success(formatImageSrc(file))
|
|
||||||
}).catch(error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
<template>
|
|
||||||
<span>
|
|
||||||
<template v-if="value">
|
|
||||||
<a :href="setting.proxyUrl + '/'+(value)" :download="filename ? filename : basename(value)">
|
|
||||||
下载
|
|
||||||
</a>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
-
|
|
||||||
</template>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import setting from '@/setting'
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-file-list",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
setting,
|
|
||||||
path
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
value:String,
|
|
||||||
filename:String
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {},
|
|
||||||
methods: {
|
|
||||||
basename:path.basename
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="footer mt10">
|
|
||||||
<div class="copyrightnr link">
|
|
||||||
友情链接
|
|
||||||
<a v-for="v in likeList" :href="v.wangzhi" target="_blank">{{ v.wangzhanmingcheng }}</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style type="text/scss" scoped lang="scss">
|
|
||||||
.footer{
|
|
||||||
padding: 15px;
|
|
||||||
color: #767676;
|
|
||||||
text-align: center;
|
|
||||||
.link{
|
|
||||||
a:after{
|
|
||||||
content: ' | ';
|
|
||||||
}
|
|
||||||
a:last-child:after{
|
|
||||||
content: '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import api from '@/api';
|
|
||||||
import {extend} from '@/utils/extend';
|
|
||||||
const setting = require('@/setting');
|
|
||||||
|
|
||||||
export default {
|
|
||||||
data(){
|
|
||||||
return {
|
|
||||||
likeList:[]
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
loadListMenu(module, target) {
|
|
||||||
this.$post(api.search.all, {table: module, order: 'id desc'}).then(res => {
|
|
||||||
this[target] = res.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created(){
|
|
||||||
this.loadListMenu("youqinglianjie",'likeList');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@ -1,328 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="header-box" :class="{ open: status }">
|
|
||||||
<e-container>
|
|
||||||
<div class="header-top clearfix">
|
|
||||||
<div class="left">欢迎光临</div>
|
|
||||||
<div class="right">
|
|
||||||
<template v-if="$session.username">
|
|
||||||
<el-dropdown>
|
|
||||||
<span class="el-dropdown-link">
|
|
||||||
{{ $session.username }} <i class="el-icon-arrow-down el-icon--right"></i>
|
|
||||||
</span>
|
|
||||||
<el-dropdown-menu slot="dropdown">
|
|
||||||
<el-dropdown-item icon="el-icon-user" @click.native="$router.push('/admin')">个人中心</el-dropdown-item>
|
|
||||||
<el-dropdown-item icon="el-icon-arrow-left" @click.native="logout">退出登录</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<el-button type="primary" @click="$router.push('/login')" size="mini">
|
|
||||||
登录
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</e-container>
|
|
||||||
<div class="marks-bg" @click="status = false"></div>
|
|
||||||
<div class="header-nav">
|
|
||||||
<e-container class="clearfix">
|
|
||||||
<div class="logo nav-left">
|
|
||||||
<div class="brand" @click="status = true">
|
|
||||||
<span class="fa fa-bars"></span>
|
|
||||||
</div>
|
|
||||||
{{ setting.title }}
|
|
||||||
</div>
|
|
||||||
<div class="header-nav-ul nav-left clearfix">
|
|
||||||
<ul class="header-nav-left clearfix">
|
|
||||||
<li>
|
|
||||||
<router-link to="/">首页
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<router-link to="/xinwenxinxi">旅游新闻
|
|
||||||
<i class="el-icon-arrow-down"></i>
|
|
||||||
</router-link>
|
|
||||||
<ul class="submenu">
|
|
||||||
<li v-for="m in listMenuxinwenfenlei">
|
|
||||||
<router-link :to="'/xinwenxinxi?fenlei=' + m.id" v-text="m.fenleimingcheng"></router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<router-link to="/jingdianxinxi">景区信息
|
|
||||||
<i class="el-icon-arrow-down"></i>
|
|
||||||
</router-link>
|
|
||||||
<ul class="submenu">
|
|
||||||
<li v-for="m in listMenudiqu">
|
|
||||||
<router-link :to="'/jingdianxinxi?suoshudiqu=' + m.id" v-text="m.diqumingcheng"></router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<router-link to="/difangmeishi">美食信息
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<router-link to="/lvyouxianlu">旅游线路
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<router-link to="/liuyanbanadd">在线留言
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<router-link to="/yonghuadd">注册
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</e-container>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" scope lang="scss">
|
|
||||||
.el-button--primary{
|
|
||||||
|
|
||||||
background: rgba(15, 80, 37, 0.8) !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
.header-box {
|
|
||||||
.header-top {
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.marks-bg,
|
|
||||||
.brand {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.marks-bg {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 100;
|
|
||||||
background: rgba(0, 0, 0, .5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.left {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-nav {
|
|
||||||
|
|
||||||
background: rgba(11, 85, 14, 0.8);
|
|
||||||
height: 55px;
|
|
||||||
line-height: 55px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
font-size: 18px;
|
|
||||||
color: #ffffff;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-left {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-nav-ul {
|
|
||||||
>ul>li {
|
|
||||||
float: left;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
>a {
|
|
||||||
display: block;
|
|
||||||
padding: 0px 10px;
|
|
||||||
|
|
||||||
>i {
|
|
||||||
transition: .2s linear;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
>.submenu {
|
|
||||||
visibility: hidden;
|
|
||||||
opacity: .5;
|
|
||||||
position: absolute;
|
|
||||||
top: 100%;
|
|
||||||
left: 0px;
|
|
||||||
max-height: 0px;
|
|
||||||
width: 200px;
|
|
||||||
z-index: 5;
|
|
||||||
background: rgba(75, 154, 200, 1);
|
|
||||||
transition: .5s cubic-bezier(0, 1, 0.5, 1);
|
|
||||||
border-radius: 0 0 8px 8px;
|
|
||||||
|
|
||||||
>li>a {
|
|
||||||
line-height: 20px;
|
|
||||||
display: block;
|
|
||||||
padding: 10px 15px;
|
|
||||||
border-bottom: 1px #2B6C99 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
>li:last-child>a {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
>ul>li.active,
|
|
||||||
>ul>li:hover {
|
|
||||||
>a {
|
|
||||||
background: #4B9AC8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
>ul>li:hover {
|
|
||||||
>a>i {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
>.submenu {
|
|
||||||
visibility: initial;
|
|
||||||
opacity: 1;
|
|
||||||
max-height: 900px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
.header-box {
|
|
||||||
.brand {
|
|
||||||
display: inline;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-right {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
float: none;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-nav-ul {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 120;
|
|
||||||
transform: translateX(-100%);
|
|
||||||
width: 50%;
|
|
||||||
visibility: hidden;
|
|
||||||
background: rgba(0, 0, 0, .5);
|
|
||||||
transition: transform 100ms ease-in-out;
|
|
||||||
|
|
||||||
.header-nav-left {
|
|
||||||
>li {
|
|
||||||
width: 100%;
|
|
||||||
float: none;
|
|
||||||
|
|
||||||
>.submenu {
|
|
||||||
visibility: visible;
|
|
||||||
max-height: none;
|
|
||||||
position: static;
|
|
||||||
background: transparent;
|
|
||||||
padding-left: 20px;
|
|
||||||
|
|
||||||
>li {
|
|
||||||
>a {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-box.open {
|
|
||||||
.marks-bg {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-nav-ul {
|
|
||||||
visibility: visible;
|
|
||||||
transform: translateX(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import api from '@/api';
|
|
||||||
import { extend } from '@/utils/extend';
|
|
||||||
|
|
||||||
const setting = require('@/setting');
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "bootstrap-header",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
status: false,
|
|
||||||
keyword: '',
|
|
||||||
setting,
|
|
||||||
listMenuxinwenfenlei: [],
|
|
||||||
listMenudiqu: [],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$route() {
|
|
||||||
this.status = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
searchKeyword() {
|
|
||||||
var filter = {};
|
|
||||||
filter[""] = this.keyword;
|
|
||||||
this.$router.push({
|
|
||||||
path: '/',
|
|
||||||
query: filter
|
|
||||||
});
|
|
||||||
},
|
|
||||||
logout() {
|
|
||||||
this.$confirm('确定退出登录?', '确认信息').then(() => {
|
|
||||||
// 退出登录
|
|
||||||
this.$store.dispatch('user/logout');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
loadListMenu(module, target) {
|
|
||||||
this.$post(api.search.all, { table: module, order: 'id desc' }).then(res => {
|
|
||||||
this[target] = res.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.loadListMenu('xinwenfenlei', 'listMenuxinwenfenlei');
|
|
||||||
this.loadListMenu('diqu', 'listMenudiqu');
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="Home">
|
|
||||||
<v-header></v-header>
|
|
||||||
<transition name="slide-slip">
|
|
||||||
<router-view/>
|
|
||||||
</transition>
|
|
||||||
<v-footer></v-footer>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
.slide-slip-enter-active,
|
|
||||||
.slide-slip-leave-active {
|
|
||||||
transition: all .3s;
|
|
||||||
}
|
|
||||||
.slide-slip-enter {
|
|
||||||
transform: translateX(100%);
|
|
||||||
/* opacity: 0; */
|
|
||||||
}
|
|
||||||
.slide-slip-leave-to {
|
|
||||||
transform: translateX(-100%);
|
|
||||||
}
|
|
||||||
.dye-bottom-leave-active,
|
|
||||||
.dye-bottom-enter-active {
|
|
||||||
transition: all .3s;
|
|
||||||
}
|
|
||||||
.dye-bottom-enter,
|
|
||||||
.dye-bottom-leave-to {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import VHeader from "@/views/header";
|
|
||||||
import VFooter from "@/views/footer";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "home",
|
|
||||||
components: { VFooter, VHeader},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {},
|
|
||||||
methods: {},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,99 +0,0 @@
|
|||||||
<template>
|
|
||||||
|
|
||||||
<div class="product-preview">
|
|
||||||
<div class="big-image">
|
|
||||||
<a href="javascript:;" data-toggle="lightbox">
|
|
||||||
<img :src="lists[active]" alt="" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<ul class="thumbs unstyled clearfix">
|
|
||||||
<li v-for="(r,k) in lists" :class="{active:active == k}" :key="r" @click="active=k">
|
|
||||||
<a href="javascript:;">
|
|
||||||
<img :src="r" alt="" />
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
<style type="type/scss" lang="scss">
|
|
||||||
.product-preview {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
zoom: 1;
|
|
||||||
.big-image {
|
|
||||||
margin-right: 124px;
|
|
||||||
overflow: hidden;
|
|
||||||
zoom: 1;
|
|
||||||
}
|
|
||||||
.thumbs {
|
|
||||||
position: absolute;
|
|
||||||
top: 25px;
|
|
||||||
right: 0;
|
|
||||||
width: 68px;
|
|
||||||
> li {
|
|
||||||
margin-top: 5px;
|
|
||||||
border: 3px solid #919191;
|
|
||||||
border-radius: 50%;
|
|
||||||
overflow: hidden;
|
|
||||||
transition: all 200ms ease-in-out;
|
|
||||||
> a {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 84px;
|
|
||||||
}
|
|
||||||
> a:hover {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>li.active{
|
|
||||||
border-color: #fa6f57;
|
|
||||||
}
|
|
||||||
> li:first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import { isArray } from "@/utils/extend";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-image-toggle",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
active:0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
images:{
|
|
||||||
type:[String,Array]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
lists(){
|
|
||||||
var images = this.images;
|
|
||||||
if(!images){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
var arr;
|
|
||||||
if(isArray(images)){
|
|
||||||
arr = images;
|
|
||||||
}else{
|
|
||||||
arr = images.split(',');
|
|
||||||
}
|
|
||||||
arr = arr.filter(s=>s);
|
|
||||||
return arr;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {},
|
|
||||||
created() {
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,66 +0,0 @@
|
|||||||
<template>
|
|
||||||
<fieldset class="images_box">
|
|
||||||
<div class="imagesList" v-viewer>
|
|
||||||
<div class="uploadImage" v-for="(img,k) in images" :key="k">
|
|
||||||
<el-image :src="$formatImageSrc(img)" fit="cover" style="width: 100px;height: 100px">
|
|
||||||
</el-image>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
.images_box{
|
|
||||||
border: 1px solid #DEDEDE;
|
|
||||||
}
|
|
||||||
.imagesList{
|
|
||||||
.uploadImage{
|
|
||||||
display: inline-block;
|
|
||||||
width: 120px;
|
|
||||||
height: 120px;
|
|
||||||
padding: 10px;
|
|
||||||
border: 1px solid #DEDEDE;
|
|
||||||
text-align: center;
|
|
||||||
margin-right: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import {isString} from "@/utils/extend";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-images",
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
src:{
|
|
||||||
type:[String,Array]
|
|
||||||
},
|
|
||||||
type:String
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
images(){
|
|
||||||
var src = this.src;
|
|
||||||
if(isString(src)){
|
|
||||||
src = src.split(",").filter(s=>s!='');
|
|
||||||
}
|
|
||||||
if(!src)return[];
|
|
||||||
src = src.map(s=>this.$formatImageSrc(s));
|
|
||||||
|
|
||||||
return src;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="img-box" :class="['pb'+pb,isScale?'img-scale':'']">
|
|
||||||
<div class="img" :style="{'background-image':'url('+image+')'}"></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import {formatImageSrc} from "@/utils/utils";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-img-box",
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
pb:{
|
|
||||||
type:[String,Number],
|
|
||||||
default:100
|
|
||||||
},
|
|
||||||
src:[String],
|
|
||||||
isScale:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
image(){
|
|
||||||
var src = this.src;
|
|
||||||
if(src == ''){
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
var a = src.split(',');
|
|
||||||
return formatImageSrc(a[0]);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,256 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div :class="{fullscreen:fullscreen}" class="tinymce-container" :style="{width:containerWidth}">
|
|
||||||
<textarea :id="tinymceId" class="tinymce-textarea"/>
|
|
||||||
<div class="editor-custom-btn-container">
|
|
||||||
<editorImage color="#1890ff" class="editor-upload-btn" @successCBK="imageSuccessCBK"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
/**
|
|
||||||
* docs:
|
|
||||||
* https://panjiachen.github.io/vue-element-admin-site/feature/component/rich-editor.html#tinymce
|
|
||||||
*/
|
|
||||||
import editorImage from './components/EditorImage'
|
|
||||||
import plugins from './plugins'
|
|
||||||
import toolbar from './toolbar'
|
|
||||||
import load from './dynamicLoadScript'
|
|
||||||
|
|
||||||
// why use this cdn, detail see https://github.com/PanJiaChen/tinymce-all-in-one
|
|
||||||
const tinymceCDN = '/static/tinymce/tinymce.min.js'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'jt-tinymce',
|
|
||||||
components: {editorImage},
|
|
||||||
props: {
|
|
||||||
id: {
|
|
||||||
type: String,
|
|
||||||
default: function () {
|
|
||||||
return 'vue-tinymce-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
value: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
toolbar: {
|
|
||||||
type: Array,
|
|
||||||
required: false,
|
|
||||||
default() {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
menubar: {
|
|
||||||
type: String,
|
|
||||||
default: 'file edit insert view format table'
|
|
||||||
},
|
|
||||||
height: {
|
|
||||||
type: [Number, String],
|
|
||||||
required: false,
|
|
||||||
default: 360
|
|
||||||
},
|
|
||||||
width: {
|
|
||||||
type: [Number, String],
|
|
||||||
required: false,
|
|
||||||
default: 'auto'
|
|
||||||
},
|
|
||||||
uploadImage:{
|
|
||||||
type: Function,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
pickerUploadImage:{
|
|
||||||
type: Function,
|
|
||||||
default:function () {
|
|
||||||
return function (file,success,failure) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
hasChange: false,
|
|
||||||
hasInit: false,
|
|
||||||
tinymceId: this.id,
|
|
||||||
fullscreen: false,
|
|
||||||
languageTypeList: {
|
|
||||||
'en': 'en',
|
|
||||||
'zh': 'zh_CN',
|
|
||||||
'es': 'es_MX',
|
|
||||||
'ja': 'ja'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
containerWidth() {
|
|
||||||
const width = this.width
|
|
||||||
if (/^[\d]+(\.[\d]+)?$/.test(width)) { // matches `100`, `'100'`
|
|
||||||
return `${width}px`
|
|
||||||
}
|
|
||||||
return width
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
value(val) {
|
|
||||||
if (!this.hasChange && this.hasInit) {
|
|
||||||
this.$nextTick(() =>
|
|
||||||
window.tinymce.get(this.tinymceId).setContent(val || ''))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.init()
|
|
||||||
},
|
|
||||||
activated() {
|
|
||||||
if (window.tinymce) {
|
|
||||||
this.initTinymce()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deactivated() {
|
|
||||||
this.destroyTinymce()
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
this.destroyTinymce()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
init() {
|
|
||||||
// dynamic load tinymce from cdn
|
|
||||||
load(tinymceCDN, (err) => {
|
|
||||||
if (err) {
|
|
||||||
this.$message.error(err.message)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.initTinymce()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
initTinymce() {
|
|
||||||
const _this = this
|
|
||||||
window.tinymce.init({
|
|
||||||
selector: `#${this.tinymceId}`,
|
|
||||||
language: this.languageTypeList['zh'],
|
|
||||||
height: this.height,
|
|
||||||
body_class: 'panel-body ',
|
|
||||||
object_resizing: false,
|
|
||||||
paste_data_images:true,
|
|
||||||
toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,
|
|
||||||
menubar: this.menubar,
|
|
||||||
plugins: plugins,
|
|
||||||
end_container_on_empty_block: true,
|
|
||||||
powerpaste_word_import: 'clean',
|
|
||||||
code_dialog_height: 450,
|
|
||||||
code_dialog_width: 1000,
|
|
||||||
branding:false,
|
|
||||||
automatic_uploads: true,
|
|
||||||
advlist_bullet_styles: 'square',
|
|
||||||
advlist_number_styles: 'default',
|
|
||||||
imagetools_cors_hosts: ['www.tinymce.com', 'codepen.io'],
|
|
||||||
default_link_target: '_blank',
|
|
||||||
link_title: false,
|
|
||||||
nonbreaking_force_tab: true, // inserting nonbreaking space need Nonbreaking Space Plugin
|
|
||||||
init_instance_callback: editor => {
|
|
||||||
if (_this.value) {
|
|
||||||
editor.setContent(_this.value)
|
|
||||||
}
|
|
||||||
_this.hasInit = true
|
|
||||||
editor.on('NodeChange Change KeyUp SetContent', () => {
|
|
||||||
this.hasChange = true
|
|
||||||
this.$emit('input', editor.getContent())
|
|
||||||
})
|
|
||||||
},
|
|
||||||
setup(editor) {
|
|
||||||
editor.on('FullscreenStateChanged', (e) => {
|
|
||||||
_this.fullscreen = e.state
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// it will try to keep these URLs intact
|
|
||||||
// https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@convert_urls/
|
|
||||||
// https://stackoverflow.com/questions/5196205/disable-tinymce-absolute-to-relative-url-conversions
|
|
||||||
convert_urls: false,
|
|
||||||
images_upload_handler(blobInfo, success, failure){
|
|
||||||
_this.uploadImage(blobInfo.blob() , success , failure)
|
|
||||||
},
|
|
||||||
|
|
||||||
//拖放方式 上传图片
|
|
||||||
file_picker_callback: function (callback, value, meta) {
|
|
||||||
|
|
||||||
var input = document.createElement('input');
|
|
||||||
input.setAttribute('type', 'file');
|
|
||||||
|
|
||||||
input.onchange = function () {
|
|
||||||
|
|
||||||
var file = this.files[0];
|
|
||||||
if(file){
|
|
||||||
_this.uploadImage(file , callback , function () {
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/*_this.pickerUploadImage(file, callback , function () {
|
|
||||||
|
|
||||||
})*/
|
|
||||||
};
|
|
||||||
input.click();
|
|
||||||
},
|
|
||||||
paste_upload_image:function (editor , file , success , error) {
|
|
||||||
_this.uploadImage(file , success , error)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
destroyTinymce() {
|
|
||||||
const tinymce = window.tinymce.get(this.tinymceId)
|
|
||||||
if (this.fullscreen) {
|
|
||||||
tinymce.execCommand('mceFullScreen')
|
|
||||||
}
|
|
||||||
if (tinymce) {
|
|
||||||
tinymce.destroy()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setContent(value) {
|
|
||||||
window.tinymce.get(this.tinymceId).setContent(value)
|
|
||||||
},
|
|
||||||
getContent() {
|
|
||||||
window.tinymce.get(this.tinymceId).getContent()
|
|
||||||
},
|
|
||||||
imageSuccessCBK(arr) {
|
|
||||||
arr.forEach(v => window.tinymce.get(this.tinymceId).insertContent(`<img class="wscnph" src="${v.url}" >`))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tinymce-container {
|
|
||||||
position: relative;
|
|
||||||
line-height: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tinymce-container {
|
|
||||||
::v-deep {
|
|
||||||
.mce-fullscreen {
|
|
||||||
z-index: 10000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tinymce-textarea {
|
|
||||||
visibility: hidden;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-custom-btn-container {
|
|
||||||
position: absolute;
|
|
||||||
right: 4px;
|
|
||||||
top: 4px;
|
|
||||||
/*z-index: 2005;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
.fullscreen .editor-custom-btn-container {
|
|
||||||
z-index: 10000;
|
|
||||||
position: fixed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-upload-btn {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -1,200 +0,0 @@
|
|||||||
<template>
|
|
||||||
|
|
||||||
<div class="v-list" v-loading="loading" element-loading-text="加载中">
|
|
||||||
|
|
||||||
<el-card class="box-card">
|
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<span class="title">
|
|
||||||
管理员列表
|
|
||||||
</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<div class="form-search">
|
|
||||||
<el-form @submit.prevent.stop :inline="true" size="mini">
|
|
||||||
<el-form-item label="帐号">
|
|
||||||
|
|
||||||
<el-input v-model="search.username"></el-input>
|
|
||||||
|
|
||||||
</el-form-item> <el-form-item>
|
|
||||||
<el-button type="primary" @click="searchSubmit" icon="el-icon-search">查询</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<el-table border :data="list" style="width: 100%" highlight-current-row
|
|
||||||
>
|
|
||||||
|
|
||||||
<el-table-column type="index" label="#"></el-table-column> <!-- 序号 -->
|
|
||||||
|
|
||||||
<el-table-column label="帐号"width="130">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
{{ row.username }} </template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="密码">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
{{ row.pwd }} </template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="操作">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<el-button-group>
|
|
||||||
|
|
||||||
<el-tooltip content="编辑" placement="top">
|
|
||||||
<el-button icon="el-icon-edit" @click="$goto({path:'/admin/adminsupdt',query:{id:row.id } })"
|
|
||||||
type="warning" size="mini"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button icon="el-icon-delete" type="danger" size="mini" @click="deleteItem(row)">
|
|
||||||
|
|
||||||
</el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</el-button-group>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="e-pages" style="margin-top: 10px;text-align: center">
|
|
||||||
<el-pagination
|
|
||||||
@current-change="loadList"
|
|
||||||
:current-page="page"
|
|
||||||
:page-size="pagesize"
|
|
||||||
@size-change="sizeChange"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
:total="totalCount">
|
|
||||||
</el-pagination>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import api from '@/api';
|
|
||||||
import { remove , checkIssh } from '@/utils/utils';
|
|
||||||
import { extend } from '@/utils/extend';
|
|
||||||
import objectDiff from 'objectdiff';
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台列表页面
|
|
||||||
*/
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
loading:false,
|
|
||||||
list:[],
|
|
||||||
search:{
|
|
||||||
|
|
||||||
username:'',
|
|
||||||
|
|
||||||
},
|
|
||||||
total:{},
|
|
||||||
page:1, // 当前页
|
|
||||||
pagesize:10, // 页大小
|
|
||||||
totalCount:0, // 总行数
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {},
|
|
||||||
methods: {
|
|
||||||
searchSubmit(){
|
|
||||||
this.loadList(1);
|
|
||||||
},
|
|
||||||
|
|
||||||
sizeChange(e){
|
|
||||||
this.pagesize = e;
|
|
||||||
this.loadList(1);
|
|
||||||
},
|
|
||||||
checkIssh,
|
|
||||||
|
|
||||||
loadList( page ){
|
|
||||||
// 防止重新点加载列表
|
|
||||||
if(this.loading)return;
|
|
||||||
this.loading = true;
|
|
||||||
this.page = page;
|
|
||||||
// 筛选条件
|
|
||||||
var filter = extend(true, {}, this.search, {page:page+"", pagesize: this.pagesize+""});
|
|
||||||
var diff = objectDiff.diff(filter, this.$route.query);
|
|
||||||
if (diff.changed != 'equal') { // 筛选的条件不一致则更新链接
|
|
||||||
this.$router.push({ // 更新query
|
|
||||||
path: this.$route.path,
|
|
||||||
query: filter
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.$post(api.admins.list , filter).then(res=>{
|
|
||||||
this.loading = false;
|
|
||||||
if(res.code == api.code.OK)
|
|
||||||
{
|
|
||||||
extend(this , res.data);
|
|
||||||
}else{
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
}
|
|
||||||
}).catch(err=>{
|
|
||||||
this.loading = false;
|
|
||||||
this.$message.error(err.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 删除某行方法
|
|
||||||
deleteItem( row ){
|
|
||||||
this.$confirm('确定删除数据?' , '提示',{ // 弹出 确认框提示是否要删除
|
|
||||||
type: 'warning'
|
|
||||||
}).then(()=>{// 确定操作
|
|
||||||
|
|
||||||
this.loading = true; // 滚动条
|
|
||||||
this.$post(api.admins.delete , {// 提交后台
|
|
||||||
id:row.id
|
|
||||||
}).then(res=>{
|
|
||||||
this.loading = false;
|
|
||||||
if(res.code != api.code.OK){
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
}else{
|
|
||||||
remove(this.list , row);
|
|
||||||
}
|
|
||||||
}).catch(err=>{ // 访问网络错误
|
|
||||||
this.loading = false;
|
|
||||||
this.$message.error(err.message)
|
|
||||||
})
|
|
||||||
}).catch(()=>{
|
|
||||||
// 取消操作
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
beforeRouteUpdate(to,form,next){
|
|
||||||
extend(this.search , to.query)
|
|
||||||
this.loadList(1);
|
|
||||||
next();
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
var search = extend(this.search , this.$route.query)
|
|
||||||
if(search.page)
|
|
||||||
{
|
|
||||||
this.page = Math.floor(this.$route.query.page)
|
|
||||||
delete search.page
|
|
||||||
}
|
|
||||||
if(search.pagesize)
|
|
||||||
{
|
|
||||||
this.pagesize = Math.floor(this.$route.query.pagesize)
|
|
||||||
delete search.pagesize
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loadList(1);
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,94 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="v-mod" v-loading="loading">
|
|
||||||
<el-card class="box-card">
|
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<span> 修改密码</span>
|
|
||||||
</div>
|
|
||||||
<div class="">
|
|
||||||
<el-form ref="modForm" :model="form" inline-message label-width="120px">
|
|
||||||
<el-form-item label="原密码" prop="oldPassword" required :rules="[{required:true,message:'请填写原密码'}]">
|
|
||||||
<el-input style="width:200px" type="password" v-model="form.oldPassword"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="新密码" prop="newPwd" required :rules="[{required:true,message:'请填写新密码'}]">
|
|
||||||
<el-input style="width:200px" type="password" v-model="form.newPwd"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="确认密码" prop="newPwd2" required
|
|
||||||
:rules="[{required:true,message:'请填写确认密码'},
|
|
||||||
{validator:checkPassword,message:'两次密码不一致', trigger: 'blur' }]">
|
|
||||||
<el-input style="width:200px" type="password" v-model="form.newPwd2"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button @click="savePassword">保存</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import api from '@/api'
|
|
||||||
export default {
|
|
||||||
name: "v-mod",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading:false,
|
|
||||||
form:{
|
|
||||||
oldPassword:'',
|
|
||||||
newPwd:'',
|
|
||||||
newPwd2:''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {},
|
|
||||||
methods: {
|
|
||||||
savePassword(){
|
|
||||||
|
|
||||||
this.$refs.modForm.validate().then(()=>{
|
|
||||||
if( this.loading )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.loading = true;
|
|
||||||
var form = this.form;
|
|
||||||
this.$post(api.editorPassword,form).then(res=>{
|
|
||||||
this.loading = false;
|
|
||||||
if(res.code == api.code.OK)
|
|
||||||
{
|
|
||||||
this.$message.success('密码修改成功');
|
|
||||||
this.$refs.modForm.resetFields();
|
|
||||||
}else{
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
}
|
|
||||||
}).catch(err=>{
|
|
||||||
this.loading = false;
|
|
||||||
this.$message.error(err.message);
|
|
||||||
});
|
|
||||||
|
|
||||||
}).catch(()=>{
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
checkPassword(rule, value, callback){
|
|
||||||
if(value == this.form.newPwd)
|
|
||||||
{
|
|
||||||
callback();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
callback(new Error('两次密码不一致'));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="subtitle-modelbox-widget">
|
|
||||||
<h3 class="section-title">
|
|
||||||
{{title}}
|
|
||||||
</h3>
|
|
||||||
<div class="sidebar-widget-body">
|
|
||||||
<slot></slot>
|
|
||||||
</div>
|
|
||||||
<!-- /.sidebar-widget-body -->
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" scoped lang="scss">
|
|
||||||
.subtitle-modelbox-widget {
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,.08);
|
|
||||||
.section-title {
|
|
||||||
font-size: 20px;
|
|
||||||
font-family: 'Open Sans', sans-serif;
|
|
||||||
border-bottom: 1px solid #e3e3e3;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
color: rgba(91,40,158,0.8);
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: 0px;
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-top: 20px;
|
|
||||||
}
|
|
||||||
.sidebar-widget-body{
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "e-module-model-box",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
title:String
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {},
|
|
||||||
created() {
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="e-module-info">
|
|
||||||
<slot :data="data"></slot>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="type/scss" lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import api from '@/api'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-module-info",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
data:{}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
module:String,
|
|
||||||
order:String,
|
|
||||||
where:Object,
|
|
||||||
field:String
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
module(){
|
|
||||||
this.loadData();
|
|
||||||
},
|
|
||||||
order(){
|
|
||||||
this.loadData();
|
|
||||||
},
|
|
||||||
where(){
|
|
||||||
this.loadData();
|
|
||||||
},
|
|
||||||
field(){
|
|
||||||
this.loadData();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {},
|
|
||||||
methods: {
|
|
||||||
loadData(){
|
|
||||||
var param = {};
|
|
||||||
if(this.where){
|
|
||||||
param.where = JSON.stringify(this.where);
|
|
||||||
}
|
|
||||||
if(this.order){
|
|
||||||
param.order = this.order;
|
|
||||||
}
|
|
||||||
if(this.field){
|
|
||||||
param.field = this.field;
|
|
||||||
}
|
|
||||||
param.limit = 1;
|
|
||||||
param.table = this.module;
|
|
||||||
|
|
||||||
this.$post(api.search.all , param).then(res=>{
|
|
||||||
if(res.code == 0 && res.data && res.data[0]){
|
|
||||||
this.data = res.data[0]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
if(this.module){
|
|
||||||
this.loadData();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,109 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="e-news-info clearfix">
|
|
||||||
<div class="thumb" v-if="image" @click="$gotoUrl">
|
|
||||||
<div class="img-box pb100">
|
|
||||||
<div class="img" :style="{'background-image': 'url('+$getImage(image)+')'}"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="news-content-text" :class="{'not-thumb':!image}">
|
|
||||||
<h3 @click="$gotoUrl">{{title}}</h3>
|
|
||||||
<div class="description" v-html="$substr(description,len)">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="other-content">
|
|
||||||
<slot></slot>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
.e-news-info{
|
|
||||||
margin-bottom: 10px;
|
|
||||||
background: #ffffff;
|
|
||||||
position: relative;
|
|
||||||
.thumb{
|
|
||||||
float: left;
|
|
||||||
width: 120px;
|
|
||||||
}
|
|
||||||
.news-content-text{
|
|
||||||
margin-left: 130px;
|
|
||||||
h3{
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 14px;
|
|
||||||
margin: 0px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
.description{
|
|
||||||
color: #7b7b7b;
|
|
||||||
}
|
|
||||||
.other-content{
|
|
||||||
position: absolute;
|
|
||||||
left: 130px;
|
|
||||||
bottom: 5px;
|
|
||||||
span{
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.news-content-text.not-thumb{
|
|
||||||
margin-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 768px){
|
|
||||||
.e-news-info{
|
|
||||||
.thumb {
|
|
||||||
width: 100px;
|
|
||||||
}
|
|
||||||
.news-content-text {
|
|
||||||
margin-left: 110px;
|
|
||||||
.other-content {
|
|
||||||
left: 110px;
|
|
||||||
}
|
|
||||||
.description{
|
|
||||||
word-break:break-all;
|
|
||||||
display:-webkit-box;/**对象作为伸缩盒子模型展示**/
|
|
||||||
-webkit-box-orient:vertical;/**设置或检索伸缩盒子对象的子元素的排列方式**/
|
|
||||||
-webkit-line-clamp:2;/**显示的行数**/
|
|
||||||
overflow:hidden;/**隐藏超出的内容**/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import gotoUrl from "../mixins/gotoUrl";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-news-list",
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
mixins:[gotoUrl],
|
|
||||||
props:{
|
|
||||||
image:String,
|
|
||||||
title:String,
|
|
||||||
description:[String,Number],
|
|
||||||
len:{
|
|
||||||
type:Number,
|
|
||||||
default:30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,200 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="e-paper">
|
|
||||||
|
|
||||||
<div id="TypeFieldabc" v-if="isSelect">
|
|
||||||
<div style="border: 1px solid #ededed; border-radius: 5px; padding: 10px; background: #F2F2F2;">
|
|
||||||
<table class="table table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th width="60"> </th>
|
|
||||||
<th style="text-align: left">答案</th>
|
|
||||||
<!--<th width="80">跳转序号</th>-->
|
|
||||||
<th style="text-align: left" width="100">得分</th>
|
|
||||||
<th width="60">
|
|
||||||
<el-button size="mini" type="primary" @click="addItem">增加答案</el-button>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="(v,k) in paperList" :key="v.zimu">
|
|
||||||
<td style="text-align: right" v-text="v.zimu"></td>
|
|
||||||
<td>
|
|
||||||
<el-input size="mini" :value="v.title" @input="updatePaper($event,v,k,'title')"></el-input>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<el-input size="mini" :value="v.point" @input="updatePaper($event,v,k,'point')" type="number"></el-input>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<el-popconfirm icon="el-icon-info" iconColor="red" title="确定删除?" @confirm="deleteItem(k,v)" @onConfirm="deleteItem(k,v)">
|
|
||||||
<el-button size="mini" type="danger" slot="reference" icon="el-icon-delete-solid"></el-button>
|
|
||||||
</el-popconfirm>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import {extend, isArray} from "@/utils/extend";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-paper",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isSelect:true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
value:[String],
|
|
||||||
vo:Object,
|
|
||||||
type:String,
|
|
||||||
danxuanti:{
|
|
||||||
type:String,
|
|
||||||
default:''
|
|
||||||
},
|
|
||||||
duoxuanti:{
|
|
||||||
type:String,
|
|
||||||
default:''
|
|
||||||
},
|
|
||||||
panduanti:{
|
|
||||||
type:String,
|
|
||||||
default:''
|
|
||||||
},
|
|
||||||
correctText:{
|
|
||||||
type:String,
|
|
||||||
default:'正确'
|
|
||||||
},
|
|
||||||
errorText:{
|
|
||||||
type:String,
|
|
||||||
default:'错误'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch:{
|
|
||||||
type( val ){
|
|
||||||
if(this.value.length == 0){
|
|
||||||
if(this.panduanti.indexOf(val) != -1)
|
|
||||||
{
|
|
||||||
// 这个是判断类型
|
|
||||||
// 直接帮忙设定为两个
|
|
||||||
if(this.paperList.length != 2 || this.paperList[0].title != this.correctText)
|
|
||||||
{
|
|
||||||
var obj = [
|
|
||||||
{
|
|
||||||
zimu:'A',
|
|
||||||
title:this.correctText,
|
|
||||||
point:0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
zimu:'B',
|
|
||||||
title:this.errorText,
|
|
||||||
point:0
|
|
||||||
}
|
|
||||||
];
|
|
||||||
this.emitInput(obj);
|
|
||||||
}
|
|
||||||
this.isSelect = true;
|
|
||||||
}else if(this.danxuanti.indexOf(val) == -1 && this.duoxuanti.indexOf(val) == -1)
|
|
||||||
{
|
|
||||||
this.isSelect = false;
|
|
||||||
}else{
|
|
||||||
if(this.paperList.length == 0)
|
|
||||||
{
|
|
||||||
var obj = [
|
|
||||||
{
|
|
||||||
zimu:'A',
|
|
||||||
title:'',
|
|
||||||
point:0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
zimu:'B',
|
|
||||||
title:'',
|
|
||||||
point:0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
zimu:'C',
|
|
||||||
title:'',
|
|
||||||
point:0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
zimu:'D',
|
|
||||||
title:'',
|
|
||||||
point:0
|
|
||||||
}
|
|
||||||
];
|
|
||||||
this.emitInput(obj);
|
|
||||||
}
|
|
||||||
this.isSelect = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
paperList(){
|
|
||||||
var value = this.value;
|
|
||||||
try{
|
|
||||||
value = JSON.parse(value);
|
|
||||||
}catch (e) {
|
|
||||||
value = [];
|
|
||||||
}
|
|
||||||
if(!isArray(value)){
|
|
||||||
value = [];
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
updateZimu( paperList )
|
|
||||||
{
|
|
||||||
var zimu = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
||||||
var result = paperList ? paperList : extend(true,[],this.paperList);
|
|
||||||
for (var i=0;i<result.length;i++)
|
|
||||||
{
|
|
||||||
result[i].zimu = zimu.substr(i,1)
|
|
||||||
}
|
|
||||||
this.emitInput(result);
|
|
||||||
},
|
|
||||||
updatePaper($event , v , k , key ){
|
|
||||||
var result = extend(true,[],this.paperList);
|
|
||||||
var obj = {};
|
|
||||||
obj[key] = $event;
|
|
||||||
var nowObj = extend(true,{} , v , obj);
|
|
||||||
result[k] = nowObj;
|
|
||||||
this.emitInput(result);
|
|
||||||
},
|
|
||||||
emitInput(val){
|
|
||||||
this.$emit('input' , JSON.stringify(val))
|
|
||||||
},
|
|
||||||
addItem(){
|
|
||||||
var zimu = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
||||||
|
|
||||||
var result = extend(true,[],this.paperList);
|
|
||||||
var index = result.length;
|
|
||||||
var obj = {
|
|
||||||
zimu:zimu.substr(index,1),
|
|
||||||
title:'',
|
|
||||||
point:0
|
|
||||||
}
|
|
||||||
result.push(obj);
|
|
||||||
this.emitInput(result);
|
|
||||||
},
|
|
||||||
deleteItem(k){
|
|
||||||
var result = extend(true,[],this.paperList);
|
|
||||||
result.splice(k,1);
|
|
||||||
this.updateZimu(result);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
<template>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" lang="scss">
|
|
||||||
@import "./asset/icon/MKPlayer.scss";
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "e-play-list",
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
watch: {},
|
|
||||||
computed: {},
|
|
||||||
methods: {},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,363 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="v-module-products">
|
|
||||||
<article>
|
|
||||||
<div class="pro-btn pro-btn-add" @click="$gotoUrl">
|
|
||||||
查看
|
|
||||||
</div>
|
|
||||||
<div :class="showType">
|
|
||||||
<div class="image" @click="$gotoUrl">
|
|
||||||
<e-img-box :src="image" :pb="imageHeight" :is-scale="isScale"></e-img-box>
|
|
||||||
</div>
|
|
||||||
<div class="text">
|
|
||||||
<h2 class="title h4">
|
|
||||||
<a href="javascript:;" @click="$gotoUrl">{{title}}</a>
|
|
||||||
</h2>
|
|
||||||
<sup v-if="price!=''" class="price">¥ {{price}}</sup>
|
|
||||||
<span class="description clearfix" v-text="$substr(description , 30)">
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<style type="text/scss" scoped lang="scss">
|
|
||||||
.v-module-products{
|
|
||||||
article {
|
|
||||||
position: relative;
|
|
||||||
transition: all 0.3s;
|
|
||||||
overflow: hidden;
|
|
||||||
border: 1px solid #F5F4EF;
|
|
||||||
margin-left: -1px;
|
|
||||||
margin-top: -2px;
|
|
||||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
|
|
||||||
border-radius: 8px;
|
|
||||||
.badge {
|
|
||||||
position: absolute;
|
|
||||||
top: 10px;
|
|
||||||
left: 10px;
|
|
||||||
line-height: initial;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
sub, sup {
|
|
||||||
font-size: 100%;
|
|
||||||
}
|
|
||||||
.text {
|
|
||||||
width: 100%;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
.text a:hover {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.text .title {
|
|
||||||
display: block;
|
|
||||||
margin: 0;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
font-size: 14px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.text sub,.text sup{
|
|
||||||
bottom: auto;
|
|
||||||
top: auto;
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
.text sub{
|
|
||||||
text-decoration: line-through;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
.image {
|
|
||||||
overflow: hidden;
|
|
||||||
height: auto;
|
|
||||||
a {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.pro-btn-add {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translate3d(100%, 0, 0);
|
|
||||||
transition: all 0.5s;
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
box-shadow: 0 3px 30px rgba(0, 0, 0, 0.1);
|
|
||||||
position: relative;
|
|
||||||
z-index: 22;
|
|
||||||
.pro-btn-add {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translate3d(0, 0, 0);
|
|
||||||
}
|
|
||||||
.info > span {
|
|
||||||
transform: scale(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.info {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
width: 35px;
|
|
||||||
right: 15px;
|
|
||||||
top: 15px;
|
|
||||||
margin-right: 0;
|
|
||||||
margin-top: 5px;
|
|
||||||
z-index: 3;
|
|
||||||
a {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: dimgray;
|
|
||||||
color: white;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 30px;
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
background-color: #000000;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
a:hover:after {
|
|
||||||
position: absolute;
|
|
||||||
content: attr(data-title);
|
|
||||||
padding: 5px 6px;
|
|
||||||
right: 110%;
|
|
||||||
top: 3px;
|
|
||||||
white-space: nowrap;
|
|
||||||
z-index: 20;
|
|
||||||
background-color: #000000;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
line-height: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-favorite.added {
|
|
||||||
transform: scale(1);
|
|
||||||
a {
|
|
||||||
background-color: #e71d36;
|
|
||||||
}
|
|
||||||
a:hover:after {
|
|
||||||
content: attr(data-title-added);
|
|
||||||
background-color: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
> span {
|
|
||||||
display: block;
|
|
||||||
transition: all 0.3s;
|
|
||||||
transform: scale(0);
|
|
||||||
}
|
|
||||||
> span:nth-child(1) {
|
|
||||||
transition-delay: 0.1s;
|
|
||||||
}
|
|
||||||
> span:nth-child(2) {
|
|
||||||
transition-delay: 0.2s;
|
|
||||||
}
|
|
||||||
> span:nth-child(3) {
|
|
||||||
transition-delay: 0.3s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.figure-list {
|
|
||||||
display: table;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.figure-list .image,.figure-list .text{
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: middle;
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
.figure-list .image{
|
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
.figure-list .text {
|
|
||||||
width: 60%;
|
|
||||||
position: relative;
|
|
||||||
padding: 0 20px;
|
|
||||||
vertical-align: top;
|
|
||||||
padding-top: 20px;
|
|
||||||
.title {
|
|
||||||
white-space: inherit;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
}
|
|
||||||
.description {
|
|
||||||
display: block;
|
|
||||||
margin-top: 15px;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
}
|
|
||||||
.price{
|
|
||||||
position: absolute;
|
|
||||||
right: 0px;
|
|
||||||
top: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.figure-grid {
|
|
||||||
.text .description {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.figure-block{
|
|
||||||
.text .description {
|
|
||||||
position: relative;
|
|
||||||
display: none;
|
|
||||||
height: 80px;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 1;
|
|
||||||
padding-top: 5px;
|
|
||||||
}
|
|
||||||
.text .description:after {
|
|
||||||
background: -moz-linear-gradient(top, rgba(255, 255, 255, 0) 0%, white 100%);
|
|
||||||
/* FF3.6-15 */
|
|
||||||
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, white 100%);
|
|
||||||
/* Chrome10-25,Safari5.1-6 */
|
|
||||||
background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, white 100%);
|
|
||||||
/* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=0 );
|
|
||||||
/* IE6-9 */
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 75px;
|
|
||||||
content: "";
|
|
||||||
display: block;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
padding-left: 15px;
|
|
||||||
padding-right: 15px;
|
|
||||||
}
|
|
||||||
.title {
|
|
||||||
font-weight: 600;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.title small {
|
|
||||||
display: block;
|
|
||||||
text-transform: none;
|
|
||||||
color: black;
|
|
||||||
font-size: 40%;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
.price {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.pro-btn {
|
|
||||||
-moz-border-radius: 3px;
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
display: inline-block;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #212529;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
user-select: none;
|
|
||||||
background-color: transparent;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
padding: 0.375rem 0.75rem;
|
|
||||||
font-size: 1rem;
|
|
||||||
line-height: 1.5;
|
|
||||||
border-radius: 12px;
|
|
||||||
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
||||||
}
|
|
||||||
.pro-btn.pro-btn-add {
|
|
||||||
background: #3c5570;
|
|
||||||
position: absolute;
|
|
||||||
overflow: hidden;
|
|
||||||
color: white;
|
|
||||||
bottom: 20px;
|
|
||||||
right: 10px;
|
|
||||||
border: 0;
|
|
||||||
font-size: 12px;
|
|
||||||
cursor: pointer;
|
|
||||||
z-index: 9;
|
|
||||||
}
|
|
||||||
.pro-btn.pro-btn-add:hover {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.pro-btn:hover {
|
|
||||||
color: #212529;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@media (min-width: 992px) {
|
|
||||||
.v-module-products article {
|
|
||||||
box-shadow: 0 3px 30px rgba(0, 0, 0, 0.1);
|
|
||||||
.info a {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.info {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.figure-list .image {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.v-module-products article .badge {
|
|
||||||
top: 20px;
|
|
||||||
left: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import gotoUrl from "../mixins/gotoUrl";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "e-module-products",
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
image:String,
|
|
||||||
isScale:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
},
|
|
||||||
imageHeight:{
|
|
||||||
type:[String,Number],
|
|
||||||
default:80
|
|
||||||
},
|
|
||||||
title:String,
|
|
||||||
price:[String,Number],
|
|
||||||
description:[String,Number],
|
|
||||||
type:{
|
|
||||||
type:String,
|
|
||||||
default:'grid'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mixins:[gotoUrl],
|
|
||||||
watch: {},
|
|
||||||
computed: {
|
|
||||||
showType(){
|
|
||||||
switch (this.type) {
|
|
||||||
case 'grid':
|
|
||||||
return 'figure-grid';
|
|
||||||
default:
|
|
||||||
return 'figure-list';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-radio-group v-model="select" @change="changeSelect" :disabled="disabled">
|
|
||||||
<el-radio v-for="v in list" :label="v.zimu"> {{ v.zimu }} 、 {{ v.title }} </el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import {findObject} from "@/utils/utils";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "t-radio",
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
select:'',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
obj:Object,
|
|
||||||
paper:String,
|
|
||||||
daan:String,
|
|
||||||
disabled:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed:{
|
|
||||||
list(){
|
|
||||||
if(!this.paper){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
return eval("("+this.paper+")")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
changeSelect(val){
|
|
||||||
if(val){
|
|
||||||
var obj = findObject(this.list , r=> r.zimu == val );
|
|
||||||
this.obj.zimu = obj.zimu;
|
|
||||||
this.obj[this.daan] = obj.title;
|
|
||||||
this.obj.defen = obj.point === undefined ? obj.defen : obj.point;
|
|
||||||
}else{
|
|
||||||
this.obj.zimu = '';
|
|
||||||
this.obj[this.daan] = '';
|
|
||||||
this.obj.defen = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue