;(function(){System.register(['./vendor-legacy.031e1374.js','./index-legacy.f25f109a4.js','./index-legacy.f25f109a10.js','./index-legacy.f25f109a20.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a19.js','./cart-legacy.eb028ecf.js','./index.module-legacy.2b6ca4e3.js','./index-legacy.34c73938.js','./index-legacy.143c9aad.js','./index-legacy.123f1f76.js','./index-legacy.1cd7b6bb.js','./index-legacy.8c8f59a3.js','./index-legacy.820df6d5.js','./icon-address-legacy.93b9dd46.js','./index-legacy.f25f109a13.js','./index-legacy.f25f109a14.js','./icon_checkbox_default-legacy.e33240bc.js','./index-legacy.1bb96d98.js','./index-legacy.f25f109a8.js','./index-legacy.637f35565.js','./orderStatus-legacy.071c8548.js','./index-legacy.c75fe8a2.js','./index-legacy.d70883d8.js','./index-legacy.637f3556.js','./index-legacy.f25f109a3.js'],function(exports){'use strict';var defineComponent,ref,reactive,watch,useRouter,createVNode,Card,CellGroup,Cell,SubmitBar,createTextVNode,Popup,Fragment,Toast,cartConfirm,formateAttr,styles,Address,ColProtocol,Payment,moneyFormat,ColResult,state,ColPopup,UserAuth;return{setters:[function(module){defineComponent=module.d;ref=module.V;reactive=module.h;watch=module.U;useRouter=module.a2;createVNode=module.a;Card=module.as;CellGroup=module.C;Cell=module.q;SubmitBar=module.aq;createTextVNode=module.j;Popup=module.P;Fragment=module.F;Toast=module.T;},function(){},function(){},function(){},function(){},function(){},function(){},function(module){cartConfirm=module.c;formateAttr=module.f;},function(module){styles=module.s;},function(module){Address=module.A;},function(module){ColProtocol=module.C;},function(module){Payment=module.P;},function(module){moneyFormat=module.m;ColResult=module.C;state=module.s;},function(module){ColPopup=module.C;},function(module){UserAuth=module.U;},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var index=exports('default',defineComponent({name:'cartConfirmAgin',setup:function setup(){var _cartConfirm$orderInf,_cartConfirm$orderInf2,_cartConfirm$orderInf3,_cartConfirm$orderInf4,_cartConfirm$orderInf5,_cartConfirm$orderInf6,_cartConfirm$orderInf7,_cartConfirm$orderInf8,_cartConfirm$orderInf9,_cartConfirm$orderInf10,_cartConfirm$orderInf11,_cartConfirm$orderInf12,_cartConfirm$orderInf13;// console.log(cartConfirm)
var list=((_cartConfirm$orderInf=cartConfirm.orderInfo)===null||_cartConfirm$orderInf===void 0?void 0:_cartConfirm$orderInf.orderItemList)||[];var calcAmount={totalAmount:((_cartConfirm$orderInf2=cartConfirm.orderInfo)===null||_cartConfirm$orderInf2===void 0?void 0:_cartConfirm$orderInf2.totalAmount)||0,payAmount:((_cartConfirm$orderInf3=cartConfirm.orderInfo)===null||_cartConfirm$orderInf3===void 0?void 0:_cartConfirm$orderInf3.payAmount)||0,freightAmount:((_cartConfirm$orderInf4=cartConfirm.orderInfo)===null||_cartConfirm$orderInf4===void 0?void 0:_cartConfirm$orderInf4.freightAmount)||0};ref(0);// 0->未支付；1->支付宝；2->微信
var address={city:(_cartConfirm$orderInf5=cartConfirm.orderInfo)===null||_cartConfirm$orderInf5===void 0?void 0:_cartConfirm$orderInf5.receiverCity,detailAddress:(_cartConfirm$orderInf6=cartConfirm.orderInfo)===null||_cartConfirm$orderInf6===void 0?void 0:_cartConfirm$orderInf6.receiverDetailAddress,name:(_cartConfirm$orderInf7=cartConfirm.orderInfo)===null||_cartConfirm$orderInf7===void 0?void 0:_cartConfirm$orderInf7.receiverName,phoneNumber:(_cartConfirm$orderInf8=cartConfirm.orderInfo)===null||_cartConfirm$orderInf8===void 0?void 0:_cartConfirm$orderInf8.receiverPhone,postCode:(_cartConfirm$orderInf9=cartConfirm.orderInfo)===null||_cartConfirm$orderInf9===void 0?void 0:_cartConfirm$orderInf9.receiverPostCode,province:(_cartConfirm$orderInf10=cartConfirm.orderInfo)===null||_cartConfirm$orderInf10===void 0?void 0:_cartConfirm$orderInf10.receiverProvince,region:(_cartConfirm$orderInf11=cartConfirm.orderInfo)===null||_cartConfirm$orderInf11===void 0?void 0:_cartConfirm$orderInf11.receiverRegion};var agreeStatus=ref(false);var paymentPopup=ref(false);var authPopup=ref(false);var orderInfo=reactive({orderNo:((_cartConfirm$orderInf12=cartConfirm.orderInfo)===null||_cartConfirm$orderInf12===void 0?void 0:_cartConfirm$orderInf12.orderSn)||'',actualPrice:((_cartConfirm$orderInf13=cartConfirm.orderInfo)===null||_cartConfirm$orderInf13===void 0?void 0:_cartConfirm$orderInf13.payAmount)||0});//修复实名认证头部问题
watch(authPopup,function(value,oldValue){if(authPopup.value){// 设置是否显示导航栏 0 显示 1 不显示
postMessage({api:'setBarStatus',content:{status:0}});}else{postMessage({api:'setBarStatus',content:{status:1}});}});// 提交
var _onSubmit=function onSubmit(){if(!agreeStatus.value){Toast('请先阅读并同意《酷乐秀平台服务协议》');return;}var users=state.user.data;// 判断是否需要实名认证
if(!(users!==null&&users!==void 0&&users.realName)||!(users!==null&&users!==void 0&&users.idCardNo)){authPopup.value=true;return;}// 判断是否有订单号
if(orderInfo.orderNo){paymentPopup.value=true;return;}Toast('没有订单号!');};var router=useRouter();//认证成功
var onAuthSuccess=function onAuthSuccess(){authPopup.value=false;_onSubmit();// 实名成功后自动支付
};return function(){return createVNode(Fragment,null,[list.length?createVNode("div",{"class":styles.cartConfirm},[createVNode("div",{"class":styles.cartConfirmBox},[createVNode(Address,{"item":address,"isLink":false},null)]),createVNode("div",{"style":{marginTop:'20px'},"class":[styles.cartBox,styles.cartConfirmBox]},[createVNode("div",{"class":styles.shopBox},[list.map(function(item){return createVNode("div",{"class":[styles.cartItem],"style":{marginBottom:'10px'}},[createVNode(Card,{"price":moneyFormat(item.productPrice),"desc":formateAttr(item.productAttr),"title":item.productName,"thumb":item.productPic,"num":item.productQuantity},null)]);})]),createVNode(CellGroup,{"border":false},{default:function _default(){return[createVNode(Cell,{"border":false,"title":"总额","value":'¥ '+calcAmount.totalAmount},null)];}})]),createVNode("div",{"class":styles.payProtocol},[createVNode(ColProtocol,{"modelValue":agreeStatus.value,"onUpdate:modelValue":function onUpdateModelValue($event){return agreeStatus.value=$event;}},null),createVNode(SubmitBar,{"buttonText":"\u7ED3\u7B97(".concat(list.length,")"),"buttonColor":"var(--van-primary)","disabled":list.length===0,"onSubmit":function onSubmit(){return _onSubmit();}},{default:function _default(){return[createVNode("div",{"class":styles.confirmBottom},[createTextVNode("\u5408\u8BA1"),' ',createVNode("span",{"class":styles['price-des']},[createTextVNode("\xA5"),moneyFormat(calcAmount.payAmount)])])];}})]),createVNode("div",{"style":{height:'var(--van-submit-bar-height)'}},null),createVNode(ColPopup,{"modelValue":authPopup.value,"onUpdate:modelValue":function onUpdateModelValue($event){return authPopup.value=$event;}},{default:function _default(){return[createVNode(UserAuth,{"onSuccess":onAuthSuccess},null)];}}),createVNode(Popup,{"show":paymentPopup.value,"closeOnClickOverlay":false,"position":"bottom","round":true,"closeOnPopstate":true,"safeAreaInsetBottom":true,"style":{minHeight:'30%'}},{default:function _default(){return[createVNode(Payment,{"modelValue":paymentPopup.value,"onUpdate:modelValue":function onUpdateModelValue($event){return paymentPopup.value=$event;},"orderInfo":orderInfo,"paymentType":"goodsPay","onBackOut":function onBackOut(){return paymentPopup.value=false;}},null)];}})]):createVNode(ColResult,{"buttonText":"去购物车","onClick":function onClick(){router.push({path:'/cart'});}},null)]);};}}));}};});})();
