1 |
- import{d as V,Q as x,P as L,S as F,W as D,g as Y,y as C,V as $,n as H,af as M,j as t,A as i,w as _,aS as j,B as f,T as I}from"./ResizeObserver.es.39b48a47.js";import{C as k}from"./index.970ad07b.js";import{t as G}from"./tradeOrder.c5307744.js";import{o as l}from"./orderStatus.fbc0ddaf.js";import{s as R,m as T}from"./index.07111672.js";const U="_double12Active_1q8o3_1",z="_headImg_1q8o3_10",Q="_activeArea1_1q8o3_20",W="_tip1_1q8o3_31",J="_shadowImg_1q8o3_39",K="_activeCon_1q8o3_48",X="_activeBox_1q8o3_53",Z="_activeTimes_1q8o3_65",tt="_activeListCon_1q8o3_72",et="_activeList_1q8o3_72",it="_number_1q8o3_103",at="_activeContent_1q8o3_108",ut="_vipNumber_1q8o3_116",st="_vipBuy1_1q8o3_135",ot="_vipBuy2_1q8o3_140",rt="_vipBuy3_1q8o3_147",nt="_svipDetails_1q8o3_154",ct="_activeArea2_1q8o3_179",dt="_activeArea3_1q8o3_184",lt="_titCon_1q8o3_212",vt="_classCon_1q8o3_223",pt="_classBox_1q8o3_231",mt="_activeArea4_1q8o3_252",_t="_subBtnCon_1q8o3_257",gt="_subBtn_1q8o3_257",yt="_disable_1q8o3_282",Bt="_dialogContainer_1q8o3_286",Ct="_dialogTitle_1q8o3_294",Et="_dialogContent_1q8o3_300",bt="_dialogBtnGroup_1q8o3_306",Dt="_orderGroup_1q8o3_309",At="_dialogBtn_1q8o3_306";var e={double12Active:U,headImg:z,activeArea1:Q,tip1:W,shadowImg:J,activeCon:K,activeBox:X,activeTimes:Z,activeListCon:tt,activeList:et,number:it,activeContent:at,vipNumber:ut,vipBuy1:st,vipBuy2:ot,vipBuy3:rt,svipDetails:nt,activeArea2:ct,activeArea3:dt,titCon:lt,classCon:vt,classBox:pt,activeArea4:mt,subBtnCon:_t,subBtn:gt,disable:yt,dialogContainer:Bt,dialogTitle:Ct,dialogContent:Et,dialogBtnGroup:bt,orderGroup:Dt,dialogBtn:At},Ft="./assets/tip1Img.c5ce28aa.png",ft="./assets/tip2Img.97d3f6ef.png",q="./assets/shadow.4180f90c.png",It="./assets/svipCon1.619c1f15.png",Tt="./assets/svipCon2.db632703.png",Vt=V({name:"double12Active",setup(qt,{emit:ht}){const A=x(),h=L(),s=F({titleOpacity:0,navBarHeight:0,orderVisiable:!1,orderDetail:{},activityId:h.query.activityId}),a=F({activityStart:"2024-12-12 00:00:00",activityEnd:"2024-12-12 23:59:59",registrationPrice:0,buyCount:0,buyNum:0,vipCardId:0,activityList:[]}),E=D(()=>Date.now()<new Date(a.activityStart).getTime()?{disable:!0,text:"\u6D3B\u52A8\u672A\u5F00\u59CB"}:Date.now()>new Date(a.activityEnd).getTime()?{disable:!0,text:"\u6D3B\u52A8\u5DF2\u7ED3\u675F"}:a.buyCount<=a.buyNum?{disable:!0,text:"\u60A8\u5DF2\u53C2\u4E0E\u6D3B\u52A8"}:{disable:!1,text:"\u7ACB\u5373\u8D2D\u4E70"}),v=D(()=>Y.user.data),N=D(()=>{var u;return((u=v.value.userVip)==null?void 0:u.vipType)==="PERMANENT_SVIP"});P();function P(){!s.activityId||C.get(`/api-student/memberPriceSettings/getDoubleTwelve/${s.activityId}`).then(u=>{if(u.code===200&&u.data){const{activityStart:n,activityEnd:p,registrationPrice:r,buyCount:c,buyNum:g,vipCardId:o,activityRewardList:B}=u.data||{};a.activityStart=n,a.activityEnd=p,a.registrationPrice=r,a.buyCount=c<1?99999:c,a.buyNum=g,a.vipCardId=o,a.activityList=(B||[]).map(b=>{const{rewardType:d,vipCardId:y,unit:m}=b.activityReward;return d==="DISCOUNT"?{goodType:d,goodName:`\u7545\u5B66\u5361 ${R[m]}`,goodNum:1,bizContent:y,giftFlag:!0,vipEndDays:null,goodsNum:1,unit:m}:{goodType:d,goodName:`\u5C0F\u9177Ai ${d} ${T[m]}`,goodNum:1,bizContent:y,giftFlag:!0,vipEndDays:null,goodsNum:1,unit:m}})}}).catch(u=>{console.log(u)})}async function w(){var u,n,p;try{if(N.value){I("\u60A8\u5DF2\u662F\u6C38\u4E45SVIP\u4F1A\u5458");return}const r="SVIP",c=await C.post("/api-student/userOrder/getPendingOrder",{data:{goodType:r}});if(console.log(c,"resPadding"),(u=c==null?void 0:c.data)!=null&&u.id){s.orderVisiable=!0,s.orderDetail=c.data||{};return}const{data:g}=await C.post("/api-student/memberPriceSettings/list",{data:{status:1}}),o=((g==null?void 0:g.list)||[]).find(m=>m.id===a.vipCardId);o||I("\u672A\u5339\u914D\u4E0A\u6D3B\u52A8"),o.title=T[o.period];const B=_(v.value.userVip.svipEndDate||new Date).toDate(),b=_(B).add(1,"year").toDate();l.orderObject.orderType=r,l.orderObject.orderName=`\u5C0F\u9177Ai ${r} ${o.title}`,l.orderObject.orderDesc=`\u5C0F\u9177Ai ${r} ${o.title}`,l.orderObject.actualPrice=a.registrationPrice,l.orderObject.recomUserId="",l.orderObject.activityId=s.activityId,l.orderObject.orderNo="";const d={orderType:r,goodsName:`\u5C0F\u9177Ai ${r} ${o.title}`,id:o.id,title:o.title,num:1,salePrice:o.salePrice,period:o.period,vipEndDays:((n=v.value.userVip)==null?void 0:n.vipEndDays)||0,svipEndDays:((p=v.value.userVip)==null?void 0:p.svipEndDays)||0,discount:o.discount,discountPrice:o.discountPrice,price:a.registrationPrice,startTime:_(B).format("YYYY-MM-DD"),endTime:_(b).format("YYYY-MM-DD"),recomUserId:"",activityBuyCount:0,activityList:[],discountCardFlag:v.value.discountCardFlag,discountEndTime:v.value.discountEndTime,discountStartTime:v.value.discountStartTime},y=a.buyCount-a.buyNum;y>0&&(d.activityBuyCount=y,d.activityList=a.activityList),l.orderObject.orderList=[d],A.push({path:"/orderDetail",query:{orderType:r}})}catch{}}const O=async()=>{try{await C.post("/api-student/userOrder/orderCancel",{data:{orderNo:s.orderDetail.orderNo}}),s.orderVisiable=!1}catch{}},S=async()=>{const u=s.orderDetail||{};G(u,()=>{A.push({path:"/orderDetail",query:{orderType:u.orderType}})})};return $(()=>{H({api:"getNavHeight"},u=>{const{content:n}=u,p=n.dpi||2;if(n.navHeight){const r=n.navHeight/p;s.navBarHeight=r}})}),M("scroll",()=>{const u=window.scrollY||window.pageYOffset||document.documentElement.scrollTop;s.titleOpacity=u>30?1:0}),()=>t("div",{class:e.double12Active,style:{"--navBarHeight":`${s.navBarHeight}px`}},[t(k,{background:`rgba(255,255,255, ${s.titleOpacity})`,color:`rgba(0,0,0, ${s.titleOpacity})`,backIconColor:"black",hideHeader:!1,border:!1},null),t("div",{class:e.headImg},null),t("div",{class:e.activeArea1},[t("img",{class:e.tip1,src:Ft},null),t("img",{class:e.shadowImg,src:q},null),t("div",{class:e.activeCon},[t("div",{class:e.activeBox},[i("\u6D3B\u52A8\u65F6\u95F4")]),t("div",{class:e.activeTimes},[`${_(a.activityStart).format("YYYY\u5E74MM\u6708DD\u65E5HH:mm")}-${_(a.activityEnd).format("YYYY\u5E74MM\u6708DD\u65E5HH:mm")}`])]),t("div",{class:e.activeCon},[t("div",{class:e.activeBox},[i("\u6D3B\u52A8\u5185\u5BB9")]),t("div",{class:e.activeListCon},[t("div",{class:e.activeList},[i("SVIP\u5E74\u5EA6\u4F1A\u5458\u9650\u65F6\u7279\u60E0\u81F3"),t("span",{class:e.number},[" ",a.registrationPrice," "]),t("span",null,[i("\u5143")])]),t("div",{class:e.activeList},[i("\u6D3B\u52A8\u671F\u95F4"),t("span",null,[i("\u4E70\u4E00\u5E74\u9001\u4E00\u5E74")])]),t("div",{class:e.activeList},[i("\u540C\u65F6\u989D\u5916"),t("span",null,[i("\u83B7\u8D60\u4E00\u5E74\u7545\u5B66\u5361")]),i("\uFF0C\u4EAB\u53D7\u7EA6\u8BFE75\u6298\uFF01")])])]),t("div",{class:e.activeContent},[t("div",{class:[e.vipNumber,e.vipBuy1]},[t("div",null,[i("SVIP\u5E74\u5EA6\u4F1A\u5458")]),t("div",null,[i("\u4EF7\u503C1280\u5143")])])," ",t("div",{class:[e.vipNumber,e.vipBuy2]},[t("div",null,[i("SVIP\u5E74\u5EA6\u4F1A\u5458")]),t("div",null,[i("\u4EF7\u503C1280\u5143")])])," ",t("div",{class:[e.vipNumber,e.vipBuy3]},[t("div",null,[i("\u7545\u5B66\u5361\u4E00\u5E74\u671F")]),t("div",null,[i("\u4EF7\u503C200\u5143")])]),t("div",{class:e.svipDetails},[t("span",null,[i("\xA5")]),t("span",null,[a.registrationPrice]),t("span",null,[i("(SVIP\u4F1A\u5458\u4E701\u5E74\u8D601\u5E74\uFF0C\u8FD8\u90011\u5E74\u7545\u5B66\u5361)")])])])]),t("img",{class:e.activeArea2,src:It},null),t("div",{class:e.activeArea3},[t("img",{class:e.tip1,src:ft},null),t("img",{class:e.shadowImg,src:q},null),t("div",{class:e.titCon},[i("\u4E13\u4E3A\u97F3\u4E50\u5B66\u4E60\u8005\u8BBE\u8BA1\u7684\u5168\u65B9\u4F4D\u5B66\u4E60\u901A\u884C\u8BC1\uFF0C\u7545\u5B66\u5361\u751F\u6548\u671F\u95F4\uFF0C\u8D2D\u4E70\u4EFB\u4F55VIP\u5B9A\u5236\u8BFE\u3001\u8DA3\u7EA0\u8BFE\u3001\u76F4\u64AD\u8BFE\u3001\u89C6\u9891\u8BFE"),t("span",null,[i("\u4EAB\u53D775\u6298")]),i("\u4F18\u60E0\uFF0C\u52A9\u60A8\u5728\u97F3\u4E50\u9053\u8DEF\u4E0A\u66F4\u8FDB\u4E00\u6B65\u3002")]),t("div",{class:e.classCon},[t("div",{class:e.classBox},[i("\u8BFE\u7A0B\u5168\u90E8"),t("span",null,[i("75")]),t("span",null,[i("\u6298")])])])]),t("img",{class:e.activeArea4,src:Tt},null),t("div",{class:e.subBtnCon},[t("div",{class:[e.subBtn,E.value.disable&&e.disable],onClick:()=>{!E.value.disable&&w()}},[E.value.text])]),t(j,{show:s.orderVisiable,"onUpdate:show":u=>s.orderVisiable=u,style:{background:"transparent"},closeOnClickOverlay:!1},{default:()=>[t("div",{class:e.dialogContainer},[t("div",{class:e.dialogTitle},[i("\u63D0\u793A")]),t("div",{class:e.dialogContent},[i("\u60A8\u6709\u5F85\u652F\u4ED8\u7684\u8BA2\u5355,\u662F\u5426\u7EE7\u7EED\u652F\u4ED8")]),t("div",{class:[e.dialogBtnGroup,e.orderGroup]},[t(f,{round:!0,type:"default",plain:!0,block:!0,onClick:O},{default:()=>[i("\u53D6\u6D88\u8BA2\u5355")]}),t(f,{round:!0,type:"primary",block:!0,class:e.dialogBtn,onClick:S},{default:()=>[i("\u7EE7\u7EED\u652F\u4ED8")]})])])]})])}});export{Vt as default};
|