global.webpackJsonp([9],{ /***/ 313: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _vue = __webpack_require__(1); var _vue2 = _interopRequireDefault(_vue); var _index = __webpack_require__(314); var _index2 = _interopRequireDefault(_index); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var app = new _vue2.default(_index2.default); app.$mount(); exports.default = { config: { navigationBarTitleText: '讲座汇报' } }; /***/ }), /***/ 314: /***/ (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__(316); /* 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_7b308fc6_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__(317); var disposed = false function injectStyle (ssrContext) { if (disposed) return __webpack_require__(315) } var normalizeComponent = __webpack_require__(0) /* script */ /* template */ /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = "data-v-7b308fc6" /* 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_7b308fc6_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\\releaselecture\\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-7b308fc6", Component.options) } else { hotAPI.reload("data-v-7b308fc6", Component.options) } module.hot.dispose(function (data) { disposed = true }) })()} /* harmony default export */ __webpack_exports__["default"] = (Component.exports); /***/ }), /***/ 315: /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ 316: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // exports.default = { data: function data() { return { street: { columnOne: [], index: 0, arrStruct: [], label: '点击选择街道' }, community: { columnOne: [], index: 0, arrStruct: [], label: '点击选择社区' }, name: '', content: '', date: '', time: '', commiting: false }; }, methods: { commit: function commit(e) { var _this = this; var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'first'; if (this.commiting) { return; } console.log(e); var inputs = this.service.filter(e.mp.detail.value); if (!inputs.allowed) { return; } else { inputs = inputs.obj; } var street = this.street.label.replace('点击选择街道', ''); var community = this.community.label.replace('点击选择社区', ''); if (!this.service.checkEmptyInput([inputs.name, street, community, this.date, this.time, inputs.content], ['讲座标题', '街道', '社区', '讲座日期', '讲座时间', '讲座内容'])) { return; } if (!this.service.checkBadWords([inputs.name, inputs.content], ['标题', '内容'])) { return; } if (type == 'first') { wx.showModal({ title: '', content: '确定要发布吗?', success: function success(res) { if (res.confirm) { _this.execCommit(e, inputs); } } }); } else { this.execCommit(e, inputs); } }, execCommit: function execCommit(e, inputs) { var _this2 = this; wx.showLoading({ title: '正在上传' }); this.commiting = true; wx.request({ url: this.rootUrl + '/lecture/addlect', header: { 'content-type': 'application/x-www-form-urlencoded' }, method: 'POST', data: { scid: this.community.arrStruct[this.community.index].value, sessionID: wx.getStorageSync('sessionID'), lecture_title: inputs.name, lecture_content: inputs.content, lecture_date: this.date + ' ' + this.time + ':00' }, success: function success(res) { if (res.statusCode == '500') { console.log('eeee'); _this2.service.getUnionId(_this2.rootAvatar, _this2.rootUrl).then(function (res) { console.log(res); _this2.commiting = false; _this2.commit(e, 'again'); }); } else { console.log(res); if (res.data === 1) { wx.hideLoading(); wx.showModal({ title: '发布成功', content: '请在我的讲座中查看', showCancel: false, success: function success(res) { if (res.confirm) { _this2.name = ''; _this2.date = ''; _this2.time = ''; _this2.content = ''; _this2.$set(_this2.street, 'index', 0); _this2.$set(_this2.street, 'label', '点击选择街道'); _this2.$set(_this2.community, 'label', '点击选择社区'); _this2.commiting = false; } } }); } else { wx.hideLoading(); wx.showToast({ title: '上传失败 请检查上传内容', icon: 'none' }); _this2.commiting = false; } } }, fail: function fail(res) { wx.hideLoading(); wx.showToast({ title: '上传失败', icon: 'none' }); _this2.commiting = false; } }); }, warning: function warning() { if (this.street.label == '点击选择街道') { wx.showToast({ title: '请先选择街道', icon: 'none' }); } }, pickerConfirm: function pickerConfirm(e, s) { switch (s) { case 'time': this.time = e.mp.detail.value;break; case 'date': this.date = e.mp.detail.value;break; case 'street': { var oldLabel = this.street.label; this.street.index = e.mp.detail.value; this.street.label = this.street.columnOne[this.street.index]; if (oldLabel != this.street.label) { this.getCommunity(); } break; } case 'community': { this.community.index = e.mp.detail.value; this.community.label = this.community.columnOne[this.community.index]; break; } } }, getCommunity: function getCommunity() { var _this3 = this; wx.showLoading({ title: '加载社区列表' }); wx.request({ url: this.rootUrl + '/comm/getbyid/' + this.street.arrStruct[this.street.index].value, success: function success(res) { _this3.community.columnOne = res.data.map(function (v) { return v.comm_Name; }); _this3.community.arrStruct = res.data.map(function (v) { return { label: v.comm_Name, value: v.scid }; }); _this3.community.index = 0; _this3.community.label = _this3.community.columnOne[0]; wx.hideLoading(); } }); } }, onLoad: function onLoad() { var _this4 = this; wx.request({ url: this.rootUrl + '/street/all', success: function success(res) { _this4.street.columnOne = res.data.map(function (v) { return v.street_Name; }); _this4.street.arrStruct = res.data.map(function (v) { return { label: v.street_Name, value: v.ssid }; }); } }); } }; /***/ }), /***/ 317: /***/ (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: "baseinfo" }, [_c('form', { staticClass: "baseinfo-box", attrs: { "eventid": '6' }, on: { "submit": _vm.commit } }, [_c('div', { staticClass: "list-input" }, [_c('span', [_vm._v("讲座标题")]), _vm._v(" "), _c('input', { attrs: { "placeholder": "请输入讲座标题", "name": "name", "value": _vm.name, "placeholder-style": "color:#9B9B9B", "eventid": '0' }, on: { "input": function($event) { _vm.name = _vm.service.Input($event) } } })]), _vm._v(" "), _c('div', { staticClass: "list-input between" }, [_c('span', [_vm._v("讲座街道")]), _vm._v(" "), _c('picker', { attrs: { "value": _vm.street.index, "range": _vm.street.columnOne, "eventid": '1' }, on: { "change": function($event) { _vm.pickerConfirm($event, 'street') } } }, [_c('div', { attrs: { "hover-class": "hover" } }, [_vm._v(_vm._s(_vm.street.label))])])], 1), _vm._v(" "), _c('div', { staticClass: "list-input between" }, [_c('span', [_vm._v("讲座社区")]), _vm._v(" "), _c('picker', { attrs: { "disabled": _vm.street.label == '点击选择街道', "value": _vm.community.index, "range": _vm.community.columnOne, "eventid": '2' }, on: { "tap": _vm.warning, "change": function($event) { _vm.pickerConfirm($event, 'community') } } }, [_c('div', { attrs: { "hover-class": "hover" } }, [_vm._v(_vm._s(_vm.community.label))])])], 1), _vm._v(" "), _c('div', { staticClass: "list-input between" }, [_c('span', [_vm._v("讲座日期")]), _vm._v(" "), _c('picker', { attrs: { "mode": "date", "value": _vm.date, "eventid": '3' }, on: { "change": function($event) { _vm.pickerConfirm($event, 'date') } } }, [_c('div', { class: { unset: _vm.date == '' }, attrs: { "hover-class": "hover" } }, [_vm._v(_vm._s(_vm.date || '点击选择'))])])], 1), _vm._v(" "), _c('div', { staticClass: "list-input between" }, [_c('span', [_vm._v("讲座时间")]), _vm._v(" "), _c('picker', { attrs: { "mode": "time", "value": _vm.time, "eventid": '4' }, on: { "change": function($event) { _vm.pickerConfirm($event, 'time') } } }, [_c('div', { class: { unset: _vm.time == '' }, attrs: { "hover-class": "hover" } }, [_vm._v(_vm._s(_vm.time || '点击选择'))])])], 1), _vm._v(" "), _c('div', { staticClass: "greytitle" }, [_vm._v("讲座内容")]), _vm._v(" "), _c('div', { staticClass: "textarea" }, [_c('textarea', { attrs: { "placeholder": "请输入讲座内容", "name": "content", "value": _vm.content, "maxlength": "10000", "eventid": '5' }, on: { "input": function($event) { _vm.content = _vm.service.Input($event) } } }), _vm._v(" "), _c('div', [_vm._v(_vm._s(_vm.content.length) + "/10000")])]), _vm._v(" "), _c('div', { staticClass: "commit" }, [_c('button', { attrs: { "form-type": "submit", "hover-class": "fade", "disabled": _vm.commiting } }, [_vm._v("提交")])], 1)])], 1) } 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-7b308fc6", esExports) } } /***/ }) },[313]); //# sourceMappingURL=main.js.map