@yeez-tech/user-my-order 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,35 +1,33 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, watch as _ } from "vue";
2
- import { ChevronDown as v, ChevronLeft as y, ChevronRight as b, ChevronUp as x, Download as S, FileText as C, Folder as w, MessageSquare as T, Pause as E, Play as D } from "lucide-vue-next";
3
- //#region src/modules/PrepaidOrders.vue?vue&type=script&setup=true&lang.ts
4
- var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k = {
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, watch as _, withCtx as v, withModifiers as y } from "vue";
2
+ import { ChevronDown as b, ChevronLeft as x, ChevronRight as S, ChevronUp as ee, Download as te, FileText as C, Folder as w, MessageSquare as T, Pause as E, Play as D } from "lucide-vue-next";
3
+ import { Modal as O, Tooltip as k } from "@arco-design/web-vue";
4
+ //#region src/assets/icons/refund-apply.svg?url
5
+ var A = "data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_469_5060)'%3e%3cpath%20d='M9.05029%207.46143C9.22046%207.46143%209.38407%207.52958%209.50439%207.6499C9.62457%207.77013%209.69179%207.93305%209.69189%208.10303V12.2085C9.69313%2012.2935%209.67768%2012.3786%209.646%2012.4575C9.61431%2012.5363%209.56696%2012.608%209.50732%2012.6685C9.44765%2012.729%209.37675%2012.7773%209.29834%2012.8101C9.21989%2012.8429%209.13532%2012.8599%209.05029%2012.8599C8.96591%2012.8598%208.88212%2012.8434%208.8042%2012.811C8.72618%2012.7786%208.65579%2012.7303%208.59619%2012.6704C8.5366%2012.6105%208.48957%2012.5396%208.45752%2012.4614C8.42549%2012.3833%208.40831%2012.2998%208.40869%2012.2153V8.10303C8.40879%207.93301%208.47694%207.77013%208.59717%207.6499C8.7174%207.52967%208.88027%207.46153%209.05029%207.46143Z'%20fill='%234749AD'%20stroke='white'%20stroke-width='0.2'/%3e%3cpath%20d='M11.915%205.14648C11.9989%205.15632%2012.0805%205.18244%2012.1543%205.22363C12.2279%205.26481%2012.2924%205.32052%2012.3447%205.38672C12.3971%205.45299%2012.436%205.5291%2012.459%205.61035C12.4819%205.69154%2012.4893%205.77656%2012.4795%205.86035C12.4696%205.94418%2012.4425%206.02494%2012.4014%206.09863C12.3602%206.17233%2012.3055%206.23769%2012.2393%206.29004L9.0293%208.82715L6.04785%206.28516C5.91816%206.17487%205.83795%206.01735%205.82422%205.84766C5.81053%205.67801%205.86436%205.50954%205.97461%205.37988C6.08488%205.25032%206.24252%205.16997%206.41211%205.15625C6.58171%205.1426%206.75026%205.19642%206.87988%205.30664L9%207.10742L9.0625%207.16016L9.12695%207.10938L11.4414%205.28027C11.5077%205.22796%2011.5838%205.18902%2011.665%205.16602C11.7462%205.14305%2011.8312%205.13666%2011.915%205.14648Z'%20fill='%234749AD'%20stroke='white'%20stroke-width='0.2'/%3e%3cpath%20d='M6.83301%2010.0825H11.2002L11.3193%2010.1021C11.4363%2010.1329%2011.5433%2010.196%2011.627%2010.2856C11.7384%2010.4051%2011.7998%2010.5627%2011.7998%2010.7261C11.7998%2010.8894%2011.7384%2011.047%2011.627%2011.1665C11.5156%2011.2858%2011.363%2011.3582%2011.2002%2011.3696H6.83301C6.74472%2011.3758%206.65569%2011.364%206.57227%2011.3345C6.48896%2011.3049%206.4123%2011.2581%206.34766%2011.1978C6.28308%2011.1374%206.23152%2011.0639%206.19629%2010.9829C6.16113%2010.9019%206.14258%2010.8144%206.14258%2010.7261C6.14258%2010.6377%206.16111%2010.5503%206.19629%2010.4692C6.23153%2010.3882%206.28306%2010.3147%206.34766%2010.2544C6.41231%2010.1941%206.48894%2010.1472%206.57227%2010.1177C6.61405%2010.1029%206.65748%2010.0924%206.70117%2010.0864L6.83301%2010.0825ZM6.83984%208.23193H11.2354C11.3196%208.23193%2011.4036%208.24852%2011.4814%208.28076C11.5592%208.313%2011.6299%208.36088%2011.6895%208.42041C11.7489%208.47994%2011.7959%208.55068%2011.8281%208.62842C11.8603%208.70614%2011.8769%208.78941%2011.877%208.87354C11.877%208.95779%2011.8604%209.04179%2011.8281%209.11963C11.7959%209.19734%2011.7489%209.26813%2011.6895%209.32764C11.63%209.3871%2011.5591%209.43407%2011.4814%209.46631C11.4036%209.49855%2011.3196%209.51514%2011.2354%209.51514H6.83984C6.75567%209.51513%206.6725%209.4985%206.59473%209.46631C6.51699%209.43411%206.44624%209.3871%206.38672%209.32764C6.32717%209.26809%206.27931%209.19743%206.24707%209.11963C6.21483%209.04179%206.19824%208.95779%206.19824%208.87354C6.19829%208.78943%206.21489%208.70612%206.24707%208.62842C6.27931%208.55058%206.32714%208.47999%206.38672%208.42041C6.44627%208.3609%206.51695%208.31298%206.59473%208.28076C6.67242%208.24864%206.75577%208.23195%206.83984%208.23193Z'%20fill='%234749AD'%20stroke='white'%20stroke-width='0.2'/%3e%3cpath%20d='M5.15723%201.81152C6.75958%200.954924%208.60233%200.658391%2010.3926%200.96875C12.183%201.2792%2013.8186%202.17916%2015.0391%203.52539C16.2596%204.87162%2016.9949%206.58723%2017.1289%208.39941C17.2628%2010.2115%2016.7875%2012.0163%2015.7783%2013.5273C15.6716%2013.6776%2015.5104%2013.7808%2015.3291%2013.8145C15.1471%2013.8482%2014.9586%2013.8099%2014.8047%2013.707C14.6508%2013.6041%2014.5433%2013.4448%2014.5049%2013.2637C14.4667%2013.0831%2014.5004%2012.8945%2014.5986%2012.7383C15.4738%2011.4275%2015.8611%209.8513%2015.6934%208.28418C15.5255%206.71683%2014.8128%205.25794%2013.6797%204.16211C12.5466%203.06633%2011.0652%202.40243%209.49316%202.28711C7.92107%202.17178%206.35804%202.61251%205.07715%203.53125C3.79658%204.44991%202.87914%205.78869%202.48438%207.31445C2.08961%208.84054%202.24227%2010.4572%202.91699%2011.8818C3.59167%2013.3063%204.7451%2014.4489%206.17578%2015.1104C7.6066%2015.7718%209.22472%2015.9099%2010.7471%2015.501H10.748C10.8382%2015.4757%2010.9324%2015.4684%2011.0254%2015.4795C11.1183%2015.4906%2011.2084%2015.5196%2011.29%2015.5654C11.3717%2015.6113%2011.4431%2015.6735%2011.501%2015.7471C11.5589%2015.8207%2011.6017%2015.9049%2011.627%2015.9951C11.6522%2016.0853%2011.6596%2016.1795%2011.6484%2016.2725C11.6373%2016.3654%2011.6084%2016.4555%2011.5625%2016.5371C11.5166%2016.6188%2011.4545%2016.6902%2011.3809%2016.748C11.3072%2016.8059%2011.223%2016.8487%2011.1328%2016.874C10.437%2017.0586%209.71991%2017.152%209%2017.1514C7.18299%2017.1513%205.41783%2016.5446%203.98535%2015.4268C2.55291%2014.3089%201.5354%2012.7439%201.09375%2010.9814C0.652154%209.21879%200.811584%207.35855%201.54785%205.69727C2.28413%204.03603%203.55478%202.66824%205.15723%201.81152Z'%20fill='%234749AD'%20stroke='white'%20stroke-width='0.2'/%3e%3cpath%20d='M13.8989%2011.48C13.9954%2011.4801%2014.0916%2011.5003%2014.1802%2011.5386C14.2686%2011.5768%2014.3484%2011.6326%2014.4146%2011.7026C14.4808%2011.7728%2014.5318%2011.8561%2014.5649%2011.9468L14.5669%2011.9517L15.1177%2013.2368L15.1577%2013.3286L15.2495%2013.2896L16.5347%2012.7388C16.6204%2012.7021%2016.7129%2012.6822%2016.8062%2012.6812C16.8993%2012.6802%2016.9921%2012.6982%2017.0786%2012.7329C17.165%2012.7676%2017.2435%2012.8192%2017.3101%2012.8843C17.3768%2012.9495%2017.4306%2013.027%2017.4673%2013.1128C17.5039%2013.1985%2017.5229%2013.2911%2017.5239%2013.3843C17.5249%2013.4775%2017.5078%2013.5703%2017.4731%2013.6567C17.4385%2013.7431%2017.3868%2013.8216%2017.3218%2013.8882C17.2892%2013.9215%2017.2536%2013.9518%2017.2153%2013.978L17.0933%2014.0454L15.0806%2014.9126C14.9905%2014.9502%2014.894%2014.9694%2014.7964%2014.9692H14.7944C14.654%2014.9717%2014.5159%2014.9323%2014.3979%2014.856C14.28%2014.7796%2014.1875%2014.6698%2014.1323%2014.5405L13.2642%2012.5103L13.2622%2012.5054L13.2114%2012.3706C13.1992%2012.3241%2013.1915%2012.2763%2013.189%2012.228C13.1839%2012.1317%2013.1986%2012.0353%2013.2319%2011.9448C13.2653%2011.8544%2013.317%2011.7716%2013.3833%2011.7017C13.4498%2011.6317%2013.53%2011.5756%2013.6187%2011.5376C13.7072%2011.4997%2013.8026%2011.4799%2013.8989%2011.48Z'%20fill='%234749AD'%20stroke='white'%20stroke-width='0.2'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_469_5060'%3e%3crect%20width='18'%20height='18'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", j = "data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.6302%205.86255L15.0705%202.09605C14.9904%201.90146%2014.8541%201.73514%2014.6791%201.61829C14.504%201.50144%2014.2982%201.43935%2014.0877%201.43995H4.00771C3.57661%201.43995%203.1914%201.69734%203.0258%202.09605L1.4643%205.86255C1.4103%205.99215%201.3833%206.12895%201.3833%206.27024V15.6392C1.3833%2016.2252%201.8603%2016.7022%202.44621%2016.7022H15.6483C16.2342%2016.7022%2016.7112%2016.2252%2016.7112%2015.6392V6.26936C16.7112%206.12896%2016.6842%205.99215%2016.6302%205.86257V5.86255ZM4.0203%202.51995H14.0778L15.3828%205.66995H2.71351L4.0203%202.51995ZM2.4633%2015.6212L2.46151%206.74995H15.6312V15.6212H2.4633Z'%20fill='%234749AD'/%3e%3cpath%20d='M10.3598%2013.9039H6.05957V12.8239H10.3598C10.9853%2012.8239%2011.4947%2012.3145%2011.4947%2011.689C11.4947%2011.0635%2010.9853%2010.5541%2010.3598%2010.5541H6.16307V9.60455L8.02426%207.76855L8.78297%208.53716L7.83347%209.47407H10.3598C11.5811%209.47407%2012.5747%2010.4677%2012.5747%2011.689C12.5747%2012.9103%2011.5811%2013.9039%2010.3598%2013.9039Z'%20fill='%234749AD'/%3e%3c/svg%3e", M = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, N = {
5
6
  key: 0,
6
7
  class: "space-y-6"
7
- }, A = {
8
- class: "px-6 py-3 bg-[#ffffff]",
9
- style: { "border-bottom": "1px solid #E5E6E9" }
10
- }, j = { class: "flex flex-col md:flex-row md:items-center md:justify-between gap-2" }, M = { class: "flex flex-wrap items-center gap-4" }, N = { class: "text-[11px] font-bold text-[#262626]" }, P = { class: "text-[11px] font-medium text-[#262626]" }, F = {
8
+ }, P = ["onClick"], ne = { class: "flex flex-col md:flex-row md:items-center md:justify-between gap-2" }, F = { class: "flex flex-wrap items-center gap-4" }, I = { class: "text-[12px] font-medium text-[#262626]" }, L = { class: "text-[12px] font-medium text-[#262626]" }, re = {
11
9
  key: 0,
12
- class: "text-[11px] font-medium text-[#262626]"
13
- }, I = ["onClick"], L = { class: "flex items-center gap-4" }, R = { class: "text-[11px] font-bold text-[#262626]" }, ee = { class: "relative" }, te = { class: "flex items-start gap-4" }, ne = { class: "w-12 h-12 rounded overflow-hidden flex-shrink-0" }, re = ["src", "alt"], ie = { class: "flex-1 min-w-0" }, ae = { class: "flex flex-col md:flex-row md:items-center md:justify-between gap-2" }, oe = { class: "min-w-0 max-w-[400px]" }, se = ["onClick", "title"], ce = { class: "flex items-center gap-4" }, le = {
10
+ class: "text-[12px] font-medium text-[#262626]"
11
+ }, ie = ["onClick"], ae = { class: "flex items-center gap-4" }, oe = { class: "text-[12px] font-medium text-[#262626]" }, se = { class: "relative" }, ce = ["onClick"], le = { class: "flex items-start gap-4" }, ue = { class: "w-12 h-12 rounded overflow-hidden flex-shrink-0" }, de = ["src", "alt"], fe = { class: "flex-1 min-w-0" }, pe = { class: "flex flex-col md:flex-row md:items-center md:justify-between gap-2" }, me = { class: "min-w-0 max-w-[400px]" }, he = ["title"], ge = { class: "flex items-center gap-4" }, _e = {
14
12
  key: 0,
15
13
  class: "flex-1 max-w-[500px] min-w-[300px]"
16
- }, ue = { class: "flex flex-col gap-1" }, z = { class: "flex items-center justify-between" }, B = { class: "text-xs font-medium text-[#262626]" }, V = { class: "text-xs font-medium text-[#262626]" }, H = { class: "w-full h-2 bg-slate-100 rounded-full overflow-hidden relative" }, U = { class: "absolute inset-0 flex items-center justify-center pointer-events-none" }, de = { class: "text-[10px] font-medium text-slate-600" }, fe = { class: "text-[10px] font-medium text-white" }, pe = { class: "flex items-center justify-between" }, me = { class: "text-xs font-medium text-[#262626]" }, he = {
14
+ }, ve = { class: "flex flex-col gap-1" }, ye = { class: "flex items-center justify-between" }, be = { class: "text-xs font-medium text-[#262626]" }, xe = { class: "text-xs font-medium text-[#262626]" }, Se = { class: "w-full h-2 bg-slate-100 rounded-full overflow-hidden relative" }, Ce = { class: "absolute inset-0 flex items-center justify-center pointer-events-none" }, we = { class: "text-[10px] font-medium text-slate-600" }, Te = { class: "text-[10px] font-medium text-white" }, Ee = { class: "flex items-center justify-between" }, De = { class: "text-xs font-medium text-[#262626]" }, Oe = {
17
15
  key: 0,
18
16
  class: "text-xs font-medium text-[#262626]"
19
- }, ge = { class: "flex items-center gap-2" }, _e = {
17
+ }, ke = { class: "flex items-center gap-2" }, Ae = {
20
18
  key: 0,
21
19
  class: "flex items-center gap-2 mr-4"
22
- }, ve = { class: "text-xs font-medium text-[#262626]" }, ye = { class: "flex items-center gap-2 w-[80px] justify-end" }, be = ["onClick"], xe = ["onClick"], Se = {
20
+ }, je = { class: "text-xs font-medium text-[#262626]" }, Me = { class: "flex items-center gap-2 w-[80px] justify-end" }, Ne = ["onClick"], Pe = ["onClick"], Fe = ["onClick"], Ie = ["src"], Le = ["onClick"], Re = ["src"], ze = {
23
21
  key: 0,
24
22
  class: "absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-[#ffffff] to-transparent pointer-events-none"
25
- }, Ce = {
23
+ }, Be = {
26
24
  key: 1,
27
25
  class: "bg-[#ffffff] p-10 rounded-[8px] shadow-sm flex flex-col items-center justify-center text-center",
28
26
  style: { border: "1px solid #E5E6E9" }
29
- }, we = { class: "w-16 h-16 rounded-full bg-slate-50 flex items-center justify-center text-slate-400 mb-4" }, Te = {
27
+ }, Ve = { class: "w-16 h-16 rounded-full bg-slate-50 flex items-center justify-center text-slate-400 mb-4" }, He = {
30
28
  key: 2,
31
29
  class: "flex items-center justify-center gap-2 mt-6"
32
- }, Ee = ["disabled"], De = { class: "text-sm font-bold text-[#262626]" }, Oe = ["disabled"], W = /* @__PURE__ */ c({
30
+ }, Ue = ["disabled"], We = { class: "text-sm font-bold text-[#262626]" }, Ge = ["disabled"], R = /* @__PURE__ */ c({
33
31
  __name: "PrepaidOrders",
34
32
  props: {
35
33
  orders: {},
@@ -39,7 +37,8 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
39
37
  totalPages: {},
40
38
  isServerPagination: { type: Boolean },
41
39
  downloadStates: {},
42
- downloadStatusText: {}
40
+ downloadStatusText: {},
41
+ refundStates: {}
43
42
  },
44
43
  emits: [
45
44
  "page-change",
@@ -49,65 +48,84 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
49
48
  "pause-download",
50
49
  "resume-download",
51
50
  "open-file",
52
- "contact-seller"
51
+ "contact-seller",
52
+ "request-refund",
53
+ "request-after-sales"
53
54
  ],
54
55
  setup(t, { emit: c }) {
55
- let f = t, m = c, _ = (e) => e ? e.substring(0, 16) : "--", v = (e, t) => {
56
- m("view-product", e, t);
57
- }, x = {
56
+ let m = t, _ = c, b = (e) => e ? e.substring(0, 16) : "--", ee = (e, t) => {
57
+ _("view-product", e, t);
58
+ }, R = {
58
59
  idle: "下载数据",
59
60
  preparing: "资源加载中...",
60
61
  downloading: "下载中...",
61
62
  paused: "下载已暂停",
62
63
  decrypting: "解密中...",
63
64
  completed: "下载完成"
64
- }, W = (e, t) => f.downloadStates?.[`${e}-${t}`], G = (e) => f.downloadStatusText?.[e] || x[e], K = (e, t) => {
65
- let n = W(e, t);
65
+ }, z = (e, t) => m.downloadStates?.[`${e}-${t}`], B = (e) => m.downloadStatusText?.[e] || R[e], V = (e, t) => {
66
+ let n = z(e, t);
66
67
  if (!n) return "0.00";
67
68
  let r = Number.parseFloat(n.fileSize || "0");
68
69
  return !Number.isFinite(r) || r <= 0 ? "0.00" : (n.progress * r / 100).toFixed(2);
69
- }, q = (e, t) => {
70
- let n = W(e, t);
70
+ }, H = (e, t) => {
71
+ let n = z(e, t);
71
72
  if (!n || n.status === "idle") {
72
- m("download", t);
73
+ _("download", t);
73
74
  return;
74
75
  }
75
76
  if (n.status === "paused") {
76
- m("resume-download", t);
77
+ _("resume-download", t);
77
78
  return;
78
79
  }
79
80
  if (n.status === "completed") {
80
- m("open-file", t);
81
+ _("open-file", t);
82
+ return;
83
+ }
84
+ _("pause-download", t);
85
+ }, U = f(""), W = f(!1), G = (e, t) => m.refundStates?.[`${e}-${t}`], K = (e) => !e.isExchange && !e.isGift, q = (e) => {
86
+ U.value = e, W.value = !0;
87
+ }, J = () => {
88
+ let e = U.value;
89
+ if (!e) {
90
+ Y();
81
91
  return;
82
92
  }
83
- m("pause-download", t);
84
- }, J = {
93
+ _("request-refund", e), Y();
94
+ }, Y = () => {
95
+ W.value = !1, U.value = "";
96
+ }, X = (e) => {
97
+ _("request-after-sales", e);
98
+ }, Z = {
85
99
  已付款: "#3B82F6",
86
100
  待审核: "#F59E0B",
87
101
  审核通过: "#22C55E",
88
102
  退款中: "#3B82F6",
89
103
  已退款: "#22C55E",
90
104
  交易成功: "#22C55E"
91
- }, Y = {
105
+ }, Ke = {
92
106
  已付款: "已付款",
93
107
  待审核: "待审核",
94
108
  审核通过: "审核通过",
95
109
  退款中: "退款中",
96
110
  已退款: "已退款",
97
111
  交易成功: "交易成功"
98
- }, X = (e) => J[e] || "#262626", Z = (e) => Y[e] || "";
99
- return (c, f) => (d(), i("section", O, [t.orders.length > 0 ? (d(), i("div", k, [(d(!0), i(e, null, p(t.orders, (t) => (d(), i("div", {
112
+ }, Q = (e) => Z[e] || "#262626", $ = (e) => Ke[e] || "";
113
+ return (c, f) => (d(), i(e, null, [a("section", M, [t.orders.length > 0 ? (d(), i("div", N, [(d(!0), i(e, null, p(t.orders, (t) => (d(), i("div", {
100
114
  key: t.id,
101
115
  class: "bg-[#ffffff] rounded-[8px] shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md",
102
116
  style: { border: "1px solid #E5E6E9" }
103
- }, [a("div", A, [a("div", j, [a("div", M, [
104
- a("h3", N, "订单编号:" + h(t.orderNumber || t.id), 1),
105
- a("span", P, "共 " + h(t.products.length) + " 件商品", 1),
106
- t.createTime ? (d(), i("span", F, "购买时间: " + h(_(t.createTime)), 1)) : r("", !0),
117
+ }, [a("div", {
118
+ class: "px-6 py-3 bg-[#ffffff] hover:bg-slate-50 cursor-pointer transition-all duration-200",
119
+ style: { "border-bottom": "1px solid #E5E6E9" },
120
+ onClick: (e) => c.$emit("view-detail", t)
121
+ }, [a("div", ne, [a("div", F, [
122
+ a("h3", I, "订单编号:" + h(t.orderNumber || t.id), 1),
123
+ a("span", L, "共 " + h(t.products.length) + " 件商品", 1),
124
+ t.createTime ? (d(), i("span", re, "购买时间: " + h(b(t.createTime)), 1)) : r("", !0),
107
125
  a("span", {
108
- class: "text-[11px] font-medium text-[#4749ad] flex items-center gap-1 cursor-pointer hover:text-[#4749ad] transition-colors",
109
- onClick: (e) => c.$emit("view-detail", t)
110
- }, [...f[2] ||= [o(" 订单详情 ", -1), a("svg", {
126
+ class: "text-[12px] font-medium text-[#4749ad] flex items-center gap-1 hover:text-[#4749ad] transition-colors",
127
+ onClick: y((e) => c.$emit("view-detail", t), ["stop"])
128
+ }, [...f[3] ||= [o(" 订单详情 ", -1), a("svg", {
111
129
  xmlns: "http://www.w3.org/2000/svg",
112
130
  class: "h-3 w-3 text-[#4749ad]",
113
131
  fill: "none",
@@ -118,52 +136,52 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
118
136
  "stroke-linejoin": "round",
119
137
  "stroke-width": "2",
120
138
  d: "M9 5l7 7-7 7"
121
- })], -1)]], 8, I)
122
- ]), a("div", L, [a("p", R, "实付金额:¥" + h(t.totalAmount.toFixed(2)), 1), Z(t.status) ? (d(), i("span", {
139
+ })], -1)]], 8, ie)
140
+ ]), a("div", ae, [a("p", oe, "实付金额:¥" + h(t.totalAmount.toFixed(2)), 1), $(t.status) ? (d(), i("span", {
123
141
  key: 0,
124
142
  class: "px-2 py-0.5 rounded-full text-[11px] font-bold min-w-[70px] text-center bg-transparent",
125
143
  style: u({
126
- color: X(t.status),
127
- border: "1px solid " + X(t.status)
144
+ color: Q(t.status),
145
+ border: "1px solid " + Q(t.status)
128
146
  })
129
- }, h(Z(t.status)), 5)) : r("", !0)])])]), a("div", ee, [a("div", { class: l({ "max-h-[360px] overflow-y-auto": t.products.length > 3 }) }, [(d(!0), i(e, null, p(t.products, (e, o) => (d(), i("div", {
130
- key: e.id,
131
- class: "px-6 py-4 hover:bg-slate-50 transition-all duration-200 hover:shadow-sm"
132
- }, [a("div", te, [a("div", ne, [a("img", {
133
- src: e.image,
134
- alt: e.name,
147
+ }, h($(t.status)), 5)) : r("", !0)])])], 8, P), a("div", se, [a("div", { class: l({ "max-h-[360px] overflow-y-auto": t.products.length > 3 }) }, [(d(!0), i(e, null, p(t.products, (o, p) => (d(), i("div", {
148
+ key: o.id,
149
+ class: "px-6 py-4 hover:bg-slate-50 transition-all duration-200 hover:shadow-sm cursor-pointer",
150
+ onClick: (e) => ee(t, o)
151
+ }, [a("div", le, [a("div", ue, [a("img", {
152
+ src: o.image,
153
+ alt: o.name,
135
154
  class: "w-full h-full object-cover"
136
- }, null, 8, re)]), a("div", ie, [a("div", ae, [a("div", oe, [a("p", {
137
- class: "text-sm font-bold text-[#262626] truncate cursor-pointer hover:text-[#3F69B4] transition-colors",
138
- onClick: (n) => v(t, e),
139
- title: e.name
140
- }, h(e.name), 9, se)]), a("div", ce, [W(t.id, e.id) && [
155
+ }, null, 8, de)]), a("div", fe, [a("div", pe, [a("div", me, [a("p", {
156
+ class: "text-sm font-bold text-[#262626] truncate hover:text-[#3F69B4] transition-colors",
157
+ title: o.name
158
+ }, h(o.name), 9, he)]), a("div", ge, [z(t.id, o.id) && [
141
159
  "preparing",
142
160
  "downloading",
143
161
  "paused",
144
162
  "decrypting"
145
- ].includes(W(t.id, e.id).status) ? (d(), i("div", le, [a("div", ue, [
146
- a("div", z, [a("span", B, h(G(W(t.id, e.id).status)), 1), a("span", V, h(K(t.id, e.id)) + " MB / " + h(W(t.id, e.id).fileSize), 1)]),
147
- a("div", H, [
163
+ ].includes(z(t.id, o.id).status) ? (d(), i("div", _e, [a("div", ve, [
164
+ a("div", ye, [a("span", be, h(B(z(t.id, o.id).status)), 1), a("span", xe, h(V(t.id, o.id)) + " MB / " + h(z(t.id, o.id).fileSize), 1)]),
165
+ a("div", Se, [
148
166
  a("div", {
149
167
  class: l(["h-full transition-all duration-300 ease-in-out", {
150
168
  "bg-blue-600": [
151
169
  "preparing",
152
170
  "downloading",
153
171
  "paused"
154
- ].includes(W(t.id, e.id).status),
155
- "bg-green-600": W(t.id, e.id).status === "decrypting"
172
+ ].includes(z(t.id, o.id).status),
173
+ "bg-green-600": z(t.id, o.id).status === "decrypting"
156
174
  }]),
157
- style: u({ width: W(t.id, e.id).progress + "%" })
175
+ style: u({ width: z(t.id, o.id).progress + "%" })
158
176
  }, null, 6),
159
- a("div", U, [a("span", de, h(W(t.id, e.id).progress) + "% ", 1)]),
177
+ a("div", Ce, [a("span", we, h(z(t.id, o.id).progress) + "% ", 1)]),
160
178
  a("div", {
161
179
  class: "absolute inset-0 flex items-center justify-center pointer-events-none overflow-hidden",
162
- style: u({ clipPath: `inset(0 ${100 - W(t.id, e.id).progress}% 0 0)` })
163
- }, [a("span", fe, h(W(t.id, e.id).progress) + "% ", 1)], 4)
180
+ style: u({ clipPath: `inset(0 ${100 - z(t.id, o.id).progress}% 0 0)` })
181
+ }, [a("span", Te, h(z(t.id, o.id).progress) + "% ", 1)], 4)
164
182
  ]),
165
- a("div", pe, [a("span", me, " 预计剩余: " + h(W(t.id, e.id).estimatedTime), 1), ["downloading", "paused"].includes(W(t.id, e.id).status) ? (d(), i("span", he, " 下载速度: " + h(W(t.id, e.id).speed) + " MB/s ", 1)) : r("", !0)])
166
- ])])) : r("", !0), a("div", ge, [W(t.id, e.id)?.status === "completed" ? (d(), i("div", _e, [f[3] ||= a("div", { class: "w-4 h-4 rounded-full bg-green-100 flex items-center justify-center" }, [a("svg", {
183
+ a("div", Ee, [a("span", De, " 预计剩余: " + h(z(t.id, o.id).estimatedTime), 1), ["downloading", "paused"].includes(z(t.id, o.id).status) ? (d(), i("span", Oe, " 下载速度: " + h(z(t.id, o.id).speed) + " MB/s ", 1)) : r("", !0)])
184
+ ])])) : r("", !0), a("div", ke, [z(t.id, o.id)?.status === "completed" ? (d(), i("div", Ae, [f[4] ||= a("div", { class: "w-4 h-4 rounded-full bg-green-100 flex items-center justify-center" }, [a("svg", {
167
185
  xmlns: "http://www.w3.org/2000/svg",
168
186
  class: "h-3 w-3 text-green-600",
169
187
  fill: "none",
@@ -174,38 +192,73 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
174
192
  "stroke-linejoin": "round",
175
193
  "stroke-width": "2",
176
194
  d: "M5 13l4 4L19 7"
177
- })])], -1), a("span", ve, h(G("completed")), 1)])) : r("", !0), a("div", ye, [t.status === "已退款" ? r("", !0) : (d(), i("button", {
178
- key: 0,
179
- class: "w-10 h-10 rounded-full flex items-center justify-center hover:bg-slate-50 transition-all transform hover:scale-105 hover:shadow-md",
180
- onClick: (n) => q(t.id, e.id)
181
- }, [!W(t.id, e.id) || W(t.id, e.id)?.status === "idle" ? (d(), n(g(S), {
182
- key: 0,
183
- size: "16",
184
- class: "text-[#4749ad]"
185
- })) : [
186
- "preparing",
187
- "downloading",
188
- "decrypting"
189
- ].includes(W(t.id, e.id).status) ? (d(), n(g(E), {
190
- key: 1,
191
- size: "16",
192
- class: "text-[#4749ad]"
193
- })) : W(t.id, e.id)?.status === "paused" ? (d(), n(g(D), {
194
- key: 2,
195
- size: "16",
196
- class: "text-[#4749ad]"
197
- })) : W(t.id, e.id)?.status === "completed" ? (d(), n(g(w), {
198
- key: 3,
199
- size: "16",
200
- class: "text-[#4749ad]"
201
- })) : r("", !0)], 8, be)), a("button", {
202
- class: "w-10 h-10 rounded-full flex items-center justify-center hover:bg-slate-50 transition-all transform hover:scale-105 hover:shadow-md",
203
- title: "联系卖家",
204
- onClick: (t) => c.$emit("contact-seller", e.id)
205
- }, [s(g(T), {
206
- size: "16",
207
- class: "text-[#4749ad]"
208
- })], 8, xe)])])])])])])]))), 128))], 2), t.products.length > 3 ? (d(), i("div", Se)) : r("", !0)])]))), 128))])) : (d(), i("div", Ce, [a("div", we, [s(g(C), { size: "24" })]), f[4] ||= a("h3", { class: "text-lg font-bold text-[#262626] mb-6" }, "暂无订单", -1)])), t.totalPages > 1 ? (d(), i("div", Te, [
195
+ })])], -1), a("span", je, h(B("completed")), 1)])) : r("", !0), a("div", Me, [
196
+ s(g(k), { content: "下载数据" }, {
197
+ default: v(() => [t.status === "已退款" ? r("", !0) : (d(), i("button", {
198
+ key: 0,
199
+ class: "w-10 h-10 rounded-full flex items-center justify-center hover:bg-slate-50 transition-all transform hover:scale-105 hover:shadow-md",
200
+ onClick: y((e) => H(t.id, o.id), ["stop"])
201
+ }, [!z(t.id, o.id) || z(t.id, o.id)?.status === "idle" ? (d(), n(g(te), {
202
+ key: 0,
203
+ size: "16",
204
+ class: "text-[#4749ad]"
205
+ })) : [
206
+ "preparing",
207
+ "downloading",
208
+ "decrypting"
209
+ ].includes(z(t.id, o.id).status) ? (d(), n(g(E), {
210
+ key: 1,
211
+ size: "16",
212
+ class: "text-[#4749ad]"
213
+ })) : z(t.id, o.id)?.status === "paused" ? (d(), n(g(D), {
214
+ key: 2,
215
+ size: "16",
216
+ class: "text-[#4749ad]"
217
+ })) : z(t.id, o.id)?.status === "completed" ? (d(), n(g(w), {
218
+ key: 3,
219
+ size: "16",
220
+ class: "text-[#4749ad]"
221
+ })) : r("", !0)], 8, Ne))]),
222
+ _: 2
223
+ }, 1024),
224
+ s(g(k), { content: "联系卖家" }, {
225
+ default: v(() => [a("button", {
226
+ class: "w-10 h-10 rounded-full flex items-center justify-center hover:bg-slate-50 transition-all transform hover:scale-105 hover:shadow-md",
227
+ onClick: y((e) => c.$emit("contact-seller", o.id), ["stop"])
228
+ }, [s(g(T), {
229
+ size: "16",
230
+ class: "text-[#4749ad]"
231
+ })], 8, Pe)]),
232
+ _: 2
233
+ }, 1024),
234
+ K(t) ? (d(), i(e, { key: 0 }, [G(t.id, o.id) === "refundable" ? (d(), n(g(k), {
235
+ key: 0,
236
+ content: "申请退款"
237
+ }, {
238
+ default: v(() => [a("button", {
239
+ class: "w-10 h-10 rounded-full flex items-center justify-center hover:bg-slate-50 transition-all transform hover:scale-105 hover:shadow-md",
240
+ onClick: y((e) => q(o.id), ["stop"])
241
+ }, [a("img", {
242
+ src: g(A),
243
+ alt: "申请退款",
244
+ class: "w-[18px] h-[18px]"
245
+ }, null, 8, Ie)], 8, Fe)]),
246
+ _: 2
247
+ }, 1024)) : G(t.id, o.id) === "after_sales" ? (d(), n(g(k), {
248
+ key: 1,
249
+ content: "联系售后"
250
+ }, {
251
+ default: v(() => [a("button", {
252
+ class: "w-10 h-10 rounded-full flex items-center justify-center hover:bg-slate-50 transition-all transform hover:scale-105 hover:shadow-md",
253
+ onClick: y((e) => X(o.id), ["stop"])
254
+ }, [a("img", {
255
+ src: g(j),
256
+ alt: "联系售后",
257
+ class: "w-[18px] h-[18px]"
258
+ }, null, 8, Re)], 8, Le)]),
259
+ _: 2
260
+ }, 1024)) : r("", !0)], 64)) : r("", !0)
261
+ ])])])])])])], 8, ce))), 128))], 2), t.products.length > 3 ? (d(), i("div", ze)) : r("", !0)])]))), 128))])) : (d(), i("div", Be, [a("div", Ve, [s(g(C), { size: "24" })]), f[5] ||= a("h3", { class: "text-lg font-bold text-[#262626] mb-6" }, "暂无订单", -1)])), t.totalPages > 1 ? (d(), i("div", He, [
209
262
  a("button", {
210
263
  onClick: f[0] ||= (e) => c.$emit("page-change", t.currentPage - 1, t.pageSize),
211
264
  disabled: t.currentPage === 1,
@@ -216,8 +269,8 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
216
269
  height: "32px",
217
270
  border: "1px solid #d1d5db"
218
271
  }
219
- }, [s(g(y), { size: "16" })], 8, Ee),
220
- a("span", De, h(t.currentPage) + " / " + h(t.totalPages), 1),
272
+ }, [s(g(x), { size: "16" })], 8, Ue),
273
+ a("span", We, h(t.currentPage) + " / " + h(t.totalPages), 1),
221
274
  a("button", {
222
275
  onClick: f[1] ||= (e) => c.$emit("page-change", t.currentPage + 1, t.pageSize),
223
276
  disabled: t.currentPage === t.totalPages,
@@ -228,14 +281,34 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
228
281
  height: "32px",
229
282
  border: "1px solid #d1d5db"
230
283
  }
231
- }, [s(g(b), { size: "16" })], 8, Oe)
232
- ])) : r("", !0)]));
284
+ }, [s(g(S), { size: "16" })], 8, Ge)
285
+ ])) : r("", !0)]), s(g(O), {
286
+ visible: W.value,
287
+ "onUpdate:visible": f[2] ||= (e) => W.value = e,
288
+ title: "申请退款",
289
+ footer: !1,
290
+ "mask-closable": !1,
291
+ width: 448,
292
+ "modal-style": { borderRadius: "8px" },
293
+ onCancel: Y
294
+ }, {
295
+ default: v(() => [f[6] ||= a("p", { class: "text-sm text-[#262626] text-center mb-6" }, "确认要申请退款吗?退款成功后您将无法继续下载并使用此数据。", -1), a("div", { class: "flex justify-end gap-3" }, [a("button", {
296
+ style: { border: "none" },
297
+ class: "px-4 py-2 text-sm text-[#262626] rounded-md hover:bg-slate-50 transition-colors cursor-pointer",
298
+ onClick: Y
299
+ }, "取消"), a("button", {
300
+ style: { border: "none" },
301
+ class: "px-4 py-2 text-sm text-white bg-[#4749ad] rounded-md hover:opacity-90 transition-colors cursor-pointer",
302
+ onClick: J
303
+ }, "确认")])]),
304
+ _: 1
305
+ }, 8, ["visible"])], 64));
233
306
  }
234
- }), G = (e, t) => {
307
+ }), z = (e, t) => {
235
308
  let n = e.__vccOpts || e;
236
309
  for (let [e, r] of t) n[e] = r;
237
310
  return n;
238
- }, K = /* @__PURE__ */ G(W, [["__scopeId", "data-v-d8cb4a28"]]), q = { class: "order-management bg-[#F6F4F0] text-[#262626] font-[PingFangSC]" }, J = /* @__PURE__ */ G(/* @__PURE__ */ c({
311
+ }, B = /* @__PURE__ */ z(R, [["__scopeId", "data-v-54548955"]]), V = { class: "order-management bg-[#F6F4F0] text-[#262626] font-[PingFangSC]" }, H = /* @__PURE__ */ z(/* @__PURE__ */ c({
239
312
  __name: "OrderManagement",
240
313
  props: {
241
314
  orders: {},
@@ -254,8 +327,11 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
254
327
  onResumeDownload: {},
255
328
  onOpenFile: {},
256
329
  onContactSeller: {},
330
+ onRequestRefund: {},
331
+ onRequestAfterSales: {},
257
332
  downloadStates: {},
258
- downloadStatusText: {}
333
+ downloadStatusText: {},
334
+ refundStates: {}
259
335
  },
260
336
  setup(e) {
261
337
  let n = e, r = f(n.currentOrderPage), a = t(() => n.currentOrderPage ?? r.value), o = t(() => n.orderItemsPerPage ?? 10);
@@ -279,7 +355,7 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
279
355
  }), h = t(() => n.serverPagination ? n.totalOrderCount : u.value.length);
280
356
  return _(() => n.currentOrderPage, (e) => {
281
357
  r.value = e ?? 1;
282
- }), (t, r) => (d(), i("div", q, [s(K, {
358
+ }), (t, r) => (d(), i("div", V, [s(B, {
283
359
  orders: p.value,
284
360
  "total-orders": h.value,
285
361
  "current-page": a.value,
@@ -288,6 +364,7 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
288
364
  "is-server-pagination": n.serverPagination,
289
365
  "download-states": n.downloadStates,
290
366
  "download-status-text": n.downloadStatusText,
367
+ "refund-states": n.refundStates,
291
368
  onPageChange: l,
292
369
  onViewDetail: r[0] ||= (t) => e.onViewDetail?.(t),
293
370
  onViewProduct: r[1] ||= (t, n) => e.onViewProduct?.(t, n),
@@ -295,7 +372,9 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
295
372
  onPauseDownload: r[3] ||= (t) => e.onPauseDownload?.(t),
296
373
  onResumeDownload: r[4] ||= (t) => e.onResumeDownload?.(t),
297
374
  onOpenFile: r[5] ||= (t) => e.onOpenFile?.(t),
298
- onContactSeller: r[6] ||= (t) => e.onContactSeller?.(t)
375
+ onContactSeller: r[6] ||= (t) => e.onContactSeller?.(t),
376
+ onRequestRefund: r[7] ||= (t) => e.onRequestRefund?.(t),
377
+ onRequestAfterSales: r[8] ||= (t) => e.onRequestAfterSales?.(t)
299
378
  }, null, 8, [
300
379
  "orders",
301
380
  "total-orders",
@@ -304,10 +383,11 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
304
383
  "total-pages",
305
384
  "is-server-pagination",
306
385
  "download-states",
307
- "download-status-text"
386
+ "download-status-text",
387
+ "refund-states"
308
388
  ])]));
309
389
  }
310
- }), [["__scopeId", "data-v-da671205"]]), Y = { class: "order-detail space-y-8 bg-[#ffffff] font-[PingFangSC]" }, X = {
390
+ }), [["__scopeId", "data-v-3199584e"]]), U = { class: "order-detail space-y-8 bg-[#ffffff] font-[PingFangSC]" }, W = {
311
391
  class: "bg-[#ffffff] rounded-[8px] shadow-sm",
312
392
  style: {
313
393
  border: "1px solid #E5E6E9",
@@ -316,136 +396,138 @@ var O = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, k
316
396
  "padding-left": "24px",
317
397
  "padding-right": "24px"
318
398
  }
319
- }, Z = { class: "space-y-3" }, ke = { class: "flex justify-between" }, Ae = { class: "text-[12px] font-medium text-[#262626]" }, je = { class: "flex justify-between items-center" }, Me = { class: "flex justify-between" }, Ne = { class: "text-[12px] font-medium text-[#262626]" }, Pe = { class: "text-[12px] font-medium text-[#262626]" }, Fe = {
399
+ }, G = { class: "space-y-3" }, K = { class: "flex justify-between" }, q = { class: "text-[12px] font-medium text-[#262626]" }, J = { class: "flex justify-between items-center" }, Y = { class: "flex justify-between" }, X = { class: "text-[12px] font-medium text-[#262626]" }, Z = { class: "text-[12px] font-medium text-[#262626]" }, Ke = {
320
400
  key: 0,
321
401
  class: "flex justify-between"
322
- }, Ie = { class: "text-[12px] font-medium text-[#262626]" }, Le = {
402
+ }, Q = { class: "text-[12px] font-medium text-[#262626]" }, $ = {
323
403
  key: 1,
324
404
  class: "flex justify-between"
325
- }, Re = { class: "text-[12px] font-medium text-[#262626]" }, ze = {
405
+ }, qe = { class: "text-[12px] font-medium text-[#262626]" }, Je = {
326
406
  class: "text-[18px] font-bold text-[#262626]",
327
407
  style: { "font-weight": "700" }
328
- }, Be = {
408
+ }, Ye = {
329
409
  class: "bg-[#ffffff] rounded-[8px] shadow-sm",
330
410
  style: {
331
411
  border: "1px solid #E5E6E9",
332
412
  "padding-top": "24px",
333
413
  "padding-bottom": "24px"
334
414
  }
335
- }, Ve = { class: "space-y-4" }, He = { class: "w-12 h-12 rounded overflow-hidden flex-shrink-0" }, Q = ["src", "alt"], Ue = { class: "flex-1 min-w-0" }, We = { class: "flex items-center justify-between mb-2" }, Ge = ["title", "onClick"], Ke = { class: "text-[11px] font-medium text-[#8D8C8B]" }, qe = { class: "flex items-center gap-2" }, Je = {
415
+ }, Xe = { class: "space-y-4" }, Ze = { class: "w-12 h-12 rounded overflow-hidden flex-shrink-0" }, Qe = ["src", "alt"], $e = { class: "flex-1 min-w-0" }, et = { class: "flex items-center justify-between mb-2" }, tt = ["title", "onClick"], nt = { class: "text-[11px] font-medium text-[#8D8C8B]" }, rt = { class: "flex items-center gap-2" }, it = {
336
416
  key: 0,
337
- class: "text-xs font-bold text-[#262626]"
338
- }, Ye = ["onClick"], Xe = {
417
+ class: "text-xs font-medium text-[#262626]"
418
+ }, at = ["onClick"], ot = {
339
419
  key: 0,
340
420
  class: "px-6"
341
- }, Ze = {
421
+ }, st = {
342
422
  class: "mt-4 pt-4 px-6",
343
423
  style: { "border-top": "1px solid #E5E6E9" }
344
- }, Qe = { class: "flex justify-end items-center gap-2" }, $e = { class: "text-sm font-bold text-[#262626]" }, et = {
424
+ }, ct = { class: "flex justify-end items-center gap-2" }, lt = { class: "text-sm font-bold text-[#262626]" }, ut = {
345
425
  key: 0,
346
426
  class: "mt-2 text-xs font-medium text-[#262626] text-right"
347
- }, tt = {
427
+ }, dt = {
348
428
  key: 0,
349
429
  class: "bg-[#ffffff] rounded-[8px] shadow-sm p-6",
350
430
  style: { border: "1px solid #E5E6E9" }
351
- }, $ = /* @__PURE__ */ G(/* @__PURE__ */ c({
431
+ }, ft = /* @__PURE__ */ z(/* @__PURE__ */ c({
352
432
  __name: "OrderDetail",
353
433
  props: { order: {} },
354
434
  emits: ["contact-seller", "view-product"],
355
435
  setup(c, { emit: l }) {
356
- let _ = c, y = l, b = f(!1), S = t(() => _.order.products && _.order.products.length > 5), C = t(() => _.order.products ? b.value ? _.order.products : _.order.products.slice(0, 5) : []), w = () => {
357
- b.value = !b.value;
358
- }, E = (e) => {
436
+ let _ = c, y = l, x = f(!1), S = t(() => _.order.products && _.order.products.length > 5), te = t(() => _.order.products ? x.value ? _.order.products : _.order.products.slice(0, 5) : []), C = () => {
437
+ x.value = !x.value;
438
+ }, w = (e) => {
359
439
  y("contact-seller", e);
360
- }, D = (e) => {
440
+ }, E = (e) => {
361
441
  y("view-product", _.order, e);
362
- }, O = (e, t) => e ? e.length <= t ? e : e.substring(0, t) + "..." : "", k = (e) => {
442
+ }, D = (e, t) => e ? e.length <= t ? e : e.substring(0, t) + "..." : "", O = (e) => {
363
443
  if (!e) return "";
364
444
  let t = new Date(e);
365
445
  return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")} ${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
366
- }, A = (e) => M(e) ? "购买时间" : N(e) ? "兑换时间" : P(e) ? "发放时间" : "购买时间", j = (e) => e.createTime ? e.createTime : e.exchangeTime ? e.exchangeTime : e.issueTime ? e.issueTime : e.createTime || "", M = (e) => !e.isExchange && !e.isGift, N = (e) => e.isExchange, P = (e) => e.isGift, F = {
446
+ }, A = (e) => M(e) ? "购买时间" : N(e) ? "兑换时间" : P(e) ? "发放时间" : "购买时间", j = (e) => e.createTime ? e.createTime : e.exchangeTime ? e.exchangeTime : e.issueTime ? e.issueTime : e.createTime || "", M = (e) => !e.isExchange && !e.isGift, N = (e) => e.isExchange, P = (e) => e.isGift, ne = {
367
447
  已付款: "#3B82F6",
368
448
  待审核: "#F59E0B",
369
449
  审核通过: "#22C55E",
370
450
  退款中: "#3B82F6",
371
451
  已退款: "#22C55E",
372
452
  交易成功: "#22C55E"
373
- }, I = {
453
+ }, F = {
374
454
  已付款: "已付款",
375
455
  待审核: "待审核",
376
456
  审核通过: "审核通过",
377
457
  退款中: "退款中",
378
458
  已退款: "已退款",
379
459
  交易成功: "交易成功"
380
- }, L = (e) => F[e] || "#262626", R = (e) => I[e] || "";
381
- return (t, l) => (d(), i("section", Y, [
460
+ }, I = (e) => ne[e] || "#262626", L = (e) => F[e] || "";
461
+ return (t, l) => (d(), i("section", U, [
382
462
  l[7] ||= a("h2", {
383
463
  class: "text-[18px] font-bold text-[#262626]",
384
464
  style: { "font-weight": "700" }
385
465
  }, "订单信息", -1),
386
- a("div", X, [a("div", Z, [
387
- a("div", ke, [l[0] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "订单编号", -1), a("span", Ae, h(c.order.orderNumber || c.order.id), 1)]),
388
- a("div", je, [l[1] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "交易状态", -1), R(c.order.status) ? (d(), i("span", {
466
+ a("div", W, [a("div", G, [
467
+ a("div", K, [l[0] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "订单编号", -1), a("span", q, h(c.order.orderNumber || c.order.id), 1)]),
468
+ a("div", J, [l[1] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "交易状态", -1), L(c.order.status) ? (d(), i("span", {
389
469
  key: 0,
390
470
  class: "px-2 py-0.5 rounded-full text-[11px] font-bold min-w-[70px] text-center bg-transparent",
391
471
  style: u({
392
- color: L(c.order.status),
393
- border: "1px solid " + L(c.order.status)
472
+ color: I(c.order.status),
473
+ border: "1px solid " + I(c.order.status)
394
474
  })
395
- }, h(R(c.order.status)), 5)) : r("", !0)]),
396
- a("div", Me, [a("span", Ne, h(A(c.order)), 1), a("span", Pe, h(k(j(c.order))), 1)]),
397
- M(c.order) ? (d(), i("div", Fe, [l[2] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "支付方式", -1), a("span", Ie, h(c.order.paymentMethod || "在线支付"), 1)])) : r("", !0),
398
- N(c.order) ? (d(), i("div", Le, [l[3] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "兑换码", -1), a("span", Re, h(c.order.exchangeCode || "ABCD-1234-EFGH-5678"), 1)])) : r("", !0)
475
+ }, h(L(c.order.status)), 5)) : r("", !0)]),
476
+ a("div", Y, [a("span", X, h(A(c.order)), 1), a("span", Z, h(O(j(c.order))), 1)]),
477
+ M(c.order) ? (d(), i("div", Ke, [l[2] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "支付方式", -1), a("span", Q, h(c.order.paymentMethod || "在线支付"), 1)])) : r("", !0),
478
+ N(c.order) ? (d(), i("div", $, [l[3] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "兑换码", -1), a("span", qe, h(c.order.exchangeCode || "ABCD-1234-EFGH-5678"), 1)])) : r("", !0)
399
479
  ])]),
400
- a("h2", ze, "产品信息(共" + h(c.order.products ? c.order.products.length : 0) + "件)", 1),
401
- a("div", Be, [a("div", Ve, [(d(!0), i(e, null, p(C.value, (e, t) => (d(), i("div", {
480
+ a("h2", Je, "产品信息(共" + h(c.order.products ? c.order.products.length : 0) + "件)", 1),
481
+ a("div", Ye, [a("div", Xe, [(d(!0), i(e, null, p(te.value, (e, t) => (d(), i("div", {
402
482
  key: e.id,
403
483
  class: "flex items-start gap-4 px-6 py-4 w-full hover:bg-slate-50 transition-all duration-200 hover:shadow-sm"
404
484
  }, [
405
- a("div", He, [a("img", {
485
+ a("div", Ze, [a("img", {
406
486
  src: e.image,
407
487
  alt: e.name,
408
488
  class: "w-full h-full object-cover"
409
- }, null, 8, Q)]),
410
- a("div", Ue, [a("div", We, [a("p", {
489
+ }, null, 8, Qe)]),
490
+ a("div", $e, [a("div", et, [a("p", {
411
491
  class: "text-sm font-bold text-[#262626] flex-1 cursor-pointer hover:text-[#3F69B4] transition-colors",
412
492
  title: e.name,
413
- onClick: (t) => D(e)
414
- }, h(O(e.name, 35)), 9, Ge)]), a("div", Ke, [
493
+ onClick: (t) => E(e)
494
+ }, h(D(e.name, 35)), 9, tt)]), a("div", nt, [
415
495
  a("span", null, "文件后缀:" + h(e.metadata?.fileSuffix || "pdf"), 1),
416
496
  l[4] ||= a("span", { class: "mx-2" }, "|", -1),
417
497
  a("span", null, "数据标识:" + h(e.metadata?.dataId || "D1757042744151521"), 1),
418
498
  l[5] ||= a("span", { class: "mx-2" }, "|", -1),
419
499
  a("span", null, "文件大小:" + h(e.metadata?.fileSize || "2.8MB"), 1)
420
500
  ])]),
421
- a("div", qe, [M(c.order) && e.price ? (d(), i("span", Je, "¥" + h(e.price.toFixed(2)), 1)) : r("", !0), a("button", {
422
- class: "w-10 h-10 rounded-full flex items-center justify-center hover:bg-slate-50 transition-all transform hover:scale-105 hover:shadow-md",
423
- title: "联系卖家",
424
- onClick: (t) => E(e.id)
425
- }, [s(g(T), {
426
- size: "16",
427
- class: "text-[#4749ad]"
428
- })], 8, Ye)])
429
- ]))), 128)), S.value ? (d(), i("div", Xe, [a("button", {
430
- onClick: w,
501
+ a("div", rt, [M(c.order) && e.price ? (d(), i("span", it, "¥" + h(e.price.toFixed(2)), 1)) : r("", !0), s(g(k), { content: "联系卖家" }, {
502
+ default: v(() => [a("button", {
503
+ class: "w-10 h-10 rounded-full flex items-center justify-center hover:bg-slate-50 transition-all transform hover:scale-105 hover:shadow-md",
504
+ onClick: (t) => w(e.id)
505
+ }, [s(g(T), {
506
+ size: "16",
507
+ class: "text-[#4749ad]"
508
+ })], 8, at)]),
509
+ _: 2
510
+ }, 1024)])
511
+ ]))), 128)), S.value ? (d(), i("div", ot, [a("button", {
512
+ onClick: C,
431
513
  class: "flex items-center justify-end gap-2 px-1.5 py-1.5 text-[12px] font-medium text-[#4749ad] hover:bg-slate-50 rounded-md transition-all transform hover:scale-105 hover:shadow-md w-[88px]",
432
514
  style: {
433
515
  "text-align": "right",
434
516
  "margin-left": "auto"
435
517
  }
436
- }, [o(h(b.value ? "收起" : "展开全部") + " ", 1), b.value ? (d(), n(g(x), {
518
+ }, [o(h(x.value ? "收起" : "展开全部") + " ", 1), x.value ? (d(), n(g(ee), {
437
519
  key: 0,
438
520
  size: "16"
439
- })) : (d(), n(g(v), {
521
+ })) : (d(), n(g(b), {
440
522
  key: 1,
441
523
  size: "16"
442
- }))])])) : r("", !0)]), a("div", Ze, [a("div", Qe, [l[6] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "总计", -1), a("span", $e, " ¥" + h(c.order.totalAmount ? c.order.totalAmount.toFixed(2) : "0.00"), 1)]), P(c.order) ? (d(), i("div", et, " 本订单产品为平台赠送,无实际支付金额 ")) : r("", !0)])]),
443
- t.$slots["host-extra"] ? (d(), i("div", tt, [m(t.$slots, "host-extra", {}, void 0, !0)])) : r("", !0)
524
+ }))])])) : r("", !0)]), a("div", st, [a("div", ct, [l[6] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "总计", -1), a("span", lt, " ¥" + h(c.order.totalAmount ? c.order.totalAmount.toFixed(2) : "0.00"), 1)]), P(c.order) ? (d(), i("div", ut, " 本订单产品为平台赠送,无实际支付金额 ")) : r("", !0)])]),
525
+ t.$slots["host-extra"] ? (d(), i("div", dt, [m(t.$slots, "host-extra", {}, void 0, !0)])) : r("", !0)
444
526
  ]));
445
527
  }
446
- }), [["__scopeId", "data-v-2f5fb62c"]]), nt = {
447
- OrderManagement: J,
448
- OrderDetailPanel: $
528
+ }), [["__scopeId", "data-v-729f1680"]]), pt = {
529
+ OrderManagement: H,
530
+ OrderDetailPanel: ft
449
531
  };
450
532
  //#endregion
451
- export { $ as OrderDetailPanel, J as OrderManagement, nt as userMyOrder };
533
+ export { ft as OrderDetailPanel, H as OrderManagement, pt as userMyOrder };