import{C as N,v as R,r,N as b,O as I,w as x,D as v,ax as A,E as l,F as e,M as m,J as d,au as _,K as o,aC as E,al as g,as as V,X as f,B as q,I as c,G,H}from"./common.modules-7b90237f.js";import{bM as S,A as z,bN as h,b as M,g as T,_ as U}from"./page-activity-ActivityDetail-27bd7cf0.js";import{L as F}from"./page-activity-DailySignIn-63fcaba2.js";import"./page-turntable-assets-d6267459.js";import"./native/index-ecf1462d.js";import"./en-91d2fc72.js";import"./page-activity-Bonus-9d46271c.js";const j={class:"redeem-container"},J={class:"redeem-container-header"},K={class:"redeem-container-header-belly"},O={alt:""},Q={class:"redeem-container-content"},W={class:"redeem-container-receive"},X=["placeholder"],Y={key:0},Z={class:"redeem-container-record"},ee={class:"redeem-container-record-title"},te={class:"redeem-container-record-itemsBox"},se={class:"redeem-container-record-item ar-1px-b"},ae={class:"redeem-container-record-item-left"},oe={class:"redeem-container-record-item-right"},ne=["src"],ie=N({__name:"index",setup(re){const{t:u}=R(),w=r(!1),y=b(),C=I(),n=r(C.query.hbcode||""),$=r(!0),p=x({pageSize:10,pageNo:1,startDate:null,endDate:null}),i=r({list:[],pageNo:0,totalPage:0,totalCount:0}),k=async()=>{if(n.value.trim()===""){await f({message:u("tipPlsEnterCode")});return}const t=await S({giftCode:n.value});if(t.code===0){q(u("redeemDialogDesc1")),n.value="",await B();return}else await f({message:u(`code${t.msgCode}`)})},B=async()=>{const t=await z(h(p));t&&(i.value.list=t==null?void 0:t.data.list)};return(t,a)=>{const D=v("NavBar"),P=v("svg-icon"),L=A("lazy");return c(),l("div",j,[e("div",J,[m(D,{title:t.$t("gift"),"left-arrow":"",onClickLeft:a[0]||(a[0]=s=>d(y).go(-1))},null,8,["title"]),e("div",K,[_(e("img",O,null,512),[[L,d(M)("main","gift")]])])]),e("div",Q,[e("div",W,[e("p",null,o(t.$t("tipHelloVIP")),1),e("p",null,o(t.$t("tipWepreparedGift4u")),1),e("h4",null,o(t.$t("tipPlsEnterRedeemCode")),1),_(e("input",{type:"text","auto-complete":"new-password",autocomplete:"off",placeholder:t.$t("tipPlsEnterCode"),"onUpdate:modelValue":a[1]||(a[1]=s=>n.value=s)},null,8,X),[[E,n.value]]),w.value?(c(),l("h5",Y,o(t.$t("tipPlsBindBankcard")),1)):g("v-if",!0),e("button",{onClick:a[2]||(a[2]=s=>k())},o(t.$t("receive")),1)]),e("div",Z,[e("div",ee,[m(P,{name:"giftHistory"}),g(` <img :src="getIcons('main', 'gRecord')" /> `),e("span",null,o(t.$t("record")),1)]),e("div",te,[m(F,{list:i.value.list,"onUpdate:list":a[3]||(a[3]=s=>i.value.list=s),"page-query":p,"onUpdate:pageQuery":a[4]||(a[4]=s=>p=s),api:d(h),distance:20,isAutoLoad:$.value},{content:V(()=>[(c(!0),l(G,null,H(i.value.list,s=>(c(),l("div",{class:"redeem-container-record-items",key:s.reserved},[e("div",se,[e("div",ae,[e("h5",null,o(t.$t("receiveSuccess")),1),e("span",null,o(s.addTime),1)]),e("div",oe,[e("img",{src:d(T)("main","gold")},null,8,ne),e("span",null,o(s.amount),1)])])]))),128))]),_:1},8,["list","page-query","api","isAutoLoad"])])])])])}}});const _e=U(ie,[["__scopeId","data-v-695ca243"],["__file","/usr/local/jenkins-prod/workspace/ar079-india-tashanwin/src/views/main/RedeemGift/index.vue"]]);export{_e as default};
