main.js 7.41 KB
global.webpackJsonp([33],{

/***/ 103:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _vue = __webpack_require__(1);

var _vue2 = _interopRequireDefault(_vue);

var _index = __webpack_require__(104);

var _index2 = _interopRequireDefault(_index);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var app = new _vue2.default(_index2.default);
app.$mount();

/***/ }),

/***/ 104:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_19647e74_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__ = __webpack_require__(170);
var disposed = false
function injectStyle (ssrContext) {
  if (disposed) return
  __webpack_require__(105)
}
var normalizeComponent = __webpack_require__(0)
/* script */

/* template */

/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-19647e74"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue___default.a,
  __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_19647e74_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__["a" /* default */],
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "src\\pages\\article\\index.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions.")}

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-19647e74", Component.options)
  } else {
    hotAPI.reload("data-v-19647e74", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

/* harmony default export */ __webpack_exports__["default"] = (Component.exports);


/***/ }),

/***/ 105:
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ 106:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _mpvueWxparse = __webpack_require__(33);

var _mpvueWxparse2 = _interopRequireDefault(_mpvueWxparse);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = {
  components: {
    wxParse: _mpvueWxparse2.default
  },
  data: function data() {
    return {
      title: '',
      type: '',
      tags: [],
      files: [],
      lawyer: '',
      time: '',
      content: '',
      imgs: '',
      imageProp: {}
    };
  },

  methods: {
    loadArticles: function loadArticles(LIPID) {
      var _this = this;

      wx.showLoading({ title: '正在加载' });
      wx.request({
        url: this.rootUrl + '/pub/getbylipid',
        data: {
          LIPID: LIPID,
          sessionID: wx.getStorageSync('sessionID')
        },
        success: function success(res) {
          if (res.statusCode == '500') {
            _this.service.getUnionId(_this.rootAvatar, _this.rootUrl).then(function (res) {
              console.log(res);
              _this.loadArticles(LIPID);
            });
          } else {
            var data = res.data.resquest;
            _this.title = data.info_Title;
            _this.content = data.info_Content.replace(/<[^>\\]*\\[^>]*>/g, '');
            _this.type = data.info_Type;
            _this.files = res.data.files;
            _this.tags = data.info_Tag.split(',');
            _this.time = _this.service.correctTime(data.createDate);
            wx.hideLoading();
          }
        },
        fail: function fail(res) {
          console.log(res);
        }
      });
    },
    download: function download(i) {
      wx.setClipboardData({
        data: this.rootAvatar + this.files[i].path,
        success: function success(res) {
          wx.hideToast();
          wx.showModal({
            title: '',
            content: '下载链接已复制到剪贴板,请在浏览器中粘贴下载',
            showCancel: false
          });
        }
      });
    }
  },
  onLoad: function onLoad() {
    this.imageProp = { mode: 'aspectFit', padding: 0, lazyLoad: false, domain: this.rootAvatar.replace('https:', '') };
    this.loadArticles(this.$root.$mp.query.LIPID);
  },
  onUnload: function onUnload() {
    this.title = '';
    this.content = '';
    this.type = '';
    this.tags = [];
    this.time = '';
  }
}; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/***/ }),

/***/ 170:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', {
    staticClass: "container"
  }, [_c('div', {
    staticClass: "title"
  }, [_vm._v(_vm._s(_vm.title))]), _vm._v(" "), _c('div', {
    staticClass: "subhead"
  }, [_c('div', {
    staticClass: "type"
  }, [_vm._v(_vm._s(_vm.type))]), _vm._v("\r\n    " + _vm._s(_vm.time) + "\r\n    "), _vm._l((_vm.tags), function(v, i) {
    return _c('div', {
      key: i,
      staticClass: "tags"
    }, [_vm._v(_vm._s(v))])
  })], 2), _vm._v(" "), _c('div', {
    staticClass: "main"
  }, [_c('wxParse', {
    attrs: {
      "content": _vm.content,
      "noData": "加载中……",
      "imageProp": _vm.imageProp,
      "mpcomid": '0'
    }
  })], 1), _vm._v(" "), _vm._l((_vm.files), function(v, i) {
    return _c('div', {
      key: i,
      staticClass: "download",
      attrs: {
        "hover-class": "fade",
        "eventid": '0-' + i
      },
      on: {
        "tap": function($event) {
          _vm.download(i)
        }
      }
    }, [_c('img', {
      attrs: {
        "src": "/static/imgs/download.png"
      }
    }), _vm._v(_vm._s(v.name))])
  }), _vm._v(" "), _c('div', {
    staticStyle: {
      "width": "100%",
      "height": "130rpx"
    }
  })], 2)
}
var staticRenderFns = []
render._withStripped = true
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ __webpack_exports__["a"] = (esExports);
if (false) {
  module.hot.accept()
  if (module.hot.data) {
     require("vue-hot-reload-api").rerender("data-v-19647e74", esExports)
  }
}

/***/ })

},[103]);
//# sourceMappingURL=main.js.map