diff --git a/.gitignore b/.gitignore index c2658d7..e768632 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules/ +node_modules diff --git a/.gitignore 2 b/.gitignore 2 new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/.gitignore 2 @@ -0,0 +1 @@ +node_modules/ diff --git a/App.vue b/App 2.vue similarity index 100% rename from App.vue rename to App 2.vue diff --git a/dist/build/mp-weixin/app.js b/dist/build/mp-weixin/app.js index 9340545..e5ac314 100644 --- a/dist/build/mp-weixin/app.js +++ b/dist/build/mp-weixin/app.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common/vendor.js"),n=require("./utils/session.js");Math;function r(){setTimeout(()=>{try{if(n.isLoggedIn())return;const r=getCurrentPages(),t=r[r.length-1];if((e=>!(!e||!e.includes("pages/login/Login")&&!e.includes("pages/report-view/reportView")))(t&&t.route?t.route:""))return;e.index.reLaunch({url:"/pages/login/Login"})}catch(r){e.index.reLaunch({url:"/pages/login/Login"})}},50)}const t={onLaunch(){r()},onShow(){r()}};function o(){return{app:e.createSSRApp(t)}}o().app.mount("#app"),exports.createApp=o; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common/vendor.js"),n=require("./utils/session.js");Math;function t(){setTimeout(()=>{try{if(n.isLoggedIn())return;const t=getCurrentPages();if(0===t.length)return;const r=t[t.length-1];if((e=>!(!e||!e.includes("pages/login/Login")&&!e.includes("pages/report-view/reportView")))(r&&r.route?r.route:""))return;e.index.reLaunch({url:"/pages/login/Login"})}catch(t){e.index.reLaunch({url:"/pages/login/Login"})}},50)}const r={onLaunch(){t()},onShow(){t()}};function o(){return{app:e.createSSRApp(r)}}o().app.mount("#app"),exports.createApp=o; diff --git a/dist/build/mp-weixin/pages/home/Home.js b/dist/build/mp-weixin/pages/home/Home.js index 91f76eb..a145d4d 100644 --- a/dist/build/mp-weixin/pages/home/Home.js +++ b/dist/build/mp-weixin/pages/home/Home.js @@ -1 +1 @@ -"use strict";const e=require("../../common/vendor.js"),t=require("../../api/index.js"),a=require("../../utils/session.js"),n=require("../../composables/useNavigator.js"),i=require("../../utils/datetime.js"),s=require("../../utils/appointment.js");Math||(l+o)();const o=()=>"../../components/TabBar.js",l=()=>"../../components/AppIcon.js",u={__name:"Home",emits:["change-page"],setup(o,{emit:l}){const u=a.getUserSession(),p=a.getStoreSession();u.id;const{goPage:r,navigateTo:c}=n.useNavigator(),v=(()=>{var t,a,n,i;const s=(null==(a=(t=e.index).getSystemInfoSync)?void 0:a.call(t).statusBarHeight)||20;let o=s+44;const l=null==(i=(n=e.index).getMenuButtonBoundingClientRect)?void 0:i.call(n);if(l&&l.top&&l.height){o=s+2*Math.max(l.top-s,4)+l.height}return`padding-top:${s}px;height:${o}px;`})(),d=e.ref("doing"),m=[{title:"待确认",name:"new"},{title:"进行中",name:"doing"},{title:"已完成",name:"done"}],T=e.ref([]),g=e.computed(()=>T.value.filter(e=>"new"===e.status).length),f=e.ref([]),h=e.ref(!1),y=e.ref(!1),w=[{label:"猫",value:"猫"},{label:"狗",value:"狗"},{label:"其他",value:"其他"}],x=e.ref({petName:"",petType:"",serviceType:"",appointmentTime:"",remark:""}),N=e.computed(()=>{const e=x.value.appointmentTime||"";return e.includes("T")?e.split("T")[0]:""}),$=e.computed(()=>{const e=x.value.appointmentTime||"";return e.includes("T")?(e.split("T")[1]||"").slice(0,5):""}),j=e.computed(()=>T.value.filter(e=>"new"===d.value?"new"===e.status:"doing"===d.value?"doing"===e.status:"done"!==d.value||("done"===e.status||"cancel"===e.status))),S=e=>{var t;const a=(null==(t=null==e?void 0:e.detail)?void 0:t.value)||"",n=$.value||"00:00";x.value.appointmentTime=a?`${a}T${n}`:""},b=t=>{var a;const n=(null==(a=null==t?void 0:t.detail)?void 0:a.value)||"",i=N.value;i?x.value.appointmentTime=`${i}T${n}`:e.index.showToast({title:"请先选择日期",icon:"none"})},q=async()=>{if(!p.id)return;const a=await t.getAppointmentList(null,p.id);if(200===a.code){T.value=a.data.map(e=>({id:e.id,title:e.serviceType||"洗澡美容预约",desc:`${e.petType||""} - ${e.petName||""}`,time:i.formatDateTimeCN(e.appointmentTime),status:e.status||"new",statusText:s.getAppointmentStatusText(e.status),petName:e.petName,petType:e.petType,serviceType:e.serviceType,appointmentTime:e.appointmentTime}));const t=T.value.filter(e=>"new"===e.status).length;t>0&&e.index.showToast({title:`有 ${t} 个待确认预约`,icon:"none"})}},A=async()=>{const a=x.value;if(!a.petName)return void e.index.showToast({title:"请输入宠物名字",icon:"none"});if(!a.petType)return void e.index.showToast({title:"请选择宠物类型",icon:"none"});if(!a.serviceType)return void e.index.showToast({title:"请选择服务类型",icon:"none"});if(!a.appointmentTime)return void e.index.showToast({title:"请选择预约时间",icon:"none"});y.value=!0;const n=await t.createAppointment({...a,storeId:p.id,userId:u.id});y.value=!1,200===n.code?(e.index.showToast({title:"预约创建成功",icon:"success"}),x.value={petName:"",petType:"",serviceType:"",appointmentTime:"",remark:""},h.value=!1,q()):e.index.showToast({title:n.message||"创建失败",icon:"none"})};return e.onMounted(()=>{q(),(async()=>{if(!p.id)return;const e=await t.getServiceTypeList(p.id);200===e.code&&(f.value=e.data.map(e=>({label:e.name,value:e.name})))})()}),(a,n)=>e.e({a:e.o(e=>h.value=!0),b:e.s(e.unref(v)),c:e.f(m,(t,a,n)=>e.e({a:e.t(t.title),b:"new"===t.name&&g.value>0},"new"===t.name&&g.value>0?{c:e.t(g.value)}:{},{d:t.name,e:e.n({active:d.value===t.name}),f:e.o(e=>d.value=t.name,t.name)})),d:j.value.length>0},j.value.length>0?{e:e.f(j.value,(a,n,i)=>{return e.e({a:e.n(`dot-${a.status}`),b:"d5a02c57-0-"+i,c:e.t(a.petName),d:e.t(a.statusText),e:e.n((o=a.status,s.getAppointmentTagClass(o))),f:e.t(a.serviceType),g:e.n(`tag-${a.status}`),h:"d5a02c57-1-"+i,i:e.t(a.time),j:"new"===a.status},"new"===a.status?{k:e.o(n=>(async a=>{const n=await t.startAppointment(a.id,u.id);200===n.code?(e.index.showToast({title:"已开始服务",icon:"success"}),q()):e.index.showToast({title:n.message||"操作失败",icon:"none"})})(a),a.id),l:e.o(n=>(async a=>{e.index.showModal({title:"提示",content:"确定取消该预约?",success:async n=>{if(!n.confirm)return;const i=await t.cancelAppointment(a.id);200===i.code?(e.index.showToast({title:"已取消",icon:"success"}),q()):e.index.showToast({title:i.message||"操作失败",icon:"none"})}})})(a),a.id)}:"doing"===a.status?{n:e.o(t=>(t=>{c("report"),e.index.setStorageSync("petstore_report_prefill",JSON.stringify({appointmentId:t.id,petName:t.petName,serviceType:t.serviceType,appointmentTime:t.appointmentTime}))})(a),a.id)}:{o:e.t("cancel"===a.status?"已取消":"已完成")},{m:"doing"===a.status,p:e.n(`card-${a.status}`),q:a.id});var o}),f:e.p({name:"profile",size:14}),g:e.p({name:"orders",size:13})}:{},{h:0===j.value.length},(j.value.length,{}),{i:h.value},h.value?{j:e.o(e=>h.value=!1),k:x.value.petName,l:e.o(e=>x.value.petName=e.detail.value),m:e.t(x.value.petType||"请选择"),n:w,o:e.o(e=>x.value.petType=w[e.detail.value].value),p:e.t(x.value.serviceType||"请选择"),q:f.value,r:e.o(e=>x.value.serviceType=f.value[e.detail.value].value),s:e.t(N.value||"请选择日期"),t:N.value,v:e.o(S),w:e.t($.value||"请选择时间"),x:$.value,y:e.o(b),z:x.value.remark,A:e.o(e=>x.value.remark=e.detail.value),B:e.o(e=>h.value=!1),C:y.value,D:e.o(A),E:e.o(()=>{}),F:e.o(e=>h.value=!1)}:{},{G:e.o(e.unref(r)),H:e.p({"current-page":"home"})})}},p=e._export_sfc(u,[["__scopeId","data-v-d5a02c57"]]);wx.createPage(p); +"use strict";const e=require("../../common/vendor.js"),t=require("../../api/index.js"),a=require("../../utils/session.js"),n=require("../../composables/useNavigator.js"),i=require("../../utils/datetime.js"),o=require("../../utils/appointment.js");Math||(l+s)();const s=()=>"../../components/TabBar.js",l=()=>"../../components/AppIcon.js",u={__name:"Home",emits:["change-page"],setup(s,{emit:l}){const u=a.getUserSession(),p=a.getStoreSession();u.id;const{goPage:v,navigateTo:r}=n.useNavigator(),c=(()=>{var t,a,n,i;const o=(null==(a=(t=e.index).getSystemInfoSync)?void 0:a.call(t).statusBarHeight)||20;let s=o+44;const l=null==(i=(n=e.index).getMenuButtonBoundingClientRect)?void 0:i.call(n);if(l&&l.top&&l.height){s=o+2*Math.max(l.top-o,4)+l.height}return`padding-top:${o}px;height:${s}px;`})(),m=e.ref("doing"),d=[{title:"待确认",name:"new"},{title:"进行中",name:"doing"},{title:"已完成",name:"done"}],T=e.ref([]),g=e.computed(()=>T.value.filter(e=>"new"===e.status).length),f=e.ref([]),y=e.ref(!1),h=e.ref(!1),w=[{label:"猫",value:"猫"},{label:"狗",value:"狗"},{label:"其他",value:"其他"}],x=e.ref({petName:"",petType:"",serviceType:"",appointmentTime:"",remark:""}),N=e.computed(()=>{const e=x.value.appointmentTime||"";return e.includes("T")?e.split("T")[0]:""}),$=e.computed(()=>{const e=x.value.appointmentTime||"";return e.includes("T")?(e.split("T")[1]||"").slice(0,5):""}),S=e.computed(()=>T.value.filter(e=>"new"===m.value?"new"===e.status:"doing"===m.value?"doing"===e.status:"done"!==m.value||("done"===e.status||"cancel"===e.status))),b=e=>{var t;const a=(null==(t=null==e?void 0:e.detail)?void 0:t.value)||"",n=$.value||"00:00";x.value.appointmentTime=a?`${a}T${n}`:""},j=t=>{var a;const n=(null==(a=null==t?void 0:t.detail)?void 0:a.value)||"",i=N.value;i?x.value.appointmentTime=`${i}T${n}`:e.index.showToast({title:"请先选择日期",icon:"none"})},k=async()=>{if(!p.id)return;const a=await t.getAppointmentList(null,p.id);if(200===a.code){T.value=a.data.map(e=>({id:e.id,title:e.serviceType||"洗澡美容预约",desc:`${e.petType||""} - ${e.petName||""}`,time:i.formatDateTimeCN(e.appointmentTime),status:e.status||"new",statusText:o.getAppointmentStatusText(e.status),petName:e.petName,petType:e.petType,serviceType:e.serviceType,appointmentTime:e.appointmentTime}));const t=T.value.filter(e=>"new"===e.status).length;t>0&&e.index.showToast({title:`有 ${t} 个待确认预约`,icon:"none"})}},q=async()=>{const a=x.value;if(!a.petName)return void e.index.showToast({title:"请输入宠物名字",icon:"none"});if(!a.petType)return void e.index.showToast({title:"请选择宠物类型",icon:"none"});if(!a.serviceType)return void e.index.showToast({title:"请选择服务类型",icon:"none"});if(!a.appointmentTime)return void e.index.showToast({title:"请选择预约时间",icon:"none"});h.value=!0;const n=await t.createAppointment({...a,storeId:p.id,userId:u.id});h.value=!1,200===n.code?(e.index.showToast({title:"预约创建成功",icon:"success"}),x.value={petName:"",petType:"",serviceType:"",appointmentTime:"",remark:""},y.value=!1,k()):e.index.showToast({title:n.message||"创建失败",icon:"none"})};return e.onMounted(()=>{k(),(async()=>{if(!p.id)return;const e=await t.getServiceTypeList(p.id);200===e.code&&(f.value=e.data.map(e=>({label:e.name,value:e.name})))})()}),(a,n)=>e.e({a:"customer"===e.unref(u).role},"customer"===e.unref(u).role?{b:e.s(e.unref(c)),c:e.t(e.unref(p).name||"宠伴生活馆"),d:x.value.petName,e:e.o(e=>x.value.petName=e.detail.value),f:e.t(x.value.petType||"请选择"),g:w,h:e.o(e=>x.value.petType=w[e.detail.value].value),i:e.t(x.value.serviceType||"请选择"),j:f.value,k:e.o(e=>x.value.serviceType=f.value[e.detail.value].value),l:e.t(N.value||"请选择日期"),m:N.value,n:e.o(b),o:e.t($.value||"请选择时间"),p:$.value,q:e.o(j),r:x.value.remark,s:e.o(e=>x.value.remark=e.detail.value),t:h.value,v:e.o(q)}:e.e({w:e.o(e=>y.value=!0),x:e.s(e.unref(c)),y:e.f(d,(t,a,n)=>e.e({a:e.t(t.title),b:"new"===t.name&&g.value>0},"new"===t.name&&g.value>0?{c:e.t(g.value)}:{},{d:t.name,e:e.n({active:m.value===t.name}),f:e.o(e=>m.value=t.name,t.name)})),z:S.value.length>0},S.value.length>0?{A:e.f(S.value,(a,n,i)=>{return e.e({a:e.n(`dot-${a.status}`),b:"36a15fc8-0-"+i,c:e.t(a.petName),d:e.t(a.statusText),e:e.n((s=a.status,o.getAppointmentTagClass(s))),f:e.t(a.serviceType),g:e.n(`tag-${a.status}`),h:"36a15fc8-1-"+i,i:e.t(a.time),j:"new"===a.status},"new"===a.status?{k:e.o(n=>(async a=>{const n=await t.startAppointment(a.id,u.id);200===n.code?(e.index.showToast({title:"已开始服务",icon:"success"}),k()):e.index.showToast({title:n.message||"操作失败",icon:"none"})})(a),a.id),l:e.o(n=>(async a=>{e.index.showModal({title:"提示",content:"确定取消该预约?",success:async n=>{if(!n.confirm)return;const i=await t.cancelAppointment(a.id);200===i.code?(e.index.showToast({title:"已取消",icon:"success"}),k()):e.index.showToast({title:i.message||"操作失败",icon:"none"})}})})(a),a.id)}:"doing"===a.status?{n:e.o(t=>(t=>{r("report"),e.index.setStorageSync("petstore_report_prefill",JSON.stringify({appointmentId:t.id,petName:t.petName,serviceType:t.serviceType,appointmentTime:t.appointmentTime}))})(a),a.id)}:{o:e.t("cancel"===a.status?"已取消":"已完成")},{m:"doing"===a.status,p:e.n(`card-${a.status}`),q:a.id});var s}),B:e.p({name:"profile",size:14}),C:e.p({name:"orders",size:13})}:{},{D:0===S.value.length},(S.value.length,{}),{E:y.value},y.value?{F:e.o(e=>y.value=!1),G:x.value.petName,H:e.o(e=>x.value.petName=e.detail.value),I:e.t(x.value.petType||"请选择"),J:w,K:e.o(e=>x.value.petType=w[e.detail.value].value),L:e.t(x.value.serviceType||"请选择"),M:f.value,N:e.o(e=>x.value.serviceType=f.value[e.detail.value].value),O:e.t(N.value||"请选择日期"),P:N.value,Q:e.o(b),R:e.t($.value||"请选择时间"),S:$.value,T:e.o(j),U:x.value.remark,V:e.o(e=>x.value.remark=e.detail.value),W:e.o(e=>y.value=!1),X:h.value,Y:e.o(q),Z:e.o(()=>{}),aa:e.o(e=>y.value=!1)}:{}),{ab:e.o(e.unref(v)),ac:e.p({"current-page":"home"})})}},p=e._export_sfc(u,[["__scopeId","data-v-36a15fc8"]]);wx.createPage(p); diff --git a/dist/build/mp-weixin/pages/home/Home.wxml b/dist/build/mp-weixin/pages/home/Home.wxml index 3674aa0..e34976d 100644 --- a/dist/build/mp-weixin/pages/home/Home.wxml +++ b/dist/build/mp-weixin/pages/home/Home.wxml @@ -1 +1 @@ -宠伴生活馆新建预约今日服务看板待确认、进行中、已完成实时同步,支持一键开始服务与快速填报。{{tab.a}} {{tab.c}}{{item.c}}{{item.d}}{{item.f}}{{item.i}}开始服务取消填写报告{{item.o}}暂无数据新建预约✕填写基础信息后即可创建预约,后续可在列表中继续处理。宠物名字宠物类型{{m}}服务类型{{p}}预约日期{{s}}预约时间{{w}}备注(可选)取消确认创建 \ No newline at end of file +宠伴生活馆{{c}}宠物服务,让爱更专业预约服务宠物名字宠物类型{{f}}服务类型{{i}}预约日期{{l}}预约时间{{o}}备注(可选)提交预约宠伴生活馆新建预约今日服务看板待确认、进行中、已完成实时同步,支持一键开始服务与快速填报。{{tab.a}} {{tab.c}}{{item.c}}{{item.d}}{{item.f}}{{item.i}}开始服务取消填写报告{{item.o}}暂无数据新建预约✕填写基础信息后即可创建预约,后续可在列表中继续处理。宠物名字宠物类型{{I}}服务类型{{L}}预约日期{{O}}预约时间{{R}}备注(可选)取消确认创建 \ No newline at end of file diff --git a/dist/build/mp-weixin/pages/home/Home.wxss b/dist/build/mp-weixin/pages/home/Home.wxss index 88623e2..194cb05 100644 --- a/dist/build/mp-weixin/pages/home/Home.wxss +++ b/dist/build/mp-weixin/pages/home/Home.wxss @@ -1 +1 @@ -.home-page.data-v-d5a02c57{padding-bottom:140rpx}.home-nav.data-v-d5a02c57{padding:0 16px 10px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:10}.nav-title.data-v-d5a02c57{font-size:18px;font-weight:700;color:#fff;letter-spacing:.5px}.home-hero.data-v-d5a02c57{margin-top:12px;padding:14px 16px;border:1px solid #dcefe3;border-radius:14px;background:linear-gradient(135deg,#f3fff7,#ecfbf3)}.hero-title.data-v-d5a02c57{font-size:16px;font-weight:700;color:#166534}.hero-sub.data-v-d5a02c57{margin-top:4px;font-size:12px;color:#4b5563;line-height:1.45}.list-content.data-v-d5a02c57{padding:0}.btn-primary.data-v-d5a02c57{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 16px;font-size:14px;border-radius:10px;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;border:none;cursor:pointer;font-weight:600;box-shadow:0 6px 14px rgba(34,197,94,.22)}.btn-secondary.data-v-d5a02c57{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 14px;font-size:14px;border-radius:10px;background:#f8fafc;color:#334155;border:1px solid #dbe3ee;cursor:pointer}.btn-block.data-v-d5a02c57{display:inline-flex;align-items:center;justify-content:center;flex:1;height:44px;font-size:16px;border-radius:8px;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;border:none;cursor:pointer}.btn-ghost.data-v-d5a02c57{display:inline-flex;align-items:center;justify-content:center;width:96px;height:44px;border-radius:8px;border:1px solid #dbe3ee;background:#fff;color:#64748b;font-size:15px}.remark-textarea.data-v-d5a02c57{min-height:84px;line-height:1.45}.custom-tabs.data-v-d5a02c57{display:flex;background:#fff;border:1px solid #e8edf4;border-radius:14px;box-shadow:0 4px 16px rgba(15,23,42,.05);margin:12px 0 0;padding:0 12px}.tab-item.data-v-d5a02c57{flex:1;text-align:center;padding:12px 0;font-size:15px;color:#999;cursor:pointer;position:relative}.tab-item.active.data-v-d5a02c57{color:#16a34a;font-weight:600}.tab-item.active.data-v-d5a02c57:after{content:"";position:absolute;bottom:0;left:50%;transform:translate(-50%);width:40px;height:3px;background:#16a34a;border-radius:2px}.tab-badge.data-v-d5a02c57{position:absolute;top:6px;right:12px;background:#ef4444;color:#fff;font-size:10px;font-weight:700;padding:0 5px;height:16px;line-height:16px;border-radius:8px;min-width:8px;text-align:center}.tag-warning.data-v-d5a02c57{display:inline-flex;align-items:center;font-size:12px;padding:2px 8px;border-radius:10px;background:#fff3e8;color:#ff6b35;font-weight:500}.tag-primary.data-v-d5a02c57{display:inline-flex;align-items:center;font-size:12px;padding:2px 8px;border-radius:10px;background:#e8f7ef;color:#07c160;font-weight:500}.tag-success.data-v-d5a02c57{display:inline-flex;align-items:center;font-size:12px;padding:2px 8px;border-radius:10px;background:#f0f0f0;color:#888;font-weight:500}.tag-default.data-v-d5a02c57{display:inline-flex;align-items:center;font-size:12px;padding:2px 8px;border-radius:10px;background:#f5f5f5;color:#999;font-weight:500}.van-field.data-v-d5a02c57{display:flex;align-items:center;background:#f5f5f5;border-radius:8px;padding:8px 12px;color:#333;min-height:40px;font-size:14px;width:100%;box-sizing:border-box}.timeline.data-v-d5a02c57{padding:4px 0}.timeline-item.data-v-d5a02c57{display:flex;align-items:flex-start;margin-bottom:4px;position:relative}.timeline-dot.data-v-d5a02c57{display:flex;flex-direction:column;align-items:center;width:24px;flex-shrink:0;padding-top:14px}.dot-inner.data-v-d5a02c57{width:12px;height:12px;border-radius:50%;background:#fff;z-index:1}.dot-new .dot-inner.data-v-d5a02c57{background:#ff6b35}.dot-doing .dot-inner.data-v-d5a02c57{background:#07c160}.dot-done .dot-inner.data-v-d5a02c57{background:silver}.dot-cancel .dot-inner.data-v-d5a02c57{background:#d0d0d0}.timeline-line.data-v-d5a02c57{position:absolute;left:11px;top:28px;bottom:-4px;width:2px;background:#e8e0d8}.timeline-item:last-child .timeline-line.data-v-d5a02c57{display:none}.order-card.data-v-d5a02c57{flex:1;background:#fff;border-radius:14px;padding:14px 16px;margin-left:12px;margin-bottom:12px;box-shadow:0 8px 18px rgba(15,23,42,.06);border-left:4px solid;border:1px solid #e8edf4}.card-new.data-v-d5a02c57{border-left-color:#ff6b35}.card-doing.data-v-d5a02c57{border-left-color:#07c160}.card-done.data-v-d5a02c57{border-left-color:silver}.card-cancel.data-v-d5a02c57{border-left-color:#d8d8d8;opacity:.7}.card-header.data-v-d5a02c57{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.pet-info.data-v-d5a02c57{display:flex;align-items:center;gap:8px}.pet-emoji.data-v-d5a02c57{width:20px;height:20px;border-radius:6px;background:#eef2f7;display:inline-flex;align-items:center;justify-content:center}.pet-name.data-v-d5a02c57{font-weight:600;color:#333;font-size:15px}.service-row.data-v-d5a02c57{margin-bottom:8px}.service-tag.data-v-d5a02c57{font-size:12px;background:#fdf6f0;color:#8b5e3c;padding:2px 8px;border-radius:10px;font-weight:500}.tag-new.data-v-d5a02c57{background:#fff3e8;color:#ff6b35}.tag-doing.data-v-d5a02c57{background:#e8f7ef;color:#07c160}.tag-done.data-v-d5a02c57{background:#f0f0f0;color:#888}.card-body.data-v-d5a02c57{margin-bottom:10px}.card-time.data-v-d5a02c57{font-size:13px;color:#6b7280;display:inline-flex;align-items:center;gap:4px}.card-footer.data-v-d5a02c57{display:flex;justify-content:flex-end;align-items:center}.action-btns.data-v-d5a02c57{display:flex;gap:8px}.done-label.data-v-d5a02c57{font-size:13px;color:#999}.popup-mask.data-v-d5a02c57{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:3000;display:flex;align-items:flex-end;justify-content:center}.popup-content.data-v-d5a02c57{background:#fff;border-radius:20px 20px 0 0;width:430px;max-width:100%;height:calc(100vh - 24px);max-height:calc(100vh - 24px);display:flex;flex-direction:column;position:relative}.popup-header.data-v-d5a02c57{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #f0f0f0}.popup-title.data-v-d5a02c57{font-size:16px;font-weight:600}.popup-close.data-v-d5a02c57{font-size:18px;color:#999}.popup-body.data-v-d5a02c57{padding:16px 20px 120px;overflow-y:auto;flex:1}.popup-footer.data-v-d5a02c57{position:absolute;left:0;right:0;bottom:0;background:#fff;border-top:1px solid #eef2f7;padding:10px 20px max(env(safe-area-inset-bottom),16px);z-index:2}.popup-desc.data-v-d5a02c57{font-size:12px;color:#6b7280;line-height:1.45;margin-bottom:10px}.popup-actions.data-v-d5a02c57{display:flex;align-items:center;gap:10px}.field-label.data-v-d5a02c57{font-size:14px;color:#666;margin-bottom:6px;margin-top:12px}.picker-field.data-v-d5a02c57{display:flex;align-items:center;background:#f5f5f5;border-radius:8px;padding:8px 12px;color:#333;min-height:40px;font-size:14px;width:100%;box-sizing:border-box} +.home-page.data-v-36a15fc8{padding-bottom:140rpx}.home-nav.data-v-36a15fc8{padding:0 16px 10px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:10}.nav-title.data-v-36a15fc8{font-size:18px;font-weight:700;color:#fff;letter-spacing:.5px}.home-hero.data-v-36a15fc8{margin-top:12px;padding:14px 16px;border:1px solid #dcefe3;border-radius:14px;background:linear-gradient(135deg,#f3fff7,#ecfbf3)}.hero-title.data-v-36a15fc8{font-size:16px;font-weight:700;color:#166534}.hero-sub.data-v-36a15fc8{margin-top:4px;font-size:12px;color:#4b5563;line-height:1.45}.list-content.data-v-36a15fc8{padding:0}.c-header.data-v-36a15fc8{background:linear-gradient(135deg,#07c160,#10b76f);padding:20px 20px 40px;text-align:center;color:#fff;border-radius:0 0 24px 24px}.c-title.data-v-36a15fc8{font-size:24px;font-weight:700;margin-bottom:8px}.c-sub.data-v-36a15fc8{font-size:14px;opacity:.8}.c-booking-card.data-v-36a15fc8{background:#fff;border-radius:16px;margin:-20px 16px 0;padding:24px 20px;box-shadow:0 4px 12px rgba(0,0,0,.05)}.c-booking-title.data-v-36a15fc8{font-size:18px;font-weight:600;color:#333;margin-bottom:20px;text-align:center}.btn-primary.data-v-36a15fc8{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 16px;font-size:14px;border-radius:10px;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;border:none;cursor:pointer;font-weight:600;box-shadow:0 6px 14px rgba(34,197,94,.22)}.btn-secondary.data-v-36a15fc8{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 14px;font-size:14px;border-radius:10px;background:#f8fafc;color:#334155;border:1px solid #dbe3ee;cursor:pointer}.btn-block.data-v-36a15fc8{display:inline-flex;align-items:center;justify-content:center;flex:1;height:44px;font-size:16px;border-radius:8px;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;border:none;cursor:pointer}.btn-ghost.data-v-36a15fc8{display:inline-flex;align-items:center;justify-content:center;width:96px;height:44px;border-radius:8px;border:1px solid #dbe3ee;background:#fff;color:#64748b;font-size:15px}.remark-textarea.data-v-36a15fc8{min-height:84px;line-height:1.45}.custom-tabs.data-v-36a15fc8{display:flex;background:#fff;border:1px solid #e8edf4;border-radius:14px;box-shadow:0 4px 16px rgba(15,23,42,.05);margin:12px 0 0;padding:0 12px}.tab-item.data-v-36a15fc8{flex:1;text-align:center;padding:12px 0;font-size:15px;color:#999;cursor:pointer;position:relative}.tab-item.active.data-v-36a15fc8{color:#16a34a;font-weight:600}.tab-item.active.data-v-36a15fc8:after{content:"";position:absolute;bottom:0;left:50%;transform:translate(-50%);width:40px;height:3px;background:#16a34a;border-radius:2px}.tab-badge.data-v-36a15fc8{position:absolute;top:6px;right:12px;background:#ef4444;color:#fff;font-size:10px;font-weight:700;padding:0 5px;height:16px;line-height:16px;border-radius:8px;min-width:8px;text-align:center}.tag-warning.data-v-36a15fc8{display:inline-flex;align-items:center;font-size:12px;padding:2px 8px;border-radius:10px;background:#fff3e8;color:#ff6b35;font-weight:500}.tag-primary.data-v-36a15fc8{display:inline-flex;align-items:center;font-size:12px;padding:2px 8px;border-radius:10px;background:#e8f7ef;color:#07c160;font-weight:500}.tag-success.data-v-36a15fc8{display:inline-flex;align-items:center;font-size:12px;padding:2px 8px;border-radius:10px;background:#f0f0f0;color:#888;font-weight:500}.tag-default.data-v-36a15fc8{display:inline-flex;align-items:center;font-size:12px;padding:2px 8px;border-radius:10px;background:#f5f5f5;color:#999;font-weight:500}.van-field.data-v-36a15fc8{display:flex;align-items:center;background:#f5f5f5;border-radius:8px;padding:8px 12px;color:#333;min-height:40px;font-size:14px;width:100%;box-sizing:border-box}.timeline.data-v-36a15fc8{padding:4px 0}.timeline-item.data-v-36a15fc8{display:flex;align-items:flex-start;margin-bottom:4px;position:relative}.timeline-dot.data-v-36a15fc8{display:flex;flex-direction:column;align-items:center;width:24px;flex-shrink:0;padding-top:14px}.dot-inner.data-v-36a15fc8{width:12px;height:12px;border-radius:50%;background:#fff;z-index:1}.dot-new .dot-inner.data-v-36a15fc8{background:#ff6b35}.dot-doing .dot-inner.data-v-36a15fc8{background:#07c160}.dot-done .dot-inner.data-v-36a15fc8{background:silver}.dot-cancel .dot-inner.data-v-36a15fc8{background:#d0d0d0}.timeline-line.data-v-36a15fc8{position:absolute;left:11px;top:28px;bottom:-4px;width:2px;background:#e8e0d8}.timeline-item:last-child .timeline-line.data-v-36a15fc8{display:none}.order-card.data-v-36a15fc8{flex:1;background:#fff;border-radius:14px;padding:14px 16px;margin-left:12px;margin-bottom:12px;box-shadow:0 8px 18px rgba(15,23,42,.06);border-left:4px solid;border:1px solid #e8edf4}.card-new.data-v-36a15fc8{border-left-color:#ff6b35}.card-doing.data-v-36a15fc8{border-left-color:#07c160}.card-done.data-v-36a15fc8{border-left-color:silver}.card-cancel.data-v-36a15fc8{border-left-color:#d8d8d8;opacity:.7}.card-header.data-v-36a15fc8{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.pet-info.data-v-36a15fc8{display:flex;align-items:center;gap:8px}.pet-emoji.data-v-36a15fc8{width:20px;height:20px;border-radius:6px;background:#eef2f7;display:inline-flex;align-items:center;justify-content:center}.pet-name.data-v-36a15fc8{font-weight:600;color:#333;font-size:15px}.service-row.data-v-36a15fc8{margin-bottom:8px}.service-tag.data-v-36a15fc8{font-size:12px;background:#fdf6f0;color:#8b5e3c;padding:2px 8px;border-radius:10px;font-weight:500}.tag-new.data-v-36a15fc8{background:#fff3e8;color:#ff6b35}.tag-doing.data-v-36a15fc8{background:#e8f7ef;color:#07c160}.tag-done.data-v-36a15fc8{background:#f0f0f0;color:#888}.card-body.data-v-36a15fc8{margin-bottom:10px}.card-time.data-v-36a15fc8{font-size:13px;color:#6b7280;display:inline-flex;align-items:center;gap:4px}.card-footer.data-v-36a15fc8{display:flex;justify-content:flex-end;align-items:center}.action-btns.data-v-36a15fc8{display:flex;gap:8px}.done-label.data-v-36a15fc8{font-size:13px;color:#999}.popup-mask.data-v-36a15fc8{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:3000;display:flex;align-items:flex-end;justify-content:center}.popup-content.data-v-36a15fc8{background:#fff;border-radius:20px 20px 0 0;width:430px;max-width:100%;height:calc(100vh - 24px);max-height:calc(100vh - 24px);display:flex;flex-direction:column;position:relative}.popup-header.data-v-36a15fc8{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #f0f0f0}.popup-title.data-v-36a15fc8{font-size:16px;font-weight:600}.popup-close.data-v-36a15fc8{font-size:18px;color:#999}.popup-body.data-v-36a15fc8{padding:16px 20px 120px;overflow-y:auto;flex:1}.popup-footer.data-v-36a15fc8{position:absolute;left:0;right:0;bottom:0;background:#fff;border-top:1px solid #eef2f7;padding:10px 20px max(env(safe-area-inset-bottom),16px);z-index:2}.popup-desc.data-v-36a15fc8{font-size:12px;color:#6b7280;line-height:1.45;margin-bottom:10px}.popup-actions.data-v-36a15fc8{display:flex;align-items:center;gap:10px}.field-label.data-v-36a15fc8{font-size:14px;color:#666;margin-bottom:6px;margin-top:12px}.picker-field.data-v-36a15fc8{display:flex;align-items:center;background:#f5f5f5;border-radius:8px;padding:8px 12px;color:#333;min-height:40px;font-size:14px;width:100%;box-sizing:border-box} diff --git a/dist/build/mp-weixin/pages/mine/Mine.js b/dist/build/mp-weixin/pages/mine/Mine.js index 77d8310..225cc2c 100644 --- a/dist/build/mp-weixin/pages/mine/Mine.js +++ b/dist/build/mp-weixin/pages/mine/Mine.js @@ -1 +1 @@ -"use strict";const e=require("../../common/vendor.js"),n=require("../../utils/session.js"),o=require("../../composables/useNavigator.js");Math||(t+r)();const r=()=>"../../components/TabBar.js",t=()=>"../../components/AppIcon.js",s={__name:"Mine",emits:["change-page"],setup(r,{emit:t}){const s=n.getUserSession(),{goPage:a,navigateTo:i}=o.useNavigator(),u=(()=>{var n,o,r,t;let s=((null==(o=(n=e.index).getSystemInfoSync)?void 0:o.call(n).statusBarHeight)||20)+12;const a=null==(t=(r=e.index).getMenuButtonBoundingClientRect)?void 0:t.call(r);return a&&a.top&&a.height&&(s=a.top+a.height+8),`padding-top:${s}px;`})(),c=e.computed(()=>s.name?s.name.slice(0,1).toUpperCase():"?"),p=e.computed(()=>{var e;if(s.avatar)return{};const n=["#ff7c43","#07c160","#8b6914","#e06040","#5090d0"];return{background:n[((null==(e=s.name)?void 0:e.charCodeAt(0))||0)%n.length]}}),f=()=>{e.index.showModal({title:"提示",content:"确定退出登录?",success:e=>{e.confirm&&(n.clearSession(),i("login"))}})};return(n,o)=>e.e({a:e.unref(s).avatar},e.unref(s).avatar?{b:e.unref(s).avatar}:{c:e.t(c.value)},{d:e.s(p.value),e:e.t(e.unref(s).name),f:e.t(e.unref(s).phone),g:e.t("boss"===e.unref(s).role?"店长":"员工"),h:e.s(e.unref(u)),i:e.o(n=>e.unref(i)("profile")),j:"boss"===e.unref(s).role},"boss"===e.unref(s).role?{k:e.p({name:"staff",size:15}),l:e.o(n=>e.unref(i)("staff")),m:e.p({name:"service",size:15}),n:e.o(n=>e.unref(i)("serviceType")),o:e.p({name:"store",size:15}),p:e.o(n=>e.unref(i)("store"))}:{},{q:e.p({name:"profile",size:15}),r:e.o(n=>e.unref(i)("profile")),s:e.p({name:"report",size:15}),t:e.o(n=>e.unref(i)("myReports")),v:e.p({name:"orders",size:15}),w:e.o(n=>e.unref(i)("myOrders")),x:e.p({name:"logout",size:15,color:"#dc2626"}),y:e.o(f),z:e.o(e.unref(a)),A:e.p({"current-page":"mine"})})}},a=e._export_sfc(s,[["__scopeId","data-v-27768e55"]]);wx.createPage(a); +"use strict";const e=require("../../common/vendor.js"),r=require("../../utils/session.js"),n=require("../../composables/useNavigator.js");Math||(t+o)();const o=()=>"../../components/TabBar.js",t=()=>"../../components/AppIcon.js",s={__name:"Mine",emits:["change-page"],setup(o,{emit:t}){const s=r.getUserSession(),{goPage:a,navigateTo:u}=n.useNavigator(),i=(()=>{var r,n,o,t;let s=((null==(n=(r=e.index).getSystemInfoSync)?void 0:n.call(r).statusBarHeight)||20)+12;const a=null==(t=(o=e.index).getMenuButtonBoundingClientRect)?void 0:t.call(o);return a&&a.top&&a.height&&(s=a.top+a.height+8),`padding-top:${s}px;`})(),c=e.computed(()=>s.name?s.name.slice(0,1).toUpperCase():"?"),p=e.computed(()=>{var e;if(s.avatar)return{};const r=["#ff7c43","#07c160","#8b6914","#e06040","#5090d0"];return{background:r[((null==(e=s.name)?void 0:e.charCodeAt(0))||0)%r.length]}}),f=()=>{e.index.showModal({title:"提示",content:"确定退出登录?",success:e=>{e.confirm&&(r.clearSession(),u("login"))}})};return(r,n)=>e.e({a:e.unref(s).avatar},e.unref(s).avatar?{b:e.unref(s).avatar}:{c:e.t(c.value)},{d:e.s(p.value),e:e.t(e.unref(s).name),f:e.t(e.unref(s).phone),g:e.t("boss"===e.unref(s).role?"店长":"customer"===e.unref(s).role?"客户":"员工"),h:e.s(e.unref(i)),i:e.o(r=>e.unref(u)("profile")),j:"boss"===e.unref(s).role},"boss"===e.unref(s).role?{k:e.p({name:"staff",size:15}),l:e.o(r=>e.unref(u)("staff")),m:e.p({name:"service",size:15}),n:e.o(r=>e.unref(u)("serviceType")),o:e.p({name:"store",size:15}),p:e.o(r=>e.unref(u)("store"))}:{},{q:e.p({name:"profile",size:15}),r:e.o(r=>e.unref(u)("profile")),s:"customer"!==e.unref(s).role},"customer"!==e.unref(s).role?{t:e.p({name:"report",size:15}),v:e.o(r=>e.unref(u)("myReports"))}:{},{w:e.p({name:"orders",size:15}),x:e.o(r=>e.unref(u)("myOrders")),y:e.p({name:"logout",size:15,color:"#dc2626"}),z:e.o(f),A:e.o(e.unref(a)),B:e.p({"current-page":"mine"})})}},a=e._export_sfc(s,[["__scopeId","data-v-5428c025"]]);wx.createPage(a); diff --git a/dist/build/mp-weixin/pages/mine/Mine.wxml b/dist/build/mp-weixin/pages/mine/Mine.wxml index d5c5870..f30473d 100644 --- a/dist/build/mp-weixin/pages/mine/Mine.wxml +++ b/dist/build/mp-weixin/pages/mine/Mine.wxml @@ -1 +1 @@ -{{c}}{{e}}{{f}}{{g}}店铺管理员工管理›服务类型›店铺设置›个人中心个人信息›我的报告›我的订单›退出登录 \ No newline at end of file +{{c}}{{e}}{{f}}{{g}}店铺管理员工管理›服务类型›店铺设置›个人中心个人信息›我的报告›我的订单›退出登录 \ No newline at end of file diff --git a/dist/build/mp-weixin/pages/mine/Mine.wxss b/dist/build/mp-weixin/pages/mine/Mine.wxss index 939f838..40fc9f8 100644 --- a/dist/build/mp-weixin/pages/mine/Mine.wxss +++ b/dist/build/mp-weixin/pages/mine/Mine.wxss @@ -1 +1 @@ -.mine-page.data-v-27768e55{padding-bottom:140rpx;background:#f5f7fb;min-height:100vh}.user-card.data-v-27768e55{background:linear-gradient(135deg,#22c55e,#16a34a);border-radius:0 0 24px 24px;padding:24px 16px 22px;color:#fff;cursor:pointer;box-shadow:0 10px 24px rgba(34,197,94,.25)}.user-info.data-v-27768e55{display:flex;align-items:center;gap:12px}.user-info-content.data-v-27768e55{flex:1}.user-avatar.data-v-27768e55{width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;overflow:hidden;flex-shrink:0;border:2px solid rgba(255,255,255,.3)}.avatar-img.data-v-27768e55{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.avatar-initials.data-v-27768e55{color:#fff;font-size:22px;font-weight:700}.user-name.data-v-27768e55{font-size:21px;font-weight:700;color:#fff;line-height:1.1}.user-phone.data-v-27768e55{font-size:14px;opacity:.92;margin-top:4px}.role-pill.data-v-27768e55{margin-top:8px;display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700;background:rgba(255,255,255,.92);color:#166534}.menu-section.data-v-27768e55{padding:0 14px;margin-top:12px}.menu-card.data-v-27768e55{background:#fff;border:1px solid #e6ecf4;border-radius:16px;box-shadow:0 8px 20px rgba(15,23,42,.05);overflow:hidden}.menu-title.data-v-27768e55{font-size:12px;color:#94a3b8;font-weight:700;padding:12px 14px 8px}.menu-item.data-v-27768e55{min-height:54px;padding:0 14px;display:flex;align-items:center;justify-content:space-between}.menu-item+.menu-item.data-v-27768e55{border-top:1px solid #eef2f7}.menu-left.data-v-27768e55{display:flex;align-items:center;gap:10px}.menu-icon.data-v-27768e55{width:28px;height:28px;border-radius:8px;background:#f1f5f9;display:inline-flex;align-items:center;justify-content:center;font-size:16px}.menu-text.data-v-27768e55{font-size:16px;color:#1f2937;font-weight:600}.menu-arrow.data-v-27768e55{color:#c4cfdd;font-size:18px}.logout-btn.data-v-27768e55{width:100%;height:44px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:12px;border:1px solid #fecaca;background:#fff1f2;color:#dc2626;font-size:15px;font-weight:700} +.mine-page.data-v-5428c025{padding-bottom:140rpx;background:#f5f7fb;min-height:100vh}.user-card.data-v-5428c025{background:linear-gradient(135deg,#22c55e,#16a34a);border-radius:0 0 24px 24px;padding:24px 16px 22px;color:#fff;cursor:pointer;box-shadow:0 10px 24px rgba(34,197,94,.25)}.user-info.data-v-5428c025{display:flex;align-items:center;gap:12px}.user-info-content.data-v-5428c025{flex:1}.user-avatar.data-v-5428c025{width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;overflow:hidden;flex-shrink:0;border:2px solid rgba(255,255,255,.3)}.avatar-img.data-v-5428c025{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.avatar-initials.data-v-5428c025{color:#fff;font-size:22px;font-weight:700}.user-name.data-v-5428c025{font-size:21px;font-weight:700;color:#fff;line-height:1.1}.user-phone.data-v-5428c025{font-size:14px;opacity:.92;margin-top:4px}.role-pill.data-v-5428c025{margin-top:8px;display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700;background:rgba(255,255,255,.92);color:#166534}.menu-section.data-v-5428c025{padding:0 14px;margin-top:12px}.menu-card.data-v-5428c025{background:#fff;border:1px solid #e6ecf4;border-radius:16px;box-shadow:0 8px 20px rgba(15,23,42,.05);overflow:hidden}.menu-title.data-v-5428c025{font-size:12px;color:#94a3b8;font-weight:700;padding:12px 14px 8px}.menu-item.data-v-5428c025{min-height:54px;padding:0 14px;display:flex;align-items:center;justify-content:space-between}.menu-item+.menu-item.data-v-5428c025{border-top:1px solid #eef2f7}.menu-left.data-v-5428c025{display:flex;align-items:center;gap:10px}.menu-icon.data-v-5428c025{width:28px;height:28px;border-radius:8px;background:#f1f5f9;display:inline-flex;align-items:center;justify-content:center;font-size:16px}.menu-text.data-v-5428c025{font-size:16px;color:#1f2937;font-weight:600}.menu-arrow.data-v-5428c025{color:#c4cfdd;font-size:18px}.logout-btn.data-v-5428c025{width:100%;height:44px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:12px;border:1px solid #fecaca;background:#fff1f2;color:#dc2626;font-size:15px;font-weight:700} diff --git a/dist/dev/mp-weixin/app.js b/dist/dev/mp-weixin/app.js index 13bd3cf..050dd82 100644 --- a/dist/dev/mp-weixin/app.js +++ b/dist/dev/mp-weixin/app.js @@ -26,6 +26,7 @@ function scheduleAuthGuard() { try { if (utils_session.isLoggedIn()) return; const pages = getCurrentPages(); + if (pages.length === 0) return; const cur = pages[pages.length - 1]; const route = cur && cur.route ? cur.route : ""; if (isPublicRoute(route)) return; diff --git a/dist/dev/mp-weixin/pages/home/Home.js b/dist/dev/mp-weixin/pages/home/Home.js index 12bdb8c..4a6d2fd 100644 --- a/dist/dev/mp-weixin/pages/home/Home.js +++ b/dist/dev/mp-weixin/pages/home/Home.js @@ -182,9 +182,32 @@ const _sfc_main = { }); return (_ctx, _cache) => { return common_vendor.e({ - a: common_vendor.o(($event) => showNewAppt.value = true), + a: common_vendor.unref(userInfo).role === "customer" + }, common_vendor.unref(userInfo).role === "customer" ? { b: common_vendor.s(common_vendor.unref(navSafeStyle)), - c: common_vendor.f(statusTabs, (tab, k0, i0) => { + c: common_vendor.t(common_vendor.unref(storeInfo).name || "宠伴生活馆"), + d: newAppt.value.petName, + e: common_vendor.o(($event) => newAppt.value.petName = $event.detail.value), + f: common_vendor.t(newAppt.value.petType || "请选择"), + g: petTypes, + h: common_vendor.o((e) => newAppt.value.petType = petTypes[e.detail.value].value), + i: common_vendor.t(newAppt.value.serviceType || "请选择"), + j: serviceTypes.value, + k: common_vendor.o((e) => newAppt.value.serviceType = serviceTypes.value[e.detail.value].value), + l: common_vendor.t(appointmentDate.value || "请选择日期"), + m: appointmentDate.value, + n: common_vendor.o(onAppointmentDateChange), + o: common_vendor.t(appointmentTime.value || "请选择时间"), + p: appointmentTime.value, + q: common_vendor.o(onAppointmentTimeOnlyChange), + r: newAppt.value.remark, + s: common_vendor.o(($event) => newAppt.value.remark = $event.detail.value), + t: creatingAppt.value, + v: common_vendor.o(confirmNewAppt) + } : common_vendor.e({ + w: common_vendor.o(($event) => showNewAppt.value = true), + x: common_vendor.s(common_vendor.unref(navSafeStyle)), + y: common_vendor.f(statusTabs, (tab, k0, i0) => { return common_vendor.e({ a: common_vendor.t(tab.title), b: tab.name === "new" && newApptCount.value > 0 @@ -198,9 +221,9 @@ const _sfc_main = { f: common_vendor.o(($event) => currentStatus.value = tab.name, tab.name) }); }), - d: filteredOrders.value.length > 0 + z: filteredOrders.value.length > 0 }, filteredOrders.value.length > 0 ? { - e: common_vendor.f(filteredOrders.value, (item, k0, i0) => { + A: common_vendor.f(filteredOrders.value, (item, k0, i0) => { return common_vendor.e({ a: common_vendor.n(`dot-${item.status}`), b: "bd9bb22b-0-" + i0, @@ -225,45 +248,45 @@ const _sfc_main = { q: item.id }); }), - f: common_vendor.p({ + B: common_vendor.p({ name: "profile", size: 14 }), - g: common_vendor.p({ + C: common_vendor.p({ name: "orders", size: 13 }) } : {}, { - h: filteredOrders.value.length === 0 + D: filteredOrders.value.length === 0 }, filteredOrders.value.length === 0 ? {} : {}, { - i: showNewAppt.value + E: showNewAppt.value }, showNewAppt.value ? { - j: common_vendor.o(($event) => showNewAppt.value = false), - k: newAppt.value.petName, - l: common_vendor.o(($event) => newAppt.value.petName = $event.detail.value), - m: common_vendor.t(newAppt.value.petType || "请选择"), - n: petTypes, - o: common_vendor.o((e) => newAppt.value.petType = petTypes[e.detail.value].value), - p: common_vendor.t(newAppt.value.serviceType || "请选择"), - q: serviceTypes.value, - r: common_vendor.o((e) => newAppt.value.serviceType = serviceTypes.value[e.detail.value].value), - s: common_vendor.t(appointmentDate.value || "请选择日期"), - t: appointmentDate.value, - v: common_vendor.o(onAppointmentDateChange), - w: common_vendor.t(appointmentTime.value || "请选择时间"), - x: appointmentTime.value, - y: common_vendor.o(onAppointmentTimeOnlyChange), - z: newAppt.value.remark, - A: common_vendor.o(($event) => newAppt.value.remark = $event.detail.value), - B: common_vendor.o(($event) => showNewAppt.value = false), - C: creatingAppt.value, - D: common_vendor.o(confirmNewAppt), - E: common_vendor.o(() => { + F: common_vendor.o(($event) => showNewAppt.value = false), + G: newAppt.value.petName, + H: common_vendor.o(($event) => newAppt.value.petName = $event.detail.value), + I: common_vendor.t(newAppt.value.petType || "请选择"), + J: petTypes, + K: common_vendor.o((e) => newAppt.value.petType = petTypes[e.detail.value].value), + L: common_vendor.t(newAppt.value.serviceType || "请选择"), + M: serviceTypes.value, + N: common_vendor.o((e) => newAppt.value.serviceType = serviceTypes.value[e.detail.value].value), + O: common_vendor.t(appointmentDate.value || "请选择日期"), + P: appointmentDate.value, + Q: common_vendor.o(onAppointmentDateChange), + R: common_vendor.t(appointmentTime.value || "请选择时间"), + S: appointmentTime.value, + T: common_vendor.o(onAppointmentTimeOnlyChange), + U: newAppt.value.remark, + V: common_vendor.o(($event) => newAppt.value.remark = $event.detail.value), + W: common_vendor.o(($event) => showNewAppt.value = false), + X: creatingAppt.value, + Y: common_vendor.o(confirmNewAppt), + Z: common_vendor.o(() => { }), - F: common_vendor.o(($event) => showNewAppt.value = false) - } : {}, { - G: common_vendor.o(common_vendor.unref(goPage)), - H: common_vendor.p({ + aa: common_vendor.o(($event) => showNewAppt.value = false) + } : {}), { + ab: common_vendor.o(common_vendor.unref(goPage)), + ac: common_vendor.p({ ["current-page"]: "home" }) }); diff --git a/dist/dev/mp-weixin/pages/home/Home.wxml b/dist/dev/mp-weixin/pages/home/Home.wxml index 03c62d1..7630730 100644 --- a/dist/dev/mp-weixin/pages/home/Home.wxml +++ b/dist/dev/mp-weixin/pages/home/Home.wxml @@ -1 +1 @@ -宠伴生活馆新建预约今日服务看板待确认、进行中、已完成实时同步,支持一键开始服务与快速填报。{{tab.a}} {{tab.c}}{{item.c}}{{item.d}}{{item.f}}{{item.i}}开始服务取消填写报告{{item.o}}暂无数据新建预约✕填写基础信息后即可创建预约,后续可在列表中继续处理。宠物名字宠物类型{{m}}服务类型{{p}}预约日期{{s}}预约时间{{w}}备注(可选)取消确认创建 \ No newline at end of file +宠伴生活馆{{c}}宠物服务,让爱更专业预约服务宠物名字宠物类型{{f}}服务类型{{i}}预约日期{{l}}预约时间{{o}}备注(可选)提交预约宠伴生活馆新建预约今日服务看板待确认、进行中、已完成实时同步,支持一键开始服务与快速填报。{{tab.a}} {{tab.c}}{{item.c}}{{item.d}}{{item.f}}{{item.i}}开始服务取消填写报告{{item.o}}暂无数据新建预约✕填写基础信息后即可创建预约,后续可在列表中继续处理。宠物名字宠物类型{{I}}服务类型{{L}}预约日期{{O}}预约时间{{R}}备注(可选)取消确认创建 \ No newline at end of file diff --git a/dist/dev/mp-weixin/pages/home/Home.wxss b/dist/dev/mp-weixin/pages/home/Home.wxss index eecf096..d60f0b4 100644 --- a/dist/dev/mp-weixin/pages/home/Home.wxss +++ b/dist/dev/mp-weixin/pages/home/Home.wxss @@ -25,6 +25,26 @@ } .list-content.data-v-bd9bb22b { padding: 0; } +.c-header.data-v-bd9bb22b { + background: linear-gradient(135deg, #07c160 0%, #10b76f 100%); + padding: 20px 20px 40px; + text-align: center; + color: #fff; + border-radius: 0 0 24px 24px; +} +.c-title.data-v-bd9bb22b { font-size: 24px; font-weight: 700; margin-bottom: 8px; +} +.c-sub.data-v-bd9bb22b { font-size: 14px; opacity: 0.8; +} +.c-booking-card.data-v-bd9bb22b { + background: #fff; + border-radius: 16px; + margin: -20px 16px 0; + padding: 24px 20px; + box-shadow: 0 4px 12px rgba(0,0,0,0.05); +} +.c-booking-title.data-v-bd9bb22b { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 20px; text-align: center; +} /* 按钮 */ .btn-primary.data-v-bd9bb22b { diff --git a/dist/dev/mp-weixin/pages/mine/Mine.js b/dist/dev/mp-weixin/pages/mine/Mine.js index 0e9e579..3c61a30 100644 --- a/dist/dev/mp-weixin/pages/mine/Mine.js +++ b/dist/dev/mp-weixin/pages/mine/Mine.js @@ -57,7 +57,7 @@ const _sfc_main = { d: common_vendor.s(avatarStyle.value), e: common_vendor.t(common_vendor.unref(userInfo).name), f: common_vendor.t(common_vendor.unref(userInfo).phone), - g: common_vendor.t(common_vendor.unref(userInfo).role === "boss" ? "店长" : "员工"), + g: common_vendor.t(common_vendor.unref(userInfo).role === "boss" ? "店长" : common_vendor.unref(userInfo).role === "customer" ? "客户" : "员工"), h: common_vendor.s(common_vendor.unref(userCardSafeStyle)), i: common_vendor.o(($event) => common_vendor.unref(navigateTo)("profile")), j: common_vendor.unref(userInfo).role === "boss" @@ -83,24 +83,27 @@ const _sfc_main = { size: 15 }), r: common_vendor.o(($event) => common_vendor.unref(navigateTo)("profile")), - s: common_vendor.p({ + s: common_vendor.unref(userInfo).role !== "customer" + }, common_vendor.unref(userInfo).role !== "customer" ? { + t: common_vendor.p({ name: "report", size: 15 }), - t: common_vendor.o(($event) => common_vendor.unref(navigateTo)("myReports")), - v: common_vendor.p({ + v: common_vendor.o(($event) => common_vendor.unref(navigateTo)("myReports")) + } : {}, { + w: common_vendor.p({ name: "orders", size: 15 }), - w: common_vendor.o(($event) => common_vendor.unref(navigateTo)("myOrders")), - x: common_vendor.p({ + x: common_vendor.o(($event) => common_vendor.unref(navigateTo)("myOrders")), + y: common_vendor.p({ name: "logout", size: 15, color: "#dc2626" }), - y: common_vendor.o(logout), - z: common_vendor.o(common_vendor.unref(goPage)), - A: common_vendor.p({ + z: common_vendor.o(logout), + A: common_vendor.o(common_vendor.unref(goPage)), + B: common_vendor.p({ ["current-page"]: "mine" }) }); diff --git a/dist/dev/mp-weixin/pages/mine/Mine.wxml b/dist/dev/mp-weixin/pages/mine/Mine.wxml index c5bf7be..a9a5750 100644 --- a/dist/dev/mp-weixin/pages/mine/Mine.wxml +++ b/dist/dev/mp-weixin/pages/mine/Mine.wxml @@ -1 +1 @@ -{{c}}{{e}}{{f}}{{g}}店铺管理员工管理›服务类型›店铺设置›个人中心个人信息›我的报告›我的订单›退出登录 \ No newline at end of file +{{c}}{{e}}{{f}}{{g}}店铺管理员工管理›服务类型›店铺设置›个人中心个人信息›我的报告›我的订单›退出登录 \ No newline at end of file diff --git a/main.js b/main.js deleted file mode 100644 index ffcc69d..0000000 --- a/main.js +++ /dev/null @@ -1,9 +0,0 @@ -import { createSSRApp } from 'vue' -import App from './App.vue' - -export function createApp() { - const app = createSSRApp(App) - return { - app - } -} diff --git a/pages/home/home.vue b/pages/home/home.vue deleted file mode 100644 index fd4cff7..0000000 --- a/pages/home/home.vue +++ /dev/null @@ -1,539 +0,0 @@ - - - - - - {{ storeInfo.name || '宠伴生活馆' }} - 宠物服务,让爱更专业 - - - - 预约服务 - - 宠物名字 - - - - 宠物类型 - - {{ newAppt.petType || '请选择' }} ▾ - - - - 服务类型 - - {{ newAppt.serviceType || '请选择' }} ▾ - - - - 预约时间 - - {{ newAppt.appointmentTime || '请选择' }} ▾ - - - - 备注 - - - 提交预约 - - - - - - - - 宠伴生活馆 - - + 新建预约 - - - - - - {{ tab.label }} - - - - - - - - - - - - - - - - - {{ petEmoji(item.petType) }} - {{ item.petName }} - {{ item.serviceType }} - - {{ item.statusText }} - - - 📅 {{ item.time }} - - - - 开始服务 - 取消 - - - 填写报告 - - {{ item.status === 'cancel' ? '已取消' : '已完成' }} - - - - - - - 📭 - 暂无数据 - - - - - - - - 新建预约 - ✕ - - - - 宠物名字 - - - - 宠物类型 - - {{ newAppt.petType || '请选择' }} ▾ - - - - 服务类型 - - {{ newAppt.serviceType || '请选择' }} ▾ - - - - 预约时间 - - {{ newAppt.appointmentTime || '请选择' }} ▾ - - - - 备注 - - - - - 取消 - 确定 - - - - - - - - - - diff --git a/pages/login/login.vue b/pages/login/login.vue deleted file mode 100644 index 2f88bdb..0000000 --- a/pages/login/login.vue +++ /dev/null @@ -1,348 +0,0 @@ - - - - - 宠伴生活馆 - 宠物服务,让爱更专业 - - - - - 🎉 - 入驻成功 - 欢迎加入宠伴生活馆 - - 店铺名称{{ regResult.store.name }} - 您的账号{{ regResult.user.phone }} - 初始密码{{ regResult.user.password }} - 员工邀请码{{ regResult.store.inviteCode }} - - 📋 复制员工邀请码 - 前往登录 → - - - - - ✅ - 注册成功 - 您已成功加入 {{ regResult.store?.name }} 团队 - - 所属店铺{{ regResult.store?.name }} - 您的账号{{ regResult.user?.phone }} - - 前往登录 → - - - - - - - {{ tab.label }} - - - - - - - - - - - - {{ smsCountdown > 0 ? smsCountdown + 's' : '获取验证码' }} - - - - 登录 - 其他登录方式 - - 📱 微信授权登录 - - - 员工注册 - 商家入驻 - - - - - - - - - - - - - {{ smsCountdown > 0 ? smsCountdown + 's' : '获取验证码' }} - - - - 登录 - - 商家入驻 - - - - - - - - - - - - - - - - - - 提交申请 - - 返回登录 - - - - - - 请输入店长提供的邀请码加入团队 - - - - - - - - - - - - - 注册 - - 返回登录 - - - - - - - - - diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue deleted file mode 100644 index 729e72d..0000000 --- a/pages/mine/mine.vue +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - {{ initials }} - - - {{ userInfo.name }} - {{ userInfo.phone }} - - 🏠 店长 - 🌟 客户 - 👤 员工 - - - - - - - - - - 👥 - 员工管理 - › - - - - 🛁 - 服务类型 - › - - - - ⚙️ - 店铺设置 - › - - - - - - - - - 📅 - 我的预约 - › - - - - - - - - - 📋 - 我的报告 - › - - - - 📦 - 我的订单 - › - - - - - - - - - 退出登录 - - - - - - - - - diff --git a/pages/mine/my-orders.vue b/pages/mine/my-orders.vue deleted file mode 100644 index dc668a7..0000000 --- a/pages/mine/my-orders.vue +++ /dev/null @@ -1,176 +0,0 @@ - - - - - ‹ - 我的订单 - - - - - - {{ tab.label }} - - - - - - {{ item.title }} - {{ item.desc }} - - {{ item.time }} - {{ item.statusText }} - - - 开始服务 - 取消 - - - 填写报告 - - - - 📦 - 暂无数据 - - - - - - - - diff --git a/pages/mine/my-reports.vue b/pages/mine/my-reports.vue deleted file mode 100644 index 369c163..0000000 --- a/pages/mine/my-reports.vue +++ /dev/null @@ -1,145 +0,0 @@ - - - - - ‹ - 我的报告 - - - - - - - - - - 📷 - - - - 🐾 {{ r.petName }} - {{ serviceEmoji(r.serviceType) }} {{ r.serviceType }} - - - - - - - 📋 - 暂无报告 - - - - - - - diff --git a/pages/mine/service-type.vue b/pages/mine/service-type.vue deleted file mode 100644 index 325bb1d..0000000 --- a/pages/mine/service-type.vue +++ /dev/null @@ -1,193 +0,0 @@ - - - - - ‹ - 服务类型 - - - - - + 新增服务类型 - - - - - - {{ s.name }} - - 删除 - - - 系统默认 - - - - 🛁 - 暂无服务类型 - - - - - - - - 新增服务类型 - ✕ - - - - 服务类型名称 - - - - - 取消 - 确定 - - - - - - - - - diff --git a/pages/mine/staff.vue b/pages/mine/staff.vue deleted file mode 100644 index 2bd40c6..0000000 --- a/pages/mine/staff.vue +++ /dev/null @@ -1,247 +0,0 @@ - - - - - ‹ - 员工管理 - - - - - 员工邀请码 - {{ storeInfo.inviteCode }} - 复制 - - - - + 新增员工 - - - - - - - - {{ s.name ? s.name[0] : '?' }} - - - {{ s.name }} - {{ s.phone }} - {{ s.role === 'boss' ? '🏠 店长' : '👤 员工' }} - - 删除 - - - 👥 - 暂无员工 - - - - - - - - 新增员工 - ✕ - - - - 员工姓名 - - - - 手机号 - - - - - 取消 - 确定 - - - - - - - - - diff --git a/pages/mine/store.vue b/pages/mine/store.vue deleted file mode 100644 index a3ba16a..0000000 --- a/pages/mine/store.vue +++ /dev/null @@ -1,124 +0,0 @@ - - - - - ‹ - 店铺设置 - - - - - - - 店铺名称 - - - - 联系电话 - - - - 地址 - - - - 简介 - - - - - - 保存设置 - - - - - - - - diff --git a/pages/report-view/reportView.vue b/pages/report-view/reportView.vue deleted file mode 100644 index 928f0fd..0000000 --- a/pages/report-view/reportView.vue +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - - 加载报告中... - - - - - - 🔍 - 报告不存在或链接已失效 - - - - - - - {{ reportData.store?.name || '宠伴生活馆' }} - 宠物服务,让爱更专业 - - 📞 {{ reportData.store.phone }} - 📍 {{ reportData.store.address }} - - - - - - 服务报告 - {{ formatTime(reportData.appointmentTime) }} - - - - - - 宠物名字 - {{ reportData.petName || '-' }} - - - 服务项目 - {{ reportData.serviceType || '-' }} - - - 服务时间 - {{ formatTime(reportData.appointmentTime) }} - - - 服务技师 - {{ reportData.staffName || '-' }} - - - - - - 服务前后对比 - - - 服务前 - - 暂无照片 - - - 服务后 - - 暂无照片 - - - - - - - 备注 - {{ reportData.remark }} - - - - - 📸 生成图片分享朋友圈 - 我要预约 - - - - - - - - - - - diff --git a/pages/report/report.vue b/pages/report/report.vue deleted file mode 100644 index 1cac481..0000000 --- a/pages/report/report.vue +++ /dev/null @@ -1,333 +0,0 @@ - - - - - ✓ 提交成功,可复制链接或扫描二维码分享给宠主 - - - 报告链接 - {{ reportResult.reportUrl }} - - - - - 📥 保存二维码到相册 - 返回首页 - - - - - - - - 基本信息 - - - 宠物名字 - - - - 服务类型 - - {{ report.serviceType || '请选择' }} ▾ - - - - 服务时间 - - {{ report.appointmentTime || '请选择' }} ▾ - - - - - - - - 服务照片 - - - 服务前 - - - - + - 上传照片 - - - - - 服务后 - - - - + - 上传照片 - - - - - - - - - 备注 - - - - - - - 提交报告 - - - - - - - - diff --git a/src/App.vue b/src/App.vue index e321590..765b0fe 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,6 +14,7 @@ function scheduleAuthGuard() { try { if (isLoggedIn()) return const pages = getCurrentPages() + if (pages.length === 0) return // 还没加载完页面,默认第一个页面是 login,不需要拦截 const cur = pages[pages.length - 1] const route = cur && cur.route ? cur.route : '' if (isPublicRoute(route)) return diff --git a/src/pages.json b/src/pages.json index bdc872f..84e40b1 100644 --- a/src/pages.json +++ b/src/pages.json @@ -18,5 +18,5 @@ "navigationBarTitleText": "宠伴生活馆", "navigationBarBackgroundColor": "#07c160", "backgroundColor": "#F8F8F8" - }, + } } diff --git a/src/pages/home/Home.vue b/src/pages/home/Home.vue index 9116c5d..adfffb4 100644 --- a/src/pages/home/Home.vue +++ b/src/pages/home/Home.vue @@ -1,11 +1,55 @@ - - - 宠伴生活馆 - 新建预约 + + + + 宠伴生活馆 + + + {{ storeInfo.name || '宠伴生活馆' }} + 宠物服务,让爱更专业 + + + + 预约服务 + 宠物名字 + + + 宠物类型 + newAppt.petType = petTypes[e.detail.value].value"> + {{ newAppt.petType || '请选择' }} + + + 服务类型 + newAppt.serviceType = serviceTypes[e.detail.value].value"> + {{ newAppt.serviceType || '请选择' }} + + + 预约日期 + + {{ appointmentDate || '请选择日期' }} + + + 预约时间 + + {{ appointmentTime || '请选择时间' }} + + + 备注(可选) + + + 提交预约 + + + + + + 宠伴生活馆 + 新建预约 + + 今日服务看板 待确认、进行中、已完成实时同步,支持一键开始服务与快速填报。 @@ -107,6 +151,7 @@ + @@ -316,6 +361,24 @@ onMounted(() => { .hero-sub { margin-top: 4px; font-size: 12px; color: #4b5563; line-height: 1.45; } .list-content { padding: 0; } +.c-header { + background: linear-gradient(135deg, #07c160 0%, #10b76f 100%); + padding: 20px 20px 40px; + text-align: center; + color: #fff; + border-radius: 0 0 24px 24px; +} +.c-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; } +.c-sub { font-size: 14px; opacity: 0.8; } +.c-booking-card { + background: #fff; + border-radius: 16px; + margin: -20px 16px 0; + padding: 24px 20px; + box-shadow: 0 4px 12px rgba(0,0,0,0.05); +} +.c-booking-title { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 20px; text-align: center; } + /* 按钮 */ .btn-primary { display: inline-flex; diff --git a/src/pages/mine/Mine.vue b/src/pages/mine/Mine.vue index c179718..6fac8c5 100644 --- a/src/pages/mine/Mine.vue +++ b/src/pages/mine/Mine.vue @@ -10,7 +10,7 @@ {{ userInfo.name }} {{ userInfo.phone }} - {{ userInfo.role === 'boss' ? '店长' : '员工' }} + {{ userInfo.role === 'boss' ? '店长' : userInfo.role === 'customer' ? '客户' : '员工' }} @@ -42,7 +42,7 @@ 个人信息 › - + 我的报告 › diff --git a/static/tab-home-active.png b/static/tab-home-active.png deleted file mode 100644 index 9e55c7c..0000000 Binary files a/static/tab-home-active.png and /dev/null differ diff --git a/static/tab-home-active.svg b/static/tab-home-active.svg deleted file mode 100644 index 35ea98f..0000000 --- a/static/tab-home-active.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - 🏠 - diff --git a/static/tab-home.png b/static/tab-home.png deleted file mode 100644 index 4de130d..0000000 Binary files a/static/tab-home.png and /dev/null differ diff --git a/static/tab-home.svg b/static/tab-home.svg deleted file mode 100644 index 511178d..0000000 --- a/static/tab-home.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - 🏠 - diff --git a/static/tab-mine-active.png b/static/tab-mine-active.png deleted file mode 100644 index 9e55c7c..0000000 Binary files a/static/tab-mine-active.png and /dev/null differ diff --git a/static/tab-mine-active.svg b/static/tab-mine-active.svg deleted file mode 100644 index c26f6ac..0000000 --- a/static/tab-mine-active.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - 👤 - diff --git a/static/tab-mine.png b/static/tab-mine.png deleted file mode 100644 index 4de130d..0000000 Binary files a/static/tab-mine.png and /dev/null differ diff --git a/static/tab-mine.svg b/static/tab-mine.svg deleted file mode 100644 index af834ca..0000000 --- a/static/tab-mine.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - 👤 - diff --git a/static/tab-report-active.png b/static/tab-report-active.png deleted file mode 100644 index 9e55c7c..0000000 Binary files a/static/tab-report-active.png and /dev/null differ diff --git a/static/tab-report-active.svg b/static/tab-report-active.svg deleted file mode 100644 index f62db18..0000000 --- a/static/tab-report-active.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - 📋 - diff --git a/static/tab-report.png b/static/tab-report.png deleted file mode 100644 index 4de130d..0000000 Binary files a/static/tab-report.png and /dev/null differ diff --git a/static/tab-report.svg b/static/tab-report.svg deleted file mode 100644 index 21c8e2b..0000000 --- a/static/tab-report.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - 📋 - diff --git a/uni.scss b/uni.scss deleted file mode 100644 index 64a18f8..0000000 --- a/uni.scss +++ /dev/null @@ -1,21 +0,0 @@ -/* uni.scss - 全局样式变量 */ -$uni-color-primary: #07c160; -$uni-color-success: #07c160; -$uni-color-warning: #ff9f00; -$uni-color-error: #ff4d4f; -$uni-color-white: #ffffff; -$uni-color-black: #000000; -$uni-bg-color: #f5f5f5; -$uni-text-color: #333333; -$uni-text-color-grey: #999999; -$uni-border-color: #eeeeee; - -/* 主题色变量(兼容部分 vant 变量) */ -:root { - --van-primary-color: #07c160; - --van-orange: #ff9f00; - --van-text: #333333; - --van-text-secondary: #999999; - --van-cream: #f8f6f3; - --van-brown: #8b6914; -} diff --git a/utils/api.js b/utils/api.js deleted file mode 100644 index 0684c1e..0000000 --- a/utils/api.js +++ /dev/null @@ -1,124 +0,0 @@ -// utils/api.js - uniapp API 封装 -const BASE_URL = 'http://localhost:8080/api' - -// 统一请求封装 -const request = (options) => { - return new Promise((resolve, reject) => { - uni.request({ - url: BASE_URL + options.url, - method: options.method || 'GET', - data: options.data || {}, - header: options.header || { - 'Content-Type': 'application/json' - }, - success: (res) => { - if (res.statusCode === 200) { - resolve(res.data) - } else { - reject(res) - } - }, - fail: (err) => { - reject(err) - } - }) - }) -} - -const get = (url, params = {}) => { - return request({ url, method: 'GET', data: params }) -} - -const post = (url, data = {}) => { - return request({ url, method: 'POST', data }) -} - -const put = (url, data = {}) => { - return request({ url, method: 'PUT', data }) -} - -const del = (url) => { - return request({ url, method: 'DELETE' }) -} - -// 图片完整URL -export const imgUrl = (path) => { - if (!path) return '' - if (path.startsWith('http')) return path - return `http://localhost:8080${path}` -} - -// 发送验证码 -export const sendSms = (phone) => post('/sms/send', { phone }) - -// 登录 -export const login = (phone, code) => post('/user/login', { phone, code }) - -// 注册老板 -export const registerBoss = (data) => post('/user/register-boss', data) - -// 注册员工 -export const registerStaff = (data) => post('/user/register-staff', data) - -// 预约列表 -export const getAppointmentList = (userId) => get('/appointment/list', { userId }) - -// 创建预约 -export const createAppointment = (data) => post('/appointment/create', data) - -// 开始服务 -export const startAppointment = (appointmentId, staffUserId) => - post('/appointment/start', { appointmentId, staffUserId }) - -// 取消预约 -export const cancelAppointment = (id) => put(`/appointment/status?id=${id}&status=cancel`) - -// 提交报告 -export const createReport = (data) => post('/report/create', data) - -// 获取报告(通过token) -export const getReportByToken = (token) => get('/report/get', { token }) - -// 报告列表 -export const getReportList = (params) => get('/report/list', params) - -// 服务类型列表 -export const getServiceTypeList = (storeId) => get('/service-type/list', { storeId }) - -// 创建服务类型 -export const createServiceType = (storeId, name) => post('/service-type/create', { storeId, name }) - -// 删除服务类型 -export const deleteServiceType = (id) => del(`/service-type/delete?id=${id}`) - -// 员工列表 -export const getStaffList = (storeId) => get('/user/staff-list', { storeId }) - -// 添加员工 -export const createStaff = (data) => post('/user/create-staff', data) - -// 删除员工 -export const deleteStaff = (staffId) => del(`/user/staff?staffId=${staffId}`) - -// 更新店铺 -export const updateStore = (data) => put('/store/update', data) - -// 上传图片(uniapp版) -export const uploadImage = (filePath) => { - return new Promise((resolve, reject) => { - uni.uploadFile({ - url: BASE_URL + '/upload/image', - filePath: filePath, - name: 'file', - success: (res) => { - try { - const data = JSON.parse(res.data) - resolve(data) - } catch (e) { - reject(e) - } - }, - fail: (err) => reject(err) - }) - }) -}