创建文章

This commit is contained in:
zkr_liushenlu 2021-04-21 14:51:28 +08:00
parent 2940be4e0b
commit c7c4aa29be
13 changed files with 2291 additions and 1793 deletions

View File

@ -46,6 +46,11 @@ public class ArticleManageController extends BaseController {
return prefix + "/articleList";
}
@GetMapping("createPage")
public String createPage() {
return prefix + "/createArticle";
}
/**
* 查询所有公司发布的文章信息
*

View File

@ -1,291 +0,0 @@
package com.ruoyi.content.domain;
public class ArticleSendUrl {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column article_send_url.PUBLISH_ID
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
private String publishId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column article_send_url.VERSION_NUMBER
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
private String versionNumber;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column article_send_url.QYH_ARTICLE_URL
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
private String qyhArticleUrl;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column article_send_url.CREATE_DATE
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
private String createDate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column article_send_url.CREATE_TIME
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
private String createTime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column article_send_url.CREATE_USER
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
private String createUser;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column article_send_url.UPDATE_USER
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
private String updateUser;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column article_send_url.UPDATE_DATE
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
private String updateDate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column article_send_url.UPDATE_TIME
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
private String updateTime;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column article_send_url.PUBLISH_ID
*
* @return the value of article_send_url.PUBLISH_ID
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getPublishId() {
return publishId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column article_send_url.PUBLISH_ID
*
* @param publishId the value for article_send_url.PUBLISH_ID
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setPublishId(String publishId) {
this.publishId = publishId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column article_send_url.VERSION_NUMBER
*
* @return the value of article_send_url.VERSION_NUMBER
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getVersionNumber() {
return versionNumber;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column article_send_url.VERSION_NUMBER
*
* @param versionNumber the value for article_send_url.VERSION_NUMBER
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setVersionNumber(String versionNumber) {
this.versionNumber = versionNumber;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column article_send_url.QYH_ARTICLE_URL
*
* @return the value of article_send_url.QYH_ARTICLE_URL
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getQyhArticleUrl() {
return qyhArticleUrl;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column article_send_url.QYH_ARTICLE_URL
*
* @param qyhArticleUrl the value for article_send_url.QYH_ARTICLE_URL
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setQyhArticleUrl(String qyhArticleUrl) {
this.qyhArticleUrl = qyhArticleUrl;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column article_send_url.CREATE_DATE
*
* @return the value of article_send_url.CREATE_DATE
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getCreateDate() {
return createDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column article_send_url.CREATE_DATE
*
* @param createDate the value for article_send_url.CREATE_DATE
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setCreateDate(String createDate) {
this.createDate = createDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column article_send_url.CREATE_TIME
*
* @return the value of article_send_url.CREATE_TIME
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column article_send_url.CREATE_TIME
*
* @param createTime the value for article_send_url.CREATE_TIME
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column article_send_url.CREATE_USER
*
* @return the value of article_send_url.CREATE_USER
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getCreateUser() {
return createUser;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column article_send_url.CREATE_USER
*
* @param createUser the value for article_send_url.CREATE_USER
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column article_send_url.UPDATE_USER
*
* @return the value of article_send_url.UPDATE_USER
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getUpdateUser() {
return updateUser;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column article_send_url.UPDATE_USER
*
* @param updateUser the value for article_send_url.UPDATE_USER
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setUpdateUser(String updateUser) {
this.updateUser = updateUser;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column article_send_url.UPDATE_DATE
*
* @return the value of article_send_url.UPDATE_DATE
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getUpdateDate() {
return updateDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column article_send_url.UPDATE_DATE
*
* @param updateDate the value for article_send_url.UPDATE_DATE
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setUpdateDate(String updateDate) {
this.updateDate = updateDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column article_send_url.UPDATE_TIME
*
* @return the value of article_send_url.UPDATE_TIME
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column article_send_url.UPDATE_TIME
*
* @param updateTime the value for article_send_url.UPDATE_TIME
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
}

View File

@ -1,932 +0,0 @@
package com.ruoyi.content.domain;
import java.util.ArrayList;
import java.util.List;
public class ArticleSendUrlExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public ArticleSendUrlExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andPublishIdIsNull() {
addCriterion("PUBLISH_ID is null");
return (Criteria) this;
}
public Criteria andPublishIdIsNotNull() {
addCriterion("PUBLISH_ID is not null");
return (Criteria) this;
}
public Criteria andPublishIdEqualTo(String value) {
addCriterion("PUBLISH_ID =", value, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdNotEqualTo(String value) {
addCriterion("PUBLISH_ID <>", value, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdGreaterThan(String value) {
addCriterion("PUBLISH_ID >", value, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdGreaterThanOrEqualTo(String value) {
addCriterion("PUBLISH_ID >=", value, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdLessThan(String value) {
addCriterion("PUBLISH_ID <", value, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdLessThanOrEqualTo(String value) {
addCriterion("PUBLISH_ID <=", value, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdLike(String value) {
addCriterion("PUBLISH_ID like", value, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdNotLike(String value) {
addCriterion("PUBLISH_ID not like", value, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdIn(List<String> values) {
addCriterion("PUBLISH_ID in", values, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdNotIn(List<String> values) {
addCriterion("PUBLISH_ID not in", values, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdBetween(String value1, String value2) {
addCriterion("PUBLISH_ID between", value1, value2, "publishId");
return (Criteria) this;
}
public Criteria andPublishIdNotBetween(String value1, String value2) {
addCriterion("PUBLISH_ID not between", value1, value2, "publishId");
return (Criteria) this;
}
public Criteria andVersionNumberIsNull() {
addCriterion("VERSION_NUMBER is null");
return (Criteria) this;
}
public Criteria andVersionNumberIsNotNull() {
addCriterion("VERSION_NUMBER is not null");
return (Criteria) this;
}
public Criteria andVersionNumberEqualTo(String value) {
addCriterion("VERSION_NUMBER =", value, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberNotEqualTo(String value) {
addCriterion("VERSION_NUMBER <>", value, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberGreaterThan(String value) {
addCriterion("VERSION_NUMBER >", value, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberGreaterThanOrEqualTo(String value) {
addCriterion("VERSION_NUMBER >=", value, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberLessThan(String value) {
addCriterion("VERSION_NUMBER <", value, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberLessThanOrEqualTo(String value) {
addCriterion("VERSION_NUMBER <=", value, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberLike(String value) {
addCriterion("VERSION_NUMBER like", value, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberNotLike(String value) {
addCriterion("VERSION_NUMBER not like", value, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberIn(List<String> values) {
addCriterion("VERSION_NUMBER in", values, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberNotIn(List<String> values) {
addCriterion("VERSION_NUMBER not in", values, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberBetween(String value1, String value2) {
addCriterion("VERSION_NUMBER between", value1, value2, "versionNumber");
return (Criteria) this;
}
public Criteria andVersionNumberNotBetween(String value1, String value2) {
addCriterion("VERSION_NUMBER not between", value1, value2, "versionNumber");
return (Criteria) this;
}
public Criteria andQyhArticleUrlIsNull() {
addCriterion("QYH_ARTICLE_URL is null");
return (Criteria) this;
}
public Criteria andQyhArticleUrlIsNotNull() {
addCriterion("QYH_ARTICLE_URL is not null");
return (Criteria) this;
}
public Criteria andQyhArticleUrlEqualTo(String value) {
addCriterion("QYH_ARTICLE_URL =", value, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlNotEqualTo(String value) {
addCriterion("QYH_ARTICLE_URL <>", value, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlGreaterThan(String value) {
addCriterion("QYH_ARTICLE_URL >", value, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlGreaterThanOrEqualTo(String value) {
addCriterion("QYH_ARTICLE_URL >=", value, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlLessThan(String value) {
addCriterion("QYH_ARTICLE_URL <", value, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlLessThanOrEqualTo(String value) {
addCriterion("QYH_ARTICLE_URL <=", value, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlLike(String value) {
addCriterion("QYH_ARTICLE_URL like", value, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlNotLike(String value) {
addCriterion("QYH_ARTICLE_URL not like", value, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlIn(List<String> values) {
addCriterion("QYH_ARTICLE_URL in", values, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlNotIn(List<String> values) {
addCriterion("QYH_ARTICLE_URL not in", values, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlBetween(String value1, String value2) {
addCriterion("QYH_ARTICLE_URL between", value1, value2, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andQyhArticleUrlNotBetween(String value1, String value2) {
addCriterion("QYH_ARTICLE_URL not between", value1, value2, "qyhArticleUrl");
return (Criteria) this;
}
public Criteria andCreateDateIsNull() {
addCriterion("CREATE_DATE is null");
return (Criteria) this;
}
public Criteria andCreateDateIsNotNull() {
addCriterion("CREATE_DATE is not null");
return (Criteria) this;
}
public Criteria andCreateDateEqualTo(String value) {
addCriterion("CREATE_DATE =", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotEqualTo(String value) {
addCriterion("CREATE_DATE <>", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateGreaterThan(String value) {
addCriterion("CREATE_DATE >", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateGreaterThanOrEqualTo(String value) {
addCriterion("CREATE_DATE >=", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateLessThan(String value) {
addCriterion("CREATE_DATE <", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateLessThanOrEqualTo(String value) {
addCriterion("CREATE_DATE <=", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateLike(String value) {
addCriterion("CREATE_DATE like", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotLike(String value) {
addCriterion("CREATE_DATE not like", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateIn(List<String> values) {
addCriterion("CREATE_DATE in", values, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotIn(List<String> values) {
addCriterion("CREATE_DATE not in", values, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateBetween(String value1, String value2) {
addCriterion("CREATE_DATE between", value1, value2, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotBetween(String value1, String value2) {
addCriterion("CREATE_DATE not between", value1, value2, "createDate");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("CREATE_TIME is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("CREATE_TIME is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(String value) {
addCriterion("CREATE_TIME =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(String value) {
addCriterion("CREATE_TIME <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(String value) {
addCriterion("CREATE_TIME >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(String value) {
addCriterion("CREATE_TIME >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(String value) {
addCriterion("CREATE_TIME <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(String value) {
addCriterion("CREATE_TIME <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLike(String value) {
addCriterion("CREATE_TIME like", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotLike(String value) {
addCriterion("CREATE_TIME not like", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<String> values) {
addCriterion("CREATE_TIME in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<String> values) {
addCriterion("CREATE_TIME not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(String value1, String value2) {
addCriterion("CREATE_TIME between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(String value1, String value2) {
addCriterion("CREATE_TIME not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateUserIsNull() {
addCriterion("CREATE_USER is null");
return (Criteria) this;
}
public Criteria andCreateUserIsNotNull() {
addCriterion("CREATE_USER is not null");
return (Criteria) this;
}
public Criteria andCreateUserEqualTo(String value) {
addCriterion("CREATE_USER =", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotEqualTo(String value) {
addCriterion("CREATE_USER <>", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserGreaterThan(String value) {
addCriterion("CREATE_USER >", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
addCriterion("CREATE_USER >=", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLessThan(String value) {
addCriterion("CREATE_USER <", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLessThanOrEqualTo(String value) {
addCriterion("CREATE_USER <=", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLike(String value) {
addCriterion("CREATE_USER like", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotLike(String value) {
addCriterion("CREATE_USER not like", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserIn(List<String> values) {
addCriterion("CREATE_USER in", values, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotIn(List<String> values) {
addCriterion("CREATE_USER not in", values, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserBetween(String value1, String value2) {
addCriterion("CREATE_USER between", value1, value2, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotBetween(String value1, String value2) {
addCriterion("CREATE_USER not between", value1, value2, "createUser");
return (Criteria) this;
}
public Criteria andUpdateUserIsNull() {
addCriterion("UPDATE_USER is null");
return (Criteria) this;
}
public Criteria andUpdateUserIsNotNull() {
addCriterion("UPDATE_USER is not null");
return (Criteria) this;
}
public Criteria andUpdateUserEqualTo(String value) {
addCriterion("UPDATE_USER =", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserNotEqualTo(String value) {
addCriterion("UPDATE_USER <>", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserGreaterThan(String value) {
addCriterion("UPDATE_USER >", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserGreaterThanOrEqualTo(String value) {
addCriterion("UPDATE_USER >=", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserLessThan(String value) {
addCriterion("UPDATE_USER <", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserLessThanOrEqualTo(String value) {
addCriterion("UPDATE_USER <=", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserLike(String value) {
addCriterion("UPDATE_USER like", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserNotLike(String value) {
addCriterion("UPDATE_USER not like", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserIn(List<String> values) {
addCriterion("UPDATE_USER in", values, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserNotIn(List<String> values) {
addCriterion("UPDATE_USER not in", values, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserBetween(String value1, String value2) {
addCriterion("UPDATE_USER between", value1, value2, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserNotBetween(String value1, String value2) {
addCriterion("UPDATE_USER not between", value1, value2, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateDateIsNull() {
addCriterion("UPDATE_DATE is null");
return (Criteria) this;
}
public Criteria andUpdateDateIsNotNull() {
addCriterion("UPDATE_DATE is not null");
return (Criteria) this;
}
public Criteria andUpdateDateEqualTo(String value) {
addCriterion("UPDATE_DATE =", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotEqualTo(String value) {
addCriterion("UPDATE_DATE <>", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateGreaterThan(String value) {
addCriterion("UPDATE_DATE >", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateGreaterThanOrEqualTo(String value) {
addCriterion("UPDATE_DATE >=", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateLessThan(String value) {
addCriterion("UPDATE_DATE <", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateLessThanOrEqualTo(String value) {
addCriterion("UPDATE_DATE <=", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateLike(String value) {
addCriterion("UPDATE_DATE like", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotLike(String value) {
addCriterion("UPDATE_DATE not like", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateIn(List<String> values) {
addCriterion("UPDATE_DATE in", values, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotIn(List<String> values) {
addCriterion("UPDATE_DATE not in", values, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateBetween(String value1, String value2) {
addCriterion("UPDATE_DATE between", value1, value2, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotBetween(String value1, String value2) {
addCriterion("UPDATE_DATE not between", value1, value2, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("UPDATE_TIME is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("UPDATE_TIME is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(String value) {
addCriterion("UPDATE_TIME =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(String value) {
addCriterion("UPDATE_TIME <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(String value) {
addCriterion("UPDATE_TIME >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(String value) {
addCriterion("UPDATE_TIME >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(String value) {
addCriterion("UPDATE_TIME <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(String value) {
addCriterion("UPDATE_TIME <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLike(String value) {
addCriterion("UPDATE_TIME like", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotLike(String value) {
addCriterion("UPDATE_TIME not like", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<String> values) {
addCriterion("UPDATE_TIME in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<String> values) {
addCriterion("UPDATE_TIME not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(String value1, String value2) {
addCriterion("UPDATE_TIME between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(String value1, String value2) {
addCriterion("UPDATE_TIME not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table article_send_url
*
* @mbggenerated do_not_delete_during_merge Tue Sep 04 17:49:40 CST 2018
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@ -1,99 +0,0 @@
package com.ruoyi.content.mapper;
import com.ruoyi.content.domain.ArticleSendUrl;
import com.ruoyi.content.domain.ArticleSendUrlExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface ArticleSendUrlMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
int countByExample(ArticleSendUrlExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
int deleteByExample(ArticleSendUrlExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
int deleteByPrimaryKey(String publishId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
int insert(ArticleSendUrl record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
int insertSelective(ArticleSendUrl record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
List<ArticleSendUrl> selectByExample(ArticleSendUrlExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
ArticleSendUrl selectByPrimaryKey(String publishId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
int updateByExampleSelective(@Param("record") ArticleSendUrl record, @Param("example") ArticleSendUrlExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
int updateByExample(@Param("record") ArticleSendUrl record, @Param("example") ArticleSendUrlExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
int updateByPrimaryKeySelective(ArticleSendUrl record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table article_send_url
*
* @mbggenerated Tue Sep 04 17:49:40 CST 2018
*/
int updateByPrimaryKey(ArticleSendUrl record);
}

View File

@ -1179,7 +1179,7 @@ public class ArticleServiceImpl implements ArticleService {
// 文章的发布id
String publishId = userId + "a" + articleId;
msg = this.getHtmlUrl(articleId, articleName, shareImgUrl, shareDes, articleContent, ids, publishId, companyId,
msg = this.getHtmlUrl123(articleId, articleName, shareImgUrl, shareDes, articleContent, ids, publishId, companyId,
isAuthorization, isReserve, automaticName, introduction, isJoinActive);
Map<String, String> resultMap1 = new HashMap<String, String>();
resultMap1 = (Map<String, String>) msg.getObject();
@ -1212,4 +1212,82 @@ public class ArticleServiceImpl implements ArticleService {
return msg;
}
/**
* 生成静态页面路径
*/
public Message getHtmlUrl123(Integer articleId, String shareTitle, String shareImgUrl, String shareDes,
String articleContent, String ids, String publishId, String companyId, String isAuthorization,
String isReserve, String automaticName, String introduction, String isJoinActive) {
Message msg = new Message();
Map<String, String> resultMap = new HashMap<String, String>();
/*************** 根据链接爬文章***********start ****************************/
LOGGER.info(
"调用生成静态页面参数articleId[{}],shareTitle[{}],shareImgUrl[{}],shareDes[{}],ids[{}],publishId[{}],companyId[{}],isAuthorization[{}],isReserve[{}],automaticName[{}],introduction[{}],isJoinActive[{}]",
articleId, shareTitle, shareImgUrl, shareDes, ids, publishId, companyId, isAuthorization, isReserve,
automaticName, introduction, isJoinActive);
try {
/**************************** 生成静态页开始 ************************************/
Configuration conf = new Configuration();
Map<String, Object> pageData = new HashMap<String, Object>();
Map<String, String> articleMap = new HashMap<String, String>();
// 时间戳
String versionNumber = DateUtil.currentDate(DateUtil.yyyyMMddHHmmssSSS) + RandomUtils.randomNumber(3);
// 封装数据
articleMap.put("shareTitle", shareTitle);
articleMap.put("shareImgUrl", shareImgUrl);
articleMap.put("shareDes", shareDes);
articleMap.put("articleId", String.valueOf(articleId));
articleMap.put("articleContent", articleContent);
articleMap.put("companyId", companyId);
articleMap.put("versionNumber", versionNumber);
articleMap.put("publishId", publishId);
articleMap.put("isAuthorization", isAuthorization);// 是否授权
articleMap.put("isReserve", isReserve);
articleMap.put("isJoinActive", isJoinActive);
articleMap.put("automaticName", automaticName);
articleMap.put("introduction", introduction);
if (ids == null || "".equals(ids)) {
articleMap.put("adId", "");
} else {
articleMap.put("adId", ids);
}
pageData.put("articleInfo", articleMap);
// 静态页生成路径
String viewPath = PathUtil.getArticleViewUrl(versionNumber, String.valueOf(articleId));
String createPath = PathUtil.getArticleCreateUrl(versionNumber, articleId + versionNumber.substring(8, 14));
FreemakerUtil.generateStaticPage(conf, PropertiesConstants.TEMPLATE_VIEW_PATH,
PropertiesConstants.FILE_PATH + viewPath, pageData);
FreemakerUtil.generateStaticPage(conf, PropertiesConstants.TEMPLATE_CREATE_PATH,
PropertiesConstants.FILE_PATH + createPath, pageData);
// 把静态页上传到oss
OSSUtil.uploadFileHtml(PropertiesConstants.OSSENDPOINT, PropertiesConstants.OSSID,
PropertiesConstants.OSSKEY, PropertiesConstants.BUCKETNAME,
PropertiesConstants.FILE_PATH + viewPath, PropertiesConstants.OSSPATH + viewPath);
OSSUtil.uploadFileHtml(PropertiesConstants.OSSENDPOINT, PropertiesConstants.OSSID,
PropertiesConstants.OSSKEY, PropertiesConstants.BUCKETNAME,
PropertiesConstants.FILE_PATH + createPath, PropertiesConstants.OSSPATH + createPath);
String articleViewUrl = PropertiesConstants.OSS_URL + PropertiesConstants.OSSPATH + viewPath; // cdn路径
// 生产
// String articleEditUrl = PropertiesConstants.OSS_URL_HTTPS +
// PropertiesConstants.OSSPATH + editPath; // cdn路径
// 测试
String articleEditUrl = PropertiesConstants.OSS_URL + PropertiesConstants.OSSPATH + createPath;
LOGGER.info("articleEditUrl[{}]===============", articleEditUrl);
/**************************** 生成静态页结束 ************************************/
// 保存文章的原始静态页面路径
resultMap.put("articleEditUrl", articleEditUrl);
resultMap.put("articleViewUrl", articleViewUrl);
resultMap.put("versionNumber", versionNumber);
LOGGER.info("生成静态页面的versionNumber为{}", versionNumber);
} catch (Exception e) {
e.printStackTrace();
throw new BusinessException("系统繁忙,请稍后再试");
}
msg.setObject(resultMap);
return msg;
}
}

View File

@ -7,50 +7,66 @@ import org.springframework.web.context.request.ServletRequestAttributes;
/**
* 获取路径方法
* @author Administrator
*
* @author Administrator
*/
public class PathUtil {
/**
* 获取web项目访问路径
* 使用该方法是必须在web.xml中配置了监听 org.springframework.web.context.request.RequestContextListener
* @return
*/
public static String getWebPath(){
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/";
return basePath;
}
/**
* 获取web项目classes路径
* @return
*/
public static String getClassesPath(){
return Thread.currentThread().getContextClassLoader().getResource("").getPath();
}
/**
* 获取已发布文章的浏览静态页
*
* liu.hx
* 2018年4月24日
* @throws
*/
public static String getArticleViewUrl(String timestamp,String articleId) {
return "template/html/view/"+timestamp.substring(0, 8)+"/"+articleId+"b"+timestamp+".html";
}
/**
* 获取文章编辑静态页
*
* liu.hx
* 2018年4月24日
* @throws
*/
public static String getArticleEditUrl(String timestamp,String name) {
return "template/html/mkt-ms/edit/"+timestamp.substring(0, 8)+"/"+name+".html";
}
/**
* 获取web项目访问路径
* 使用该方法是必须在web.xml中配置了监听 org.springframework.web.context.request.RequestContextListener
*
* @return
*/
public static String getWebPath() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
return basePath;
}
/**
* 获取web项目classes路径
*
* @return
*/
public static String getClassesPath() {
return Thread.currentThread().getContextClassLoader().getResource("").getPath();
}
/**
* 获取已发布文章的浏览静态页
* <p>
* liu.hx
* 2018年4月24日
*
* @throws
*/
public static String getArticleViewUrl(String timestamp, String articleId) {
return "template/html/view/" + timestamp.substring(0, 8) + "/" + articleId + "b" + timestamp + ".html";
}
/**
* 获取文章编辑静态页
* <p>
* liu.hx
* 2018年4月24日
*
* @throws
*/
public static String getArticleEditUrl(String timestamp, String name) {
return "template/html/edit/" + timestamp.substring(0, 8) + "/" + name + ".html";
}
/**
* 获取文章编辑静态页
* <p>
* liu.hx
* 2018年4月24日
*
* @throws
*/
public static String getArticleCreateUrl(String timestamp, String name) {
return "template/html/create/" + timestamp.substring(0, 8) + "/" + name + ".html";
}
}

View File

@ -1,353 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ruoyi.content.mapper.ArticleSendUrlMapper" >
<resultMap id="BaseResultMap" type="com.ruoyi.content.domain.ArticleSendUrl" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
<id column="PUBLISH_ID" property="publishId" jdbcType="VARCHAR" />
<result column="VERSION_NUMBER" property="versionNumber" jdbcType="VARCHAR" />
<result column="QYH_ARTICLE_URL" property="qyhArticleUrl" jdbcType="VARCHAR" />
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR" />
<result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR" />
<result column="CREATE_USER" property="createUser" jdbcType="VARCHAR" />
<result column="UPDATE_USER" property="updateUser" jdbcType="VARCHAR" />
<result column="UPDATE_DATE" property="updateDate" jdbcType="VARCHAR" />
<result column="UPDATE_TIME" property="updateTime" jdbcType="VARCHAR" />
</resultMap>
<sql id="Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
PUBLISH_ID, VERSION_NUMBER, QYH_ARTICLE_URL, CREATE_DATE, CREATE_TIME, CREATE_USER,
UPDATE_USER, UPDATE_DATE, UPDATE_TIME
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.ruoyi.content.domain.ArticleSendUrlExample" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from article_send_url
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
select
<include refid="Base_Column_List" />
from article_send_url
where PUBLISH_ID = #{publishId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
delete from article_send_url
where PUBLISH_ID = #{publishId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.ruoyi.content.domain.ArticleSendUrlExample" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
delete from article_send_url
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ruoyi.content.domain.ArticleSendUrl" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
<!-- <selectKey resultType="java.lang.String" keyProperty="publishId" order="BEFORE" >
SELECT LAST_INSERT_ID()
</selectKey> -->
insert into article_send_url (PUBLISH_ID, VERSION_NUMBER, QYH_ARTICLE_URL,
CREATE_DATE, CREATE_TIME, CREATE_USER,
UPDATE_USER, UPDATE_DATE, UPDATE_TIME
)
values (#{publishId,jdbcType=VARCHAR}, #{versionNumber,jdbcType=VARCHAR}, #{qyhArticleUrl,jdbcType=VARCHAR},
#{createDate,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
#{updateUser,jdbcType=VARCHAR}, #{updateDate,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.ruoyi.content.domain.ArticleSendUrl" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
<!-- <selectKey resultType="java.lang.String" keyProperty="publishId" order="BEFORE" >
SELECT LAST_INSERT_ID()
</selectKey> -->
insert into article_send_url
<trim prefix="(" suffix=")" suffixOverrides="," >
PUBLISH_ID,
<if test="versionNumber != null" >
VERSION_NUMBER,
</if>
<if test="qyhArticleUrl != null" >
QYH_ARTICLE_URL,
</if>
<if test="createDate != null" >
CREATE_DATE,
</if>
<if test="createTime != null" >
CREATE_TIME,
</if>
<if test="createUser != null" >
CREATE_USER,
</if>
<if test="updateUser != null" >
UPDATE_USER,
</if>
<if test="updateDate != null" >
UPDATE_DATE,
</if>
<if test="updateTime != null" >
UPDATE_TIME,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
#{publishId,jdbcType=VARCHAR},
<if test="versionNumber != null" >
#{versionNumber,jdbcType=VARCHAR},
</if>
<if test="qyhArticleUrl != null" >
#{qyhArticleUrl,jdbcType=VARCHAR},
</if>
<if test="createDate != null" >
#{createDate,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=VARCHAR},
</if>
<if test="createUser != null" >
#{createUser,jdbcType=VARCHAR},
</if>
<if test="updateUser != null" >
#{updateUser,jdbcType=VARCHAR},
</if>
<if test="updateDate != null" >
#{updateDate,jdbcType=VARCHAR},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ruoyi.content.domain.ArticleSendUrlExample" resultType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
select count(*) from article_send_url
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
update article_send_url
<set >
<if test="record.publishId != null" >
PUBLISH_ID = #{record.publishId,jdbcType=VARCHAR},
</if>
<if test="record.versionNumber != null" >
VERSION_NUMBER = #{record.versionNumber,jdbcType=VARCHAR},
</if>
<if test="record.qyhArticleUrl != null" >
QYH_ARTICLE_URL = #{record.qyhArticleUrl,jdbcType=VARCHAR},
</if>
<if test="record.createDate != null" >
CREATE_DATE = #{record.createDate,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null" >
CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
</if>
<if test="record.createUser != null" >
CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
</if>
<if test="record.updateUser != null" >
UPDATE_USER = #{record.updateUser,jdbcType=VARCHAR},
</if>
<if test="record.updateDate != null" >
UPDATE_DATE = #{record.updateDate,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null" >
UPDATE_TIME = #{record.updateTime,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
update article_send_url
set PUBLISH_ID = #{record.publishId,jdbcType=VARCHAR},
VERSION_NUMBER = #{record.versionNumber,jdbcType=VARCHAR},
QYH_ARTICLE_URL = #{record.qyhArticleUrl,jdbcType=VARCHAR},
CREATE_DATE = #{record.createDate,jdbcType=VARCHAR},
CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
UPDATE_USER = #{record.updateUser,jdbcType=VARCHAR},
UPDATE_DATE = #{record.updateDate,jdbcType=VARCHAR},
UPDATE_TIME = #{record.updateTime,jdbcType=VARCHAR}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.content.domain.ArticleSendUrl" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
update article_send_url
<set >
<if test="versionNumber != null" >
VERSION_NUMBER = #{versionNumber,jdbcType=VARCHAR},
</if>
<if test="qyhArticleUrl != null" >
QYH_ARTICLE_URL = #{qyhArticleUrl,jdbcType=VARCHAR},
</if>
<if test="createDate != null" >
CREATE_DATE = #{createDate,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
CREATE_TIME = #{createTime,jdbcType=VARCHAR},
</if>
<if test="createUser != null" >
CREATE_USER = #{createUser,jdbcType=VARCHAR},
</if>
<if test="updateUser != null" >
UPDATE_USER = #{updateUser,jdbcType=VARCHAR},
</if>
<if test="updateDate != null" >
UPDATE_DATE = #{updateDate,jdbcType=VARCHAR},
</if>
<if test="updateTime != null" >
UPDATE_TIME = #{updateTime,jdbcType=VARCHAR},
</if>
</set>
where PUBLISH_ID = #{publishId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.ruoyi.content.domain.ArticleSendUrl" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Sep 04 17:49:40 CST 2018.
-->
update article_send_url
set VERSION_NUMBER = #{versionNumber,jdbcType=VARCHAR},
QYH_ARTICLE_URL = #{qyhArticleUrl,jdbcType=VARCHAR},
CREATE_DATE = #{createDate,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=VARCHAR},
CREATE_USER = #{createUser,jdbcType=VARCHAR},
UPDATE_USER = #{updateUser,jdbcType=VARCHAR},
UPDATE_DATE = #{updateDate,jdbcType=VARCHAR},
UPDATE_TIME = #{updateTime,jdbcType=VARCHAR}
where PUBLISH_ID = #{publishId,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,544 @@
/**
* Version: 1.6
* Title: Eleditor 移动端富文本编辑器
* Site: https://eleditor.fixel.cn
* Author: Try
*/
.Eleditor-scrollLocked {
height: 100%;
overflow: hidden
}
.Eleditor-wrap.Eleditor-mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .5)
}
.Eleditor-loading {
display: none;
position: absolute;
padding: 15px;
background: rgba(255, 255, 255, .9);
z-index: 999;
width: 100%;
height: 100%
}
.Eleditor-loading p {
font-size: 12px;
color: #666;
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%)
}
.Eleditor-loading p:before {
content: '';
width: 25px;
height: 25px;
margin: 0 auto;
background: url(data:image/gif;base64,R0lGODlhIAAgALMAAP///7Ozs/v7+9bW1uHh4fLy8rq6uoGBgTQ0NAEBARsbG8TExJeXl/39/VRUVAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBQAAACwAAAAAIAAgAAAE5xDISSlLrOrNp0pKNRCdFhxVolJLEJQUoSgOpSYT4RowNSsvyW1icA16k8MMMRkCBjskBTFDAZyuAEkqCfxIQ2hgQRFvAQEEIjNxVDW6XNE4YagRjuBCwe60smQUDnd4Rz1ZAQZnFAGDd0hihh12CEE9kjAEVlycXIg7BAsMB6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YEvpJivxNaGmLHT0VnOgGYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ/V/nmOM82XiHQjYKhKP1oZmADdEAAAh+QQFBQAAACwAAAAAGAAXAAAEchDISasKNeuJFKoHs4mUYlJIkmjIV54Soypsa0wmLSnqoTEtBw52mG0AjhYpBxioEqRNy8V0qFzNw+GGwlJki4lBqx1IBgjMkRIghwjrzcDti2/Gh7D9qN774wQGAYOEfwCChIV/gYmDho+QkZKTR3p7EQAh+QQFBQAAACwBAAAAHQAOAAAEchDISWdANesNHHJZwE2DUSEo5SjKKB2HOKGYFLD1CB/DnEoIlkti2PlyuKGEATMBaAACSyGbEDYD4zN1YIEmh0SCQQgYehNmTNNaKsQJXmBuuEYPi9ECAU/UFnNzeUp9VBQEBoFOLmFxWHNoQw6RWEocEQAh+QQFBQAAACwHAAAAGQARAAAEaRDICdZZNOvNDsvfBhBDdpwZgohBgE3nQaki0AYEjEqOGmqDlkEnAzBUjhrA0CoBYhLVSkm4SaAAWkahCFAWTU0A4RxzFWJnzXFWJJWb9pTihRu5dvghl+/7NQmBggo/fYKHCX8AiAmEEQAh+QQFBQAAACwOAAAAEgAYAAAEZXCwAaq9ODAMDOUAI17McYDhWA3mCYpb1RooXBktmsbt944BU6zCQCBQiwPB4jAihiCK86irTB20qvWp7Xq/FYV4TNWNz4oqWoEIgL0HX/eQSLi69boCikTkE2VVDAp5d1p0CW4RACH5BAUFAAAALA4AAAASAB4AAASAkBgCqr3YBIMXvkEIMsxXhcFFpiZqBaTXisBClibgAnd+ijYGq2I4HAamwXBgNHJ8BEbzgPNNjz7LwpnFDLvgLGJMdnw/5DRCrHaE3xbKm6FQwOt1xDnpwCvcJgcJMgEIeCYOCQlrF4YmBIoJVV2CCXZvCooHbwGRcAiKcmFUJhEAIfkEBQUAAAAsDwABABEAHwAABHsQyAkGoRivELInnOFlBjeM1BCiFBdcbMUtKQdTN0CUJru5NJQrYMh5VIFTTKJcOj2HqJQRhEqvqGuU+uw6AwgEwxkOO55lxIihoDjKY8pBoThPxmpAYi+hKzoeewkTdHkZghMIdCOIhIuHfBMOjxiNLR4KCW1ODAlxSxEAIfkEBQUAAAAsCAAOABgAEgAABGwQyEkrCDgbYvvMoOF5ILaNaIoGKroch9hacD3MFMHUBzMHiBtgwJMBFolDB4GoGGBCACKRcAAUWAmzOWJQExysQsJgWj0KqvKalTiYPhp1LBFTtp10Is6mT5gdVFx1bRN8FTsVCAqDOB9+KhEAIfkEBQUAAAAsAgASAB0ADgAABHgQyEmrBePS4bQdQZBdR5IcHmWEgUFQgWKaKbWwwSIhc4LonsXhBSCsQoOSScGQDJiWwOHQnAxWBIYJNXEoFCiEWDI9jCzESey7GwMM5doEwW4jJoypQQ743u1WcTV0CgFzbhJ5XClfHYd/EwZnHoYVDgiOfHKQNREAIfkEBQUAAAAsAAAPABkAEQAABGeQqUQruDjrW3vaYCZ5X2ie6EkcKaooTAsi7ytnTq046BBsNcTvItz4AotMwKZBIC6H6CVAJaCcT0CUBTgaTg5nTCu9GKiDEMPJg5YBBOpwlnVzLwtqyKnZagZWahoMB2M3GgsHSRsRACH5BAUFAAAALAEACAARABgAAARcMKR0gL34npkUyyCAcAmyhBijkGi2UW02VHFt33iu7yiDIDaD4/erEYGDlu/nuBAOJ9Dvc2EcDgFAYIuaXS3bbOh6MIC5IAP5Eh5fk2exC4tpgwZyiyFgvhEMBBEAIfkEBQUAAAAsAAACAA4AHQAABHMQyAnYoViSlFDGXBJ808Ep5KRwV8qEg+pRCOeoioKMwJK0Ekcu54h9AoghKgXIMZgAApQZcCCu2Ax2O6NUud2pmJcyHA4L0uDM/ljYDCnGfGakJQE5YH0wUBYBAUYfBIFkHwaBgxkDgX5lgXpHAXcpBIsRADs=) no-repeat center top;
background-size: 100%;
display: inline-block;
vertical-align: middle;
margin-right: 10px
}
.Eleditor-wrap ul {
list-style: none
}
.Eleditor-area,
.Eleditor-area *,
.Eleditor-wrap,
.Eleditor-wrap * {
cursor: pointer;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
tap-highlight-color: rgba(0, 0, 0, 0)
}
.Eleditor-area .Eleditor-active {
background: #cce0f2 !important;
padding: 2% !important
}
.Eleditor-controller {
background: #fafafa;
position: absolute;
box-sizing: border-box;
transform: translate(-50%, 0);
-webkit-transform: translate(-50%, 0);
left: 50%;
display: none;
margin-top: 5px;
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
-webkit-box-shadow: 0 0 20px rgba(0, 0, 0, .2);
border-bottom: 1px solid #e1e1e1;
border-radius: 3px;
-webkit-border-radius: 3px
}
.Eleditor-controller ul {
margin-bottom: 2.5%;
/* hrjlhy */
margin: 0;
margin-bottom: 2.5%;
}
.Eleditor-controller ul:after {
content: '';
display: block;
height: 0;
clear: both
}
.Eleditor-controller ul li {
float: left;
display: inline-block;
width: 30%;
margin: 2% 0 0 2.5%;
height: 42px;
border-radius: 3px;
-webkit-border-radius: 3px;
line-height: 42px;
padding-left: 10%;
box-sizing: border-box;
font-size: 14px;
border-right: 1px solid #ddd;
border-bottom: 1px solid #ddd;
border-top: 1px solid #eee;
border-left: 1px solid #eee;
white-space: nowrap;
position: relative
}
.Eleditor-controller ul li.Eleditor-undo {
display: none
}
.Eleditor-controller ul li:before {
background-size: 100%;
background-repeat: no-repeat
}
.Eleditor-controller ul li:before {
content: '';
position: absolute;
left: 8px;
top: 12px;
width: 15px;
height: 15px;
display: block;
/* background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAANlBMVEUAAABIotJIodFIo9NIo9NHotJAn89IotFHotJHodFIn9dHotJIodJHotFHodFHodFHodFIotIElcMpAAAAEXRSTlMAwIBAf7AQ4HDvINCg8M+Qb3nwl3EAAAC/SURBVDjL7dPRasQgEEbhf3THqEm2Pe//sl3Ixc5GF3JRaAv97tQDwojiVfOsh+yNV2LQpc5AYCnYIEkJPAUGgqRowSRjVZQmoR2h/Yd/KNwUNVxymqIN5LDY0wJVqtDC5h1MmZO9SGXnJEs9WeC16KFUt+Cj65usS3ku+s0C/wxHGXJYnLQyDw3WYTyTcBj4jk/D2RP+aJgPFWo+lGl4Z7BMw/VqWCZX/7rxXAmX96Hdgg3Sm3DQL4W75/lX+ALtiBv2wt/cBwAAAABJRU5ErkJggg==) */
}
.Eleditor-controller ul li.Eleditor-insertText:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjBAMAAADs965qAAAAHlBMVEUAAAAmk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk//nRnVBAAAACXRSTlMAQBCAcMAgMKCd1QxoAAAAf0lEQVQoz2NwlJyJCiYwCHASIzRziiAyEAEJTWRABoxECiHMEmNgKBQUAgohbJzMwBAJ1AESaracOTM0EkUIpIKBE0UI7JYpyGaBbUHYSroQE8htKGYBMQhMJEUI0yxjMwwbgVwihRBmwYUQNpImxCQohDCL8nhEpAmciYmwEAAsoK4MjVmkgQAAAABJRU5ErkJggg==)
}
/* .Eleditor-controller ul li.Eleditor-insertImage:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAMAAAApB0NrAAAAM1BMVEUAAAD/gAD/gAD/gAD/gAD/gAD/gAD/gAD/gAD/gAD/gAD/gAD/gAD/gAD/gAD/gAD/gABSMWeoAAAAEHRSTlMAwKDiQBBQ8CCwkIBg0HAwYTpfggAAAMVJREFUOMvN1EsOgzAMBFA7H/6lvv9pa1DK1IlwWHYWQRo9RmJBiIYoXuKgRHoZSFdGvs+xREoy3ScrUsPkhX9N3pmX7Jr8Es349kwon+qZUWTf9KiHIow+5XwpWRLE7syLFlNDYFY5wy2BoVk0r1yTCKNJ67o1K4FhEEuoGI8YM6WUW2LMIkc3VQSmVFAgMGfFfCkQmFKlotJFYFAVBfI1ERW2yBhURQWeN6oMCGINiGci9Q3/mZHu/x716NwbT+6fJ/fYB/HBGdUQKWkCAAAAAElFTkSuQmCC)
} */
.Eleditor-controller ul li.Eleditor-undo:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAMAAAApB0NrAAAATlBMVEUAAABubm5wcHBpaWpwcHBwcHBsbG5nZ2lwcHBwcHBwcHBwcHBwcHBubnBpaWlwcHBwcHBwcHBwcHBwcHBwcHBpaWlwcHBwcHBoaGhwcHCaDFyHAAAAGXRSTlMAPsUR69IhMvZKpZJ9Vgfg2a5kmnQruYYXgiMi7QAAAM1JREFUOMvlklmSwyAMRI0QiwGvGSd597/oDJWqzGIH/0/6D9UDpFZ376Hr9RS5QGgTVgDTRPzMGWMUpM0MwBqa/XwAQ2eghPsLJIN+/dIDxDkNdkeMC8y+tj3xUExmP7PYB333Zr04gGX7gfQO0u9b200hrt8FwO39LBFy652qzcHtsB9rx2fZQX80V4w6yVIGXyFFxwN/npLi63E98jmXvDilKnlBXu7LmiJAdGho7T0kqnI7P2YC3EkO6/TxLM92QnfmivyJlfbdv9Unig4RkspeaqcAAAAASUVORK5CYII=)
}
/* .Eleditor-controller ul li.Eleditor-insertImage div[id^='rt_rt_'] {
left: 0 !important;
width: 100% !important;
opacity: 0;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0)
} */
.Eleditor-controller ul li.Eleditor-insertLink:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAMAAAApB0NrAAAAM1BMVEUAAAAmk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/+67wOaAAAAEHRSTlMA8NAwEIBAwCCwoHBgUOCQaFFl2wAAAPlJREFUOMuFlN0ShSAIhP0DMU/l+z/tkZxsm2LaK2M+BDcG9ypefGvNL+wsxdxO5WRc4tslH9+QX1OVylQOSAwkyCgatNw7spxdJIX4FYH2xyeKBwIqvaPHo9bqUNST3IfYYux7eM+9eK5i9iN5WksXImrnfCT+gHDzZ70hgWjfjgMgAZEwDK16pon4iEiChM1EhEiLr0Ri3rLNoF2INFyHWYi4MJB5bttOFBoiv4cfzzHVgQT3aXqZr6hXs0FSs+/AjtPXM6r70DGw3wzhd6IVcp79oHWopceiiQwx+oMIKis0woIISg7XCnEt9hKI1p5AJdg3BvK5t/7GyxRFV0zN3AAAAABJRU5ErkJggg==)
}
.Eleditor-controller ul li.Eleditor-insertHr:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjBAMAAADs965qAAAAG1BMVEUAAAAmk/8mk/8mk/8mk/8mk/8mk/8mk/8mk//SKiEGAAAACHRSTlMAgEAQ0CCgwHszpJ0AAABeSURBVCjPYwABiQ4k0IBTqE0QDiqgQk1gCsKmuZABppAzplCLAYZQhzOmEFBZkDJCKEiBoQOoDA10gJQxIgJCACTUkYAuhKkK0yysNjoT43pnokKCYTALYaQcwkkOAOuLWyAmEX4YAAAAAElFTkSuQmCC)
}
.Eleditor-controller ul li.Eleditor-deleteThis:before,
.Eleditor-controller ul li.Eleditor-deleteBefore:before,
.Eleditor-controller ul li.Eleditor-deleteAfter:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjBAMAAADs965qAAAALVBMVEUAAAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAB21glVAAAADnRSTlMAwEDQMBDgUPCgYCCQgBYit2kAAACsSURBVCjP5czBCcIwFMbxr6UgejI3T0UygFQHCIILBDzosRMED87TGZxAOoJukLaCVeHNYBpCEnrz7P/wDj/4HmwzGnoj6miplxFVPWNsQXWQlFq7/gRKaA5T3sB2NxNBa2ZSNNwbaJyGGFOBlNOG+0TLYTK/fbmGozNwkMhOgaZ0gSpxfQVKaAnSWDV/T5NOoqqxfwaC7zcqAglHDy8ZOYpypGIqLe0i6bbAFx3L0mvjGhXnAAAAAElFTkSuQmCC)
}
.Eleditor-controller ul li.Eleditor-cancel:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjBAMAAADs965qAAAAJ1BMVEUAAACIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIgln7UqAAAADHRSTlMAYLAgMfKf4EGAclBp3/IGAAAA9UlEQVQoz2MAA+ZFNWfOFC1mQAAOnTNgoAEXYdY5czxTQjL9zBllmNDWM8ccQLTbmaMbICKMZw4ZQFhGZw5CGDJHBWDqRc+AmdxnQuCmssScBlGmRx0QdrseBZmhA9EPM1cB6CYQ4QxxjANQwQkGBqYzBgwsEFNljjAw2BwC4mNAaaDlIE2HGRjYgCrWHAHJA5WBCaCGBQw6BWAFB8EYCGoUGGoSGCDKZCAG5hQwnJkAsfwY1DNzDjAA5SDKYAygUAOQBtl0DOLYHuyqMM3CtBGbuzBdj82PmCGBGV5YQxUz7DFjCDMeMWMbZ5rATDmY6QszFQIAly6EERaFwtIAAAAASUVORK5CYII=)
}
.Eleditor-controller ul li.Eleditor-editText:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjBAMAAADs965qAAAAJ1BMVEUAAAAmk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk/8mk//34ERwAAAADHRSTlMAgEAQ0KBgMMDwcOAe1XweAAAA3UlEQVQoz4XRrcoCQRjF8fPiOwomRRARg3gFghttYjMs5g02i8FL8ALsGgxegs2q4ieci3J2d2aPA4In/vjDAzMIVlofAVR6fl0g4msJJPSLgQm5AQq5AVgwzaiotC+TPIDPerY2EN3S7ASei3MTxjZbQRSRNrv2LSmizUYQRe5sRorIfU6KeO07UjSCJ0UiRVNHiszFkaLEkaIqPXV89FeQcZGoiSSPROuZySPR7o4kjUQVcmbSSFQm72jgkwxthoD+yW0tpOF4DoQ08CDCT8p+W2tlFO4bPfxTaTHeolbpPP71OVwAAAAASUVORK5CYII=)
}
@media screen and (max-width:300px) {
.Eleditor-controller ul li {
width: 30%;
text-align: center;
padding-left: 0;
font-size: 12px
}
.Eleditor-controller ul li:before {
display: none
}
}
.Eleditor-textEditor {
display: none;
width: 100%;
height: 100%;
background: #fff;
position: fixed;
left: 0;
top: 0;
/* hrjlhy */
margin: 15% 0 0 15%;
width: 70%;
height: 40%;
}
.Eleditor-textEditor-colors,
.Eleditor-textEditor-fontsizes,
.Eleditor-textEditor-lineheight,
.Eleditor-textEditor-linedecorations {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #fff;
z-index: 1
}
.Eleditor-textEditor-modulePane {
margin: 10px 8px;
border-bottom: 1px solid #ccc;
padding-bottom: 10px
}
.Eleditor-textEditor-linedecorations .Eleditor-textEditor-modulePane {
margin-bottom: 0
}
.Eleditor-textEditor-linedecorations ul li {
text-align: center;
display: block;
color: #555;
font-size: 14px;
letter-spacing: 2px;
padding: 20px 0;
border-bottom: 1px solid #eee
}
.Eleditor-textEditor-colors ul:after {
content: '';
display: block;
clear: both;
height: 0
}
.Eleditor-textEditor-colors ul li {
float: left;
text-align: center;
width: 20%;
margin-bottom: 10px
}
.Eleditor-textEditor-colors ul li span {
width: 40px;
height: 40px;
display: inline-block;
border-radius: 3px;
cursor: pointer;
position: relative
}
.Eleditor-textEditor-colors ul li span.transparent:after,
.Eleditor-textEditor-colors ul li span.transparent:before {
position: absolute;
background: #dedede;
content: '';
transform: rotate(45deg);
-webkit-transform: rotate(45deg)
}
.Eleditor-textEditor-colors ul li span.transparent:after {
width: 1px;
height: 100%;
left: 50%;
top: 0
}
.Eleditor-textEditor-colors ul li span.transparent:before {
width: 100%;
height: 1px;
left: 0;
top: 50%
}
.Eleditor-textEditor-fontsizes ul li,
.Eleditor-textEditor-lineheight ul li {
text-align: center;
color: #333;
font-size: 14px;
line-height: 30px
}
.Eleditor-textStyle {
display: flex;
display: -webkit-flex;
position: relative;
border-bottom: 1px solid #eee;
overflow-x: auto;
overflow-y: hidden;
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .1)
}
.Eleditor-textStyle .Eleditor-textStyle-item {
flex: 1;
-webkit-flex: 1;
padding: 10px 0
}
.Eleditor-textStyle .Eleditor-textStyle-item div {
width: 24px;
height: 24px;
position: relative;
margin: auto
}
.Eleditor-textStyle .Eleditor-textStyle-item div:before {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: block;
background-size: 20px;
background-position: center;
background-repeat: no-repeat
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-active {
background-color: #FFE69F !important;
padding: 0;
border: 1px solid #DCAC6C;
border-radius: 2px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-bold:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAACgUlEQVRYR82Y0XEaQQyGpWWO19BB7AqCKwipIHYFcQeBh9MOT8FPzC4PmApyVBB3ENOBU0FIBbGf4U4ZkSVzM8GsbjycV08wo+O+ldC//y5C4oGJ80EU0Dk3McawZiHM/AgAD5JLRCvNM7GcKKD3XgX3zIsEtsiybDkajQS+cagAmfkJEXeV0QQz9xHxTS33ERFv8zy/0Txfz1EBAsCKiAZNfnw+n/c2m80lAEwA4G149j7Lsqsm1TwZYH0xzrkhIs73kET0QbvYVgAFxnt/DQBf5TMzj6y1txrI1gAD5B0AfGTmtbX2PDnA6XR61ul0fgawCyKKDl6rFRQw59wDIr5j5htrrQzQ0Wgd0Ht/DwDvkwVMuoJBG3+HSb6y1srQpNPiuh6WZXk+Ho/XyQB67/sA8B0Aesy8tNaKLkajlSERR4SInwPcU1VVfU31hP5kgEHzRJRlmzsL/zsxHQON/u1LqwX85/OiPfmbcMhYrMqyvNZWrimgkutwGiJOttvtsimcusVN/aAI8SFUZr4zxizyPBexVoW2xY39oLxd/ofGGJle8YWXNRM7JKKFhvCkgHWAINKFuJkwMCrL1RrgHtY5VyDiJ/muEevWAQXMey87iBwDFkQ0PNbqVwEMwv1FjqhEdJEc4Gw2GzCzbHtyfj5apFepYPKAzjmRnG/JVrA2yVF9bb3FQQ/l4CS2K6qFrQN673dHzyR1sC7SSR2agjeUW4WdDWPmH9Za2aOjcdIWh2mVdopZ6O3hut3uQHuBpAKUqwpjjGz0zwYz102qwPxXIW1b6y9RAUb7cDzhFzMXVVUVpzKsanMZWrjPlyuOdZPzx6F1Riv4wuq9+PHkAf8AXHXCODnTUHYAAAAASUVORK5CYII=)
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-color:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAC6klEQVRYR82YTW4TMRSA3xspWSGRLliTnIB2yYr0BMAJCNLYqsQCOAFwAsoGRX6JmJ6AcgLCCVpO0HACWokFmjDzkKNM5Px4xj+DindRPJ7Pb+zP7xmhxZam6QUi/iaih20Ni20NJKV8AgCf9XhJkgzG4/G8jbFbAxRCzBDx0QrqTCk1+m8AT05O+mVZXgHALwC4w8zXi8VikGXZdSxkKxGUUmYA8AwAzpi5v4rka6XU6a0DjkajXqfTuULEnl57RVEMEfETAMyVUoNbB5RSvgWAN8z8jYiGGkgIMUfE+8z8nIh0dINb9CeuYADgqVLqXJMY0DMiOg6mA4AoQCHESH9OZv5BRP0KRH/2brf7U/9m5iMiugyFjAWs1LKzIcyNE6OcYEAhxCEiXgDATZ7n/W2lGOqBPM8PQpUTDOgSIUPe75RSejN5tyBAc43VHWvG8ResnCBAY5d+ISJ9BltbrHKCAKuXlmV5PJlMZnWAUspXAPCemYOU4w1oU4sNcrUcdGZz12VC2+OEAC7V4nNKCCFOEfGlPqt9leMFmKbpMEmSrza12KJoKsc3V/QCrNTCzB+ISK8t5yaEOEfExwDgpRxnwJgo6FlU0de5IhEduM7MGdBHLbaXhyjHB1Bnx0E7sQI2DHBJREcuUXQCrAYGgO9KqUOXgff1CVGOE6CUUqdLD3zUYpuE71JpBDTVopTqhUaves53szUCGlmLlx4ajr9lkeWiq1pAc7axkbM8/yfP83t1uWItoHFE6fTd2V0+kymK4sV0Ov1oe8YKaJaTIYd8E6Rhhtpc0QrYlloa1mKjW+sAW6ttY5SzF7BttTTkisvy1Jbl7AUMzTya1t2+/5uKrx3AtspFV9iqfLXdiO0AxmS/rlDb/YzydOcCYAPQVEvslYUPbJ1yNgCNdGh9U+Xzopi++y6h9HjbgP9cLQ7K2ShP14BGSr5xUxUTFZ9nzVzRVM4acLX+MkTMqns+nxe00Xe1xIZmafoXDcwGR/w9qZwAAAAASUVORK5CYII=);
background-size: 16px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-color:before {
background-position: center 3px;
background-size: 15px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-color span {
display: block;
width: 18px;
height: 1px;
background: #333;
position: absolute;
bottom: 2px;
left: 4px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-linedecoration:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAACd0lEQVRYR+2YS3LaQBCGuwVoa98g9glCThByA3wCkxMEFswUqzgrqoeFyAlCTmBuEPsEISewfQO85aFOtWpGRWE9kShvNCsYaVqf/n7NCCFhENE9IvYQ8WY8Hj8k3VPX3Gw26zHzPTM/aK1vju1i0oOMMSzzzPxDa31XF0yKGHeI+F2uKaXe8DSAeeoTUaNgnkiZ1xsFK8kHAI2CjYJNJ8mJgSZJmiRpkuScSQIAP5VSw6pxlrXeGDMHgG+lNqxEtELEjwDwqJTqnRlQjhSfmfmf1rpbdMvvFj1rra/PCUhET4h4lSZG2pY/lh0APimlVueANMaIYn+t7cRwSgPMXVgHMBEtEPHW2koUIhFQFhhjngHgg/ze7/fXk8lE/tc2ptPpVavVerIGX5RS4uY3IwtwAAC/ZAUzL5POrFVo7dm7b218VUotSgFaFaNksZAjrbXEZuVBRENEDKyhzEqRqqAF7MqJHxEv8t60KLUx5tAzr/IFIysJMwHlofbTxB8HwMxzrfWoKNDhfUQUIGJc+BHxS96nlVxAq+RAwJySzCwJIy5fFgElIslUOaBHicDMotwwLe4ObRYCdO4GAAGKMts+SECXiCjzr85Vtr5dMLMkQd+B2WUvMle0thYGFONBEFxuNhtxkQS5i8siIkaqAcDc9/35aDRaF1oEAKUAnVELOkBEUSjK8ozxKGXK9/1FGTBn7yTAQxiB3e123TAMLwHANfuV53nrdru9OgXqpBgs6pK676usYN1Ax/YawKoKxwpKsG+321tElGB/t8HM606n89slVwx41MDfDdA2gHhjEgNKzw3DULpCqQJc95tIQfc8r+969H9Yv8s4C539kQAAAABJRU5ErkJggg==);
background-size: 18px;
background-position: center 3px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-bgColor:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAC5ElEQVRYR82YTXLTQBCFuy3JW5ITYJ8AcgKSExBOAJyAeOGe8oqwcs14YTgB4QTACRJOgDlBkhNg1i5Xp1olqcZj/cxIqkKzk0oafeqZ9/pJCAMf2IVPa305Go1eyBzM/EhEN13mK7u3NeB6vT7Z7Xb3AHCST5wkyelsNtv2Cdka0BjzDgC+2jDMPFNKfR4K4G8AeAkAjwDwPFvmB6XU9L8DGmMETABl731CRDl+nYGdEdGmL8hWS6y1vkHEtwKx3++nURSd58vNzN+UUrL8vYxgQEccv4hI4EBrvUXEZwCwTZJk2pdYggEdcbzPrcWuKgAU57uWsQ1gKg5m/qeUKizG3pcAsCGis65wcn8QoAPxhYiubAit9QYRU+MGgF7EEgToimOxWDw4gFeIuM7OHb1Am4p6A9riYOY/SimxloORXfM3O7klotM2UPY93oBV4nABjDE/LE/sLJYQwEIc4/F4UmUjEiAQ8XsGfkdEF12q6AXodI5GI7Y8MTVyd6+GAHsBOh7XqE5jjASGD32IpRHQRxwl+7Do1dJZuoilEVBrXVhHSJyyPZGZ3yilRDzBwwfwHhEnMnNIILVfDAB+EtFlMF1TJ1mtVufMfJv7mrSwgIdIGyy8sq1YaivoiCOA7fhSyY1KqevQSSoB7a4gwQARQ6pnc7ySA2ZulbYrAZ091LqvGmOkX+efBMFiqQMsxNF2/0jlHBdoNHl3C5QC2uKoCga+e2m5XE6iKJLP03SEOIFcXwrYdzq2A0SIl5YCuuKoCwa+VbQDRKhYjirYdc9UQdtiQcSL+Xx+5/OCZYCFOEImanqY1voaET9mluMtlgNAp3PIz6C0xfUxfMUi0c7+8D8AtMURupl9XqIpbWe589ZOP0cVzB8Ux/Gmr4/vfE6pYhzH6aows8SwojvlcPK3jIgKrsY041OZrtfYcDLXoABduEEBlsENBrAKbhCAdXCDAJRuZf/bdkVmB9tBqLjOBZ4AEfu5OCh98OAAAAAASUVORK5CYII=);
background-position: center 3px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-fontSize:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADUAAAAoCAYAAABerrI1AAAD/0lEQVRoQ8VZ0VEbMRDVwvh+QyoIVJCkgpgKQipIqCD4w9LwBXwxkj+cVBBTQUgFIRUEKsBUEPxrA8rszelmvae7k+5k0A8zWNLuO63evl2B6DEmk8nQWntSbHEjpTzqsV2ypdBnJ631DAA+uz0eHx/3jo+P5332TLG2M6jpdLqzWq3+USestWdKqdMUjvXZozMorfURAEwL43dCiDfW2rlSaq+PQynW9gF1CwC71tobAPgmhPiBDllrPymlLlM413WPTqAKgvhdgBhlWTZbLpdzAHglhPglpTzo6lCKdZ1AUYIYDAavR6PRPf3fSxNGNChKENbaC6XUF/y67PRelDCiQVGC4PfHGIN0vjHCmEwmJ09PT/lH3Nramo3H4zNfuHYBlROEEOJOSol/y9EEuO9dMcYgmJyMyJhJKQ/53lGgaIgJIb5zBXF+fr67vb19WxhJRhgckLV2UZASmjqUUs4osChQIWRgjEE6/4hGUhCG54QOrbX3APCTAFkDFgyKKYg/UsqhL6SoE30VhjHmnRDir895H1h3YsGgmIKoHDm7W/glX/VRGAUgzIU7Lh8qpTDJl4MBuxdC7Espr2NAOQWxyLJsF3NT3eU3xqDxr4Uz0QrDA6hMHdym1voUAFylkAMLAsVyUK0BZ5CFTTRhGGPwhPLwprmw7iPSu47REQSKlRjv8YjbKFprfQ0Ab7sQhjHmSgjxIUZyER/vWkExgqjkpoYQLPNKLGGgzeVyOYwVxhhRDw8P7SfFEuqIX9Y6UExOPWtJ0npSWmunIKLzDov1aMJoC/G63xtBMQURfeG11gckSUav3wioFF/aidwuhJEcFLsTC6VUngRjB80jsYQRa8vNrw0/piAq4jXUIBW5fRRGqD2c1wSqJIiYDdvmPkcPwwuKEUSbn7G/b5wwvKAYQVwIIVI0KLGlho2Z6NQQ+9UqoHiT0jVWYjf2CM+ym7tpwqiAYgqiVbyGgqUit40wiMpvLHGobVeGWGsvfaBKggCA/fF4jOIyyaA5q4kw6Dxfuc6dYYXpYg0UI4hg8RqKmKWJWsJoqmo9gCrV8RooRhDJe3f8vjb1MOqqWhZyCKhSHZegYgyGnoxvHm3MtBGGr6p1tVxTdVyCYqFR21jpAwjXUpHbRhjFfPoGlpfrg8FgvlqtsBXn+hdrhEZBUQURzDpdQGqt88YMrg1RGKzydlU3hh6Oyt3MQbEeRGfxGgqQNmZCS3Yats4OPiNlWTbkTaAcFFcQrukf6mTsPNbJDVIYRYl/5foedYDQF/A8cwY1VmKBeBRG2ZhpIwwP44mm5g8wBXGjlHKx2tfvxvUsYSbtYSAoZBf3eoGvCGvN9k0hKyKEPqMehbTeQvz5D/g1DKSBanO4AAAAAElFTkSuQmCC);
background-size: 22px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-lineHeight:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABl0lEQVRYR+2Xy03EMBCG7Y1yhhLoANIBJSyVQC5j5cRyipxcoAM6ACpAVEBKWDpIA8kgr3Ylk9ckmdhaieTqeXz+57cVS3HmnzxzPrECcic0SkGt9bau6yJJkj234dR8EjBN06sgCL6FEHsAiKY24MaTgFrrQkp5fWz0AgAP3KZT8gcBsyx7FkLc2wUR8U4p9T6lCSe2F9D4Tkr51lG8rKoq8uXHTkDLd5c9uy98+bETsOG7vgm1/Ki13kkpH+eOFBGflFI7O78F2OW7voZNP3oBzPP8dqwCiFgCQDE2fk4cec3MKbpkzgrIVXNRBY1/EfGTAfUFAH/OwP8CZCjXm7qogiugCwW4NRcd8XqKueNwkb/oiFdAFwpwa7ZGPPJv+tAXEWOllHlYHT4vp9i8RzabjXlqXhC7/wCArR3jBdA0HHjRnXh+wjC8ieO45I6Qyu89xcTbJHL9q38CH7xmuvzY9B2lAHd9ELDDjy3fcQGofPKitvzozXc2NAlogo9+fPXlu8mA1Bhcro9S0CUAVXsFpBSi1n8Brg2tKfeVeOYAAAAASUVORK5CYII=)
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-alignLeft:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABJElEQVRYR+2WQQ6CMBBFO4Gu9QZ6BLiBV/AG3kDZ0LBzR1IWxBOoJ9EjeASOgFsCHUOCiQvbRIYmkkzX/X9+XmcmBfHnB/48n+CA1BdigkyQSoCqn28P5nm+DoLgTCUgpdwmSVKP9bESHAJexhoPulpKufMSkBhsMvl8e3AyBESjeRPUWu8AYEWEYJUbYyql1NXlbyVYFMUGEW++wn34xmmaPmx1nE+stY4AYOkrJCLWrnB93Xn3oC9yv/gywV9ofbtrJdgPiBCin2LKkNRd18VZllVjg1oDlmW5bJrmMNb4rVNKHSke3IMUerwHqfScBPshadt2P0URl0cYhifXj9u5ZhDxDgALXyER8WmMiVxriKeYSp8JMkEqAaqee5AJUglQ9S80f0opswUQfwAAAABJRU5ErkJggg==);
background-size: 25px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-alignCenter:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABGUlEQVRYR+2Xuw2DMBCGbU+QTZINwgbJBskIaThEl9amQNnAbJARYJPsgWQi2ijgx48liqO+x8d3Piyk2Pkjd84nGBCdEBtkg6gBNJ/PYHaDxpi3EOKCNvLkv4jo8S/GO2Kt9VUIccoJqJTqy7LskwBzgoXU9hoMKZIzhgFRu9EG56VRSh3BxsPSUvzWTQG0UsobCLj4WYEBQbDo9GiD0R3ABAYEBfr/Sdq2PYzjiG7tKicRDUsB3hEbY+Y78oyaWMufpqmrquqedBc3TVM454qcgM45W9f1JwkwJ1hIbe+IQ4rkjGFA1G60Qa31U0qJbnVHRDYEPhUQ3WqbDTDkrbeMiTa4ZfOQWgwYYmkthg2yQdQAmr/7M/gFx6c4KVrJFfgAAAAASUVORK5CYII=);
background-size: 25px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-alignRight:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAQAAAAm93DmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfhCQ8REBuZ/AJaAAAAoklEQVRIx2NgGAWjYBgCRvzS/QK/1xMy4m9i5QMEj4mglR8ZGAnAUUBlgBGknfFMCqQY8P9h2QI8BnYZMJwn2U2OpQfwuLDLgFGAJBd+KLtAcTiNAhRAICe2KzCfZxDAq+QDgyNytLDgN7DyQedEQm5iezDQoTLcAFos9wv8ySfVCJaJhR+QeKiSPwSYChn5STHu/8ffGxkuDHS4jIJRMNQAAJ5SImJVnuoKAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA5LTE1VDE3OjE2OjI3KzA4OjAwUsazsgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wOS0xNVQxNzoxNjoyNyswODowMCObCw4AAAAASUVORK5CYII=);
background-size: 25px
}
.Eleditor-textStyle .Eleditor-textStyle-item .Eleditor-textStyle-upImg:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAARVBMVEUAAACKioqJiYmLi4uKioqLi4uIiIiKioqKioqJiYmJiYmJiYmKioqKioqPj4+KioqKioqLi4uKioqJiYmKioqJiYmKiopHpOm/AAAAFnRSTlMAwIB/XkAf79Dyn1DgMBBvkHA/r8SPuxOfgwAAANRJREFUOMvl0MtygzAMheEjI98wGELa8/6PWsxAsik2M22yyb/VN2NL+NRsV8muU92hoZxGoxLlAXEaDSDvhbbTS1BJzlegcO1foY3kdAXCpfHv5xkHSr4A1ZMMbajcMi04c8/WYc8jn2tQ+ExQct/39Avce35z9CT7BqTdXJEayKH7OoM+ee7NN50Ghgc8KTqUAl0dlrnTFQxSh3cAthilq8Ib3DKFZQFoG1AlRJEmNMfTjmMV+gP2sbF1j61ERTVll4E8+R6N0sAgjAbtrDEp40X9AEsWInSQgk2QAAAAAElFTkSuQmCC);
background-size: 22px
}
.Eleditor-textStyle .Eleditor-textStyle-item-upImg {
display: none;
position: relative
}
.Eleditor-textStyle .Eleditor-textStyle-item-upImg>:not(.webuploader-pick) {
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
top: 50% !important;
left: 50% !important;
opacity: 0
}
.Eleditor-textStyle .Eleditor-textStyle-item-upImg>:not(.webuploader-pick) label {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%
}
.Eleditor-textEditor-formats {
display: none;
position: absolute;
right: -60px;
bottom: 20%;
border-radius: 50%;
-webkit-border-radius: 50%;
width: 100px;
height: 100px;
box-shadow: 0 0 5px rgba(0, 0, 0, .1);
background: #fff;
z-index: 1
}
.Eleditor-textEditor-formats div {
background-repeat: no-repeat;
width: 100%;
height: 32px;
background-position-x: 12px;
background-position-y: center;
position: absolute
}
.Eleditor-textEditor-formats .Eleditor-textEditor-format {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAPFBMVEUAAACPj4+Li4uKioqKioqKioqKioqKioqHh4eJiYmJiYmJiYmKioqKioqJiYmKioqJiYmJiYmJiYmKiooOOgKOAAAAE3RSTlMAEEBggO/AoCDQ8N8w4LCQUHCP4ZsY5wAAAUlJREFUOMvFk92WgyAMhAUJ4U9E5/3fdStCaYtlvdmzuVGPH5kkE6Z/iD3d4xTmW5wgey8hI4zk2JQ3CTXgEkBKZGG/jMuS+kRXyFFZx9+MSqwDToLP5wLADIQtdNGbF/j5O2eVgza/ouzCJFaAxQsq+nwH9wjDINVQMp2uC7Ul3URnbB/9+sLVrm3p6t0esUO3YopoPETlW0Zpe1uFctjFA2z+GA0drqZ1dLXhuSOM5dtkTQRcOaVhK8bUozN0feFWAF+BW3M35NLJpSuzniWKFbTJnRBFyWy6W9N8gOM6hETcKbdPByXq4O3rpLwrOk3fp+OEf1/r1PsgLSL7trb+THi15Qog+bTEZrxLWAfpMznTCQh6rfCzKal8dT7i+6VhoNWJOLqveQ2PCJ1w1xSlXCDSNI5gEY2wZaLjpA4EPd0Is+q8I38XPwbTDcl2Nko+AAAAAElFTkSuQmCC);
background-size: 20px;
border-bottom: 1px solid #F5F5F5;
top: 15px
}
.Eleditor-textEditor-formats .Eleditor-textEditor-clean {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABkUlEQVRYR+3XvU3DQBQA4PdsUUBSMAIjpKLOCIwQK9QEb8AGRrgE5EyAYIKkoWcERqAIpME+ZISlyPL53p+lCMX13b3P7/z87hD2/ME998EBqN0hbwa3RXZ2nKTv2gCU+X2xOoHb+3xaonuGuJyOk/SNEkQ6ZlNkE6iiFQCm4/nVsr2ON4Obx7sZOLgdEtng0MHL6HIx63rJ3iIZEknB1eBgFQ+BpOJIwHqQJZKDIwOtkFwcC6hFSnBsoBQpxYmAXKQGJwZSkVqcChhCWuDUQB/SCmcCbCN/21UVrfraF6dvBzsJdbH6Z+6cyxGcQ8AnX2+lrteMswMW2QTL6BUAjlxcnVudgkyAu9+cQ1xbnoLUwK6CsOzdKmBftVohxUDKr8QCKQJScE0VapFsIAdngWQBJTgtkgzU4DRIEtACJ0UGgZY4CbL/2vl3qbZq/Lt9mFrd/ov7gDhOJjuBQ2yr7xQTymQn0BXZ6VcVXY/mixvu8Ugy/vMhvziJv9eYpB/t+cEikQS0nHMAarN5yOC/z+APDA6MODgVGhsAAAAASUVORK5CYII=);
background-size: 20px;
bottom: 15px
}
.Eleditor-inputarea {
position: absolute;
top: 45px;
bottom: 40px;
width: 100%
}
.Eleditor-textEditor[type=link] .Eleditor-inputarea {
bottom: 95px
}
.Eleditor-inputarea .textarea {
-webkit-user-select: auto;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
width: 100%;
padding: 10px;
box-sizing: border-box;
font-size: 14px;
color: #555;
border: none;
word-wrap: break-word;
word-break: normal
}
.Eleditor-inputarea input {
display: none
}
.Eleditor-inputarea .textarea img {
width: 100%;
height: auto;
box-sizing: border-box
}
.Eleditor-textEditor[type=link] .Eleditor-inputarea input {
height: 33px;
display: block;
border: none;
border-bottom: 1px solid #ddd;
width: 100%;
margin: 10px;
color: #333;
outline: none
}
.Eleditor-method {
border-top: 1px solid #eee;
position: absolute;
bottom: 0;
width: 100%;
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .1)
}
.Eleditor-method:after {
content: '';
clear: both;
display: block;
height: 0
}
.Eleditor-method button {
width: 50%;
border: none;
padding: 0;
margin: 0;
box-sizing: border-box;
float: left;
background: #fff;
height: 40px;
color: #333
}
.Eleditor-method .Eleditor-commit {
border-right: 1px solid #ddd
}
.Eleditor-placeholder {
color: #999
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,343 @@
/* 公共 */
* {
padding: 0;
margin: 0;
font-family: "微软雅黑";
transition: all .2s cubic-bezier(.6, .1, .1, .7);
}
html,
body {
height: 100%;
}
li {
list-style-type: none;
}
hr {
height: 1px;
background: #e4e4e4;
}
body {
display: flex;
flex-direction: column;
background: #f6f7f8;
}
button {
border: none;
filter: contrast(1);
}
button:active {
filter: contrast(.9);
}
textarea {
resize: none;
}
/* edit页面 */
/* 部分css效果在公共组件部分 */
/* 包含Eleditor的样式修正*/
#edit_head>.b {
padding: 0 0 0 calc(2.36rem - 1.68rem);
}
#edit_head>.c {
margin: 0 0.4rem 0 0;
width: 2.36rem;
height: 100%;
background: #fff;
}
#edit_head>.c>img {
width: 2.36rem;
}
#edit_cue {
font-size: 0.52rem;
line-height: 1.2rem;
text-align: center;
color: #37c7aa;
background: #d8efe9;
}
#edit_body {
flex-grow: 1;
padding: 0 0.6rem;
width: 13.8rem;
}
#edit_body .a {
word-break: break-all;
margin: .6rem 0 1.4rem;
padding: 0.6rem 0.5rem;
border: #37c7aa dashed 1px;
}
#edit_body .b {
font-size: 0.52rem;
color: #37c7aa;
text-align: right;
margin-top: -1rem;
padding: 0 0.1rem;
margin-left: 8.4rem;
padding-bottom: 1rem;
background: #f3f3f3;
width: 4rem;
}
.Eleditor-controller {
z-index: 10000;
max-width: fit-content;
}
.Eleditor-wrap {
width: 100px;
}
.Eleditor-controller ul li {
font-size: .52rem !important;
width: 90px !important;
margin: 5px 5px 0;
padding-left: 30px;
}
.Eleditor-controller ul {
margin: 0;
margin-bottom: 5px;
}
/*
* 当前页面的样式
*/
#div1 {
margin:10px auto;
border:1px solid #ccc;
}
#div1 .title {
width: 100%;
margin: 0 auto;
position: relative;
z-index: 0;
padding: 5px 24px;
border-top:1px solid #ccc;
box-sizing: border-box;
background: #fff;
}
.text{
min-height: 27.43px;
}
.w-e-text p {
display: none;
}
.head,.author{
display: block;
width: 100%;
font-size: 20px;
color: #000;
min-height: 30px;
margin-bottom: 5px;
outline: none;
resize: none;
border:none;
}
.head {
font-size: 24px;
}
.head[contenteditable]:empty:before, .author[contenteditable]:empty:before{
content: attr(placeholder);
color: #D4D4D4;
}
.head[contenteditable]:focus,.author[contenteditable]:focus{
content:none;
}
.editorcontent{
width:800px;
font-size: 18px;
line-height: 20px;
height: 370px;
overflow: auto;
padding-top: 10px;
border-top: 1px solid #ccc;
}
.editorcontent div{
min-height: 27.43px;
line-height: 24px;
font-size: 15px;
}
/* 上传图片*/
.abstract {
font-size: .26rem;
margin:10px 0;
color: #333;
}
.cover_abstract {
width:100%;
display: flex;
}
.imgload {
position: relative;
width:25%;
text-align: center;
overflow: hidden;
height: 90px;
line-height: 90px;
background-color: #fbfdff;
border: 1px dashed #c0ccda;
border-radius: 6px;
margin: 0 10px;
box-sizing: border-box;
}
.fileImg {
position: absolute;
top: 0;
left: 0;
display: inline-block;
width: 100%;
height: 100%;
background: none;
margin: 0px;
padding: 0px;
opacity: 0;
filter: alpha(opacity=0);
cursor: pointer;
z-index: 2;
}
.avatar {
position: absolute;
top: 0;
left: 0;
display: inline-block;
width: 100%;
height: 100%;
z-index: 1;
}
.addIcon {
position: relative;
top: 0;
left: 0;
display: inline-block;
width: 100%;
height: 100%;
}
.addIcon::before{
content: '';
position: absolute;
left: 50%;
top: 50%;
width: 30px;
margin-left: -15px;
margin-top: -2px;
border-top: 2px solid #cccccc;
}
.addIcon::after {
content: '';
position: absolute;
left: 50%;
top: 50%;
height: 30px;
margin-left: -2px;
margin-top: -15px;
border-left: 2px solid #ccc;
}
:focus {
outline: none;
}
.lables{
height: 200px;
width: 200px;
border: 1px solid #ccc;
position: fixed;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -100px;
background: white;
z-index: 555;
}
.lables p{
font-size: 14px;
color: #fff;
text-align: center;
background: #409eff;
padding: 0;
height: 30px;
line-height: 30px;
}
.lables label {
display: block;
font-size: 15px;
margin: 5px 0 5px 20px;
}
.lables label input{
margin: 0 10px 0 0;
}
.lables_box {
height: 135px;
overflow-y: scroll;
}
#sures{
display: block;
position: absolute;
bottom: 4px;
left: 0;
right: 0;
color: #fff;
width: 90px;
font-size: 14px;
text-align: center;
line-height: 30px;
background: #409eff;
border-radius: 5px;
margin: 0 auto;
}
/*样式修改*/
.textarea {
width:1000px;
margin: 0 auto;
}
.seldiv {
position: relative;
}
/*.w-e-text-container .label{
position: absolute;
top: 50%;
right: 5px;
float: right;
background: rgba(0,205,50, 0.4);
display: flex;
font-size: 12px;
line-height: 14px;
color: #fff;
align-items: center;
justify-content: center;
padding: 0 3px;
transform: translateY(-50%);
box-shadow: -1px 1px 1px rgba(0,0,0,0.3);
margin: 10px 3px 0 12px;
}*/
.w-e-text-container .label{
display: inline-block;
min-width: 50px;
background: rgba(0,205,50, 0.4);
font-size: 12px;
line-height: 24px;
color: #fff;
padding: 0 6px;
box-shadow: -1px 1px 1px rgba(0,0,0,0.3);
margin: 0 10px 0 0;
}
/*.w-e-text-container .label::after{
content: "";
position: absolute;
left: 100%;
top: 2px;
border-style: solid;
border-color: transparent transparent transparent rgba(0,205,50, 0.4);
border-width: 13px;
}*/

View File

@ -0,0 +1,936 @@
/**
* Version: 1.8.9
* Title: Eleditor 移动端富文本编辑器
* Site: https://eleditor.fixel.cn
* Doc: http://doc.eleditor.fixel.cn
* Author: Try
*/
(function(w){
/*polyfill*/
if (typeof Object.assign != 'function') {
// Must be writable: true, enumerable: false, configurable: true
Object.defineProperty(Object, "assign", {
value: function assign(target, varArgs) { // .length of function is 2
'use strict';
if (target == null) { // TypeError if undefined or null
throw new TypeError('Cannot convert undefined or null to object');
}
var to = Object(target);
for (var index = 1; index < arguments.length; index++) {
var nextSource = arguments[index];
if (nextSource != null) { // Skip over if undefined or null
for (var nextKey in nextSource) {
// Avoid bugs when hasOwnProperty is shadowed
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
to[nextKey] = nextSource[nextKey];
}
}
}
}
return to;
},
writable: true,
configurable: true
});
}
var _debug = false;
var _version = '1.8.9'
var _namespace = 'Eleditor';
var _notctname = ['INPUT', 'IMG', 'TEXTAREA'];
var _toolnames = {
insertText: '插文字',
insertImage: '插图片',
insertLink: '插链接',
insertHr: '水平线',
editText: '改文字',
"delete": '删除',
undo: '撤销',
cancel: '取消',
};
var _editorTpl = '';
w[_namespace] = function(){};
if( typeof jQuery === 'undefined' && typeof Zepto === 'undefined' ){
return console.warn('|--Eleditor 请引入jQuery或者Zepto模块化环境请把依赖全局安装');
}else if( typeof $ === 'undefined' ){
var $ = typeof jQuery != 'undefined' ? jQuery : Zepto;
}
var _scriptPath = function(func){
var _js = document.scripts;
_js = _js[ _js.length - 1 ].src.substring(0, _js[ _js.length-1 ].src.lastIndexOf("/") + 1 );
func(_js);
return _js;
}(function(s){
var _buildLib = '<link rel="stylesheet" href="'+s+'layout/base.css?v='+(_debug ? (+new Date()) : _version)+'">';
$('head').append(_buildLib);
});
var _inArray = function(s,a){
for(var i in a){
if(a[i]==s){
return true;
}
}
return false;
};
var _formatInnerText = function (t) {
var s = t.replace(/\ +/g, "");
s = s.replace(/[ ]/g, "");
s = s.replace(/[\r\n]/g, "");
return s.replace(/(^\s*)|(\s*$)/g, "");
};
var _getLayerMaxZIndex = function(){
var _max = Math.max.apply(null,
  $.map($('body *'), function(e) {
var _$e = $(e);
if (_$e.css('position') != 'static')
return parseInt(_$e.css('z-index')) || 1;
}));
return (_max + '').indexOf('Infinity') >= 0 ? 1 : _max + 1;
};
var _genEditorUid = function(){
return _namespace + '' + +new Date;
};
var _correctHtmlStructure = function(){
var _$wrap = arguments[0],
_empty = arguments[1];
$.each(_$wrap.find('iframe,audio,video'), function() {
var _$this = $(this),
_tagName = this.tagName.toLocaleLowerCase();
if( !_$this.parent().hasClass('Eleditor-'+_tagName+'-area') ){
$(this).wrap('<div class="Eleditor-'+_tagName+'-area"></div>');
}
});
if( _formatInnerText(_$wrap.text()) == '' && _$wrap.find('img,iframe,video').length === 0 ){
_$wrap.append(_empty);
}
if( _$wrap.find('*').length === 0 ){
_$wrap.html('<p class="Eleditor-placeholder">'+_$wrap.html()+'</p>');
}
};
var _buildEditorModule = function(_toolbars, _uid){
var _layerZIndex = _getLayerMaxZIndex();
var _html = '<div class="Eleditor-wrap" style="z-index:'+_layerZIndex+'" id="'+_uid+'">\
<div class="Eleditor-controller">\
<ul>';
for (var i = 0; i < _toolbars.length; i++) {
var _it = _toolbars[i],
_id = typeof _it === 'object' ? _it.id : _it,
_tag = (typeof _it === 'object' && _it.tag) ? _it.tag.toLocaleLowerCase() : null,
_name = typeof _it === 'object' ? _it.name : _toolnames[_it];
_html += '<li event="'+_id+'" '+(_tag ? 'bind-tags="'+_tag+'"' : '')+' class="Eleditor-'+_id+'">'+_name+'</li>';
}
_html += ' </ul>\
</div>\
<div class="Eleditor-loading"><p></p></div>\
<div class="Eleditor-textEditor">\
<div class="Eleditor-textStyle">\
<div class="Eleditor-textStyle-item"><div class="Eleditor-textStyle-bold"></div></div>\
<div class="Eleditor-textStyle-item"><div class="Eleditor-textStyle-color"><span></span></div></div>\
<div class="Eleditor-textStyle-item"><div class="Eleditor-textStyle-linedecoration"></div></div>\
<div class="Eleditor-textStyle-item"><div class="Eleditor-textStyle-bgColor"></div></div>\
<div class="Eleditor-textStyle-item"><div class="Eleditor-textStyle-fontSize"></div></div>\
<div class="Eleditor-textStyle-item"><div class="Eleditor-textStyle-lineHeight"></div></div>\
<div class="Eleditor-textStyle-item">\
<div class="Eleditor-textStyle-align Eleditor-textStyle-alignLeft" align="left"></div>\
</div>\
<div class="Eleditor-textStyle-item">\
<div class="Eleditor-textStyle-align Eleditor-textStyle-alignCenter" align="center">\
</div>\
</div>\
<div class="Eleditor-textStyle-item">\
<div class="Eleditor-textStyle-align Eleditor-textStyle-alignRight" align="right">\
</div>\
</div>\
<div class="Eleditor-textStyle-item Eleditor-textStyle-item-upImg">\
<div class="Eleditor-textStyle-upImg"></div>\
</div>\
</div>\
<div class="Eleditor-textEditor-colors">\
<div class="Eleditor-textEditor-modulePane"><span></span></div>\
<ul>\
<li><span style="background-color:#232323;"></span></li>\
<li><span style="background-color:#2196F3;"></span></li>\
<li><span style="background-color:#795548;"></span></li>\
<li><span style="background-color:#00BCD4;"></span></li>\
<li><span style="background-color:#4CAF50;"></span></li>\
<li><span style="background-color:#E666E5;"></span></li>\
<li><span style="background-color:#FF9800;"></span></li>\
<li><span style="background-color:#FF5722;"></span></li>\
<li><span style="background-color:#ff2a1a;"></span></li>\
<li><span style="background-color:#FFEB3B;"></span></li>\
<li><span style="background-color:#ffffff;border: 1px solid #ccc;"></span></li>\
<li>\
<span class="Eleditor-inheritValue" style="background-color:transparent; border: 1px solid #dedede;">\
</span>\
</li>\
</ul>\
</div>\
<div class="Eleditor-textEditor-fontsizes">\
<div class="Eleditor-textEditor-modulePane"><span>字体大小</span></div>\
<ul>\
<li class="Eleditor-inheritValue">默认</li>\
<li>14px</li>\
<li>16px</li>\
<li>20px</li>\
<li>28px</li>\
<li>35px</li>\
</ul>\
</div>\
<div class="Eleditor-textEditor-lineheight">\
<div class="Eleditor-textEditor-modulePane"><span>行高</span></div>\
<ul>\
<li class="Eleditor-inheritValue">默认</li>\
<li>20px</li>\
<li>25px</li>\
<li>30px</li>\
<li>35px</li>\
<li>40px</li>\
</ul>\
</div>\
<div class="Eleditor-textEditor-linedecorations">\
<div class="Eleditor-textEditor-modulePane"><span>文本修饰</span></div>\
<ul>\
<li class="Eleditor-inheritValue"></li>\
<li style="text-decoration: overline">上划线修饰</li>\
<li style="text-decoration: line-through">删除线修饰</li>\
<li style="text-decoration: underline">下划线修饰</li>\
</ul>\
</div>\
<div class="Eleditor-textEditor-formats">\
<div class="Eleditor-textEditor-format"></div>\
<div class="Eleditor-textEditor-clean"></div>\
</div>\
<div class="Eleditor-inputarea">\
<input placeholder="请输入超链接" type="text" />\
<div placeholder="点击输入内容" class="textarea" contenteditable="true"></div>\
</div>\
<div class="Eleditor-method">\
<button class="Eleditor-commit">提交</button>\
<button class="Eleditor-cancel">取消</button>\
</div>\
</div>\
<div class="Eleditor-delete-layer" style="z-index:'+_layerZIndex+'">\
<div class="Eleditor-delete-tip">进入批量删除模式点击段落进行删除</div>\
<div class="Eleditor-delete-revoke"></div>\
<div class="Eleditor-delete-clear"></div>\
<div class="Eleditor-delete-back">返回继续编辑</div>\
</div>\
</div>';
return _html;
};
w[_namespace] = function(){
console.log('|--Eleditor Initing');
var _args = arguments[0];
_args.upload = _args.upload || {};
_args.mounted = _args.mounted || function(){};
_args.changer = _args.changer || function(){};
_args.toolbars = _args.toolbars || [],
// _undolen = isNaN(_args._undolen) ? 10 : _args._undolen;
_editorUid = _genEditorUid(),
_historys = [],
_placeHolder = _args.placeHolder || '<p class="Eleditor-placeholder">点击此处编辑内容</p>',
_uploadRole = null;
if( _args.toolbars.length === 0 ){
_args.toolbars = [
'insertText',
'editText',
'insertImage',
'insertLink',
'insertHr',
'delete',
'undo',
'cancel',
];
}
if( _args.el instanceof jQuery ){
var _$wrap = _args.el;
}else{
var _$wrap = $(_args.el);
if( _$wrap.length === 0 ){
return console.warn('|--Eleditor '+_args.el+'元素不存在请在DOMContentLoaded后初始化Eleditor');
}else if( _$wrap.length != 1 ){
var _$wrap = $(_$wrap[0]);
}
}
if( _$wrap.attr('Eleditor-Inited') === 'true' ){
return console.warn('|--Eleditor '+_args.el+'已经绑定了Eleditor');
}
_$wrap.attr({'Eleditor-Inited': 'true', 'Eleditor-Uid': _editorUid});
_correctHtmlStructure(_$wrap, _placeHolder);
/*insert editor*/
var _lastScrollH = null;
var _$window = $(w);
var _$scrollWrap = $('html,body');
var _$editorWrap = $(_buildEditorModule(_args.toolbars, _editorUid));
var _$editorController = _$editorWrap.find('.Eleditor-controller');
var _$editorLoadingMask = _$editorWrap.find('.Eleditor-loading');
var _$editorTextModule = _$editorWrap.find('.Eleditor-textEditor');
var _$editorTextArea = _$editorTextModule.find(".Eleditor-inputarea .textarea");
var _$editorUploadImageBtn = _$editorController.find(".Eleditor-insertImage");
var _$editorBarUploadImageBtn = _$editorTextModule.find('.Eleditor-textStyle-item-upImg');
var _$editorTextLinkArea = _$editorTextModule.find(".Eleditor-inputarea input");
var _$editorColorModule = _$editorTextModule.find(".Eleditor-textEditor-colors");
var _$editorFontsizeModule = _$editorTextModule.find(".Eleditor-textEditor-fontsizes");
var _$editorUndoBtn = _$editorWrap.find(".Eleditor-undo");
var _$editorLineheightModule = _$editorTextModule.find(".Eleditor-textEditor-lineheight");
var _$editorLinedecorationsModule = _$editorTextModule.find(".Eleditor-textEditor-linedecorations");
var _$editorDeleteLayer = _$editorWrap.find(".Eleditor-delete-layer");
_$wrap.addClass('Eleditor-area');
_$wrap.after(_$editorWrap);
console.log('|--Eleditor Mounted To', _$wrap);
/*bindEvent*/
var _$selected = null,
_imageUploader = null;
var _showEditorControllerLayer = function(_$e){
_$selected = _$e;
_$e.addClass('Eleditor-active');
var _calTop = _$e.offset().top + _$e.outerHeight();
$.each(_$editorController.find('li'), function(i, e){
var _$e = $(e),
_tgs = _$e.attr('bind-tags');
if( _tgs ){
_tgs = _tgs.toLocaleLowerCase().split(',');
if( _inArray(_$selected[0].tagName.toLocaleLowerCase(), _tgs) ){
_$e.show();
}else{
_$e.hide();
}
}
});
_$editorController.show();
_flushEditorControllerLayerPosi();
if( typeof _$scrollWrap.animate === 'function' ){
_$scrollWrap.stop().animate({scrollTop: (_calTop - 150) + 'px'}, 500);
}else{
_$scrollWrap.scrollTop((_calTop - 150) + 'px');
}
_imageUploader && _imageUploader.refresh();
};
var _flushEditorControllerLayerPosi = function(){
if( _$selected ){
_$editorController.css({
top: _$selected.offset().top + _$selected.outerHeight(),
width: _$wrap.width() - 5
});
}
},
_hideEditorControllerLayer = function(){
_$wrap.find('.Eleditor-active').removeClass('Eleditor-active');
_$editorController.hide();
_$selected = null;
};
var _showEditorDeleteLayer = function(){
_flushEditorDeleteLayerHistoryBtn();
_$wrap.addClass('Eleditor-deleteMode');
_$editorDeleteLayer.show();
},
_flushEditorDeleteLayerHistoryBtn = function(){
if( _historys.length > 0 ){
_$editorWrap.find('.Eleditor-delete-revoke').removeClass('Eleditor-delete-revoke-disabled')
}else{
_$editorWrap.find('.Eleditor-delete-revoke').addClass('Eleditor-delete-revoke-disabled')
}
},
_hideEditorDeleteLayer = function(){
_$wrap.removeClass('Eleditor-deleteMode');
_$editorDeleteLayer.hide();
};
var _showEditorWrapMask = function(){
_$editorController.hide();
_$editorWrap.addClass('Eleditor-mask');
_lastScrollH = _$window.scrollTop();
_$scrollWrap.addClass('Eleditor-scrollLocked');
},
_hideEditorWrapMask = function(){
_$editorWrap.removeClass('Eleditor-mask');
_$scrollWrap.removeClass('Eleditor-scrollLocked');
_$window.scrollTop(_lastScrollH);
};
var _showLoadingMask = function(){
_showEditorWrapMask();
_$editorLoadingMask.show();
_$editorLoadingMask.html('<p>'+arguments[0]+'</p>')
},
_hideLoadingMask = function(){
_hideEditorWrapMask();
_$editorLoadingMask.hide();
};
var _appendHistory = function(){
_historys.push( _$wrap.html() );
// if( _historys.length > _undolen ){
// _historys.splice(0, 1)
// }
_flushHistoryBtn();
_flushEditorDeleteLayerHistoryBtn();
return true;
},
_revokeEdit = function(){
if( _historys.length === 0 ){
return;
}
_$wrap.html(_historys.pop());
_args.changer();
_flushHistoryBtn();
_flushEditorDeleteLayerHistoryBtn();
_hideEditorControllerLayer();
},
_flushHistoryBtn = function(){
if( _historys.length == 0 ){
_$editorUndoBtn.hide();
}else{
_$editorUndoBtn.show();
}
};
var _syncRenderTextEditorView = function(){
_$editorTextModule.attr('role', 'edit').show();
_$editorTextArea.html( _$selected.hasClass('Eleditor-placeholder') ? '' : _$selected.html() );
_$editorTextArea.attr('style', _$selected.attr('style'));
if( _$selected.css('font-weight') == 'bold' ){
_$editorTextModule.find('.Eleditor-textStyle-bold').addClass('Eleditor-active');
}
if( _inArray(_$selected.css('text-decoration'), ['overline', 'line-through', 'underline']) ){
_$editorTextModule.find('.Eleditor-textStyle-linedecoration').addClass('Eleditor-active');
}
if( _$selected[0].tagName == 'A' ){
_$editorTextModule.attr('type', 'link');
_$editorTextLinkArea.val(_$selected.attr('href'));
}else{
_$editorTextModule.attr('type', 'word');
}
var _selectAlign = _$selected.css('text-align');
if( _inArray(_selectAlign, ['left', 'center', 'right']) ){
_$editorTextModule.find('.Eleditor-textStyle-align[align='+_selectAlign+']').addClass('Eleditor-active');
}else{
_$editorTextModule.find('.Eleditor-textStyle-align').removeClass('Eleditor-active');
}
_$editorTextModule.find('.Eleditor-textStyle-color span').css('background-color', _$selected.css('color'));
};
if( typeof WebUploader != 'undefined' && typeof _args.uploader != 'function' ){
//controller
_imageUploader = WebUploader.create({
auto: true,
server: _args.upload.server || '/upload',
pick: _$editorUploadImageBtn,
resize: false,
headers: _args.upload.headers || {},
formData: _args.upload.formData || {},
duplicate: true,
fileSingleSizeLimit: _args.upload.fileSizeLimit ? _args.upload.fileSizeLimit*1024*1024 : undefined,
accept: Object.assign({
title: 'Images',
extensions: 'gif,jpg,jpeg,bmp,png,webp',
mimeTypes: 'image/gif,image/jpg,image/jpeg,image/bmp,image/png,image/webp'
}, _args.upload.accept || {}),
fileVal: _args.upload.formName,
});
_imageUploader.on( 'uploadStart', function( _file, _percentage ) {
_showLoadingMask('上传图片中<span id="uploadProgress">1</span>%');
});
_imageUploader.on( 'uploadProgress', function( _file, _percentage ) {
$('#uploadProgress').html( parseFloat((_percentage * 100).toFixed(2)) );
});
// _uploadRole
_imageUploader.on( 'error', function() {
if( arguments[0]=="Q_TYPE_DENIED" ) w.alert("请上传图片格式文件");
if( arguments[0]=="F_EXCEED_SIZE" ) w.alert("文件大小不能超过"+(arguments[1] / 1048576)+"M");
});
_imageUploader.on( 'uploadComplete', function() { _hideLoadingMask(); });
_imageUploader.on( 'uploadSuccess', function( _file, _call ) {
var _hasStyleBarBtn = $('#rt_'+_file.source.ruid).parents('.Eleditor-textStyle-item-upImg').length > 0;
if( _call.status == 1 ){
if( _hasStyleBarBtn ){
_$editorTextArea.append('<img src="'+_call.url+'">');
}else{
_appendHistory();
_$selected.after( $('<img src="'+_call.url+'">') );
if( _$selected.hasClass('Eleditor-placeholder') ){
_$selected.remove();
}
}
_args.changer();
}else{
w.alert('上传失败:['+_call.msg+']');
}
if( !_hasStyleBarBtn ){
_hideEditorControllerLayer();
}
});
_imageUploader.addButton({ id: _$editorBarUploadImageBtn });
_$editorBarUploadImageBtn.addClass('Eleditor-webUploader-btn');
}else if( typeof _args.uploader == 'function' ){
var _uploaderHanlder = function(){
var _hasStyleBarBtn = $(this).hasClass('Eleditor-textStyle-item-upImg');
try{
_args.uploader.call(this).then(function(_url){
var _urls = typeof _url === 'object' && _url.length ? _url : [_url]
if( _hasStyleBarBtn ){
for (var _uindex = 0; _uindex < _urls.length; _uindex++) {
_$editorTextArea.append('<img src="'+_urls[_uindex]+'">');
}
}else{
_appendHistory();
for (var _uindex = 0; _uindex < _urls.length; _uindex++) {
_$selected.after( $('<img src="'+_urls[_uindex]+'">') );
}
if( _$selected.hasClass('Eleditor-placeholder') ){
_$selected.remove();
}
_hideEditorControllerLayer();
}
_args.changer();
}, function(_err){
w.alert('上传失败:['+_err+']');
});
}catch(_e){
console.warn(_e);
console.warn('|--Eleditor 请检查uploader函数返回是否是标准Promise对象');
}
}
_$editorUploadImageBtn.click(_uploaderHanlder);
_$editorBarUploadImageBtn.click(_uploaderHanlder);
}else{
_$editorBarUploadImageBtn.addClass('Eleditor-textStyle-item-upImg-disabled')
}
var _editorModuleEvents = {
insertText: function(){
_showEditorWrapMask();
_$editorTextModule.attr({'role': 'insert', 'type': 'word'}).show();
},
insertLink: function(){
alert(444)
_showEditorWrapMask();
_$editorTextModule.attr({'role': 'insert', 'type': 'link'}).show();
},
insertImage: function(){
if( typeof WebUploader === 'undefined' && typeof _args.uploader != 'function' ){
window.alert('上传参数未定义.');
}
},
insertHr: function(){
_appendHistory();
var _$hr = $('<div class="horizontal-line" style="padding: 10px 0;border-bottom: 1px solid #aaa;margin-bottom: 20px;"></div>');
_$selected.after(_$hr);
_args.changer();
_hideEditorControllerLayer();
},
editText: function(){
if( _inArray(_$selected[0].tagName, _notctname) ){
return this.insertText();
}
_showEditorWrapMask();
_syncRenderTextEditorView();
},
"delete": function(){
if( _$wrap.find('*').length == 1 ){
_appendHistory();
_args.changer();
_$selected.remove();
}else{
_showEditorDeleteLayer();
}
_hideEditorControllerLayer();
_correctHtmlStructure(_$wrap, _placeHolder);
},
undo: function(){
_revokeEdit();
},
cancel: function(){
_hideEditorControllerLayer();
}
};
for (var i = 0; i < _args.toolbars.length; i++) {
if( typeof _args.toolbars[i] === 'object' ){
_editorModuleEvents[_args.toolbars[i].id] = _args.toolbars[i].handle;
}
};
/*text area click*/
_$window.on('resize', function(){
_flushEditorControllerLayerPosi();
});
_$editorController.on('click', 'ul li', function() {
var _$this = $(this),
_event = _$this.attr('event');
if( typeof _editorModuleEvents[_event] === 'function' ){
if( typeof _toolnames[_event] != 'undefined' ){
_editorModuleEvents[_event]();
}else{
_editorModuleEvents[_event](_$selected, _$this) !== false && _editorModuleEvents.cancel();
}
}
});
_$editorWrap.on('click', '.Eleditor-delete-revoke', function() {
_revokeEdit();
});
_$editorDeleteLayer.on('click', '.Eleditor-delete-clear', function() {
if( !confirm('确定清空内容吗?') ){
return;
}
var _$cloneNode = _$wrap.clone();
_$cloneNode.find('.Eleditor-placeholder').remove();
if( _formatInnerText(_$cloneNode.text()) != '' ){
_appendHistory();
_$wrap.html('');
_args.changer();
_correctHtmlStructure(_$wrap, _placeHolder);
}
});
_$editorDeleteLayer.on('click', '.Eleditor-delete-back', function() {
_hideEditorDeleteLayer();
});
/*textEditor*/
_$editorTextModule.on('click', '.Eleditor-textStyle-bold', function() {
_$editorTextArea.css("font-weight", $(this).hasClass("Eleditor-active") ? "normal" : "bold");
$(this).toggleClass("Eleditor-active");
});
_$editorTextModule.on('click', '.Eleditor-textStyle-linedecoration', function() {
_$editorLinedecorationsModule.show();
$(this).addClass('Eleditor-active');
});
_$editorTextModule.on('click', '.Eleditor-textStyle-color,.Eleditor-textStyle-bgColor', function() {
var _$this = $(this);
var _role = _$this.hasClass('Eleditor-textStyle-bgColor') ? 'bgcolor' : 'color';
_$editorColorModule.find('.Eleditor-textEditor-modulePane span').html(_role == 'bgcolor' ? '文字背景颜色' : '文字颜色');
_$editorColorModule.attr('role', _role).show();
$(this).addClass('Eleditor-active');
});
_$editorTextModule.on('click', '.Eleditor-textStyle-fontSize', function() {
_$editorFontsizeModule.show();
$(this).addClass('Eleditor-active');
});
_$editorTextModule.on('click', '.Eleditor-textStyle-lineHeight', function() {
_$editorLineheightModule.show();
$(this).addClass('Eleditor-active');
});
_$editorLinedecorationsModule.on('click', 'ul li', function() {
if( !$(this).hasClass('Eleditor-inheritValue') ){
_$editorTextArea.css("text-decoration", $(this).css('text-decoration'));
}else{
_$editorTextArea.css("text-decoration", 'inherit');
_$editorTextModule.find('.Eleditor-textStyle-linedecoration').removeClass('Eleditor-active');
}
_$editorLinedecorationsModule.hide();
});
_$editorLineheightModule.on('click', 'ul li', function() {
if( !$(this).hasClass('Eleditor-inheritValue') ){
_$editorTextArea.css("line-height", $(this).html());
}else{
_$editorTextArea.css("line-height", 'inherit');
_$editorTextModule.find('.Eleditor-textStyle-lineHeight').removeClass('Eleditor-active');
}
_$editorLineheightModule.hide();
});
_$editorFontsizeModule.on('click', 'ul li', function() {
if( !$(this).hasClass('Eleditor-inheritValue') ){
_$editorTextArea.css("font-size", $(this).html());
}else{
_$editorTextArea.css("font-size", 'inherit');
_$editorTextModule.find('.Eleditor-textStyle-fontSize').removeClass('Eleditor-active');
}
_$editorFontsizeModule.hide();
});
_$editorTextModule.on('click', ".Eleditor-textStyle-align", function() {
var _align = $(this).attr('align');
_$editorTextArea.css({"text-align": _align, "display": 'block'});
_$editorTextModule.find(".Eleditor-textStyle-align.Eleditor-active").removeClass('Eleditor-active');
$(this).addClass('Eleditor-active');
});
_$editorTextModule.on('click', ".Eleditor-textEditor-format", function() {
var _$cloneTextArea = _$editorTextArea,
_removeAttrs = 'style width height border bgcolor align color';
_$cloneTextArea.removeAttr(_removeAttrs);
$.each(_$cloneTextArea.find('*'), function(_i, _e) {
var _$eachElm = _$cloneTextArea.find(_e);
if( _inArray(_e.tagName.toLocaleLowerCase(), ['script', 'style']) ){
_$eachElm.remove();
}else{
_$eachElm.removeAttr(_removeAttrs);
}
});
_$editorTextArea.html(_$cloneTextArea.html());
_$editorTextModule.find('.Eleditor-active').removeClass('Eleditor-active');
});
_$editorTextModule.on('click', ".Eleditor-textEditor-clean", function() {
confirm('确定清空内容(不可恢复)?') && _$editorTextArea.html("");
});
_$editorTextModule.on('click', ".Eleditor-cancel,.Eleditor-commit", function() {
arguments[0].preventDefault();
if( $(this).hasClass('Eleditor-commit') ){
var _style = _$editorTextArea.attr('style') || '';
var _content = _$editorTextArea.html();
var _editAct = _$editorTextModule.attr('role') == 'edit';
var _hasPlaceHolder = _$selected.hasClass('Eleditor-placeholder');
if( !_content ){
return alert('请输入内容文字');
}
_appendHistory();
if( _editAct || (_hasPlaceHolder && _$editorTextModule.attr('type') != 'link') ){
if( _$editorTextModule.attr('type') == 'link' ){
_$selected.attr('href', _$editorTextLinkArea.val());
}
_$selected.attr('style', _style).removeClass('Eleditor-placeholder').html( _content );
}else{
var _buildWordHtml = '';
if( _$editorTextModule.attr('type') == 'link' ){
var _link = _$editorTextLinkArea.val();
_buildWordHtml = '<a style="'+_style+'" href="'+_link+'">'+_content+'</a>';
}else{
_buildWordHtml = '<p style="'+_style+'">'+_content+"</p>";
}
_$selected.after( $(_buildWordHtml) );
if( _hasPlaceHolder ){
_$selected.remove();
}
}
_args.changer();
_flushEditorControllerLayerPosi();
}
_$editorTextModule.find('.Eleditor-active').removeClass('Eleditor-active');
_$editorTextModule.find('.Eleditor-textStyle-color span').removeAttr('style');
_$editorTextArea.removeAttr('style').html('');
_$editorTextLinkArea.val('');
_hideEditorWrapMask();
_$editorTextModule.hide();
_hideEditorControllerLayer();
});
_$editorColorModule.on('click', 'ul li span', function() {
var _color = $(this).css('background-color');
if( _$editorColorModule.attr('role') == 'color' ){
if( !$(this).hasClass('Eleditor-inheritValue') ){
_$editorTextArea.css("color", _color);
_$editorTextModule.find('.Eleditor-textStyle-color span').css("background-color", _color);
}else{
_$editorTextArea.css("color", 'inherit');
_$editorTextModule.find('.Eleditor-textStyle-color').removeClass('Eleditor-active').find('span').removeAttr('style');
}
}else{
if( !$(this).hasClass('Eleditor-inheritValue') ){
_$editorTextArea.css("background-color", _color);
}else{
_$editorTextArea.css("background-color", 'inherit');
_$editorTextModule.find('.Eleditor-textStyle-bgColor').removeClass('Eleditor-active');
}
}
_$editorColorModule.hide();
});
/*controller*/
_$wrap.on('dblclick', '*', function(_e) {
var _$this = $(this);
if( _$wrap.hasClass('Eleditor-deleteMode') ){
if( !_$this.hasClass('Eleditor-placeholder') ){
_appendHistory();
if( typeof _$this.fadeOut === 'function' ){
_$this.fadeOut('fast', function(){
_$this.remove();
_correctHtmlStructure(_$wrap, _placeHolder);
});
}else{
_$this.remove();
_correctHtmlStructure(_$wrap, _placeHolder);
}
_args.changer();
}
}else if( !_$this.hasClass('Eleditor-active') ){
_hideEditorControllerLayer();
_hideEditorDeleteLayer();
_showEditorControllerLayer(_$this);
}
return _e.preventDefault() == 0;
});
/*call*/
_args.mounted();
return {
clear: function(){
_args.changer();
_$wrap.html('');
_correctHtmlStructure(_$wrap, _placeHolder);
},
revoke: function(){
_revokeEdit();
},
append: function(){
_hideEditorControllerLayer();
var _object = arguments[0];
if( !_object ){
return;
}
var _$content = $(_object);
if( typeof _object == 'string' && _$content.length == 0 ){
_$content = $('<p>'+_object+'</p>');
}
_$wrap.find('.Eleditor-placeholder').remove();
_appendHistory();
return _$wrap.append(_$content);
},
trigger: function(){
var _event = arguments[0];
if( _event == 'insertText' ){
_$selected = _$wrap.find('>:last');
_editorModuleEvents.insertText();
}else if( _event == 'insertLink' ){
_$selected = _$wrap.find('>:last');
_editorModuleEvents.insertLink();
}
},
saveState: function(){
return _appendHistory();
},
getEditNode: function(){
return _$selected;
},
getContent: function(){
var _$cloneNode = _$wrap.clone();
_$cloneNode.find('.Eleditor-placeholder').remove();
_$cloneNode.find('.Eleditor-active').removeClass('Eleditor-active');
return _$cloneNode.html();
},
getContentText: function(){
var _$cloneNode = _$wrap.clone();
_$cloneNode.find('.Eleditor-placeholder').remove();
return _formatInnerText(_$cloneNode.text());
},
hideEditorControllerLayer: _hideEditorControllerLayer,
destory: function(){
_$wrap.removeAttr('Eleditor-Inited Eleditor-Uid');
_$wrap.removeClass('Eleditor-area');
_$wrap.find('.Eleditor-placeholder').remove()
_$wrap.off().find('.Eleditor-active').removeClass('Eleditor-active');
_$editorWrap.find('*').off();
_$editorWrap.remove();
console.log('|--Eleditor '+_editorUid+' destoryed');
}
}
}
})(window);

View File

@ -402,56 +402,56 @@
</div>
</div>
</div>
<div class="modal inmodal" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" style="width: 800px;">
<div class="modal-content animated fadeIn">
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5; padding: 15px 15px;">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
class="sr-only">Close</span>
</button>
<h5 class="modal-title" style="text-align: left; font-size: 23px;">创建文章</h5>
</div>
<div class="modal-body" style="background: #ffffff;">
<form class="form-horizontal" id="form-picAdverts-add5">
<div class="col-md-12" style="margin-top: -15px;">
<div class="form-group">
<div id="div1">
<div class="toolbar"></div>
<div class="title">
<div contenteditable="true" class="head" placeholder="请在这里输入标题"></div>
<div contenteditable="true" class="author" placeholder="请输入作者"></div>
<div class="editorcontent" contenteditable="true">
<div></div>
</div>
</div>
</div>
<!--<div class="modal inmodal" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true">-->
<!-- <div class="modal-dialog" style="width: 800px;">-->
<!-- <div class="modal-content animated fadeIn">-->
<!-- <div class="modal-header" style="border-bottom: 0px solid #e5e5e5; padding: 15px 15px;">-->
<!-- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span-->
<!-- class="sr-only">Close</span>-->
<!-- </button>-->
<!-- <h5 class="modal-title" style="text-align: left; font-size: 23px;">创建文章</h5>-->
<!-- </div>-->
<!-- <div class="modal-body" style="background: #ffffff;">-->
<!-- <form class="form-horizontal" id="form-picAdverts-add5">-->
<!-- <div class="col-md-12" style="margin-top: -15px;">-->
<!-- <div class="form-group">-->
<!-- <div id="div1">-->
<!-- <div class="toolbar"></div>-->
<!-- <div class="title">-->
<!-- <div contenteditable="true" class="head" placeholder="请在这里输入标题"></div>-->
<!-- <div contenteditable="true" class="author" placeholder="请输入作者"></div>-->
<!-- <div class="editorcontent" contenteditable="true">-->
<!-- <div></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<p class="abstract" style="margin-left: 15px;">封面摘要:</p>
<p class="abstract" style="margin-left: 135px;">分享描述:</p>
<div>
<div class="cover_abstract">
<div class="imgload">
<input type="file" class="fileImg"
accept="image/png,image/gifimage/jpg, image/jpeg"
onchange="uploadOss(this)">
<img src="" class="avatar" style="display:none"/>
<i class="addIcon"></i>
</div>
<textarea autocomplete="off" placeholder="请输入内容" class="el-textarea__inner"
style="min-height: 33px;height: 90px; width: 70%"></textarea>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer" style="border-top: 0px solid #e5e5e5;">
<button type="button" class="btn btn-white" data-dismiss="modal" th:id="modalColse">关闭</button>
<button type="button" class="btn btn-primary" th:onclick="createArticleL()">创建文章</button>
</div>
</div>
</div>
</div>
<!-- <p class="abstract" style="margin-left: 15px;">封面摘要:</p>-->
<!-- <p class="abstract" style="margin-left: 135px;">分享描述:</p>-->
<!-- <div>-->
<!-- <div class="cover_abstract">-->
<!-- <div class="imgload">-->
<!-- <input type="file" class="fileImg"-->
<!-- accept="image/png,image/gifimage/jpg, image/jpeg"-->
<!-- onchange="uploadOss(this)">-->
<!-- <img src="" class="avatar" style="display:none"/>-->
<!-- <i class="addIcon"></i>-->
<!-- </div>-->
<!-- <textarea autocomplete="off" placeholder="请输入内容" class="el-textarea__inner"-->
<!-- style="min-height: 33px;height: 90px; width: 70%"></textarea>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </form>-->
<!-- </div>-->
<!-- <div class="modal-footer" style="border-top: 0px solid #e5e5e5;">-->
<!-- <button type="button" class="btn btn-white" data-dismiss="modal" th:id="modalColse">关闭</button>-->
<!-- <button type="button" class="btn btn-primary" th:onclick="createArticleL()">创建文章</button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
@ -739,17 +739,18 @@
}
function createArticle() {
$('.head').html('');
$('.author').html('');
$('.el-textarea__inner').val('');
$('.editorcontent').html('<div></div>');
filePath = '';
$(".avatar").attr('src', '')
$(".avatar").css('display', 'none');
$(".addIcon").css('display', 'block');
$('#myModal5').modal('show');
// $('.head').html('');
// $('.author').html('');
// $('.el-textarea__inner').val('');
// $('.editorcontent').html('<div></div>');
//
//
// filePath = '';
// $(".avatar").attr('src', '')
// $(".avatar").css('display', 'none');
// $(".addIcon").css('display', 'block');
// $('#myModal5').modal('show');
$.modal.parentTab('文章创建', prefix + "/createPage");
}
function createArticleL() {
@ -778,21 +779,6 @@
'<div id="img-content" class="rich_media_wrp"><div id="activity-name">' + title + '</div>'
+ '<div id="meta_content">' + author + '</div><div id="bodycontent">' + body + '</div></div></div></div></div>';
body = body + '<style>table{border-top: 1px solid #ccc;border-left: 1px solid #ccc;}' +
'table td, table th{border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 3px 5px;}' +
'table th {border-bottom: 2px solid #ccc; text-align: center;}' +
'blockquote{display: block;border-left: 8px solid #d0e5f2;padding: 5px 10px;margin: 10px 0;' +
'line-height: 1.4;font-size: 100%;background-color: #f1f1f1;}' +
'code {display: inline-block;*display: inline;*zoom: 1;background-color: #f1f1f1;' +
'border-radius: 3px;padding: 3px 5px;margin: 0 3px;}' +
'pre code {display: block;}' +
'ul, ol {margin: 10px 0 10px 20px;}' +
'#activity-name,#meta_content{display: block;width: 100%;font-size: 20px;color: #000;' +
'min-height: 30px;margin-bottom: 5px;outline: none;resize: none;border: none;}' +
'#activity-name{font-size: 24px;}' +
'#bodycontent{font-size: 18px;line-height: 20px;padding-top: 10px;}' +
'#bodycontent div{min-height: 27.43px;}</style>';
$('#myModal5').modal('hide');
$.modal.loading("创建文章中请等待。。。");
$.ajax({

View File

@ -0,0 +1,258 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('文章创建')"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no"/>
<meta name="format-detection" content="telephone=no,email=no">
<link th:href="@{/css/fileinput.min.css}" rel="stylesheet"/>
<link th:href="@{/css/createArticleBase.css}" rel="stylesheet"/>
<link th:href="@{/css/Eleditor.css}" rel="stylesheet"/>
<link th:href="@{/css/createArticleStyle.css}" rel="stylesheet"/>
</head>
<style>
.abstract {
float: left;
}
</style>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="textarea">
<div id="div1">
<div class="toolbar"></div>
<div class="title">
<div contenteditable="true" class="head" placeholder="请在这里输入标题"></div>
<div contenteditable="true" class="author" placeholder="请输入作者"></div>
<div class="editorcontent" contenteditable="true" id="editorcontent">
<div></div>
</div>
</div>
</div>
<p class="abstract" style="margin-left: 15px;">封面摘要:</p>
<p class="abstract" style="margin-left: 200px;">分享描述:</p>
<div class="cover_abstract">
<div class="imgload">
<input type="file" class="fileImg" accept="image/png,image/gifimage/jpg, image/jpeg"
onchange="uploadOss(this)">
<img src="" class="avatar" style="display:none"/>
<i class="addIcon"></i>
</div>
<textarea autocomplete="off" placeholder="请输入内容" class="el-textarea__inner"
style="min-height: 33px;height: 90px; width: 72%"></textarea>
</div>
</div>
<div style="border-top: 0px solid #e5e5e5; text-align: center; margin-top: 15px;">
<button type="button" class="btn btn-primary" th:onclick="createArticleL()">创建文章</button>
</div>
<form style="display: none;" class="lables">
<p>标签:</p>
<div class="lables_box">
<label><input type="radio" name="1" value="旅游1" checked="checked">旅游1</label>
<label><input type="radio" name="1" value="美食1" checked="checked">美食1</label>
<label><input type="radio" name="1" value="旅游2" checked="checked">旅游2</label>
<label><input type="radio" name="1" value="美食2" checked="checked">美食2</label>
</div>
<button id="sures" type="button">确定</button>
</form>
</div>
</div>
<th:block th:include="include :: footer"/>
<script th:src="@{/js/fileinput.min.js}"></script>
<script th:src="@{/js/fileinput_locale_zh.js}"></script>
<script th:src="@{/js/wangEditor.js}"></script>
<script th:src="@{/js/Eleditor.min.js}"></script>
<script th:inline="javascript">
let path = ctx;
let prefix = ctx + "article";
let filePath;
// 富文本的创建
const E = window.wangEditor;
const editor = new E(".toolbar", ".editorcontent")
editor.config.height = 550
editor.config.onchange = function (newHtml) {
console.log('change 之后最新的 html', newHtml)
console.log($('.editorcontent').html())
}
editor.create();
/*实例化一个编辑器*/
var artEditor = new Eleditor({
el: '#editorcontent',
toolbars: [
{
id: 'insertLable',
name: '插入标签',
handle: function (select, controll) { //回调返回选择的dom对象和控制按钮对象
artEditor.saveState();
$(".lables").show();
$("#sures").click(function () {
artEditor.getEditNode().attr('data_sss', $("input[name='1']:checked").val()).attr('class', 'seldiv');
let arr = [];
if (artEditor.getEditNode().find('.label').length > 0) {
for (var i = 0; i < artEditor.getEditNode().find('.label').length; i++) {
arr.push(artEditor.getEditNode().find('.label')[i].innerText.replace(/\s/g, ''))
}
if (arr.indexOf($("input[name='1']:checked").val()) === -1) {
artEditor.getEditNode().prepend(`<div class="label" contenteditable="false">
${$("input[name='1']:checked").val()}&nbsp;</div>`);
}
} else {
artEditor.getEditNode().prepend(`<div class="label" contenteditable="false">${$("input[name='1']:checked").val()}&nbsp;</div>`);
}
artEditor.hideEditorControllerLayer();
artEditor.saveState();
$(".lables").hide();
})
return false;
}
},
{
id: 'cancel',
name: '取消',
handle: function (select, controll) { //回调返回选择的dom对象和控制按钮对象
artEditor.saveState();
$(".lables").hide();
artEditor.hideEditorControllerLayer();
return false;
}
},
{
id: 'undo',
name: '撤销',
handle: function (select, controll) { //回调返回选择的dom对象和控制按钮对象
artEditor.saveState();
artEditor.getEditNode().find('.label').remove();
$(".lables").hide();
artEditor.hideEditorControllerLayer();
return false;
}
},
]
});
$('.w-e-toolbar').css('z-index', '900');
$('.w-e-text-container').css('z-index', '901');
$.ajax({
type: "post",
url: path + 'label/queryLabel',
data: {},
async: false,
success: function (data) {
if (data.result) {
let obj = data.object.labelList;
$(".lables_box").html('');
for (let i = 0; i < obj.length; i++) {
$(".lables_box").append(
'<label><input type="radio" name="1" label-id="' + obj[i].labelId + '" value="' + obj[i].labelName + '" >' + obj[i].labelName + '</label>');
}
} else {
$.modal.alertError("网络异常,请稍后再试!");
}
}
});
function uploadOss(obj) {
$.modal.loading("上传中。。。");
let formData = new FormData();
formData.append('file', obj.files[0]);
$.ajax({
type: "post",
url: '/oss',
data: formData,
processData: false,//不需要对数据进行处理
contentType: false,
cache: false,
dataType: "json",
success: function (data) {
$(".avatar").attr("src", data.object);
filePath = data.object;
$(".avatar").css('display', 'block');
$(".addIcon").css('display', 'none');
$.modal.closeLoading();
},
error: function () {
$.modal.closeLoading();
}
});
}
function createArticleL() {
let title = $('.head').text();
let author = $('.author').text();
let body = $('.editorcontent').html();
if (title == '') {
$.modal.alertWarning("请输入标题");
return;
}
if (author == '') {
$.modal.alertWarning("请输入作者");
return;
}
if (body == '') {
$.modal.alertWarning("请输入文章内容");
return;
}
if (filePath == '') {
$.modal.alertWarning("请上传分享图片");
return;
}
body = '<div id="js_article" class="rich_media"><div class="rich_media_inner">' +
'<div id="page-content" class="rich_media_area_primary">' +
'<div id="img-content" class="rich_media_wrp"><div id="activity-name">' + title + '</div>'
+ '<div id="meta_content">' + author + '</div><div id="bodycontent">' + body + '</div></div></div></div></div>';
body = body.replace('contenteditable="true"', '');
$('#myModal5').modal('hide');
$.modal.loading("创建文章中请等待。。。");
$.ajax({
url: path + "article/create",
data: {
'author': "",
'createUser': "",
'ids': "",
'isAuthorization': "0",
'isReserve': "0",
'automaticName': "",
'introduction': "",
'labelIds': "",
'isJoinActive': "0",
'articleName': title,
'shareImgUrl': filePath,
'shareDes': $('.el-textarea__inner').text(),
'articleContent': body
},
type: "post",
success: function (data) {
$.modal.closeLoading();
if (data.result) {
$.modal.confirm("创建成功!是否去文库管理页面查看新增文章?", function () {
$.modal.parentTab('文库管理', prefix + "/manage?v=" + new Date().getTime());
});
} else {
$.modal.alertError(data.info)
}
},
error: function () {
$.modal.closeLoading();
}
});
}
</script>
</body>
</html>