acdr-ui/dist/build/mp-weixin/pages/certification/index.js

2 lines
2.2 KiB
JavaScript
Raw Normal View History

2024-09-19 07:20:14 +08:00
"use strict";var e=(e,t,r)=>new Promise(((o,n)=>{var i=e=>{try{u(r.next(e))}catch(t){n(t)}},s=e=>{try{u(r.throw(e))}catch(t){n(t)}},u=e=>e.done?o(e.value):Promise.resolve(e.value).then(i,s);u((r=r.apply(e,t)).next())}));const t=require("../../common/vendor.js");require("../../store/index.js");const r=require("../../utils/http.js"),o=require("../../utils/commUtils.js"),n=require("../../service/userService.js"),i=require("../../store/user.js");if(!Array){(t.resolveComponent("wd-popup")+t.resolveComponent("layout-default-uni"))()}Math||(s+u+(()=>"../../node-modules/wot-design-uni/components/wd-popup/wd-popup.js"))();const s=()=>"../../components/TopBar.js",u=()=>"./components/certPopup.js",a={__name:"index",setup(s){const u=i.useUserStore(),a=t.ref({}),c=t.ref(!u.userInfo.isPetNursery&&!1),l=t.ref(!1),p=t.ref(""),f=()=>{c.value=!1,t.index.navigateBack()},d=()=>{c.value=!1},v=()=>e(this,null,(function*(){const e=yield r.httpGet("/petInfo/getExpertInfo");if(200==e.code)a.value=e.data,u.userInfo.isPetNursery||(yield n.getUserInfo());else{const e=yield r.httpGet("/petInfo/getApplyState");if(200==e.code&&(l.value=!0,p.value=e.data,"已通过"==e.data)){if((yield n.getUserInfo()).isPetNursery){const e=yield r.httpGet("/petInfo/getExpertInfo");200==e.code&&(a.value=e.data)}}}})),m=e=>new Date(e).toLocaleDateString();t.onLoad((()=>e(this,null,(function*(){yield v()}))));const y=()=>{t.index.navigateTo({url:"/pages/certification/pet-sitter"})};return(e,r)=>t.e({a:!l.value||t.unref(u).userInfo.isPetNursery},!l.value||t.unref(u).userInfo.isPetNursery?t.e({b:!t.unref(u).userInfo.isPetNursery},t.unref(u).userInfo.isPetNursery?{i:t.unref(o.imgUrl)("@/static/certification/cert.png"),j:t.t(a.value.cardId),k:t.t(a.value.type||"宠托师"),l:t.t(a.value.serviceNumber),m:t.t(m(a.value.createTime)),n:t.t(m(a.value.expiredTime)),o:t.t(m(a.value.updateTime))}:{c:t.unref(o.imgUrl)("@/static/certification/wy.png"),d:t.o(y),e:t.unref(o.imgUrl)("@/static/certification/wyl.png"),f:t.o(y),g:t.unref(o.imgUrl)("@/static/certification/mr.png"),h:t.o(y)}):{p:t.t(p.value)},{q:t.o(d),r:t.o(f),s:t.o((e=>c.value=e)),t:t.p({"close-on-click-modal":!1,position:"center",modelValue:c.value})})}},c=t._export_sfc(a,[["__scopeId","data-v-40cc6571"]]);wx.createPage(c);