(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/jdr/center"],{220:function(e,n,t){"use strict";(function(e,n){var o=t(4);t(26);o(t(25));var i=o(t(221));e.__webpack_require_UNI_MP_PLUGIN__=t,n(i.default)}).call(this,t(1)["default"],t(2)["createPage"])},221:function(e,n,t){"use strict";t.r(n);var o=t(222),i=t(224);for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);t(226);var a,c=t(35),u=Object(c["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],a);u.options.__file="pages/jdr/center.vue",n["default"]=u.exports},222:function(e,n,t){"use strict";t.r(n);var o=t(223);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},223:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return i})),t.d(n,"staticRenderFns",(function(){return a})),t.d(n,"recyclableRender",(function(){return r})),t.d(n,"components",(function(){return o}));var i=function(){var e=this,n=e.$createElement;e._self._c},r=!1,a=[];i._withStripped=!0},224:function(e,n,t){"use strict";t.r(n);var o=t(225),i=t.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);n["default"]=i.a},225:function(e,n,t){"use strict";(function(e,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=t(83),r=t(161),a=function(){t.e("components/uni-load-more/uni-load-more").then(function(){return resolve(t(374))}.bind(null,t)).catch(t.oe)},c=function(){t.e("components/empty").then(function(){return resolve(t(381))}.bind(null,t)).catch(t.oe)},u={components:{uniLoadMore:a,empty:c},data:function(){return{currentIndex:0,maiList:[{state:2,title:"代办订单",content:"0",loadingType:"more",orderList:[],page:1,limit:10},{state:1,title:"陪诊订单",content:"0",loadingType:"more",orderList:[],page:1,limit:10}]}},onLoad:function(e){this.shul(),this.loadData()},methods:{navGo:function(e){this.currentIndex=e,this.loadData("shua")},toBack:function(){e.switchTab({url:"/pages/user/my"})},shul:function(){var e=this;(0,i.order_receiving_hall)({type:2}).then((function(n){var t=n.data;e.maiList[0].content=t.count})),(0,i.order_receiving_hall)({type:1}).then((function(n){var t=n.data;e.maiList[1].content=t.count}))},loadData:function(n){var t=this,o=this.currentIndex,a=this.maiList[o],c=a.state;"shua"===n&&(a.loaded=!1,a.page=1,a.limit=10,a.loadingType="more",a.orderList=[]),"tabChange"===n&&!0===a.loaded||"loading"!==a.loadingType&&"noMore"!==a.loadingType&&(a.loadingType="loading",(0,i.order_receiving_hall)({type:c,page:a.page,limit:a.limit}).then((function(n){var o=n.data;console.log(o),o.data.forEach((function(e){void 0!=e.remarks&&"undefined"!=e.remarks||(e.remarks="无");var n=Object.keys(e.cate),t="";n.forEach((function(e){""==t?t+=e:t=t+"/"+e})),e.catename=t;var o=Object.keys(e.service),i="";e.issm=1,o.forEach((function(n){console.log(e),"上门接送"==n&&(e.issm=2),""==i?i+=n:i=i+"/"+n})),e.servicename=i,e.time=(0,r.getTime)(e.time)})),a.orderList=a.orderList.concat(o.data),a.page++,a.limit!=o.data.length?(a.loadingType="noMore",e.hideLoading(),t.$set(a,"loaded",!0)):a.loadingType="more"})).catch((function(e){console.log(e)})))},takeOrder:function(n){var t=this;e.showModal({title:"提示",content:"是否接取该订单，订单佣金:"+n.commission+"前往医院:"+n.hospital,success:function(r){r.confirm?(0,i.order_receiving)({},n.id).then((function(n){e.showToast({title:"接单成功",duration:2e3}),o.getSetting({withSubscriptions:!0,success:function(e){"accept"==e["2FOjTcnlEPwVnHoXzppZiuB3dXWSfpn8qJlD6p3s0GA"]&&console.log("订阅成功")}}),o.requestSubscribeMessage&&o.requestSubscribeMessage({tmplIds:["2FOjTcnlEPwVnHoXzppZiuB3dXWSfpn8qJlD6p3s0GA"],success:function(e){},fail:function(e){t.$api.msg("订阅消息失败"),console.log(e)},complete:function(){}}),t.loadData("shua"),t.shul()})):r.cancel&&console.log("用户点击取消")}})}}};n.default=u}).call(this,t(2)["default"],t(1)["default"])},226:function(e,n,t){"use strict";t.r(n);var o=t(227),i=t.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);n["default"]=i.a},227:function(e,n,t){}},[[220,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/jdr/center.js.map