1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"0b89":function(t,e,n){},1021:function(t,e,n){"use strict";var i=n("0b89"),o=n.n(i);o.a},"2d74":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=u(n("a34a")),o=n("9185"),r=n("2f62");function u(t){return t&&t.__esModule?t:{default:t}}function c(t,e,n,i,o,r,u){try{var c=t[r](u),a=c.value}catch(s){return void n(s)}c.done?e(a):Promise.resolve(a).then(i,o)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function u(t){c(r,i,o,u,a,"next",t)}function a(t){c(r,i,o,u,a,"throw",t)}u(void 0)}))}}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=n("039b"),g={computed:l(l({},(0,r.mapGetters)({hasLogin:"verifyJwt"})),(0,r.mapState)(["user"])),onShow:function(){this.GetCurrentAddress(),this.getDoctorList()},onLoad:function(t){this.getconfigData()},data:function(){return{scrollTop:0,keyword:"",loadText:{nomore:"暂无更多医生推荐"},list:[{image:"https://cdn.uviewui.com/uview/swiper/1.jpg"},{image:"https://cdn.uviewui.com/uview/swiper/2.jpg"},{image:"https://cdn.uviewui.com/uview/swiper/3.jpg"}],test:[1,2,3,4,5],currentindex:0,listtext:["xxxxxxxxxxx","yyyyyyyyyyy","zzzzzzzzzzz"],doctorList:[],latitude:0,longitude:0,pageindex:1,configInfo:{}}},onHide:function(){this.pageindex=1,this.doctorList=[]},onReachBottom:function(){this.getDoctorList()},methods:{onPageScroll:function(t){this.scrollTop=t.scrollTop},gotoxuanze:function(e){this.hasLogin?t.navigateTo({url:"../doctor_related/select_doctor?index="+e.currentTarget.dataset.index}):t.showModal({title:"提示",content:"暂未登录,请前往登录",success:function(e){e.confirm&&t.navigateTo({url:"../login/login"})}})},gotoinfo:function(e){this.hasLogin?t.navigateTo({url:"../doctor_related/doctor_info?id="+e.currentTarget.dataset.id}):t.showModal({title:"提示",content:"暂未登录,请前往登录",success:function(e){e.confirm&&t.navigateTo({url:"../login/login"})}})},getDoctorList:function(){var e=a(i.default.mark((function e(){var n,o;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$request.post("/api/v1/docter/docterList",{page:this.pageindex,latitude:this.latitude,longitude:this.longitude});case 2:n=e.sent,o=f.islogin(n),o&&(this.pageindex>n.data.last_page?t.showToast({title:"没有更多了",icon:"none"}):(this.doctorList=this.doctorList.concat(n.data.data),this.pageindex++));case 5:case"end":return e.stop()}}),e,this)})));function n(){return e.apply(this,arguments)}return n}(),submitCollect:function(){var e=a(i.default.mark((function e(n){var o;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!this.hasLogin){e.next=7;break}return e.next=3,this.$request.post("/api/v1/collection/submitCollect",{type:1,relation_id:n.currentTarget.dataset.id});case 3:o=e.sent,0==o.status&&(0==o.data.is_collect?(t.showToast({title:"取消成功",icon:"none"}),this.doctorList[n.currentTarget.dataset.index].is_collect=o.data.is_collect):(t.showToast({title:"关注成功",icon:"none"}),this.doctorList[n.currentTarget.dataset.index].is_collect=o.data.is_collect)),e.next=8;break;case 7:t.showModal({title:"提示",content:"暂未登录,请前往登录",success:function(e){e.confirm&&t.navigateTo({url:"../login/login"})}});case 8:case"end":return e.stop()}}),e,this)})));function n(t){return e.apply(this,arguments)}return n}(),servicepacks:function(){t.navigateTo({url:"../service_packs/introduce"})},searchvalue:function(e){t.navigateTo({url:"../doctor_related/select_doctor?value="+e})},childcare:function(){this.hasLogin?t.navigateTo({url:"../childcare/child_care"}):t.showModal({title:"提示",content:"暂未登录,请前往登录",success:function(e){e.confirm&&t.navigateTo({url:"../login/login"})}})},vaccines:function(){this.hasLogin?t.navigateTo({url:"../vaccines/vaccines_info"}):t.showModal({title:"提示",content:"暂未登录,请前往登录",success:function(e){e.confirm&&t.navigateTo({url:"../login/login"})}})},getconfigData:function(){var t=a(i.default.mark((function t(){var e;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$request.post("/api/v1/common/configList");case 2:e=t.sent,console.log(e),0==e.status&&(this.configInfo=e.data);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),GetCurrentAddress:function(){var e=this;(0,o.getLocation)().then((function(n){e.latitude=n.latitude,e.longitude=n.longitude,t.setStorageSync("latitude",n.latitude),t.setStorageSync("longitude",n.longitude)})).catch((function(t){}))}}};e.default=g}).call(this,n("543d")["default"])},3037:function(t,e,n){"use strict";n.r(e);var i=n("6d88"),o=n("959c");for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n("1021");var u,c=n("f0c5"),a=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"58190a9d",null,!1,i["a"],u);e["default"]=a.exports},"6d88":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var i={uSearch:function(){return n.e("uview-ui/components/u-search/u-search").then(n.bind(null,"f299"))},uSwiper:function(){return n.e("uview-ui/components/u-swiper/u-swiper").then(n.bind(null,"c192"))},uSection:function(){return n.e("uview-ui/components/u-section/u-section").then(n.bind(null,"337c"))},uGrid:function(){return n.e("uview-ui/components/u-grid/u-grid").then(n.bind(null,"3a7c"))},uGridItem:function(){return n.e("uview-ui/components/u-grid-item/u-grid-item").then(n.bind(null,"7457"))},uImage:function(){return n.e("uview-ui/components/u-image/u-image").then(n.bind(null,"4316"))},uNoticeBar:function(){return n.e("uview-ui/components/u-notice-bar/u-notice-bar").then(n.bind(null,"d549"))},uTag:function(){return n.e("uview-ui/components/u-tag/u-tag").then(n.bind(null,"6317"))},uLine:function(){return n.e("uview-ui/components/u-line/u-line").then(n.bind(null,"a852"))},uLoadmore:function(){return n.e("uview-ui/components/u-loadmore/u-loadmore").then(n.bind(null,"dcc6"))},uBackTop:function(){return n.e("uview-ui/components/u-back-top/u-back-top").then(n.bind(null,"c8ff"))},uNoNetwork:function(){return n.e("uview-ui/components/u-no-network/u-no-network").then(n.bind(null,"36dd"))}},o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.doctorList,(function(e,n){var i=t.__get_orig(e),o=parseInt(e.distance/1e3);return{$orig:i,m0:o}})));t.$mp.data=Object.assign({},{$root:{l0:n}})},r=[]},"7a1a":function(t,e,n){"use strict";(function(t){n("02cf");i(n("66fd"));var e=i(n("3037"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"959c":function(t,e,n){"use strict";n.r(e);var i=n("2d74"),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=o.a}},[["7a1a","common/runtime","common/vendor"]]]);
|