1 line
5.4 KiB
JavaScript
1 line
5.4 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-479ac2e6","chunk-2d0d83d6"],{"3e91":function(t,e,i){"use strict";i("b0c0"),i("99af");var a=i("ac0d"),s=i("eb17");e["a"]={mixins:[a["a"]],data:function(){return{listData:[],isLoadMore:!0,page:1,last_page:1}},activated:function(){var t=JSON.parse(localStorage.getItem("myLocation"));if(t&&(this.myLocation=t),this.lawyerId=this.$route.params.id,"lawyerSearch"==this.$route.name&&(this.lawyerId=this.$route.query.id),0==this.request)return!1;this.httpUrl&&this.getdata()},methods:{initdata:function(){this.page=1,this.listData=[]},getdata:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.initdata();var i={};this.lawyerId&&"lawyerSearch"!==this.$route.name&&(i.id=this.lawyerId),e&&(i={id:this.lawyerId,name:e}),"lawyerSearch"==this.$route.name&&("距离"!==this.text&&(i.distance_type="由近到远"==this.text?1:2,i.lng=this.myLocation.point.lng,i.lat=this.myLocation.point.lat),i.category_id=this.lawyerId),"lawyerConsult"==this.$route.name&&(i.goods_type=this.$route.params.consult_type),$http.post(this.httpUrl,i,"正在加载中...").then((function(e){var i=e.result,a=e.msg,s=e.data;i?(t.listData=s.list.data,t.last_page=s.list.last_page):t.$toast(a)}))},getMoreData:function(){var t=this;if(this.isLoadMore=!1,!(this.page>=this.last_page)){var e=this.page+1,i={page:e};"lawyerConsult"==this.$route.name&&(i.goods_type=this.$route.params.consult_type),$http.post(this.httpUrl,i,"正在加载更多数据中...").then((function(i){var a=i.result,s=i.msg,o=i.data;t.isLoadMore=!0,a?(t.page=e,t.listData=t.listData.concat(o.list.data)):t.$toast(s)}))}}},watch:{search:function(t){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){e.getdata(t)}),300)},lawyers:function(t){t&&t.length>0&&(this.listData=t)},immediate:!0},components:{yzBlank:s["default"]}}},"41d2":function(t,e,i){"use strict";i("95d0")},"79db":function(t,e,i){t.exports=i.p+"static/app/img/empty-image-search.ef236a93.png"},"95d0":function(t,e,i){var a=i("a1421");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var s=i("499e").default;s("7a69fc3e",a,!0,{sourceMap:!1,shadowMode:!1})},a1421:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".main[data-v-c279ddc6]{border-top:1px solid #f2f2f2}.box[data-v-c279ddc6]{background-color:#fff;padding:1rem}.box[data-v-c279ddc6],.goods-info[data-v-c279ddc6]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.goods-info[data-v-c279ddc6]{margin-left:.5rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.price[data-v-c279ddc6]{color:#f14e4e}",""]),t.exports=e},a41f:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("c-title",{attrs:{hide:!1,text:t.text}}),i("van-search",{attrs:{placeholder:"请输入商品名称",shape:"round"},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}}),t._l(t.listData,(function(e){return i("main",{key:e.id,staticClass:"main",on:{click:function(i){return t.toGoods(e.id)}}},[i("div",{staticClass:"box"},[i("van-image",{staticClass:"goods-img",attrs:{width:"6.5rem",height:"6.5rem",src:e.thumb}}),i("div",{staticClass:"goods-info"},[i("div",{staticClass:"goods-title"},[t._v(t._s(e.title))]),i("div",{staticClass:"price"},[t._v("¥"+t._s(e.price))])])],1)])}))],2)},s=[],o=(i("4056"),i("44bf")),n=i("3e91"),r={mixins:[n["a"]],data:function(){return{text:"",searchValue:"",httpUrl:"plugin.lawyer-platform.frontend.controllers.goods.getList"}},activated:function(){this.text=0==this.$route.params.consult_type?"电话咨询":"在线咨询"},methods:{toGoods:function(t){this.$router.push(this.fun.getUrl("goods",{id:t}))},getSearch:function(){var t=this,e={kwd:this.searchValue,goods_type:this.$route.params.consult_type};$http.post("plugin.lawyer-platform.frontend.controllers.goods.getList",e).then((function(e){1==e.result&&(t.listData=e.data.list.data)}))}},watch:{searchValue:function(){var t=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){t.getSearch()}),300)}},components:{VanImage:o["a"]}},l=r,c=(i("41d2"),i("2877")),d=Object(c["a"])(l,a,s,!1,null,"c279ddc6",null);e["default"]=d.exports},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var a=document.documentElement,s=document.body,o={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:s&&(t=s.scrollTop),t},getClientHeight:function(){var t=0;return t=s.clientHeight&&a.clientHeight?Math.min(s.clientHeight,a.clientHeight):Math.max(s.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(s.scrollHeight,a.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}}}]); |