1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/house/house"],{"1f99":function(e,t,n){},"70df":function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("7748");o(n("3240"));var i=o(n("7113"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},7113:function(e,t,n){"use strict";n.r(t);var o=n("c8d7"),i=n("f509");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("e029");var r=n("828b"),u=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=u.exports},ab55:function(e,t,n){"use strict";(function(e){var o=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("7ca3")),a=(n("6806"),n("2ecb")),r={data:function(){var e;return e={detail:{area:0},houseId:15,responsibility:[],coordinates:[],latitude:39.90923,longitude:116.397428,mapContext:{},visitorList:[],startTime:"",commentData:{readNumer:0,commentSize:0,comment:[]},shareButton:!1},(0,i.default)(e,"coordinates",""),(0,i.default)(e,"videoUrl",""),e},components:{avatar:function(){n.e("components/common/avatar").then(function(){return resolve(n("80cf"))}.bind(null,n)).catch(n.oe)}},onLoad:function(e){e.houseId&&(this.houseId=e.houseId),this.coordinates=this.$store.getters.coordinates,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,a.getHouseDetailById)(this.houseId+"?coordinates="+this.coordinates).then((function(t){if(200===t.code){e.detail=t.data;var n=[],o=[];e.detail.picture&&(n=JSON.parse(e.detail.picture).map((function(e){return e["fileType"]="image",e}))),e.detail.video&&(o=JSON.parse(e.detail.video).map((function(e){return e["fileType"]="video",e["videoUrl"]=e.url,e["url"]=e.url+"?x-oss-process=video/snapshot,t_0,f_jpg",e}))),e.responsibility=o.concat(n),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,a.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}}))))}))},openVideo:function(e){this.videoUrl=e.videoUrl,this.$refs.popup.open("center")},openImage:function(t){if("image"===t.fileType){var n=this.responsibility.filter((function(e){return"image"===e.fileType})),o=n.findIndex((function(e){return e.id==t.id}));e.previewImage({urls:n.map((function(e){return e.url})),current:o,longPressActions:{success:function(e){},fail:function(e){}}})}},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,a.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())}))},mp4Preview:function(){},del:function(){},like:function(){},tell:function(){this.detail.chargePersonPhone||this.$toast("该用户暂未提供手机号"),e.makePhoneCall({phoneNumber:this.detail.chargePersonPhone})},roomCollection:function(){var e=this;this.detail.roomCollection?(0,a.disableCollection)(this.houseId).then((function(t){return e.successCollection(t,"取消收藏")})):(0,a.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,a.getVisitorByQuery)({currPage:1,pageSize:2,projectItemTargetRoomId:this.houseId}).then((function(t){200===t.code&&(e.visitorList=t.data.dataList)}))},createVisitor:function(){(0,a.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=r}).call(this,n("df3c")["default"])},c8d7:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var 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,"3d33"))},uniDateformat:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat")]).then(n.bind(null,"2a9e"))},hbComment:function(){return n.e("uni_modules/hb-comment/components/hb-comment/hb-comment").then(n.bind(null,"1030"))},uvSafeBottom:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uv-safe-bottom/components/uv-safe-bottom/uv-safe-bottom")]).then(n.bind(null,"eadb"))},uniPopup:function(){return n.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(n.bind(null,"786a"))}},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={portrait:e.detail.chargePersonPortrait,name:e.detail.chargePersonName},a=e.$field.findTypeNameByList("supportingFacilities",e.detail.supportingFacilities);e.$mp.data=Object.assign({},{$root:{g0:n,g1:o,a0:i,l0:a}})},a=[]},e029:function(e,t,n){"use strict";var o=n("1f99"),i=n.n(o);i.a},f509:function(e,t,n){"use strict";n.r(t);var o=n("ab55"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a}},[["70df","common/runtime","common/vendor"]]]);
|