src/SSCMS.Web/wwwroot/sitefiles/assets/js/admin/common/materialLayerFileSelect.js

(开头部分) 2KB

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

var $url = '/common/material/layerFileSelect';

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

  groups: null,
  count: null,
  items: null,
  urlList: null,
  renameId: 0,
  renameTitle: '',
  deleteId: 0,
  selectedGroupId: 0,

  form: {
    keyword: '',
    groupId: 0,
    page: 1,
    perPage: 24
  },
});

var methods = {
  insert: function(fileUrl) {
    if (parent.$vue.runMaterialLayerFileSelect) {
      parent.$vue.runMaterialLayerFileSelect(this.attributeName, this.no, fileUrl);
    }
  },

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

    utils.loading(this, true);
    $api.get($url, {
      params: 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.fileUrl;
      });
    }).catch(function (error) {
      utils.error(error);
    }).then(function () {
      utils.loading($this, false);
    });
  },

  getGroupName: function() {
    var $this = this;
    if (this.form.groupId > 0) {
      var group = _.find(this.groups, function(o) { return o.id === $this.form.groupId; });
      return group.groupName;
    }
后面还有 81 行代码,解锁后查看完整代码

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

AI 解读

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

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