global.webpackJsonp([11],{ /***/ 303: /***/ (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__(304); 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: '咨询律师' } }; /***/ }), /***/ 304: /***/ (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__(306); /* 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_3efd7f86_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__(307); var disposed = false function injectStyle (ssrContext) { if (disposed) return __webpack_require__(305) } var normalizeComponent = __webpack_require__(0) /* script */ /* template */ /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = "data-v-3efd7f86" /* 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_3efd7f86_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\\questiondetail\\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-3efd7f86", Component.options) } else { hotAPI.reload("data-v-3efd7f86", Component.options) } module.hot.dispose(function (data) { disposed = true }) })()} /* harmony default export */ __webpack_exports__["default"] = (Component.exports); /***/ }), /***/ 305: /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ 306: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _promise = __webpack_require__(12); var _promise2 = _interopRequireDefault(_promise); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // exports.default = { data: function data() { return { cwxid: '', sysNewsId: '', text: '', sequence: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十'], lists: [], imgfiles: [], imgLoaded: [], tags: [], wx_name: '', commiting: false }; }, methods: { hideImg: function hideImg(i) { this.$set(this.imgLoaded, i, false); }, previewImg: function previewImg(i) { wx.previewImage({ urls: this.imgfiles, current: this.imgfiles[i] }); }, getLawyerPic: function getLawyerPic(liid) { var _this = this; return new _promise2.default(function (resolve) { wx.request({ url: _this.rootUrl + '/law/lawyer/' + liid, success: function success(res) { resolve(res.data[0].pic_Name); } }); }); }, Timer: function Timer(orginIndex, key) { var _this2 = this; return new _promise2.default(function (resolve) { console.log('timer'); setTimeout(function () { if (_this2.lists[orginIndex][key]) resolve(_this2.lists[orginIndex][key]);else _this2.Timer(orginIndex, key).then(function (e) { return resolve(e); }); }, 50); }); }, loadConversations: function loadConversations() { var _this3 = this; wx.request({ url: this.rootUrl + '/conwx/singleqalaw/' + this.cwxid, data: { sysNewsId: this.sysNewsId }, success: function success(res) { _this3.lists = res.data.lists; console.log(res.data.lists); _this3.imgfiles = res.data.pics.map(function (v) { return _this3.rootAvatar + v.pic_Name; }); _this3.imgLoaded = new Array(_this3.imgfiles.length).fill(true); var map = {}; _this3.lists.forEach(function (v, i) { if (map[v.liid]) { _this3.Timer(map[v.liid], 'pic').then(function (pic) { return _this3.$set(_this3.lists[i], 'pic', pic); }); } else if (v.liid) { map[v.liid] = i.toString(); _this3.getLawyerPic(v.liid).then(function (pic) { return _this3.$set(_this3.lists[i], 'pic', pic); }); } v.consultant_Date = _this3.service.correctTime(v.consultant_Date, 'full'); if (v.replay_Date) v.replay_Date = _this3.service.correctTime(v.replay_Date, 'full'); }); console.log(_this3.lists[0].cate_Name); try { _this3.tags = _this3.lists[0].cate_Name.split(','); } catch (e) { _this3.tags = _this3.lists[0].cate_Name; } _this3.text = ''; _this3.wx_name = _this3.lists[0].wx_name; _this3.commiting = false; }, fail: function fail(res) { console.log(res); } }); }, commit: function commit(e) { var _this4 = this; var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'first'; if (this.commiting) { return; } var inputs = this.service.filter(e.mp.detail.value); if (!inputs.allowed) { return; } else { inputs = inputs.obj; } if (!this.service.checkEmptyInput([inputs.text], ['回答内容'])) { return; } if (!this.service.checkBadWords([inputs.text], ['回答内容'])) { return; } if (type == 'first') { wx.showModal({ title: '', content: '确定要发布吗?', success: function success(res) { if (res.confirm) { _this4.execCommit(e, inputs); } } }); } else { this.execCommit(e, inputs); } }, execCommit: function execCommit(e, inputs) { var _this5 = this; wx.showLoading({ title: '正在上传' }); this.commiting = true; wx.request({ url: this.rootUrl + '/qa/replyqa', method: 'POST', header: { 'content-type': 'application/x-www-form-urlencoded' }, data: { QAID: this.lists[this.lists.length - 1].qaid, Consultant_Reply: inputs.text, sessionID: wx.getStorageSync('sessionID') }, success: function success(res) { if (res.statusCode == '500') { _this5.service.getUnionId(_this5.rootAvatar, _this5.rootUrl).then(function (res) { console.log(res); _this5.commiting = false; _this5.commit(e, 'again'); }); } else { if (res.data == 1) { wx.showToast({ title: '发送成功' }); _this5.loadConversations(); } else { wx.hideLoading(); wx.showToast({ title: '上传失败 请检查上传内容', icon: 'none' }); _this5.commiting = false; } } }, fail: function fail(res) { console.log(res); wx.hideLoading(); wx.showToast({ title: '上传失败', icon: 'none' }); _this5.commiting = false; } }); } }, onLoad: function onLoad() { this.cwxid = this.$root.$mp.query.cwxid; if (this.$root.$mp.query.sysNewsId !== null && this.$root.$mp.query.sysNewsId !== '' && this.$root.$mp.query.sysNewsId !== undefined) { this.sysNewsId = this.$root.$mp.query.sysNewsId; } this.loadConversations(); }, onUnload: function onUnload() { this.cwxid = ''; this.sysNewsId = ''; this.text = ''; this.lists = []; this.imgfiles = []; this.imgLoaded = []; this.tags = []; this.wx_name = ''; } }; /***/ }), /***/ 307: /***/ (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 (_vm.lists[0]) ? _c('div', { staticClass: "questiondetail" }, [_c('div', { staticClass: "head-title" }, [_vm._v("\n " + _vm._s(_vm.lists[0] ? _vm.lists[0].consultant_Title : '') + "\n "), (_vm.imgfiles.length > 0) ? _c('div', { staticClass: "img-box", staticStyle: { "padding-top": "20rpx" } }, _vm._l((_vm.imgfiles), function(item, i) { return _c('img', { key: i, attrs: { "src": _vm.imgLoaded[i] ? item : '/static/imgs/img.png', "mode": "aspectFill", "eventid": '0-' + i }, on: { "tap": function($event) { _vm.previewImg(i) }, "error": function($event) { _vm.hideImg(i) } } }) })) : _vm._e(), _vm._v(" "), _c('div', { staticClass: "foot" }, [_c('span', [_vm._v("咨询者:" + _vm._s(_vm.wx_name))]), _vm._v(" "), _vm._l((_vm.tags), function(tag, j) { return _c('div', { key: j, staticClass: "tags" }, [_vm._v(_vm._s(tag ? tag : ''))]) })], 2)]), _vm._v(" "), _vm._l((_vm.lists), function(item, i) { return _c('div', { key: i, staticClass: "list-item" }, [_c('div', { staticClass: "para-title" }, [_c('div'), _vm._v(_vm._s('第' + _vm.sequence[i] + '次提问'))]), _vm._v(" "), _c('div', { staticClass: "text", staticStyle: { "margin-top": "25rpx" } }, [_vm._v(_vm._s(item.consultant_Content))]), _vm._v(" "), _c('div', { staticClass: "time" }, [_vm._v(_vm._s(item.consultant_Date))]), _vm._v(" "), (item.is_Replay == 1) ? _c('div', [_c('div', { staticClass: "head" }, [_c('img', { staticClass: "photo", attrs: { "src": _vm.rootAvatar + item.pic, "mode": "aspectFill" } }), _vm._v(_vm._s(item.name) + "律师的回答\n ")]), _vm._v(" "), _c('div', { staticClass: "text", staticStyle: { "margin-bottom": "25rpx" } }, [_vm._v(_vm._s(item.consultant_Reply))]), _vm._v(" "), _c('div', { staticClass: "time" }, [_vm._v(_vm._s(item.replay_Date))])]) : _vm._e(), _vm._v(" "), (i + 1 == _vm.lists.length && item.is_Replay != 1) ? _c('form', { attrs: { "eventid": '2-' + i }, on: { "submit": _vm.commit } }, [_c('div', { staticClass: "textarea" }, [_c('textarea', { attrs: { "placeholder": "请输入您要回答的内容", "name": "text", "value": _vm.text, "maxlength": "10000", "eventid": '1-' + i }, on: { "input": function($event) { _vm.text = _vm.service.Input($event) } } }), _vm._v(" "), _c('div', [_vm._v(_vm._s(_vm.text.length) + "/10000")])]), _vm._v(" "), _c('div', { staticClass: "commit" }, [_c('button', { attrs: { "form-type": "submit", "hover-class": "fade", "disabled": _vm.commiting } }, [_vm._v("提交")])], 1)]) : _vm._e()], 1) })], 2) : _c('div', { staticClass: "LoadingMask" }, [_c('img', { attrs: { "src": "/static/imgs/loading.png" } })]) } 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-3efd7f86", esExports) } } /***/ }) },[303]); //# sourceMappingURL=main.js.map