feat: add .env.mp-weixin and rebuild mp-weixin with api.s-good.com

This commit is contained in:
MaDaLei 2026-04-13 18:06:56 +08:00
parent bb0908e7d3
commit ebaae1a929
10 changed files with 10 additions and 8 deletions

1
.env.mp-weixin Normal file
View File

@ -0,0 +1 @@
VITE_API_ORIGIN=https://api.s-good.com

View File

@ -1 +1 @@
"use strict";const e=require("../common/vendor.js"),t="http://localhost:8080".replace(/\/$/,""),r=`${t}/api`,s=t=>new Promise((s,o)=>{e.index.request({url:r+t.url,method:t.method||"GET",data:t.data||{},header:t.header||{},success:e=>s(e.data),fail:e=>o(e)})}),o=(e,t={})=>{const r=Object.entries(t).filter(([,e])=>null!=e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&");return s({url:`${e}${r?"?"+r:""}`,method:"GET"})},p=(e,t={})=>s({url:e,method:"POST",data:t,header:{"Content-Type":"application/json"}}),a=(e,t={})=>s({url:e,method:"PUT",data:t,header:{"Content-Type":"application/json"}}),n=e=>s({url:e,method:"DELETE"});exports.API_ORIGIN=t,exports.BASE_URL=r,exports.cancelAppointment=e=>a(`/appointment/status?id=${e}&status=cancel`),exports.createAppointment=e=>p("/appointment/create",e),exports.createReport=e=>p("/report/create",e),exports.createServiceType=(e,t)=>p("/service-type/create",{storeId:e,name:t}),exports.createStaff=e=>p("/user/create-staff",e),exports.deleteServiceType=e=>n(`/service-type/delete?id=${e}`),exports.deleteStaff=e=>n(`/user/staff?staffId=${e}`),exports.getAppointmentList=(e,t)=>o("/appointment/list",{userId:e,storeId:t}),exports.getReportByToken=e=>o("/report/get",{token:e}),exports.getReportList=e=>o("/report/list",e),exports.getServiceTypeList=e=>o("/service-type/list",{storeId:e}),exports.getStaffList=e=>o("/user/staff-list",{storeId:e}),exports.imgUrl=e=>e?e.startsWith("http")?e:`${t}${e}`:"",exports.login=(e,t)=>p("/user/login",{phone:e,code:t}),exports.registerBoss=e=>p("/user/register-boss",e),exports.registerStaff=e=>p("/user/register-staff",e),exports.sendSms=e=>p("/sms/send",{phone:e}),exports.startAppointment=(e,t)=>p("/appointment/start",{appointmentId:e,staffUserId:t}),exports.updateStore=e=>a("/store/update",e),exports.updateUser=e=>a("/user/update",e); "use strict";const e=require("../common/vendor.js"),t="https://api.s-good.com".replace(/\/$/,""),r=`${t}/api`,s=t=>new Promise((s,o)=>{e.index.request({url:r+t.url,method:t.method||"GET",data:t.data||{},header:t.header||{},success:e=>s(e.data),fail:e=>o(e)})}),o=(e,t={})=>{const r=Object.entries(t).filter(([,e])=>null!=e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&");return s({url:`${e}${r?"?"+r:""}`,method:"GET"})},p=(e,t={})=>s({url:e,method:"POST",data:t,header:{"Content-Type":"application/json"}}),a=(e,t={})=>s({url:e,method:"PUT",data:t,header:{"Content-Type":"application/json"}}),n=e=>s({url:e,method:"DELETE"});exports.API_ORIGIN=t,exports.BASE_URL=r,exports.cancelAppointment=e=>a(`/appointment/status?id=${e}&status=cancel`),exports.createAppointment=e=>p("/appointment/create",e),exports.createReport=e=>p("/report/create",e),exports.createServiceType=(e,t)=>p("/service-type/create",{storeId:e,name:t}),exports.createStaff=e=>p("/user/create-staff",e),exports.deleteServiceType=e=>n(`/service-type/delete?id=${e}`),exports.deleteStaff=e=>n(`/user/staff?staffId=${e}`),exports.getAppointmentList=(e,t)=>o("/appointment/list",{userId:e,storeId:t}),exports.getReportByToken=e=>o("/report/get",{token:e}),exports.getReportList=e=>o("/report/list",e),exports.getServiceTypeList=e=>o("/service-type/list",{storeId:e}),exports.getStaffList=e=>o("/user/staff-list",{storeId:e}),exports.imgUrl=e=>e?e.startsWith("http")?e:`${t}${e}`:"",exports.login=(e,t)=>p("/user/login",{phone:e,code:t}),exports.registerBoss=e=>p("/user/register-boss",e),exports.registerStaff=e=>p("/user/register-staff",e),exports.sendSms=e=>p("/sms/send",{phone:e}),exports.startAppointment=(e,t)=>p("/appointment/start",{appointmentId:e,staffUserId:t}),exports.updateStore=e=>a("/store/update",e),exports.updateUser=e=>a("/user/update",e);

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";const e=require("../../common/vendor.js"),t=require("../../utils/globalState.js"),n=require("../../api/index.js"),i=require("../../utils/session.js"),a=require("../../utils/datetime.js"),s=require("../../utils/appointment.js");Math||o();const o=()=>"../../components/AppIcon.js",p={__name:"MyOrders",emits:["change-page"],setup(o,{emit:p}){const c=i.getUserSession(),r=c.id,u=(()=>{var t,n,i,a;const s=(null==(n=(t=e.index).getSystemInfoSync)?void 0:n.call(t).statusBarHeight)||20;let o=s+44;const p=null==(a=(i=e.index).getMenuButtonBoundingClientRect)?void 0:a.call(i);if(p&&p.top&&p.height){o=s+2*Math.max(p.top-s,4)+p.height}return`padding-top:${s}px;height:${o}px;`})(),d=e.ref("new"),m=e.ref([]),l=[{title:"待确认",name:"new"},{title:"进行中",name:"doing"},{title:"已完成",name:"done"}],g=e.computed(()=>m.value.filter(e=>"new"===d.value?"new"===e.status:"doing"===d.value?"doing"===e.status:"done"!==d.value||("done"===e.status||"cancel"===e.status))),v=async()=>{if(!r)return;const e=await n.getAppointmentList(r);200===e.code&&(m.value=e.data.map(e=>({id:e.id,title:e.serviceType||"洗澡美容预约",desc:`${e.petType||""} - ${e.petName||""}`,time:a.formatDateTimeCN(e.appointmentTime),status:e.status||"new",statusText:s.getAppointmentStatusText(e.status),petName:e.petName,petType:e.petType,serviceType:e.serviceType,appointmentTime:e.appointmentTime})))};return e.onMounted(()=>v()),(i,a)=>e.e({a:e.p({name:"back",size:18,color:"#ffffff"}),b:e.o(n=>e.unref(t.navigateTo)("mine")),c:e.s(e.unref(u)),d:e.f(l,(t,n,i)=>({a:e.t(t.title),b:t.name,c:e.n({active:d.value===t.name}),d:e.o(e=>d.value=t.name,t.name)})),e:e.f(g.value,(i,a,o)=>{return e.e({a:e.t(i.title),b:e.t(i.statusText),c:e.n(`van-tag van-tag--${p=i.status,s.getAppointmentTagType(p)}`),d:"be66263e-1-"+o,e:e.t(i.desc),f:"be66263e-2-"+o,g:e.t(i.time),h:"new"===i.status},"new"===i.status?{i:e.o(t=>(async t=>{const i=await n.startAppointment(t.id,c.id);200===i.code?(e.index.showToast({title:"已开始服务",icon:"success"}),v()):e.index.showToast({title:i.message||"操作失败",icon:"none"})})(i),i.id),j:e.o(t=>(async t=>{e.index.showModal({title:"提示",content:"确定取消该预约?",success:async i=>{i.confirm&&200===(await n.cancelAppointment(t.id)).code&&(e.index.showToast({title:"已取消",icon:"success"}),v())}})})(i),i.id)}:"doing"===i.status?{l:e.o(n=>(n=>{e.index.setStorageSync("petstore_report_prefill",JSON.stringify({appointmentId:n.id,petName:n.petName,serviceType:n.serviceType,appointmentTime:n.appointmentTime})),t.navigateTo("report")})(i),i.id)}:{},{k:"doing"===i.status,m:i.id});var p}),f:e.p({name:"profile",size:12}),g:e.p({name:"orders",size:12,color:"#94a3b8"}),h:0===g.value.length},(g.value.length,{}))}},c=e._export_sfc(p,[["__scopeId","data-v-be66263e"]]);wx.createPage(c); "use strict";const e=require("../../common/vendor.js"),t=require("../../utils/globalState.js"),n=require("../../api/index.js"),a=require("../../utils/session.js"),i=require("../../utils/datetime.js"),s=require("../../utils/appointment.js");Math||o();const o=()=>"../../components/AppIcon.js",r={__name:"MyOrders",emits:["change-page"],setup(o,{emit:r}){const p=a.getUserSession(),u=p.id,c=(()=>{var t,n,a,i;const s=(null==(n=(t=e.index).getSystemInfoSync)?void 0:n.call(t).statusBarHeight)||20;let o=s+44;const r=null==(i=(a=e.index).getMenuButtonBoundingClientRect)?void 0:i.call(a);if(r&&r.top&&r.height){o=s+2*Math.max(r.top-s,4)+r.height}return`padding-top:${s}px;height:${o}px;`})(),m=e.ref("new"),d=e.ref([]),l=[{title:"待确认",name:"new"},{title:"进行中",name:"doing"},{title:"已完成",name:"done"}],g=e.computed(()=>d.value.filter(e=>"new"===m.value?"new"===e.status:"doing"===m.value?"doing"===e.status:"done"!==m.value||("done"===e.status||"cancel"===e.status))),f=async()=>{if(!u)return;const e=await n.getAppointmentList(u);200===e.code&&(d.value=e.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})))},v=async t=>{e.index.showModal({title:"提示",content:"确定取消该预约?",success:async a=>{if(!a.confirm)return;200===(await n.cancelAppointment(t.id)).code&&(e.index.showToast({title:"已取消",icon:"success"}),f())}})};return e.onMounted(()=>f()),(a,i)=>e.e({a:e.p({name:"back",size:18,color:"#ffffff"}),b:e.o(n=>e.unref(t.navigateTo)("mine")),c:e.s(e.unref(c)),d:"customer"===e.unref(p).role},(e.unref(p).role,{}),{e:e.f(l,(t,n,a)=>({a:e.t(t.title),b:t.name,c:e.n({active:m.value===t.name}),d:e.o(e=>m.value=t.name,t.name)})),f:e.f(g.value,(a,i,o)=>{return e.e({a:e.t(a.title),b:e.t(a.statusText),c:e.n(`van-tag van-tag--${r=a.status,s.getAppointmentTagType(r)}`),d:"ab8e2a9f-1-"+o,e:e.t(a.desc),f:"ab8e2a9f-2-"+o,g:e.t(a.time)},"customer"!==e.unref(p).role?e.e({h:"new"===a.status},"new"===a.status?{i:e.o(t=>(async t=>{const a=await n.startAppointment(t.id,p.id);200===a.code?(e.index.showToast({title:"已开始服务",icon:"success"}),f()):e.index.showToast({title:a.message||"操作失败",icon:"none"})})(a),a.id),j:e.o(e=>v(a),a.id)}:"doing"===a.status?{l:e.o(n=>(n=>{e.index.setStorageSync("petstore_report_prefill",JSON.stringify({appointmentId:n.id,petName:n.petName,serviceType:n.serviceType,appointmentTime:n.appointmentTime})),t.navigateTo("report")})(a),a.id)}:{},{k:"doing"===a.status}):e.e({m:"new"===a.status},"new"===a.status?{n:e.o(e=>v(a),a.id)}:{}),{o:a.id});var r}),g:e.p({name:"profile",size:12}),h:e.p({name:"orders",size:12,color:"#94a3b8"}),i:"customer"!==e.unref(p).role,j:0===g.value.length},(g.value.length,{}))}},p=e._export_sfc(r,[["__scopeId","data-v-ab8e2a9f"]]);wx.createPage(p);

View File

@ -1 +1 @@
<view class="page-shell orders-page data-v-be66263e"><view class="orders-nav nav-gradient data-v-be66263e" style="{{c}}"><text class="nav-back data-v-be66263e" bindtap="{{b}}"><app-icon wx:if="{{a}}" class="data-v-be66263e" u-i="be66263e-0" bind:__l="__l" u-p="{{a}}"/></text><text class="nav-title data-v-be66263e">我的订单</text><view class="nav-placeholder data-v-be66263e"></view></view><view class="page-section orders-hero data-v-be66263e"><view class="hero-title data-v-be66263e">服务进度一目了然</view><view class="hero-sub data-v-be66263e">按状态查看订单,待确认可快速开始服务,进行中可直接填写报告。</view></view><view class="van-tabs data-v-be66263e"><view wx:for="{{d}}" wx:for-item="tab" wx:key="b" class="{{['data-v-be66263e', 'van-tabs__tab', tab.c]}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="page-section section-gap data-v-be66263e"><view wx:for="{{e}}" wx:for-item="item" wx:key="m" class="order-item data-v-be66263e"><view class="order-head data-v-be66263e"><view class="order-title data-v-be66263e">{{item.a}}</view><view class="{{['data-v-be66263e', item.c]}}">{{item.b}}</view></view><view class="order-desc data-v-be66263e"><label class="desc-icon data-v-be66263e"><app-icon wx:if="{{f}}" class="data-v-be66263e" u-i="{{item.d}}" bind:__l="__l" u-p="{{f}}"/></label><label class="data-v-be66263e">{{item.e}}</label></view><view class="order-footer data-v-be66263e"><label class="order-time data-v-be66263e"><app-icon wx:if="{{g}}" class="data-v-be66263e" u-i="{{item.f}}" bind:__l="__l" u-p="{{g}}"/><text class="data-v-be66263e">{{item.g}}</text></label></view><view wx:if="{{item.h}}" class="action-btns data-v-be66263e"><button class="van-button van-button--small van-button--primary data-v-be66263e" bindtap="{{item.i}}">开始服务</button><button class="van-button van-button--small data-v-be66263e" bindtap="{{item.j}}">取消</button></view><button wx:elif="{{item.k}}" class="van-button van-button--small btn-mt data-v-be66263e" bindtap="{{item.l}}">填写报告</button></view></view><view wx:if="{{h}}" class="empty data-v-be66263e"><text class="data-v-be66263e">暂无数据</text></view></view> <view class="page-shell orders-page data-v-ab8e2a9f"><view class="orders-nav nav-gradient data-v-ab8e2a9f" style="{{c}}"><text class="nav-back data-v-ab8e2a9f" bindtap="{{b}}"><app-icon wx:if="{{a}}" class="data-v-ab8e2a9f" u-i="ab8e2a9f-0" bind:__l="__l" u-p="{{a}}"/></text><text class="nav-title data-v-ab8e2a9f">我的订单</text><view class="nav-placeholder data-v-ab8e2a9f"></view></view><view class="page-section orders-hero data-v-ab8e2a9f"><view class="hero-title data-v-ab8e2a9f">服务进度一目了然</view><view wx:if="{{d}}" class="hero-sub data-v-ab8e2a9f">查看您的预约状态,随时掌握服务进度。</view><view wx:else class="hero-sub data-v-ab8e2a9f">按状态查看订单,待确认可快速开始服务,进行中可直接填写报告。</view></view><view class="van-tabs data-v-ab8e2a9f"><view wx:for="{{e}}" wx:for-item="tab" wx:key="b" class="{{['data-v-ab8e2a9f', 'van-tabs__tab', tab.c]}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="page-section section-gap data-v-ab8e2a9f"><view wx:for="{{f}}" wx:for-item="item" wx:key="o" class="order-item data-v-ab8e2a9f"><view class="order-head data-v-ab8e2a9f"><view class="order-title data-v-ab8e2a9f">{{item.a}}</view><view class="{{['data-v-ab8e2a9f', item.c]}}">{{item.b}}</view></view><view class="order-desc data-v-ab8e2a9f"><label class="desc-icon data-v-ab8e2a9f"><app-icon wx:if="{{g}}" class="data-v-ab8e2a9f" u-i="{{item.d}}" bind:__l="__l" u-p="{{g}}"/></label><label class="data-v-ab8e2a9f">{{item.e}}</label></view><view class="order-footer data-v-ab8e2a9f"><label class="order-time data-v-ab8e2a9f"><app-icon wx:if="{{h}}" class="data-v-ab8e2a9f" u-i="{{item.f}}" bind:__l="__l" u-p="{{h}}"/><text class="data-v-ab8e2a9f">{{item.g}}</text></label></view><view wx:if="{{i}}" class="data-v-ab8e2a9f"><view wx:if="{{item.h}}" class="action-btns data-v-ab8e2a9f"><button class="van-button van-button--small van-button--primary data-v-ab8e2a9f" bindtap="{{item.i}}">开始服务</button><button class="van-button van-button--small data-v-ab8e2a9f" bindtap="{{item.j}}">取消</button></view><button wx:elif="{{item.k}}" class="van-button van-button--small btn-mt data-v-ab8e2a9f" bindtap="{{item.l}}">填写报告</button></view><view wx:else class="data-v-ab8e2a9f"><view wx:if="{{item.m}}" class="action-btns data-v-ab8e2a9f"><button class="van-button van-button--small data-v-ab8e2a9f" bindtap="{{item.n}}">取消预约</button></view></view></view></view><view wx:if="{{j}}" class="empty data-v-ab8e2a9f"><text class="data-v-ab8e2a9f">暂无数据</text></view></view>

View File

@ -1 +1 @@
.orders-page.data-v-be66263e{padding-bottom:120rpx}.nav-placeholder.data-v-be66263e{width:32px}.btn-mt.data-v-be66263e{margin-top:10px}.orders-hero.data-v-be66263e{margin-top:12px;padding:14px 16px;border:1px solid #dcefe3;border-radius:14px;background:linear-gradient(135deg,#f3fff7,#ecfbf3)}.hero-title.data-v-be66263e{font-size:16px;font-weight:700;color:#166534}.hero-sub.data-v-be66263e{margin-top:4px;font-size:12px;color:#4b5563;line-height:1.45}.orders-nav.data-v-be66263e{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10}.nav-back.data-v-be66263e{font-size:20px;color:#fff}.nav-title.data-v-be66263e{font-size:18px;font-weight:700;color:#fff}.order-item.data-v-be66263e{background:#fff;margin-bottom:12px;border-radius:14px;padding:16px;border:1px solid #e8edf4;box-shadow:0 6px 16px rgba(15,23,42,.05)}.order-head.data-v-be66263e{display:flex;align-items:center;justify-content:space-between;gap:8px}.order-title.data-v-be66263e{font-size:15px;font-weight:700;color:#1f2937;margin-bottom:6px}.order-desc.data-v-be66263e{font-size:13px;color:#6b7280;margin-bottom:10px;display:flex;align-items:center;gap:6px}.desc-icon.data-v-be66263e{width:18px;height:18px;border-radius:6px;background:#eef2f7;display:inline-flex;align-items:center;justify-content:center}.order-footer.data-v-be66263e{display:flex;justify-content:space-between;align-items:center}.order-time.data-v-be66263e{font-size:12px;color:#94a3b8;display:inline-flex;align-items:center;gap:4px}.action-btns.data-v-be66263e{display:flex;gap:8px;margin-top:10px} .orders-page.data-v-ab8e2a9f{padding-bottom:120rpx}.nav-placeholder.data-v-ab8e2a9f{width:32px}.btn-mt.data-v-ab8e2a9f{margin-top:10px}.orders-hero.data-v-ab8e2a9f{margin-top:12px;padding:14px 16px;border:1px solid #dcefe3;border-radius:14px;background:linear-gradient(135deg,#f3fff7,#ecfbf3)}.hero-title.data-v-ab8e2a9f{font-size:16px;font-weight:700;color:#166534}.hero-sub.data-v-ab8e2a9f{margin-top:4px;font-size:12px;color:#4b5563;line-height:1.45}.orders-nav.data-v-ab8e2a9f{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10}.nav-back.data-v-ab8e2a9f{font-size:20px;color:#fff}.nav-title.data-v-ab8e2a9f{font-size:18px;font-weight:700;color:#fff}.order-item.data-v-ab8e2a9f{background:#fff;margin-bottom:12px;border-radius:14px;padding:16px;border:1px solid #e8edf4;box-shadow:0 6px 16px rgba(15,23,42,.05)}.order-head.data-v-ab8e2a9f{display:flex;align-items:center;justify-content:space-between;gap:8px}.order-title.data-v-ab8e2a9f{font-size:15px;font-weight:700;color:#1f2937;margin-bottom:6px}.order-desc.data-v-ab8e2a9f{font-size:13px;color:#6b7280;margin-bottom:10px;display:flex;align-items:center;gap:6px}.desc-icon.data-v-ab8e2a9f{width:18px;height:18px;border-radius:6px;background:#eef2f7;display:inline-flex;align-items:center;justify-content:center}.order-footer.data-v-ab8e2a9f{display:flex;justify-content:space-between;align-items:center}.order-time.data-v-ab8e2a9f{font-size:12px;color:#94a3b8;display:inline-flex;align-items:center;gap:4px}.action-btns.data-v-ab8e2a9f{display:flex;gap:8px;margin-top:10px}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<view class="report-view data-v-ed21e379"><view wx:if="{{a}}" class="loading-wrap data-v-ed21e379"><view class="loading-spinner data-v-ed21e379"></view><label class="data-v-ed21e379">加载报告中...</label></view><view wx:elif="{{b}}" class="not-found data-v-ed21e379"><view class="empty data-v-ed21e379"><text class="data-v-ed21e379">报告不存在或链接已失效</text></view></view><view wx:elif="{{c}}" class="report-content data-v-ed21e379"><view class="brand-header data-v-ed21e379" style="{{k}}"><view class="header-actions data-v-ed21e379"><view class="header-btn data-v-ed21e379" bindtap="{{e}}"><app-icon wx:if="{{d}}" class="data-v-ed21e379" u-i="ed21e379-0" bind:__l="__l" u-p="{{d}}"/></view><view class="header-placeholder data-v-ed21e379"></view></view><view class="brand-logo data-v-ed21e379">{{f}}</view><view class="brand-sub data-v-ed21e379">宠物服务,让爱更专业</view><view class="brand-contact data-v-ed21e379"><label wx:if="{{g}}" class="data-v-ed21e379">电话:{{h}}</label><label wx:if="{{i}}" class="data-v-ed21e379">地址:{{j}}</label></view></view><view wx:if="{{l}}" class="customer-greeting data-v-ed21e379"> 亲爱的宠主,<label class="highlight data-v-ed21e379">{{m}}</label> 今天的服务已完成快来看看TA的变美记录吧 </view><view class="report-title-wrap data-v-ed21e379"><view class="report-title data-v-ed21e379">服务报告</view><view class="report-time data-v-ed21e379">{{n}}</view></view><view class="van-cell-group service-info data-v-ed21e379"><view class="van-cell data-v-ed21e379"><view class="van-cell__title data-v-ed21e379">宠物名字</view><view class="van-cell__value data-v-ed21e379">{{o}}</view></view><view class="van-cell data-v-ed21e379"><view class="van-cell__title data-v-ed21e379">服务项目</view><view class="van-cell__value data-v-ed21e379">{{p}}</view></view><view class="van-cell data-v-ed21e379"><view class="van-cell__title data-v-ed21e379">服务时间</view><view class="van-cell__value data-v-ed21e379">{{q}}</view></view><view class="van-cell data-v-ed21e379"><view class="van-cell__title data-v-ed21e379">服务技师</view><view class="van-cell__value data-v-ed21e379">{{r}}</view></view></view><view class="photo-section section-card data-v-ed21e379"><view class="section-label data-v-ed21e379">服务前后对比</view><view class="photo-group data-v-ed21e379"><view class="photo-group-title data-v-ed21e379">服务前</view><view wx:if="{{s}}" class="photo-grid data-v-ed21e379"><image wx:for="{{t}}" wx:for-item="img" wx:key="a" src="{{img.b}}" class="photo-image data-v-ed21e379" mode="aspectFill"/></view><view wx:else class="photo-empty data-v-ed21e379">暂无照片</view></view><view class="photo-group data-v-ed21e379" style="margin-top:16px"><view class="photo-group-title data-v-ed21e379">服务后</view><view wx:if="{{v}}" class="photo-grid data-v-ed21e379"><image wx:for="{{w}}" wx:for-item="img" wx:key="a" src="{{img.b}}" class="photo-image data-v-ed21e379" mode="aspectFill"/></view><view wx:else class="photo-empty data-v-ed21e379">暂无照片</view></view></view><view class="remark-section section-card data-v-ed21e379"><view class="section-label data-v-ed21e379">备注</view><view class="remark-content data-v-ed21e379">{{x}}</view></view><view class="action-section data-v-ed21e379"><block wx:if="{{y}}"><button open-type="share" class="van-button van-button--primary van-button--round van-button--block share-btn data-v-ed21e379"><app-icon wx:if="{{z}}" class="data-v-ed21e379" style="margin-right:6px" u-i="ed21e379-1" bind:__l="__l" u-p="{{z}}"/> 转发给宠主 </button><button class="van-button van-button--block btn-ghost data-v-ed21e379" bindtap="{{A}}">生成图片分享朋友圈</button></block><block wx:else><button class="van-button van-button--primary van-button--round van-button--block data-v-ed21e379" bindtap="{{B}}"> 联系门店 </button><button class="van-button van-button--block btn-ghost data-v-ed21e379" bindtap="{{C}}">导航去门店</button><button class="van-button van-button--block btn-ghost data-v-ed21e379" style="margin-top:12px" bindtap="{{D}}">我也要预约</button></block></view></view></view> <view class="report-view data-v-4676ea49"><view wx:if="{{a}}" class="loading-wrap data-v-4676ea49"><view class="loading-spinner data-v-4676ea49"></view><label class="data-v-4676ea49">加载报告中...</label></view><view wx:elif="{{b}}" class="not-found data-v-4676ea49"><view class="empty data-v-4676ea49"><text class="data-v-4676ea49">报告不存在或链接已失效</text></view></view><view wx:elif="{{c}}" class="report-content data-v-4676ea49"><view class="brand-header data-v-4676ea49" style="{{k}}"><view class="header-actions data-v-4676ea49"><view class="header-btn data-v-4676ea49" bindtap="{{e}}"><app-icon wx:if="{{d}}" class="data-v-4676ea49" u-i="4676ea49-0" bind:__l="__l" u-p="{{d}}"/></view><view class="header-placeholder data-v-4676ea49"></view></view><view class="brand-logo data-v-4676ea49">{{f}}</view><view class="brand-sub data-v-4676ea49">宠物服务,让爱更专业</view><view class="brand-contact data-v-4676ea49"><label wx:if="{{g}}" class="data-v-4676ea49">电话:{{h}}</label><label wx:if="{{i}}" class="data-v-4676ea49">地址:{{j}}</label></view></view><view wx:if="{{l}}" class="customer-greeting data-v-4676ea49"> 亲爱的宠主,<label class="highlight data-v-4676ea49">{{m}}</label> 今天的服务已完成快来看看TA的变美记录吧 </view><view class="report-title-wrap data-v-4676ea49"><view class="report-title data-v-4676ea49">服务报告</view><view class="report-time data-v-4676ea49">{{n}}</view></view><view class="van-cell-group service-info data-v-4676ea49"><view class="van-cell data-v-4676ea49"><view class="van-cell__title data-v-4676ea49">宠物名字</view><view class="van-cell__value data-v-4676ea49">{{o}}</view></view><view class="van-cell data-v-4676ea49"><view class="van-cell__title data-v-4676ea49">服务项目</view><view class="van-cell__value data-v-4676ea49">{{p}}</view></view><view class="van-cell data-v-4676ea49"><view class="van-cell__title data-v-4676ea49">服务时间</view><view class="van-cell__value data-v-4676ea49">{{q}}</view></view><view class="van-cell data-v-4676ea49"><view class="van-cell__title data-v-4676ea49">服务技师</view><view class="van-cell__value data-v-4676ea49">{{r}}</view></view></view><view class="photo-section section-card data-v-4676ea49"><view class="section-label data-v-4676ea49">服务前后对比</view><view class="photo-group data-v-4676ea49"><view class="photo-group-title data-v-4676ea49">服务前</view><view wx:if="{{s}}" class="photo-grid data-v-4676ea49"><image wx:for="{{t}}" wx:for-item="img" wx:key="a" src="{{img.b}}" class="photo-image data-v-4676ea49" mode="aspectFill"/></view><view wx:else class="photo-empty data-v-4676ea49">暂无照片</view></view><view class="photo-group data-v-4676ea49" style="margin-top:16px"><view class="photo-group-title data-v-4676ea49">服务后</view><view wx:if="{{v}}" class="photo-grid data-v-4676ea49"><image wx:for="{{w}}" wx:for-item="img" wx:key="a" src="{{img.b}}" class="photo-image data-v-4676ea49" mode="aspectFill"/></view><view wx:else class="photo-empty data-v-4676ea49">暂无照片</view></view></view><view class="remark-section section-card data-v-4676ea49"><view class="section-label data-v-4676ea49">备注</view><view class="remark-content data-v-4676ea49">{{x}}</view></view><view class="action-section data-v-4676ea49"><block wx:if="{{y}}"><button open-type="share" class="van-button van-button--primary van-button--round van-button--block share-btn data-v-4676ea49"><app-icon wx:if="{{z}}" class="data-v-4676ea49" style="margin-right:6px" u-i="4676ea49-1" bind:__l="__l" u-p="{{z}}"/> 转发给宠主 </button><button class="van-button van-button--block btn-ghost data-v-4676ea49" bindtap="{{A}}">生成海报 · 保存到相册</button></block><block wx:else><button class="van-button van-button--primary van-button--round van-button--block data-v-4676ea49" bindtap="{{B}}"> 联系门店 </button><button class="van-button van-button--block btn-ghost data-v-4676ea49" bindtap="{{C}}">导航去门店</button><button class="van-button van-button--block btn-ghost data-v-4676ea49" style="margin-top:12px" bindtap="{{D}}">我也要预约</button></block></view></view><canvas id="reportPosterCanvas" type="2d" class="poster-canvas-offscreen data-v-4676ea49"/></view>

View File

@ -1 +1 @@
.report-view.data-v-ed21e379{background:#f5f7fb;min-height:100vh}.loading-wrap.data-v-ed21e379{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;gap:16px;color:#999}.loading-spinner.data-v-ed21e379{width:32px;height:32px;border:3px solid #e0e0e0;border-top-color:#07c160;border-radius:50%;animation:spin-ed21e379 .8s linear infinite}@keyframes spin-ed21e379{to{transform:rotate(360deg)}}.not-found.data-v-ed21e379{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh}.report-content.data-v-ed21e379{max-width:430px;margin:0 auto;background:#f8fafc;min-height:100vh;box-shadow:0 10px 30px rgba(15,23,42,.06)}.brand-header.data-v-ed21e379{background:linear-gradient(135deg,#22c55e,#16a34a);padding:20px 20px 18px;text-align:center;color:#fff;border-radius:0 0 16px 16px;box-shadow:0 8px 20px rgba(34,197,94,.24);position:relative}.header-actions.data-v-ed21e379{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.header-btn.data-v-ed21e379{width:30px;height:30px;border-radius:999px;border:1px solid rgba(255,255,255,.45);background:rgba(255,255,255,.2);display:inline-flex;align-items:center;justify-content:center}.header-placeholder.data-v-ed21e379{width:30px;height:30px}.brand-logo.data-v-ed21e379{font-size:20px;font-weight:700;letter-spacing:1px;margin-bottom:4px}.brand-sub.data-v-ed21e379{font-size:12px;opacity:.7;margin-bottom:12px}.brand-contact.data-v-ed21e379{font-size:12px;opacity:.85;display:flex;justify-content:center;gap:16px;flex-wrap:wrap}.report-title-wrap.data-v-ed21e379{text-align:center;padding:20px 20px 14px}.report-title.data-v-ed21e379{font-size:22px;font-weight:700;color:#333}.report-time.data-v-ed21e379{font-size:13px;color:#999;margin-top:6px}.service-info.data-v-ed21e379{margin:0 16px 12px;border-radius:14px!important}.section-card.data-v-ed21e379{margin:0 16px 12px;background:#fff;border:1px solid #e8edf4;border-radius:14px;padding:12px;box-shadow:0 6px 16px rgba(15,23,42,.04)}.section-label.data-v-ed21e379{font-size:15px;font-weight:700;color:#1f2937;margin-bottom:10px}.photo-group-title.data-v-ed21e379{font-size:13px;color:#64748b;margin-bottom:8px}.photo-grid.data-v-ed21e379{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.photo-image.data-v-ed21e379{width:100%;aspect-ratio:1 / 1;border-radius:8px;border:1px solid #e5e7eb}.photo-empty.data-v-ed21e379{width:100%;height:80px;background:#f1f5f9;border:1px dashed #d1d9e6;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:13px}.remark-content.data-v-ed21e379{background:#f8fafc;border:1px solid #e8edf4;border-radius:12px;padding:14px;font-size:14px;color:#64748b;line-height:1.6;min-height:60px}.action-section.data-v-ed21e379{margin:0 16px 24px;display:flex;flex-direction:column;gap:12px}.share-btn.data-v-ed21e379{margin-top:0!important;box-shadow:0 6px 14px rgba(34,197,94,.2)!important}.btn-ghost.data-v-ed21e379{margin-top:0!important;background:#fff!important;color:#666!important;border:1px solid #e0e0e0!important;box-shadow:none!important}.customer-greeting.data-v-ed21e379{margin:-10px 16px 12px;padding:14px 16px;background:#fff;border-radius:12px;font-size:14px;color:#475569;line-height:1.5;box-shadow:0 4px 12px rgba(0,0,0,.03);position:relative;z-index:2}.customer-greeting .highlight.data-v-ed21e379{color:#16a34a;font-weight:700;margin:0 2px} .poster-canvas-offscreen.data-v-4676ea49{position:fixed;left:-9999px;top:0;width:375px;height:550px;pointer-events:none}.report-view.data-v-4676ea49{background:#f5f7fb;min-height:100vh}.loading-wrap.data-v-4676ea49{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;gap:16px;color:#999}.loading-spinner.data-v-4676ea49{width:32px;height:32px;border:3px solid #e0e0e0;border-top-color:#07c160;border-radius:50%;animation:spin-4676ea49 .8s linear infinite}@keyframes spin-4676ea49{to{transform:rotate(360deg)}}.not-found.data-v-4676ea49{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh}.report-content.data-v-4676ea49{max-width:430px;margin:0 auto;background:#f8fafc;min-height:100vh;box-shadow:0 10px 30px rgba(15,23,42,.06)}.brand-header.data-v-4676ea49{background:linear-gradient(135deg,#22c55e,#16a34a);padding:20px 20px 18px;text-align:center;color:#fff;border-radius:0 0 16px 16px;box-shadow:0 8px 20px rgba(34,197,94,.24);position:relative}.header-actions.data-v-4676ea49{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.header-btn.data-v-4676ea49{width:30px;height:30px;border-radius:999px;border:1px solid rgba(255,255,255,.45);background:rgba(255,255,255,.2);display:inline-flex;align-items:center;justify-content:center}.header-placeholder.data-v-4676ea49{width:30px;height:30px}.brand-logo.data-v-4676ea49{font-size:20px;font-weight:700;letter-spacing:1px;margin-bottom:4px}.brand-sub.data-v-4676ea49{font-size:12px;opacity:.7;margin-bottom:12px}.brand-contact.data-v-4676ea49{font-size:12px;opacity:.85;display:flex;justify-content:center;gap:16px;flex-wrap:wrap}.report-title-wrap.data-v-4676ea49{text-align:center;padding:20px 20px 14px}.report-title.data-v-4676ea49{font-size:22px;font-weight:700;color:#333}.report-time.data-v-4676ea49{font-size:13px;color:#999;margin-top:6px}.service-info.data-v-4676ea49{margin:0 16px 12px;border-radius:14px!important}.section-card.data-v-4676ea49{margin:0 16px 12px;background:#fff;border:1px solid #e8edf4;border-radius:14px;padding:12px;box-shadow:0 6px 16px rgba(15,23,42,.04)}.section-label.data-v-4676ea49{font-size:15px;font-weight:700;color:#1f2937;margin-bottom:10px}.photo-group-title.data-v-4676ea49{font-size:13px;color:#64748b;margin-bottom:8px}.photo-grid.data-v-4676ea49{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.photo-image.data-v-4676ea49{width:100%;aspect-ratio:1 / 1;border-radius:8px;border:1px solid #e5e7eb}.photo-empty.data-v-4676ea49{width:100%;height:80px;background:#f1f5f9;border:1px dashed #d1d9e6;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:13px}.remark-content.data-v-4676ea49{background:#f8fafc;border:1px solid #e8edf4;border-radius:12px;padding:14px;font-size:14px;color:#64748b;line-height:1.6;min-height:60px}.action-section.data-v-4676ea49{margin:0 16px 24px;display:flex;flex-direction:column;gap:12px}.share-btn.data-v-4676ea49{margin-top:0!important;box-shadow:0 6px 14px rgba(34,197,94,.2)!important}.btn-ghost.data-v-4676ea49{margin-top:0!important;background:#fff!important;color:#666!important;border:1px solid #e0e0e0!important;box-shadow:none!important}.customer-greeting.data-v-4676ea49{margin:-10px 16px 12px;padding:14px 16px;background:#fff;border-radius:12px;font-size:14px;color:#475569;line-height:1.5;box-shadow:0 4px 12px rgba(0,0,0,.03);position:relative;z-index:2}.customer-greeting .highlight.data-v-4676ea49{color:#16a34a;font-weight:700;margin:0 2px}

View File

@ -0,0 +1 @@
"use strict";const l=750;function e(l,e,t,f,i,n){l.beginPath(),l.moveTo(e+n,t),l.lineTo(e+f-n,t),l.quadraticCurveTo(e+f,t,e+f,t+n),l.lineTo(e+f,t+i-n),l.quadraticCurveTo(e+f,t+i,e+f-n,t+i),l.lineTo(e+n,t+i),l.quadraticCurveTo(e,t+i,e,t+i-n),l.lineTo(e,t+n),l.quadraticCurveTo(e,t,e+n,t),l.closePath()}exports.POSTER_H=1100,exports.POSTER_W=l,exports.drawReportPoster=function(t,f){const{storeName:i,storePhone:n,storeAddr:o,petName:s,serviceType:a,timeStr:r,staffName:x,remark:c,beforeImg:T,afterImg:g}=f;t.fillStyle="#ffffff",t.fillRect(0,0,l,1100);const p=t.createLinearGradient(0,0,l,300);p.addColorStop(0,"#07c160"),p.addColorStop(1,"#10b76f"),t.fillStyle=p,t.fillRect(0,0,l,300);const S=i||"宠伴生活馆";if(t.fillStyle="#ffffff",t.font="bold 36px sans-serif",t.textAlign="center",t.fillText(S,375,70),t.font="20px sans-serif",t.globalAlpha=.7,t.fillText("宠物服务,让爱更专业",375,105),t.globalAlpha=1,n||o){t.font="18px sans-serif",t.globalAlpha=.85;const l=[n,o].filter(Boolean).join(" | ");t.fillText(l,375,138),t.globalAlpha=1}t.fillStyle="#333333",t.font="bold 36px sans-serif",t.fillText("服务报告",375,220),t.fillStyle="#f8f6f3",t.beginPath(),e(t,40,260,670,220,20),t.fill();const b=[["宠物名字",s||"-"],["服务项目",a||"-"],["服务时间",r||"-"],["服务技师",x||"-"]];let d=310;t.textAlign="left",b.forEach(([l,e])=>{t.fillStyle="#999999",t.font="22px sans-serif",t.fillText(l,80,d),t.fillStyle="#333333",t.font="bold 24px sans-serif",t.fillText(String(e),220,d),d+=48}),t.fillStyle="#f8f6f3",t.beginPath(),e(t,40,500,670,360,20),t.fill(),t.fillStyle="#333333",t.font="bold 24px sans-serif",t.textAlign="center",t.fillText("服务前后对比",375,545);const y=575,h=260,u=300;t.fillStyle="#e0e0e0",t.beginPath(),e(t,60,y,u,h,16),t.fill(),t.fillStyle="#999999",t.font="20px sans-serif",t.fillText("服务前",210,705),t.fillStyle="#e0e0e0",t.beginPath(),e(t,390,y,u,h,16),t.fill(),t.fillStyle="#999999",t.fillText("服务后",540,705),c&&(t.fillStyle="#f8f6f3",t.beginPath(),e(t,40,880,670,100,20),t.fill(),t.fillStyle="#666666",t.font="22px sans-serif",t.textAlign="left",c.length>30?(t.fillText(c.substring(0,30),70,920),t.fillText(c.substring(30),70,955)):t.fillText(c,70,930)),t.fillStyle="#0f172a",t.font="20px sans-serif",t.textAlign="center",t.fillText("长按识别小程序 · 欢迎再次预约",375,1020),t.fillStyle="#07c160",t.font="bold 22px sans-serif",t.fillText(`${S}`,375,1055),T&&(t.save(),t.beginPath(),e(t,60,y,u,h,16),t.clip(),t.drawImage(T,60,y,u,h),t.restore()),g&&(t.save(),t.beginPath(),e(t,390,y,u,h,16),t.clip(),t.drawImage(g,390,y,u,h),t.restore())};