import{o as l,g as u,b as o,w as n,u as a,F as _,f as c,a as t,t as i,d as m,e as p,h as f}from"./app-SC54XQDl.js";import{i as h,c as w}from"./app-Ba7ZqSpq.js";import{T as y,_ as g,a as r}from"./app-BmjHfFtq.js";import{_ as k}from"./app-DFulsyXy.js";import{P as x}from"./app-CnAvS_S8.js";import{_ as S}from"./app-DWUwCFNm.js";import{D as v}from"./app-ZeVDYyDS.js";import"./app-Y56vIEoR.js";import"./app-D_RBJHM6.js";import"./app-CNHjdV6U.js";function C(){const{utils:d,Tea:e}=h(this);this.goBack=function(){window.history.back()},this.success=function(s){if(s.data.success){d.success("实例购买成功",function(){window.location="/anti-ddos/instances"});return}s.data.orderCode.length>0&&(window.location="/finance/pay?code="+s.data.orderCode+"&from="+window.escape(window.location.toString())+"&returnURL=/anti-ddos/instances")},this.methodCode="@balance",this.changePayMethod=function(s){this.methodCode=s}}const T=t("a",{href:"/anti-ddos/packages"},"选择实例规格",-1),b=["value"],I=["value"],N=["value"],V=t("td",{class:"title"},"高防实例",-1),B=t("td",null,"价格",-1),D=t("td",null,"支付方式",-1),$={key:0,class:"red"},P=t("a",{href:"/anti-ddos/packages"},"上一步",-1),H={__name:"confirm",setup(d){const e=w(new C);return(s,F)=>(l(),u(_,null,[o(y,{step:"pay"},{default:n(()=>[o(g,null,{default:n(()=>[o(r,{code:"selectInstance"},{default:n(()=>[T]),_:1}),o(r,{code:"pay"},{default:n(()=>[c("支付")]),_:1})]),_:1})]),_:1}),o(k,{action:"$",onSuccess:a(e).success,class:"mt-2"},{default:n(()=>[t("input",{type:"hidden",name:"packageId",value:a(e).packageId},null,8,b),t("input",{type:"hidden",name:"periodId",value:a(e).periodId},null,8,I),t("input",{type:"hidden",name:"count",value:a(e).count},null,8,N),o(v,null,{default:n(()=>[t("tbody",null,[t("tr",null,[V,t("td",null,"["+i(a(e).packageSummary)+" / "+i(a(e).periodName)+"] x "+i(a(e).count),1)]),t("tr",null,[B,t("td",null,"￥"+i(a(e).amount)+"元",1)]),t("tr",null,[D,t("td",null,[o(x)])])])]),_:1}),m(o(S,null,{default:n(()=>[c("确定购买")]),_:1},512),[[p,a(e).amount>0]]),a(e).amount==0?(l(),u("span",$,"参数错误，请返回重新选择。")):f("",!0),c("   "),P]),_:1},8,["onSuccess"])],64))}};export{H as default};
