1 line
7.5 KiB
JavaScript
1 line
7.5 KiB
JavaScript
"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[238],{2344:function(c,e,s){var a=s(8774),n=s(9439),l=s(7294),i=s(1515),r=s(2954),t=s.n(r),o={"succ-page":"index-module__succ-page____x2TM","succ-icon-area":"index-module__succ-icon-area____jgp_","succ-icon":"index-module__succ-icon___km9gr","succ-icon--warn":"index-module__succ-icon--warn___CVDqV","succ-text-area":"index-module__succ-text-area___PKs5X","succ-title":"index-module__succ-title___f8GzC","succ-desc":"index-module__succ-desc___iTLTf","succ-opr-area":"index-module__succ-opr-area____zcT9","succ-detail-cells":"index-module__succ-detail-cells___xGc3q","succ-cell-ft":"index-module__succ-cell-ft___GE2m5","succ-score":"index-module__succ-score___xv3RZ","succ-strong":"index-module__succ-strong___b3GjQ","succ-id":"index-module__succ-id___a3D_N","succ-btn-area":"index-module__succ-btn-area___RSVB3","succ-btn-row":"index-module__succ-btn-row___ZTkyE","succ-tip":"index-module__succ-tip___H_Mke",fadeInUp:"index-module__fadeInUp___XK76i",fadeIn:"index-module__fadeIn___Tr5j1",shimmer:"index-module__shimmer___n9tRH",pulse:"index-module__pulse___DxlO7",slideInRight:"index-module__slideInRight___kHKDB"},u=s(2546),d=s(6931),x=s(329),_=s(5893),m=function(){var c=(0,l.useState)("appointment"),e=(0,n.Z)(c,2),s=e[0],a=e[1],r=(0,l.useState)(""),m=(0,n.Z)(r,2),h=m[0],v=m[1],j=(0,l.useState)(0),p=(0,n.Z)(j,2),f=p[0],N=p[1],b=(0,l.useState)(null),G=(0,n.Z)(b,2),g=G[0],w=G[1],T=(0,u.O)(function(c){return c.appointments});(0,l.useEffect)(function(){var c,e=null===(c=t().getCurrentInstance().router)||void 0===c?void 0:c.params;if("lead"===(null===e||void 0===e?void 0:e.type))return a("lead"),v(e.id||""),N(Number(e.score)||0),void t().setNavigationBarTitle({title:"\u63d0\u4ea4\u6210\u529f"});var s=null===e||void 0===e?void 0:e.id;if(s){var n=T.find(function(c){return c.id===s});n&&w(n)}},[T]);var k=function(){return t().switchTab({url:"/pages/home/index"})},y=function(){return t().switchTab({url:"/pages/appointment/index"})},C=function(){(0,d.o)().then(function(c){if(c.phone){var e=String(c.phone).replace(/[^\d+]/g,"");t().makePhoneCall({phoneNumber:e,fail:function(e){console.error("[SuccessPage] call failed",e),t().showToast({title:"\u62e8\u53f7\u5931\u8d25, \u8bf7\u624b\u52a8\u62e8\u6253 "+c.phone,icon:"none"})}})}else t().showToast({title:"\u8bf7\u5728\u7ba1\u7406\u540e\u53f0\u914d\u7f6e\u7535\u8bdd\u53f7\u7801",icon:"none"})}).catch(function(c){console.error("[SuccessPage] fetchSiteConfig failed",c),t().showToast({title:"\u83b7\u53d6\u7535\u8bdd\u53f7\u7801\u5931\u8d25",icon:"none"})})},S=function(c){t().makePhoneCall({phoneNumber:c}).catch(function(){})};if("lead"===s)return(0,_.jsxs)(i.G7,{className:o["succ-page"],children:[(0,_.jsx)(i.G7,{className:o["succ-icon-area"],children:(0,_.jsx)(i.xv,{className:o["succ-icon"],children:"\u2713"})}),(0,_.jsxs)(i.G7,{className:o["succ-text-area"],children:[(0,_.jsx)(i.xv,{className:o["succ-title"],children:"\u95ee\u5377\u5df2\u63d0\u4ea4"}),(0,_.jsx)(i.xv,{className:o["succ-desc"],children:"\u533b\u751f\u52a9\u7406\u5c06\u5728 1 \u4e2a\u5de5\u4f5c\u65e5\u5185\u4e0e\u60a8\u8054\u7cfb"})]}),(0,_.jsx)(i.G7,{className:o["succ-opr-area"],children:(0,_.jsxs)(i.G7,{className:"card ".concat(o["succ-detail-cells"]),children:[(0,_.jsxs)(i.G7,{className:"form-row",children:[(0,_.jsx)(i.G7,{className:"form-value",children:(0,_.jsx)(i.xv,{children:"\u672c\u6b21\u81ea\u6d4b\u5f97\u5206"})}),(0,_.jsx)(i.xv,{className:o["succ-cell-ft"],children:(0,_.jsxs)(i.xv,{className:o["succ-score"],children:[f," \u5206"]})})]}),(0,_.jsxs)(i.G7,{className:"form-row",children:[(0,_.jsx)(i.G7,{className:"form-value",children:(0,_.jsx)(i.xv,{children:"\u63d0\u4ea4\u65f6\u95f4"})}),(0,_.jsx)(i.xv,{className:o["succ-cell-ft"],children:(0,x.p6)((new Date).toISOString())})]}),(0,_.jsxs)(i.G7,{className:"form-row",children:[(0,_.jsx)(i.G7,{className:"form-value",children:(0,_.jsx)(i.xv,{children:"\u63d0\u4ea4\u7f16\u53f7"})}),(0,_.jsx)(i.xv,{className:o["succ-cell-ft"],children:(0,_.jsx)(i.xv,{className:o["succ-id"],children:h||"-"})})]})]})}),(0,_.jsx)(i.G7,{className:"".concat(o["succ-opr-area"]," ").concat(o["succ-btn-area"]),children:(0,_.jsxs)(i.G7,{className:o["succ-btn-row"],children:[(0,_.jsx)(i.G7,{className:"btn btn--default",onClick:C,style:{flex:1},children:(0,_.jsx)(i.xv,{children:"\u7535\u8bdd\u54a8\u8be2"})}),(0,_.jsx)(i.G7,{className:"btn btn--primary",onClick:y,style:{flex:1},children:(0,_.jsx)(i.xv,{children:"\u7acb\u5373\u9884\u7ea6"})})]})}),(0,_.jsx)(i.G7,{className:o["succ-tip"],children:(0,_.jsx)(i.xv,{className:"page-footer",children:"\ud83d\udca1 \u81ea\u6d4b\u7ed3\u679c\u4ec5\u4f9b\u53c2\u8003\uff0c\u5982\u75c7\u72b6\u6301\u7eed\u8bf7\u5c3d\u5feb\u5c31\u533b"})})]});if(!g)return(0,_.jsxs)(i.G7,{className:o["succ-page"],children:[(0,_.jsx)(i.G7,{className:o["succ-icon-area"],children:(0,_.jsx)(i.xv,{className:"".concat(o["succ-icon"]," ").concat(o["succ-icon--warn"]),children:"!"})}),(0,_.jsx)(i.G7,{className:o["succ-text-area"],children:(0,_.jsx)(i.xv,{className:o["succ-title"],children:"\u672a\u627e\u5230\u9884\u7ea6\u8bb0\u5f55"})}),(0,_.jsx)(i.G7,{className:o["succ-opr-area"],children:(0,_.jsx)(i.G7,{className:"btn btn--primary",onClick:k,style:{width:"100%"},children:(0,_.jsx)(i.xv,{children:"\u8fd4\u56de\u9996\u9875"})})})]});var I=[{icon:"\ud83c\udfe5",label:"\u9884\u7ea6\u533b\u9662",value:g.hospitalName},{icon:"\ud83d\udc64",label:"\u60a3\u8005",value:"".concat(g.patientName,"\uff08").concat(g.patientAge,"\u5c81\uff09")},{icon:"\ud83d\udcde",label:"\u8054\u7cfb\u7535\u8bdd",value:g.patientPhone,strong:!0},{icon:"\ud83e\ude7a",label:"\u5c31\u8bca\u79d1\u5ba4",value:g.departmentName},{icon:"\ud83d\udcc5",label:"\u9884\u7ea6\u65e5\u671f",value:(0,x.p6)(g.date),strong:!0}];return g.symptom&&I.push({icon:"\ud83d\udcdd",label:"\u75c5\u60c5\u63cf\u8ff0",value:g.symptom}),(0,_.jsxs)(i.G7,{className:o["succ-page"],children:[(0,_.jsx)(i.G7,{className:o["succ-icon-area"],children:(0,_.jsx)(i.xv,{className:o["succ-icon"],children:"\u2713"})}),(0,_.jsxs)(i.G7,{className:o["succ-text-area"],children:[(0,_.jsx)(i.xv,{className:o["succ-title"],children:"\u9884\u7ea6\u6210\u529f"}),(0,_.jsx)(i.xv,{className:o["succ-desc"],children:"\u8bf7\u4fdd\u6301\u624b\u673a\u7545\u901a\uff0c\u533b\u9662\u5c06\u5c3d\u5feb\u4e0e\u60a8\u8054\u7cfb"})]}),(0,_.jsx)(i.G7,{className:o["succ-opr-area"],children:(0,_.jsx)(i.G7,{className:"card ".concat(o["succ-detail-cells"]),children:I.map(function(c,e){return(0,_.jsxs)(i.G7,{className:"form-row",onClick:"\ud83d\udcde"===c.icon?function(){return S(c.value)}:void 0,children:[(0,_.jsx)(i.G7,{className:"form-value",children:(0,_.jsxs)(i.xv,{children:[c.icon," ",c.label]})}),(0,_.jsx)(i.xv,{className:o["succ-cell-ft"],children:(0,_.jsx)(i.xv,{className:c.strong?o["succ-strong"]:"",children:c.value})})]},e)})})}),(0,_.jsx)(i.G7,{className:"".concat(o["succ-opr-area"]," ").concat(o["succ-btn-area"]),children:(0,_.jsx)(i.G7,{className:"btn btn--primary",onClick:k,style:{width:"100%"},children:(0,_.jsx)(i.xv,{children:"\u8fd4\u56de\u9996\u9875"})})}),(0,_.jsx)(i.G7,{className:o["succ-tip"],children:(0,_.jsx)(i.xv,{className:"page-footer",children:"\u26a0\ufe0f \u5c31\u8bca\u5f53\u65e5\u8bf7\u63d0\u524d 30 \u5206\u949f\u5230\u9662\uff0c\u51ed\u6709\u6548\u8bc1\u4ef6\u5230\u5bfc\u8bca\u53f0\u62a5\u5230"})})]})},h=m,v={navigationBarTitleText:"\u9884\u7ea6\u6210\u529f",enablePullDownRefresh:!1},j=(0,a.R4)(h,"pages/success/index",{root:{cn:[]}},v||{});h&&h.behaviors&&(j.behaviors=(j.behaviors||[]).concat(h.behaviors));Page(j)}},function(c){var e=function(e){return c(c.s=e)};c.O(0,[107,216,592],function(){return e(2344)});c.O()}]); |