src/SSCMS.Web/wwwroot/sitefiles/assets/js/home/common/editorLayerArticle.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

var $url = '/common/editor/layerArticle';

var data = utils.init({
  attributeName: utils.getQueryString('attributeName'),
  siteId: utils.getQueryInt("siteId"),
  pageType: 'card',

  groups: null,
  count: null,
  items: null,
  urlList: null,
  renameId: 0,
  renameTitle: '',
  deleteId: 0,
  selectedGroupId: 0,
  
  form: {
    siteId: utils.getQueryInt("siteId"),
    keyword: '',
    groupId: 0,
    page: 1,
    perPage: 24
  },

  isSubmitForm: false,
  submitForm: {
    textId: 0,
    linkText: ''
  }
});

var methods = {
  insert: function(result) {
    var vueHtml = '' + 
    '<el-popover' + 
    '  width="600"' + 
    '  trigger="click">' + 
    '   ' + result.content +
    '  <el-button size="small" type="primary" slot="reference">' + result.linkText + '</el-button>' + 
    '</el-popover>'
    var html = '<a href="javascript:;" data-vue="' + encodeURIComponent(vueHtml) + '">' + result.linkText + '</a>';
    parent.$vue.insertEditor(this.attributeName, html);
  },

  apiList: function (page) {
    var $this = this;
    this.form.page = page;

    utils.loading(this, true);
    $api.post($url + '/list', this.form).then(function (response) {
      var res = response.data;

      $this.groups = res.groups;
      $this.count = res.count;
      $this.items = res.items;
      $this.urlList = _.map($this.items, function (item) {
        return item.imageUrl;
      });
    }).catch(function (error) {
      utils.error(error);
后面还有 111 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。