@yeez-tech/user-my-order 0.1.4 → 0.1.7

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,33 +1,33 @@
1
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 C, Download as w, FileText as T, Folder as E, MessageSquare as D, Pause as O, Play as k } from "lucide-vue-next";
3
- import { Tooltip as A } from "@arco-design/web-vue";
4
- //#region src/modules/PrepaidOrders.vue?vue&type=script&setup=true&lang.ts
5
- var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M = {
2
+ import { ChevronDown as b, ChevronLeft as x, ChevronRight as S, ChevronUp as ee, Download as C, FileText as w, Folder as T, MessageSquare as E, Pause as D, Play as O } from "lucide-vue-next";
3
+ import { Modal as k, Tooltip as A } from "@arco-design/web-vue";
4
+ //#region src/assets/icons/refund-apply.svg?url
5
+ var 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%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", te = "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]" }, ne = {
6
6
  key: 0,
7
7
  class: "space-y-6"
8
- }, N = ["onClick"], P = { 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]" }, R = {
8
+ }, re = ["onClick"], ie = { class: "flex flex-col md:flex-row md:items-center md:justify-between gap-2" }, ae = { class: "flex flex-wrap items-center gap-4" }, oe = { class: "text-[12px] font-medium text-[#262626]" }, se = { class: "text-[12px] font-medium text-[#262626]" }, ce = {
9
9
  key: 0,
10
10
  class: "text-[12px] font-medium text-[#262626]"
11
- }, z = ["onClick"], B = { class: "flex items-center gap-4" }, ee = { class: "text-[12px] font-medium text-[#262626]" }, te = { class: "relative" }, ne = ["onClick"], re = { class: "flex items-start gap-4" }, ie = { class: "w-12 h-12 rounded overflow-hidden flex-shrink-0" }, ae = ["src", "alt"], oe = { class: "flex-1 min-w-0" }, se = { class: "flex flex-col md:flex-row md:items-center md:justify-between gap-2" }, ce = { class: "min-w-0 max-w-[400px]" }, le = ["title"], ue = { class: "flex items-center gap-4" }, V = {
11
+ }, N = ["onClick"], P = { class: "flex items-center gap-4" }, F = { class: "text-[12px] font-medium text-[#262626]" }, I = { class: "relative" }, L = ["onClick"], R = { class: "flex items-start gap-4" }, z = { class: "w-12 h-12 rounded overflow-hidden flex-shrink-0" }, B = ["src", "alt"], V = { class: "flex-1 min-w-0" }, H = { class: "flex flex-col md:flex-row md:items-center md:justify-between gap-2" }, le = { class: "min-w-0 max-w-[400px]" }, ue = ["title"], de = { class: "flex items-center gap-4" }, fe = {
12
12
  key: 0,
13
13
  class: "flex-1 max-w-[500px] min-w-[300px]"
14
- }, H = { class: "flex flex-col gap-1" }, U = { class: "flex items-center justify-between" }, de = { class: "text-xs font-medium text-[#262626]" }, fe = { class: "text-xs font-medium text-[#262626]" }, pe = { class: "w-full h-2 bg-slate-100 rounded-full overflow-hidden relative" }, me = { class: "absolute inset-0 flex items-center justify-center pointer-events-none" }, he = { class: "text-[10px] font-medium text-slate-600" }, ge = { class: "text-[10px] font-medium text-white" }, _e = { class: "flex items-center justify-between" }, ve = { class: "text-xs font-medium text-[#262626]" }, ye = {
14
+ }, pe = { class: "flex flex-col gap-1" }, me = { class: "flex items-center justify-between" }, he = { class: "text-xs font-medium text-[#262626]" }, ge = { class: "text-xs font-medium text-[#262626]" }, _e = { class: "w-full h-2 bg-slate-100 rounded-full overflow-hidden relative" }, ve = { class: "absolute inset-0 flex items-center justify-center pointer-events-none" }, ye = { class: "text-[10px] font-medium text-slate-600" }, be = { class: "text-[10px] font-medium text-white" }, xe = { class: "flex items-center justify-between" }, Se = { class: "text-xs font-medium text-[#262626]" }, Ce = {
15
15
  key: 0,
16
16
  class: "text-xs font-medium text-[#262626]"
17
- }, be = { class: "flex items-center gap-2" }, xe = {
17
+ }, we = { class: "flex items-center gap-2" }, Te = {
18
18
  key: 0,
19
19
  class: "flex items-center gap-2 mr-4"
20
- }, Se = { class: "text-xs font-medium text-[#262626]" }, Ce = { class: "flex items-center gap-2 w-[80px] justify-end" }, we = ["onClick"], Te = ["onClick"], Ee = {
20
+ }, Ee = { class: "text-xs font-medium text-[#262626]" }, De = { class: "flex items-center gap-2 w-[80px] justify-end" }, Oe = ["onClick"], ke = ["onClick"], Ae = ["onClick"], je = ["src"], Me = ["onClick"], Ne = ["src"], Pe = {
21
21
  key: 0,
22
22
  class: "absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-[#ffffff] to-transparent pointer-events-none"
23
- }, De = {
23
+ }, Fe = {
24
24
  key: 1,
25
25
  class: "bg-[#ffffff] p-10 rounded-[8px] shadow-sm flex flex-col items-center justify-center text-center",
26
26
  style: { border: "1px solid #E5E6E9" }
27
- }, Oe = { class: "w-16 h-16 rounded-full bg-slate-50 flex items-center justify-center text-slate-400 mb-4" }, ke = {
27
+ }, Ie = { class: "w-16 h-16 rounded-full bg-slate-50 flex items-center justify-center text-slate-400 mb-4" }, Le = {
28
28
  key: 2,
29
29
  class: "flex items-center justify-center gap-2 mt-6"
30
- }, Ae = ["disabled"], je = { class: "text-sm font-bold text-[#262626]" }, Me = ["disabled"], W = /* @__PURE__ */ c({
30
+ }, Re = ["disabled"], ze = { class: "text-sm font-bold text-[#262626]" }, Be = ["disabled"], U = /* @__PURE__ */ c({
31
31
  __name: "PrepaidOrders",
32
32
  props: {
33
33
  orders: {},
@@ -37,7 +37,10 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
37
37
  totalPages: {},
38
38
  isServerPagination: { type: Boolean },
39
39
  downloadStates: {},
40
- downloadStatusText: {}
40
+ downloadStatusText: {},
41
+ downloadButtonVisible: {},
42
+ contactSellerButtonVisible: {},
43
+ refundStates: {}
41
44
  },
42
45
  emits: [
43
46
  "page-change",
@@ -47,54 +50,78 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
47
50
  "pause-download",
48
51
  "resume-download",
49
52
  "open-file",
50
- "contact-seller"
53
+ "contact-seller",
54
+ "request-refund",
55
+ "request-after-sales"
51
56
  ],
52
57
  setup(t, { emit: c }) {
53
- let f = t, m = c, _ = (e) => e ? e.substring(0, 16) : "--", b = (e, t) => {
54
- m("view-product", e, t);
55
- }, C = {
58
+ let m = t, _ = c, b = (e) => e ? e.substring(0, 16) : "--", ee = (e, t) => {
59
+ _("view-product", e, t);
60
+ }, U = {
56
61
  idle: "下载数据",
57
62
  preparing: "资源加载中...",
58
63
  downloading: "下载中...",
59
64
  paused: "下载已暂停",
60
65
  decrypting: "解密中...",
61
66
  completed: "下载完成"
62
- }, W = (e, t) => f.downloadStates?.[`${e}-${t}`], G = (e) => f.downloadStatusText?.[e] || C[e], K = (e, t) => {
67
+ }, W = (e, t) => m.downloadStates?.[`${e}-${t}`], G = (e) => m.downloadStatusText?.[e] || U[e], Ve = (e, t) => {
63
68
  let n = W(e, t);
64
69
  if (!n) return "0.00";
65
70
  let r = Number.parseFloat(n.fileSize || "0");
66
71
  return !Number.isFinite(r) || r <= 0 ? "0.00" : (n.progress * r / 100).toFixed(2);
67
- }, q = (e, t) => {
72
+ }, K = (e, t) => {
68
73
  let n = W(e, t);
69
74
  if (!n || n.status === "idle") {
70
- m("download", t);
75
+ _("download", t);
71
76
  return;
72
77
  }
73
78
  if (n.status === "paused") {
74
- m("resume-download", t);
79
+ _("resume-download", t);
75
80
  return;
76
81
  }
77
82
  if (n.status === "completed") {
78
- m("open-file", t);
83
+ _("open-file", t);
79
84
  return;
80
85
  }
81
- m("pause-download", t);
82
- }, J = {
86
+ _("pause-download", t);
87
+ }, q = f(""), J = f(!1), Y = (e, t) => m.refundStates?.[`${e}-${t}`], He = (e) => !e.isExchange && !e.isGift, Ue = (e) => {
88
+ let t = e.status;
89
+ return t !== "已退款" && t !== "退款中";
90
+ }, We = (e, t) => {
91
+ let n = `${e.id}-${t}`, r = m.downloadButtonVisible?.[n];
92
+ return r === void 0 ? Ue(e) : r;
93
+ }, Ge = (e, t) => {
94
+ let n = `${e.id}-${t}`, r = m.contactSellerButtonVisible?.[n];
95
+ return r === void 0 ? !0 : r;
96
+ }, Ke = (e) => {
97
+ q.value = e, J.value = !0;
98
+ }, qe = () => {
99
+ let e = q.value;
100
+ if (!e) {
101
+ X();
102
+ return;
103
+ }
104
+ _("request-refund", e), X();
105
+ }, X = () => {
106
+ J.value = !1, q.value = "";
107
+ }, Je = (e) => {
108
+ _("request-after-sales", e);
109
+ }, Z = {
83
110
  已付款: "#3B82F6",
84
111
  待审核: "#F59E0B",
85
112
  审核通过: "#22C55E",
86
113
  退款中: "#3B82F6",
87
114
  已退款: "#22C55E",
88
115
  交易成功: "#22C55E"
89
- }, Y = {
116
+ }, Ye = {
90
117
  已付款: "已付款",
91
118
  待审核: "待审核",
92
119
  审核通过: "审核通过",
93
120
  退款中: "退款中",
94
121
  已退款: "已退款",
95
122
  交易成功: "交易成功"
96
- }, X = (e) => J[e] || "#262626", Z = (e) => Y[e] || "";
97
- return (c, f) => (d(), i("section", j, [t.orders.length > 0 ? (d(), i("div", M, [(d(!0), i(e, null, p(t.orders, (t) => (d(), i("div", {
123
+ }, Q = (e) => Z[e] || "#262626", $ = (e) => Ye[e] || "";
124
+ return (c, f) => (d(), i(e, null, [a("section", M, [t.orders.length > 0 ? (d(), i("div", ne, [(d(!0), i(e, null, p(t.orders, (t) => (d(), i("div", {
98
125
  key: t.id,
99
126
  class: "bg-[#ffffff] rounded-[8px] shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md",
100
127
  style: { border: "1px solid #E5E6E9" }
@@ -102,14 +129,14 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
102
129
  class: "px-6 py-3 bg-[#ffffff] hover:bg-slate-50 cursor-pointer transition-all duration-200",
103
130
  style: { "border-bottom": "1px solid #E5E6E9" },
104
131
  onClick: (e) => c.$emit("view-detail", t)
105
- }, [a("div", P, [a("div", F, [
106
- a("h3", I, "订单编号:" + h(t.orderNumber || t.id), 1),
107
- a("span", L, "共 " + h(t.products.length) + " 件商品", 1),
108
- t.createTime ? (d(), i("span", R, "购买时间: " + h(_(t.createTime)), 1)) : r("", !0),
132
+ }, [a("div", ie, [a("div", ae, [
133
+ a("h3", oe, "订单编号:" + h(t.orderNumber || t.id), 1),
134
+ a("span", se, "共 " + h(t.products.length) + " 件商品", 1),
135
+ t.createTime ? (d(), i("span", ce, "购买时间: " + h(b(t.createTime)), 1)) : r("", !0),
109
136
  a("span", {
110
137
  class: "text-[12px] font-medium text-[#4749ad] flex items-center gap-1 hover:text-[#4749ad] transition-colors",
111
138
  onClick: y((e) => c.$emit("view-detail", t), ["stop"])
112
- }, [...f[2] ||= [o(" 订单详情 ", -1), a("svg", {
139
+ }, [...f[3] ||= [o(" 订单详情 ", -1), a("svg", {
113
140
  xmlns: "http://www.w3.org/2000/svg",
114
141
  class: "h-3 w-3 text-[#4749ad]",
115
142
  fill: "none",
@@ -120,52 +147,52 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
120
147
  "stroke-linejoin": "round",
121
148
  "stroke-width": "2",
122
149
  d: "M9 5l7 7-7 7"
123
- })], -1)]], 8, z)
124
- ]), a("div", B, [a("p", ee, "实付金额:¥" + h(t.totalAmount.toFixed(2)), 1), Z(t.status) ? (d(), i("span", {
150
+ })], -1)]], 8, N)
151
+ ]), a("div", P, [a("p", F, "实付金额:¥" + h(t.totalAmount.toFixed(2)), 1), $(t.status) ? (d(), i("span", {
125
152
  key: 0,
126
153
  class: "px-2 py-0.5 rounded-full text-[11px] font-bold min-w-[70px] text-center bg-transparent",
127
154
  style: u({
128
- color: X(t.status),
129
- border: "1px solid " + X(t.status)
155
+ color: Q(t.status),
156
+ border: "1px solid " + Q(t.status)
130
157
  })
131
- }, h(Z(t.status)), 5)) : r("", !0)])])], 8, N), a("div", te, [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", {
132
- key: e.id,
158
+ }, h($(t.status)), 5)) : r("", !0)])])], 8, re), a("div", I, [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", {
159
+ key: o.id,
133
160
  class: "px-6 py-4 hover:bg-slate-50 transition-all duration-200 hover:shadow-sm cursor-pointer",
134
- onClick: (n) => b(t, e)
135
- }, [a("div", re, [a("div", ie, [a("img", {
136
- src: e.image,
137
- alt: e.name,
161
+ onClick: (e) => ee(t, o)
162
+ }, [a("div", R, [a("div", z, [a("img", {
163
+ src: o.image,
164
+ alt: o.name,
138
165
  class: "w-full h-full object-cover"
139
- }, null, 8, ae)]), a("div", oe, [a("div", se, [a("div", ce, [a("p", {
166
+ }, null, 8, B)]), a("div", V, [a("div", H, [a("div", le, [a("p", {
140
167
  class: "text-sm font-bold text-[#262626] truncate hover:text-[#3F69B4] transition-colors",
141
- title: e.name
142
- }, h(e.name), 9, le)]), a("div", ue, [W(t.id, e.id) && [
168
+ title: o.name
169
+ }, h(o.name), 9, ue)]), a("div", de, [W(t.id, o.id) && [
143
170
  "preparing",
144
171
  "downloading",
145
172
  "paused",
146
173
  "decrypting"
147
- ].includes(W(t.id, e.id).status) ? (d(), i("div", V, [a("div", H, [
148
- a("div", U, [a("span", de, h(G(W(t.id, e.id).status)), 1), a("span", fe, h(K(t.id, e.id)) + " MB / " + h(W(t.id, e.id).fileSize), 1)]),
149
- a("div", pe, [
174
+ ].includes(W(t.id, o.id).status) ? (d(), i("div", fe, [a("div", pe, [
175
+ a("div", me, [a("span", he, h(G(W(t.id, o.id).status)), 1), a("span", ge, h(Ve(t.id, o.id)) + " MB / " + h(W(t.id, o.id).fileSize), 1)]),
176
+ a("div", _e, [
150
177
  a("div", {
151
178
  class: l(["h-full transition-all duration-300 ease-in-out", {
152
179
  "bg-blue-600": [
153
180
  "preparing",
154
181
  "downloading",
155
182
  "paused"
156
- ].includes(W(t.id, e.id).status),
157
- "bg-green-600": W(t.id, e.id).status === "decrypting"
183
+ ].includes(W(t.id, o.id).status),
184
+ "bg-green-600": W(t.id, o.id).status === "decrypting"
158
185
  }]),
159
- style: u({ width: W(t.id, e.id).progress + "%" })
186
+ style: u({ width: W(t.id, o.id).progress + "%" })
160
187
  }, null, 6),
161
- a("div", me, [a("span", he, h(W(t.id, e.id).progress) + "% ", 1)]),
188
+ a("div", ve, [a("span", ye, h(W(t.id, o.id).progress) + "% ", 1)]),
162
189
  a("div", {
163
190
  class: "absolute inset-0 flex items-center justify-center pointer-events-none overflow-hidden",
164
- style: u({ clipPath: `inset(0 ${100 - W(t.id, e.id).progress}% 0 0)` })
165
- }, [a("span", ge, h(W(t.id, e.id).progress) + "% ", 1)], 4)
191
+ style: u({ clipPath: `inset(0 ${100 - W(t.id, o.id).progress}% 0 0)` })
192
+ }, [a("span", be, h(W(t.id, o.id).progress) + "% ", 1)], 4)
166
193
  ]),
167
- a("div", _e, [a("span", ve, " 预计剩余: " + h(W(t.id, e.id).estimatedTime), 1), ["downloading", "paused"].includes(W(t.id, e.id).status) ? (d(), i("span", ye, " 下载速度: " + h(W(t.id, e.id).speed) + " MB/s ", 1)) : r("", !0)])
168
- ])])) : r("", !0), a("div", be, [W(t.id, e.id)?.status === "completed" ? (d(), i("div", xe, [f[3] ||= a("div", { class: "w-4 h-4 rounded-full bg-green-100 flex items-center justify-center" }, [a("svg", {
194
+ a("div", xe, [a("span", Se, " 预计剩余: " + h(W(t.id, o.id).estimatedTime), 1), ["downloading", "paused"].includes(W(t.id, o.id).status) ? (d(), i("span", Ce, " 下载速度: " + h(W(t.id, o.id).speed) + " MB/s ", 1)) : r("", !0)])
195
+ ])])) : r("", !0), a("div", we, [W(t.id, o.id)?.status === "completed" ? (d(), i("div", Te, [f[4] ||= a("div", { class: "w-4 h-4 rounded-full bg-green-100 flex items-center justify-center" }, [a("svg", {
169
196
  xmlns: "http://www.w3.org/2000/svg",
170
197
  class: "h-3 w-3 text-green-600",
171
198
  fill: "none",
@@ -176,43 +203,76 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
176
203
  "stroke-linejoin": "round",
177
204
  "stroke-width": "2",
178
205
  d: "M5 13l4 4L19 7"
179
- })])], -1), a("span", Se, h(G("completed")), 1)])) : r("", !0), a("div", Ce, [s(g(A), { content: "下载数据" }, {
180
- default: v(() => [t.status === "已退款" ? r("", !0) : (d(), i("button", {
206
+ })])], -1), a("span", Ee, h(G("completed")), 1)])) : r("", !0), a("div", De, [
207
+ s(g(A), { content: "下载数据" }, {
208
+ default: v(() => [We(t, o.id) ? (d(), i("button", {
209
+ key: 0,
210
+ 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",
211
+ onClick: y((e) => K(t.id, o.id), ["stop"])
212
+ }, [!W(t.id, o.id) || W(t.id, o.id)?.status === "idle" ? (d(), n(g(C), {
213
+ key: 0,
214
+ size: "16",
215
+ class: "text-[#4749ad]"
216
+ })) : [
217
+ "preparing",
218
+ "downloading",
219
+ "decrypting"
220
+ ].includes(W(t.id, o.id).status) ? (d(), n(g(D), {
221
+ key: 1,
222
+ size: "16",
223
+ class: "text-[#4749ad]"
224
+ })) : W(t.id, o.id)?.status === "paused" ? (d(), n(g(O), {
225
+ key: 2,
226
+ size: "16",
227
+ class: "text-[#4749ad]"
228
+ })) : W(t.id, o.id)?.status === "completed" ? (d(), n(g(T), {
229
+ key: 3,
230
+ size: "16",
231
+ class: "text-[#4749ad]"
232
+ })) : r("", !0)], 8, Oe)) : r("", !0)]),
233
+ _: 2
234
+ }, 1024),
235
+ Ge(t, o.id) ? (d(), n(g(A), {
181
236
  key: 0,
182
- 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",
183
- onClick: y((n) => q(t.id, e.id), ["stop"])
184
- }, [!W(t.id, e.id) || W(t.id, e.id)?.status === "idle" ? (d(), n(g(w), {
237
+ content: "联系卖家"
238
+ }, {
239
+ default: v(() => [a("button", {
240
+ 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",
241
+ onClick: y((e) => c.$emit("contact-seller", o.id), ["stop"])
242
+ }, [s(g(E), {
243
+ size: "16",
244
+ class: "text-[#4749ad]"
245
+ })], 8, ke)]),
246
+ _: 2
247
+ }, 1024)) : r("", !0),
248
+ He(t) ? (d(), i(e, { key: 1 }, [Y(t.id, o.id) === "refundable" ? (d(), n(g(A), {
185
249
  key: 0,
186
- size: "16",
187
- class: "text-[#4749ad]"
188
- })) : [
189
- "preparing",
190
- "downloading",
191
- "decrypting"
192
- ].includes(W(t.id, e.id).status) ? (d(), n(g(O), {
250
+ content: "申请退款"
251
+ }, {
252
+ default: v(() => [a("button", {
253
+ 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",
254
+ onClick: y((e) => Ke(o.id), ["stop"])
255
+ }, [a("img", {
256
+ src: g(j),
257
+ alt: "申请退款",
258
+ class: "w-[18px] h-[18px]"
259
+ }, null, 8, je)], 8, Ae)]),
260
+ _: 2
261
+ }, 1024)) : Y(t.id, o.id) === "after_sales" ? (d(), n(g(A), {
193
262
  key: 1,
194
- size: "16",
195
- class: "text-[#4749ad]"
196
- })) : W(t.id, e.id)?.status === "paused" ? (d(), n(g(k), {
197
- key: 2,
198
- size: "16",
199
- class: "text-[#4749ad]"
200
- })) : W(t.id, e.id)?.status === "completed" ? (d(), n(g(E), {
201
- key: 3,
202
- size: "16",
203
- class: "text-[#4749ad]"
204
- })) : r("", !0)], 8, we))]),
205
- _: 2
206
- }, 1024), s(g(A), { content: "联系卖家" }, {
207
- default: v(() => [a("button", {
208
- 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",
209
- onClick: y((t) => c.$emit("contact-seller", e.id), ["stop"])
210
- }, [s(g(D), {
211
- size: "16",
212
- class: "text-[#4749ad]"
213
- })], 8, Te)]),
214
- _: 2
215
- }, 1024)])])])])])])], 8, ne))), 128))], 2), t.products.length > 3 ? (d(), i("div", Ee)) : r("", !0)])]))), 128))])) : (d(), i("div", De, [a("div", Oe, [s(g(T), { size: "24" })]), f[4] ||= a("h3", { class: "text-lg font-bold text-[#262626] mb-6" }, "暂无订单", -1)])), t.totalPages > 1 ? (d(), i("div", ke, [
263
+ content: "联系售后"
264
+ }, {
265
+ default: v(() => [a("button", {
266
+ 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",
267
+ onClick: y((e) => Je(o.id), ["stop"])
268
+ }, [a("img", {
269
+ src: g(te),
270
+ alt: "联系售后",
271
+ class: "w-[18px] h-[18px]"
272
+ }, null, 8, Ne)], 8, Me)]),
273
+ _: 2
274
+ }, 1024)) : r("", !0)], 64)) : r("", !0)
275
+ ])])])])])])], 8, L))), 128))], 2), t.products.length > 3 ? (d(), i("div", Pe)) : r("", !0)])]))), 128))])) : (d(), i("div", Fe, [a("div", Ie, [s(g(w), { size: "24" })]), f[5] ||= a("h3", { class: "text-lg font-bold text-[#262626] mb-6" }, "暂无订单", -1)])), t.totalPages > 1 ? (d(), i("div", Le, [
216
276
  a("button", {
217
277
  onClick: f[0] ||= (e) => c.$emit("page-change", t.currentPage - 1, t.pageSize),
218
278
  disabled: t.currentPage === 1,
@@ -223,8 +283,8 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
223
283
  height: "32px",
224
284
  border: "1px solid #d1d5db"
225
285
  }
226
- }, [s(g(x), { size: "16" })], 8, Ae),
227
- a("span", je, h(t.currentPage) + " / " + h(t.totalPages), 1),
286
+ }, [s(g(x), { size: "16" })], 8, Re),
287
+ a("span", ze, h(t.currentPage) + " / " + h(t.totalPages), 1),
228
288
  a("button", {
229
289
  onClick: f[1] ||= (e) => c.$emit("page-change", t.currentPage + 1, t.pageSize),
230
290
  disabled: t.currentPage === t.totalPages,
@@ -235,14 +295,34 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
235
295
  height: "32px",
236
296
  border: "1px solid #d1d5db"
237
297
  }
238
- }, [s(g(S), { size: "16" })], 8, Me)
239
- ])) : r("", !0)]));
298
+ }, [s(g(S), { size: "16" })], 8, Be)
299
+ ])) : r("", !0)]), s(g(k), {
300
+ visible: J.value,
301
+ "onUpdate:visible": f[2] ||= (e) => J.value = e,
302
+ title: "申请退款",
303
+ footer: !1,
304
+ "mask-closable": !1,
305
+ width: 448,
306
+ "modal-style": { borderRadius: "8px" },
307
+ onCancel: X
308
+ }, {
309
+ 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", {
310
+ style: { border: "none" },
311
+ class: "px-4 py-2 text-sm text-[#262626] rounded-md hover:bg-slate-50 transition-colors cursor-pointer",
312
+ onClick: X
313
+ }, "取消"), a("button", {
314
+ style: { border: "none" },
315
+ class: "px-4 py-2 text-sm text-white bg-[#4749ad] rounded-md hover:opacity-90 transition-colors cursor-pointer",
316
+ onClick: qe
317
+ }, "确认")])]),
318
+ _: 1
319
+ }, 8, ["visible"])], 64));
240
320
  }
241
- }), G = (e, t) => {
321
+ }), W = (e, t) => {
242
322
  let n = e.__vccOpts || e;
243
323
  for (let [e, r] of t) n[e] = r;
244
324
  return n;
245
- }, K = /* @__PURE__ */ G(W, [["__scopeId", "data-v-e96a63a1"]]), q = { class: "order-management bg-[#F6F4F0] text-[#262626] font-[PingFangSC]" }, J = /* @__PURE__ */ G(/* @__PURE__ */ c({
325
+ }, G = /* @__PURE__ */ W(U, [["__scopeId", "data-v-a11f0a41"]]), Ve = { class: "order-management bg-[#F6F4F0] text-[#262626] font-[PingFangSC]" }, K = /* @__PURE__ */ W(/* @__PURE__ */ c({
246
326
  __name: "OrderManagement",
247
327
  props: {
248
328
  orders: {},
@@ -261,8 +341,13 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
261
341
  onResumeDownload: {},
262
342
  onOpenFile: {},
263
343
  onContactSeller: {},
344
+ onRequestRefund: {},
345
+ onRequestAfterSales: {},
264
346
  downloadStates: {},
265
- downloadStatusText: {}
347
+ downloadStatusText: {},
348
+ downloadButtonVisible: {},
349
+ contactSellerButtonVisible: {},
350
+ refundStates: {}
266
351
  },
267
352
  setup(e) {
268
353
  let n = e, r = f(n.currentOrderPage), a = t(() => n.currentOrderPage ?? r.value), o = t(() => n.orderItemsPerPage ?? 10);
@@ -286,7 +371,7 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
286
371
  }), h = t(() => n.serverPagination ? n.totalOrderCount : u.value.length);
287
372
  return _(() => n.currentOrderPage, (e) => {
288
373
  r.value = e ?? 1;
289
- }), (t, r) => (d(), i("div", q, [s(K, {
374
+ }), (t, r) => (d(), i("div", Ve, [s(G, {
290
375
  orders: p.value,
291
376
  "total-orders": h.value,
292
377
  "current-page": a.value,
@@ -295,6 +380,9 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
295
380
  "is-server-pagination": n.serverPagination,
296
381
  "download-states": n.downloadStates,
297
382
  "download-status-text": n.downloadStatusText,
383
+ "download-button-visible": n.downloadButtonVisible,
384
+ "contact-seller-button-visible": n.contactSellerButtonVisible,
385
+ "refund-states": n.refundStates,
298
386
  onPageChange: l,
299
387
  onViewDetail: r[0] ||= (t) => e.onViewDetail?.(t),
300
388
  onViewProduct: r[1] ||= (t, n) => e.onViewProduct?.(t, n),
@@ -302,7 +390,9 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
302
390
  onPauseDownload: r[3] ||= (t) => e.onPauseDownload?.(t),
303
391
  onResumeDownload: r[4] ||= (t) => e.onResumeDownload?.(t),
304
392
  onOpenFile: r[5] ||= (t) => e.onOpenFile?.(t),
305
- onContactSeller: r[6] ||= (t) => e.onContactSeller?.(t)
393
+ onContactSeller: r[6] ||= (t) => e.onContactSeller?.(t),
394
+ onRequestRefund: r[7] ||= (t) => e.onRequestRefund?.(t),
395
+ onRequestAfterSales: r[8] ||= (t) => e.onRequestAfterSales?.(t)
306
396
  }, null, 8, [
307
397
  "orders",
308
398
  "total-orders",
@@ -311,10 +401,13 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
311
401
  "total-pages",
312
402
  "is-server-pagination",
313
403
  "download-states",
314
- "download-status-text"
404
+ "download-status-text",
405
+ "download-button-visible",
406
+ "contact-seller-button-visible",
407
+ "refund-states"
315
408
  ])]));
316
409
  }
317
- }), [["__scopeId", "data-v-da671205"]]), Y = { class: "order-detail space-y-8 bg-[#ffffff] font-[PingFangSC]" }, X = {
410
+ }), [["__scopeId", "data-v-2617ec4e"]]), q = { class: "order-detail space-y-8 bg-[#ffffff] font-[PingFangSC]" }, J = {
318
411
  class: "bg-[#ffffff] rounded-[8px] shadow-sm",
319
412
  style: {
320
413
  border: "1px solid #E5E6E9",
@@ -323,138 +416,216 @@ var j = { class: "prepaid-orders space-y-6 bg-[#ffffff] font-[PingFangSC]" }, M
323
416
  "padding-left": "24px",
324
417
  "padding-right": "24px"
325
418
  }
326
- }, Z = { class: "space-y-3" }, Ne = { class: "flex justify-between" }, Pe = { class: "text-[12px] font-medium text-[#262626]" }, Fe = { class: "flex justify-between items-center" }, Ie = { class: "flex justify-between" }, Le = { class: "text-[12px] font-medium text-[#262626]" }, Re = { class: "text-[12px] font-medium text-[#262626]" }, ze = {
419
+ }, Y = { class: "space-y-3" }, He = { class: "flex justify-between" }, Ue = { class: "text-[12px] font-medium text-[#262626]" }, We = { class: "flex justify-between items-center" }, Ge = { class: "flex justify-between" }, Ke = { class: "text-[12px] font-medium text-[#262626]" }, qe = { class: "text-[12px] font-medium text-[#262626]" }, X = {
327
420
  key: 0,
328
421
  class: "flex justify-between"
329
- }, Be = { class: "text-[12px] font-medium text-[#262626]" }, Ve = {
422
+ }, Je = { class: "text-[12px] font-medium text-[#262626]" }, Z = {
330
423
  key: 1,
331
424
  class: "flex justify-between"
332
- }, He = { class: "text-[12px] font-medium text-[#262626]" }, Ue = {
425
+ }, Ye = { class: "text-[12px] font-medium text-[#262626]" }, Q = {
333
426
  class: "text-[18px] font-bold text-[#262626]",
334
427
  style: { "font-weight": "700" }
335
- }, We = {
428
+ }, $ = {
336
429
  class: "bg-[#ffffff] rounded-[8px] shadow-sm",
337
430
  style: {
338
431
  border: "1px solid #E5E6E9",
339
432
  "padding-top": "24px",
340
433
  "padding-bottom": "24px"
341
434
  }
342
- }, Ge = { class: "space-y-4" }, Ke = { class: "w-12 h-12 rounded overflow-hidden flex-shrink-0" }, qe = ["src", "alt"], Je = { class: "flex-1 min-w-0" }, Ye = { class: "flex items-center justify-between mb-2" }, Q = ["title", "onClick"], Xe = { class: "text-[11px] font-medium text-[#8D8C8B]" }, Ze = { class: "flex items-center gap-2" }, Qe = {
435
+ }, 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 shrink-0" }, it = {
343
436
  key: 0,
344
437
  class: "text-xs font-medium text-[#262626]"
345
- }, $e = ["onClick"], et = {
438
+ }, at = ["onClick"], ot = ["onClick"], st = ["src"], ct = ["onClick"], lt = ["src"], ut = {
346
439
  key: 0,
347
440
  class: "px-6"
348
- }, tt = {
441
+ }, dt = {
349
442
  class: "mt-4 pt-4 px-6",
350
443
  style: { "border-top": "1px solid #E5E6E9" }
351
- }, nt = { class: "flex justify-end items-center gap-2" }, rt = { class: "text-sm font-bold text-[#262626]" }, it = {
444
+ }, ft = { class: "flex justify-end items-center gap-2" }, pt = { class: "text-sm font-bold text-[#262626]" }, mt = {
352
445
  key: 0,
353
446
  class: "mt-2 text-xs font-medium text-[#262626] text-right"
354
- }, at = {
447
+ }, ht = {
355
448
  key: 0,
356
449
  class: "bg-[#ffffff] rounded-[8px] shadow-sm p-6",
357
450
  style: { border: "1px solid #E5E6E9" }
358
- }, $ = /* @__PURE__ */ G(/* @__PURE__ */ c({
451
+ }, gt = /* @__PURE__ */ W(/* @__PURE__ */ c({
359
452
  __name: "OrderDetail",
360
- props: { order: {} },
361
- emits: ["contact-seller", "view-product"],
453
+ props: {
454
+ order: {},
455
+ refundStates: {},
456
+ contactSellerButtonVisible: {}
457
+ },
458
+ emits: [
459
+ "contact-seller",
460
+ "view-product",
461
+ "request-refund",
462
+ "request-after-sales"
463
+ ],
362
464
  setup(c, { emit: l }) {
363
- let _ = c, y = l, x = f(!1), S = t(() => _.order.products && _.order.products.length > 5), w = t(() => _.order.products ? x.value ? _.order.products : _.order.products.slice(0, 5) : []), T = () => {
465
+ let _ = c, y = l, x = f(!1), S = f(""), C = f(!1), w = (e) => _.refundStates?.[`${_.order.id}-${e}`], T = (e) => {
466
+ let t = `${_.order.id}-${e}`, n = _.contactSellerButtonVisible?.[t];
467
+ return n === void 0 ? !0 : n;
468
+ }, D = (e) => {
469
+ S.value = e, C.value = !0;
470
+ }, O = () => {
471
+ let e = S.value;
472
+ if (!e) {
473
+ M();
474
+ return;
475
+ }
476
+ y("request-refund", e), M();
477
+ }, M = () => {
478
+ C.value = !1, S.value = "";
479
+ }, ne = (e) => {
480
+ y("request-after-sales", e);
481
+ }, re = t(() => _.order.products && _.order.products.length > 5), ie = t(() => _.order.products ? x.value ? _.order.products : _.order.products.slice(0, 5) : []), ae = () => {
364
482
  x.value = !x.value;
365
- }, E = (e) => {
483
+ }, oe = (e) => {
366
484
  y("contact-seller", e);
367
- }, O = (e) => {
485
+ }, se = (e) => {
368
486
  y("view-product", _.order, e);
369
- }, k = (e, t) => e ? e.length <= t ? e : e.substring(0, t) + "..." : "", j = (e) => {
487
+ }, ce = (e, t) => e ? e.length <= t ? e : e.substring(0, t) + "..." : "", N = (e) => {
370
488
  if (!e) return "";
371
489
  let t = new Date(e);
372
490
  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")}`;
373
- }, M = (e) => P(e) ? "购买时间" : F(e) ? "兑换时间" : I(e) ? "发放时间" : "购买时间", N = (e) => e.createTime ? e.createTime : e.exchangeTime ? e.exchangeTime : e.issueTime ? e.issueTime : e.createTime || "", P = (e) => !e.isExchange && !e.isGift, F = (e) => e.isExchange, I = (e) => e.isGift, L = {
491
+ }, P = (e) => I(e) ? "购买时间" : L(e) ? "兑换时间" : R(e) ? "发放时间" : "购买时间", F = (e) => e.createTime ? e.createTime : e.exchangeTime ? e.exchangeTime : e.issueTime ? e.issueTime : e.createTime || "", I = (e) => !e.isExchange && !e.isGift, L = (e) => !!e.isExchange, R = (e) => !!e.isGift, z = {
374
492
  已付款: "#3B82F6",
375
493
  待审核: "#F59E0B",
376
494
  审核通过: "#22C55E",
377
495
  退款中: "#3B82F6",
378
496
  已退款: "#22C55E",
379
497
  交易成功: "#22C55E"
380
- }, R = {
498
+ }, B = {
381
499
  已付款: "已付款",
382
500
  待审核: "待审核",
383
501
  审核通过: "审核通过",
384
502
  退款中: "退款中",
385
503
  已退款: "已退款",
386
504
  交易成功: "交易成功"
387
- }, z = (e) => L[e] || "#262626", B = (e) => R[e] || "";
388
- return (t, l) => (d(), i("section", Y, [
389
- l[7] ||= a("h2", {
505
+ }, V = (e) => z[e] || "#262626", H = (e) => B[e] || "";
506
+ return (t, l) => (d(), i(e, null, [a("section", q, [
507
+ l[8] ||= a("h2", {
390
508
  class: "text-[18px] font-bold text-[#262626]",
391
509
  style: { "font-weight": "700" }
392
510
  }, "订单信息", -1),
393
- a("div", X, [a("div", Z, [
394
- a("div", Ne, [l[0] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "订单编号", -1), a("span", Pe, h(c.order.orderNumber || c.order.id), 1)]),
395
- a("div", Fe, [l[1] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "交易状态", -1), B(c.order.status) ? (d(), i("span", {
511
+ a("div", J, [a("div", Y, [
512
+ a("div", He, [l[1] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "订单编号", -1), a("span", Ue, h(c.order.orderNumber || c.order.id), 1)]),
513
+ a("div", We, [l[2] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "交易状态", -1), H(c.order.status) ? (d(), i("span", {
396
514
  key: 0,
397
515
  class: "px-2 py-0.5 rounded-full text-[11px] font-bold min-w-[70px] text-center bg-transparent",
398
516
  style: u({
399
- color: z(c.order.status),
400
- border: "1px solid " + z(c.order.status)
517
+ color: V(c.order.status),
518
+ border: "1px solid " + V(c.order.status)
401
519
  })
402
- }, h(B(c.order.status)), 5)) : r("", !0)]),
403
- a("div", Ie, [a("span", Le, h(M(c.order)), 1), a("span", Re, h(j(N(c.order))), 1)]),
404
- P(c.order) ? (d(), i("div", ze, [l[2] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "支付方式", -1), a("span", Be, h(c.order.paymentMethod || "在线支付"), 1)])) : r("", !0),
405
- F(c.order) ? (d(), i("div", Ve, [l[3] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "兑换码", -1), a("span", He, h(c.order.exchangeCode || "ABCD-1234-EFGH-5678"), 1)])) : r("", !0)
520
+ }, h(H(c.order.status)), 5)) : r("", !0)]),
521
+ a("div", Ge, [a("span", Ke, h(P(c.order)), 1), a("span", qe, h(N(F(c.order))), 1)]),
522
+ I(c.order) ? (d(), i("div", X, [l[3] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "支付方式", -1), a("span", Je, h(c.order.paymentMethod || "在线支付"), 1)])) : r("", !0),
523
+ L(c.order) ? (d(), i("div", Z, [l[4] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "兑换码", -1), a("span", Ye, h(c.order.exchangeCode || "ABCD-1234-EFGH-5678"), 1)])) : r("", !0)
406
524
  ])]),
407
- a("h2", Ue, "产品信息(共" + h(c.order.products ? c.order.products.length : 0) + "件)", 1),
408
- a("div", We, [a("div", Ge, [(d(!0), i(e, null, p(w.value, (e, t) => (d(), i("div", {
409
- key: e.id,
525
+ a("h2", Q, "产品信息(共" + h(c.order.products ? c.order.products.length : 0) + "件)", 1),
526
+ a("div", $, [a("div", Xe, [(d(!0), i(e, null, p(ie.value, (t, o) => (d(), i("div", {
527
+ key: t.id,
410
528
  class: "flex items-start gap-4 px-6 py-4 w-full hover:bg-slate-50 transition-all duration-200 hover:shadow-sm"
411
529
  }, [
412
- a("div", Ke, [a("img", {
413
- src: e.image,
414
- alt: e.name,
530
+ a("div", Ze, [a("img", {
531
+ src: t.image,
532
+ alt: t.name,
415
533
  class: "w-full h-full object-cover"
416
- }, null, 8, qe)]),
417
- a("div", Je, [a("div", Ye, [a("p", {
534
+ }, null, 8, Qe)]),
535
+ a("div", $e, [a("div", et, [a("p", {
418
536
  class: "text-sm font-bold text-[#262626] flex-1 cursor-pointer hover:text-[#3F69B4] transition-colors",
419
- title: e.name,
420
- onClick: (t) => O(e)
421
- }, h(k(e.name, 35)), 9, Q)]), a("div", Xe, [
422
- a("span", null, "文件后缀:" + h(e.metadata?.fileSuffix || "pdf"), 1),
423
- l[4] ||= a("span", { class: "mx-2" }, "|", -1),
424
- a("span", null, "数据标识:" + h(e.metadata?.dataId || "D1757042744151521"), 1),
537
+ title: t.name,
538
+ onClick: (e) => se(t)
539
+ }, h(ce(t.name, 35)), 9, tt)]), a("div", nt, [
540
+ a("span", null, "文件后缀:" + h(t.metadata?.fileSuffix || "pdf"), 1),
425
541
  l[5] ||= a("span", { class: "mx-2" }, "|", -1),
426
- a("span", null, "文件大小:" + h(e.metadata?.fileSize || "2.8MB"), 1)
542
+ a("span", null, "数据标识:" + h(t.metadata?.dataId || "D1757042744151521"), 1),
543
+ l[6] ||= a("span", { class: "mx-2" }, "|", -1),
544
+ a("span", null, "文件大小:" + h(t.metadata?.fileSize || "2.8MB"), 1)
427
545
  ])]),
428
- a("div", Ze, [P(c.order) && e.price ? (d(), i("span", Qe, "¥" + h(e.price.toFixed(2)), 1)) : r("", !0), s(g(A), { content: "联系卖家" }, {
429
- default: v(() => [a("button", {
430
- 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",
431
- onClick: (t) => E(e.id)
432
- }, [s(g(D), {
433
- size: "16",
434
- class: "text-[#4749ad]"
435
- })], 8, $e)]),
436
- _: 2
437
- }, 1024)])
438
- ]))), 128)), S.value ? (d(), i("div", et, [a("button", {
439
- onClick: T,
546
+ a("div", rt, [
547
+ I(c.order) && t.price ? (d(), i("span", it, "¥" + h(t.price.toFixed(2)), 1)) : r("", !0),
548
+ T(t.id) ? (d(), n(g(A), {
549
+ key: 1,
550
+ content: "联系卖家"
551
+ }, {
552
+ default: v(() => [a("button", {
553
+ 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",
554
+ onClick: (e) => oe(t.id)
555
+ }, [s(g(E), {
556
+ size: "16",
557
+ class: "text-[#4749ad]"
558
+ })], 8, at)]),
559
+ _: 2
560
+ }, 1024)) : r("", !0),
561
+ I(c.order) ? (d(), i(e, { key: 2 }, [w(t.id) === "refundable" ? (d(), n(g(A), {
562
+ key: 0,
563
+ content: "申请退款"
564
+ }, {
565
+ default: v(() => [a("button", {
566
+ 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",
567
+ onClick: (e) => D(t.id)
568
+ }, [a("img", {
569
+ src: g(j),
570
+ alt: "申请退款",
571
+ class: "w-[18px] h-[18px]"
572
+ }, null, 8, st)], 8, ot)]),
573
+ _: 2
574
+ }, 1024)) : w(t.id) === "after_sales" ? (d(), n(g(A), {
575
+ key: 1,
576
+ content: "联系售后"
577
+ }, {
578
+ default: v(() => [a("button", {
579
+ 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",
580
+ onClick: (e) => ne(t.id)
581
+ }, [a("img", {
582
+ src: g(te),
583
+ alt: "联系售后",
584
+ class: "w-[18px] h-[18px]"
585
+ }, null, 8, lt)], 8, ct)]),
586
+ _: 2
587
+ }, 1024)) : r("", !0)], 64)) : r("", !0)
588
+ ])
589
+ ]))), 128)), re.value ? (d(), i("div", ut, [a("button", {
590
+ onClick: ae,
440
591
  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]",
441
592
  style: {
442
593
  "text-align": "right",
443
594
  "margin-left": "auto"
444
595
  }
445
- }, [o(h(x.value ? "收起" : "展开全部") + " ", 1), x.value ? (d(), n(g(C), {
596
+ }, [o(h(x.value ? "收起" : "展开全部") + " ", 1), x.value ? (d(), n(g(ee), {
446
597
  key: 0,
447
598
  size: "16"
448
599
  })) : (d(), n(g(b), {
449
600
  key: 1,
450
601
  size: "16"
451
- }))])])) : r("", !0)]), a("div", tt, [a("div", nt, [l[6] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "总计", -1), a("span", rt, " ¥" + h(c.order.totalAmount ? c.order.totalAmount.toFixed(2) : "0.00"), 1)]), I(c.order) ? (d(), i("div", it, " 本订单产品为平台赠送,无实际支付金额 ")) : r("", !0)])]),
452
- t.$slots["host-extra"] ? (d(), i("div", at, [m(t.$slots, "host-extra", {}, void 0, !0)])) : r("", !0)
453
- ]));
602
+ }))])])) : r("", !0)]), a("div", dt, [a("div", ft, [l[7] ||= a("span", { class: "text-[12px] font-medium text-[#262626]" }, "总计", -1), a("span", pt, " ¥" + h(c.order.totalAmount ? c.order.totalAmount.toFixed(2) : "0.00"), 1)]), R(c.order) ? (d(), i("div", mt, " 本订单产品为平台赠送,无实际支付金额 ")) : r("", !0)])]),
603
+ t.$slots["host-extra"] ? (d(), i("div", ht, [m(t.$slots, "host-extra", {}, void 0, !0)])) : r("", !0)
604
+ ]), s(g(k), {
605
+ visible: C.value,
606
+ "onUpdate:visible": l[0] ||= (e) => C.value = e,
607
+ title: "申请退款",
608
+ footer: !1,
609
+ "mask-closable": !1,
610
+ width: 448,
611
+ "modal-style": { borderRadius: "8px" },
612
+ onCancel: M
613
+ }, {
614
+ default: v(() => [l[9] ||= a("p", { class: "text-sm text-[#262626] text-center mb-6" }, "确认要申请退款吗?退款成功后您将无法继续下载并使用此数据。", -1), a("div", { class: "flex justify-end gap-3" }, [a("button", {
615
+ style: { border: "none" },
616
+ class: "px-4 py-2 text-sm text-[#262626] rounded-md hover:bg-slate-50 transition-colors cursor-pointer",
617
+ onClick: M
618
+ }, "取消"), a("button", {
619
+ style: { border: "none" },
620
+ class: "px-4 py-2 text-sm text-white bg-[#4749ad] rounded-md hover:opacity-90 transition-colors cursor-pointer",
621
+ onClick: O
622
+ }, "确认")])]),
623
+ _: 1
624
+ }, 8, ["visible"])], 64));
454
625
  }
455
- }), [["__scopeId", "data-v-729f1680"]]), ot = {
456
- OrderManagement: J,
457
- OrderDetailPanel: $
626
+ }), [["__scopeId", "data-v-5edc0b3d"]]), _t = {
627
+ OrderManagement: K,
628
+ OrderDetailPanel: gt
458
629
  };
459
630
  //#endregion
460
- export { $ as OrderDetailPanel, J as OrderManagement, ot as userMyOrder };
631
+ export { gt as OrderDetailPanel, K as OrderManagement, _t as userMyOrder };