(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/jdr/center"],{1e3:function(e,t,n){"use strict";n.r(t);var o=n("13ba"),i=n("84e9");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("f663");var c=n("f0c5"),r=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=r.exports},"13ba":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},i=[]},5929:function(e,t,n){"use strict";(function(e,o){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("40f0"),a=n("22f1"),c={components:{uniLoadMore:function(){n.e("components/uni-load-more/uni-load-more").then(function(){return resolve(n("de04"))}.bind(null,n)).catch(n.oe)},empty:function(){n.e("components/empty").then(function(){return resolve(n("f3ad"))}.bind(null,n)).catch(n.oe)}},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(t){var n=t.data;e.maiList[0].content=n.count})),(0,i.order_receiving_hall)({type:1}).then((function(t){var n=t.data;e.maiList[1].content=n.count}))},loadData:function(t){var n=this,o=this.currentIndex,c=this.maiList[o],r=c.state;"shua"===t&&(c.loaded=!1,c.page=1,c.limit=10,c.loadingType="more",c.orderList=[]),"tabChange"===t&&!0===c.loaded||"loading"!==c.loadingType&&"noMore"!==c.loadingType&&(c.loadingType="loading",(0,i.order_receiving_hall)({type:r,page:c.page,limit:c.limit}).then((function(t){var o=t.data;console.log(o),o.data.forEach((function(e){void 0!=e.remarks&&"undefined"!=e.remarks||(e.remarks="无");var t=Object.keys(e.cate),n="";t.forEach((function(e){""==n?n+=e:n=n+"/"+e})),e.catename=n;var o=Object.keys(e.service),i="";e.issm=1,o.forEach((function(t){console.log(e),"上门接送"==t&&(e.issm=2),""==i?i+=t:i=i+"/"+t})),e.servicename=i,e.time=(0,a.getTime)(e.time)})),c.orderList=c.orderList.concat(o.data),c.page++,c.limit!=o.data.length?(c.loadingType="noMore",e.hideLoading(),n.$set(c,"loaded",!0)):c.loadingType="more"})).catch((function(e){console.log(e)})))},takeOrder:function(t){var n=this;e.showModal({title:"提示",content:"是否接取该订单，订单佣金:"+t.commission+"前往医院:"+t.hospital,success:function(a){a.confirm?(0,i.order_receiving)({},t.id).then((function(t){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){n.$api.msg("订阅消息失败"),console.log(e)},complete:function(){}}),n.loadData("shua"),n.shul()})):a.cancel&&console.log("用户点击取消")}})}}};t.default=c}).call(this,n("543d")["default"],n("bc2e")["default"])},"84e9":function(e,t,n){"use strict";n.r(t);var o=n("5929"),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},a0e6:function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("3e59");o(n("66fd"));var i=o(n("1000"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},e531:function(e,t,n){},f663:function(e,t,n){"use strict";var o=n("e531"),i=n.n(o);i.a}},[["a0e6","common/runtime","common/vendor"]]]);