1import{d as b,r as u,o as d,c,b as t,x as m,G as p,u as l,i as f,g as F,H as w,j as k,_ as y}from"./index-F00fqZy-.js";import{s as v,c as B,E as T}from"./index-BLeoL7EK.js";import{u as D}from"./index-BjAm8Nb3.js";import{u as N}from"./useLoading-B6b1XFEE.js";import{u as C}from"./useNative-qVd58Lwv.js";import{w as E}from"./index-BtvXHrF4.js";import{s as V,a as I,b as _}from"./index-DEQ2MvEe.js";import"./useMobileType-DeWbOkyF.js";E(V);const L="/assets/title-ClDyexGD.png",A={bg:"lg-b-#5D6EFF-#FAFBFF","m-auto":"","max-w-xl":""},G={class:"container"},H={bg:"#FFF",rel:"","mx-5":"","rounded-5":"","p-6":""},O={"pt-12":"","space-y-6":""},P={"space-y-3":""},U=b({__name:"index",setup(j){D("Lovekeyä¼åå
æ¢");const{loading:i}=N(),{nativeFn:x}=C(),{getToken:g}=w(),r=g(),o=u(),e=u(),h=async()=>{if(!o.value)return v("请è¾å
¥å
æ¢ç ");if(!r)if(e.value)await I({title:"ç¡®è®¤çæææºå·",message:()=>k("div",{class:"text-2xl text-black font-semibold"},[e.value]),confirmButtonText:"确认å
æ¢"});else return v("请è¾å
¥ä¼åçæææºå·");try{i.value=!0,await B.exchange({code:o.value,phone:e.value||void 0}),_({title:"å
æ¢æå",message:e.value?"请è³Lovekey使ç¨å
æ¢ææºå·ç»å½":"",confirmButtonText:"ç¥éäº"}).then(()=>{o.value="",e.value=""})}catch(a){a.code===T.NO_BIND_PHONE?_({width:250,message:"è´¦æ·ç»å®ææºå·åæå¯è¿è¡å
æ¢",confirmButtonText:"å»ç»å®"}).then(()=>{x("toBindPhone")}):console.error("ð ~ file: coupon.vue ~ submit ~ err:",a)}finally{i.value=!1}};return(a,s)=>(d(),c("div",A,[t("div",G,[t("div",H,[s[2]||(s[2]=t("img",{src:L,abs:"~ t--5","h-18":""},null,-1)),t("div",O,[t("div",P,[m(t("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>f(o)?o.value=n:null),placeholder:"请ç²è´´æè¾å
¥å
æ¢ç "},null,512),[[p,l(o)]]),l(r)?F("",!0):m((d(),c("input",{key:0,"onUpdate:modelValue":s[1]||(s[1]=n=>f(e)?e.value=n:null),placeholder:"请è¾å
¥ä¼åçæææºå·"},null,512)),[[p,l(e)]])]),t("button",{bg:"#000","w-full":"","rounded-3":"","p-3":"",text:"lg #FFF w-bold",onClick:h}," å
æ¢ ")])])])]))}}),W=y(U,[["__scopeId","data-v-070e3915"]]);export{W as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.