12 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/house/house"],{136:function(e,t,n){"use strict";(function(e,t){var o=n(4);n(26);o(n(25));var i=o(n(137));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},137:function(e,t,n){"use strict";n.r(t);var o=n(138),i=n(140);for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n(142);var a,s=n(32),u=Object(s["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],a);u.options.__file="pages/house/house.vue",t["default"]=u.exports},138:function(e,t,n){"use strict";n.r(t);var o=n(139);n.d(t,"render",(function(){return o["render"]})),n.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(t,"components",(function(){return o["components"]}))},139:function(e,t,n){"use strict";var o;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return a})),n.d(t,"recyclableRender",(function(){return r})),n.d(t,"components",(function(){return o}));try{o={uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,412))},uniDateformat:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat")]).then(n.bind(null,472))},hbComment:function(){return n.e("uni_modules/hb-comment/components/hb-comment/hb-comment").then(n.bind(null,493))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.$field.findTypeName("houseType",e.detail.roomTypeId)),o=e.$field.findTypeName("payWay",e.detail.payWay),i=e.$field.findTypeNameByList("supportingFacilities",e.detail.supportingFacilities);e.$mp.data=Object.assign({},{$root:{g0:n,g1:o,l0:i}})},r=!1,a=[];i._withStripped=!0},140:function(e,t,n){"use strict";n.r(t);var o=n(141),i=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=i.a},141:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(38);var o=n(57),i={data:function(){return{detail:{area:0},houseId:15,responsibility:[],coordinates:[],latitude:39.90923,longitude:116.397428,mapContext:{},visitorList:[],startTime:"",commentData:{readNumer:0,commentSize:0,comment:[]},shareButton:!1}},onLoad:function(e){e.houseId&&(this.houseId=e.houseId),this.startTime=(new Date).getTime()},onReady:function(){this.mapContext=e.createMapContext("map",this),this.init()},onUnload:function(){var e=(new Date).getTime(),t=e-this.startTime;t>1e4&&this.createVisitor()},onShareAppMessage:function(e){return{title:this.detail.name||""}},methods:{init:function(){var e=this;(0,o.getHouseDetailById)(this.houseId).then((function(t){200===t.code&&(e.detail=t.data,e.detail.picture&&(e.responsibility=JSON.parse(e.detail.picture)),e.detail.coordinates&&(e.coordinates=e.detail.coordinates.split(","),e.latitude=e.coordinates[1],e.longitude=e.coordinates[0],e.addMarkers()),e.getVisitor(),e.getHouseEvaluate())}))},getHouseEvaluate:function(){var e=this;(0,o.getHouseEvaluateListByPage)({currPage:1,pageSize:100,projectItemTargetRoomId:this.houseId}).then((function(t){200==t.code&&(e.commentData.commentSize=t.data.totalCount,e.commentData.comment=e.getTree(t.data.dataList.map((function(e){return{id:e.id,owner:!0,hasLike:!1,likeNum:2,avatarUrl:e.userPortrait,nickName:e.userName,content:e.content,parentId:e.parentId,createTime:e.date}}))))}))},getTree:function(e){var t=[],n={};return e.forEach((function(e){n[e.id]=e})),e.forEach((function(e){var o=n[e.parentId];o?(o.children||(o.children=[])).push(e):t.push(e)})),t},addEvaluate:function(e){var t=this;(0,o.insertEvaluate)({userId:this.$store.getters.user.userId,projectItemTargetRoomId:this.houseId,content:e.content,parentId:e.pId||0}).then((function(e){200==e.code&&(t.$toast("评价成功"),t.getHouseEvaluate(),t.$refs.hbComment.addComplete())}))},del:function(){},like:function(){},tell:function(){e.makePhoneCall({phoneNumber:"17601274604"})},roomCollection:function(){var e=this;this.detail.roomCollection?(0,o.disableCollection)(this.houseId).then((function(t){return e.successCollection(t,"取消收藏")})):(0,o.collection)(this.houseId).then((function(t){return e.successCollection(t,"收藏成功")}))},successCollection:function(e,t){200===e.code&&(this.init(),this.$toast(t))},addMarkers:function(){var e=[{latitude:this.coordinates[1],longitude:this.coordinates[0]}],t=[];e.forEach((function(e,n){t.push(Object.assign({},{id:n+1,width:50,height:50,joinCluster:!0},e))})),this.mapContext.addMarkers({markers:t,clear:!1,complete:function(e){}})},getVisitor:function(){var e=this;(0,o.getVisitorByQuery)({currPage:1,pageSize:2,projectItemTargetRoomId:this.houseId}).then((function(t){200===t.code&&(e.visitorList=t.data.dataList)}))},createVisitor:function(){(0,o.insertVisitor)({userId:this.$store.getters.user.userId,projectItemTargetRoomId:this.houseId})},share:function(){e.createSelectorQuery().select("#shareButton").node().exec((function(e){console.log("res",e[0].node)}))}}};t.default=i}).call(this,n(2)["default"])},142:function(e,t,n){"use strict";n.r(t);var o=n(143),i=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=i.a},143:function(e,t,n){}},[[136,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/house/house.js.map
|