1 |
- import{d as F,U as l,S as R,a3 as w,Q as H,j as o,bC as B,A as N,aS as L,C as M,F as Q,T as V,g as j}from"./ResizeObserver.es.39b48a47.js";import"./index.fcbcb027.js";import"./index.34ac729a.js";import{C as z}from"./index.ff5688ac.js";import{C as T}from"./index.db115763.js";import{C as D}from"./index.9f5e14d1.js";import{S as G}from"./index.18400b32.js";import{c as t,f as W}from"./cart.426348e2.js";import{s as r}from"./index.module.0e920025.js";import{A as $}from"./index.b1a42bb7.js";import{C as q}from"./index.08a7f4aa.js";import{P as E}from"./index.1347f274.js";import{C as J}from"./index.a0f53d9f.js";import{U as K}from"./index.0404e33a.js";import{C as X}from"./index.970ad07b.js";import"./index.0a093430.js";import"./index.3c44a6d7.js";import"./icon_checkbox.808b953c.js";import"./icon_checkbox-tenant.ecfa11df.js";import"./icon_checkbox_default.256c0849.js";import"./index.bb84a3aa.js";import"./hooks.6df65925.js";import"./index.f6c41ddf.js";import"./index.16ffd6ad.js";import"./index.867583ad.js";import"./index.428ab1a8.js";import"./use-id.b004ff17.js";import"./index.418cbe7f.js";import"./index.45e4ca3e.js";var Vo=F({name:"cartConfirmAgin",setup(){var d,c,f,v,C,A,h,y,g,I,b,P,S,x;const n=((d=t.orderInfo)==null?void 0:d.orderItemList)||[],u={totalAmount:((c=t.orderInfo)==null?void 0:c.totalAmount)||0,payAmount:((f=t.orderInfo)==null?void 0:f.payAmount)||0,freightAmount:((v=t.orderInfo)==null?void 0:v.freightAmount)||0,couponAmount:(C=t.orderInfo)==null?void 0:C.couponAmount};l(0);const U={city:(A=t.orderInfo)==null?void 0:A.receiverCity,detailAddress:(h=t.orderInfo)==null?void 0:h.receiverDetailAddress,name:(y=t.orderInfo)==null?void 0:y.receiverName,phoneNumber:(g=t.orderInfo)==null?void 0:g.receiverPhone,postCode:(I=t.orderInfo)==null?void 0:I.receiverPostCode,province:(b=t.orderInfo)==null?void 0:b.receiverProvince,region:(P=t.orderInfo)==null?void 0:P.receiverRegion},i=l(!1),s=l(!1),a=l(!1),m=R({orderNo:((S=t.orderInfo)==null?void 0:S.orderSn)||"",actualPrice:((x=t.orderInfo)==null?void 0:x.payAmount)||0});w(a,(e,Y)=>{a.value?postMessage({api:"setBarStatus",content:{status:0}}):postMessage({api:"setBarStatus",content:{status:1}})});const p=()=>{if(!i.value){V("\u8BF7\u5148\u9605\u8BFB\u5E76\u540C\u610F\u300A\u9177\u4E50\u79C0\u5E73\u53F0\u670D\u52A1\u534F\u8BAE\u300B");return}const e=j.user.data;if(!(e!=null&&e.realName)||!(e!=null&&e.idCardNo)){a.value=!0;return}if(m.orderNo){s.value=!0;return}V("\u6CA1\u6709\u8BA2\u5355\u53F7!")},k=H(),O=()=>{a.value=!1,p()};return()=>o(Q,null,[o(X,null,null),n.length?o("div",{class:r.cartConfirm},[o("div",{class:r.cartConfirmBox},[o($,{item:U,isLink:!1},null)]),o("div",{style:{marginTop:"20px"},class:[r.cartBox,r.cartConfirmBox]},[o("div",{class:r.shopBox},[n.map(e=>o("div",{class:[r.cartItem],style:{marginBottom:"10px"}},[o(z,{price:B(e.productPrice),desc:W(e.productAttr),title:e.productName,thumb:e.productPic,num:e.productQuantity},null)]))]),o(D,{border:!1},{default:()=>[o(T,{border:!1,title:"\u4F18\u60E0\u5238"},{value:()=>o("span",{style:{fontSize:"0.42667rem",color:"#ff3535",fontWeight:"bold"}},["-\xA5 "+u.couponAmount])}),o(T,{border:!1,title:"\u603B\u989D",value:"\xA5 "+u.totalAmount},null)]})]),o("div",{class:r.payProtocol},[o(q,{modelValue:i.value,"onUpdate:modelValue":e=>i.value=e},null),o(G,{buttonText:`\u7ED3\u7B97(${n.length})`,buttonColor:"var(--van-primary)",disabled:n.length===0,onSubmit:()=>p()},{default:()=>[o("div",{class:r.confirmBottom},[N("\u5408\u8BA1")," ",o("span",{class:r["price-des"]},[N("\xA5"),B(u.payAmount)])])]})]),o("div",{style:{height:"var(--van-submit-bar-height)"}},null),o(J,{modelValue:a.value,"onUpdate:modelValue":e=>a.value=e},{default:()=>[o(K,{onSuccess:O},null)]}),o(L,{show:s.value,closeOnClickOverlay:!1,position:"bottom",round:!0,closeOnPopstate:!0,safeAreaInsetBottom:!0,style:{minHeight:"30%"}},{default:()=>[o(E,{modelValue:s.value,"onUpdate:modelValue":e=>s.value=e,orderInfo:m,paymentType:"goodsPay",onBackOut:()=>s.value=!1},null)]})]):o(M,{buttonText:"\u53BB\u8D2D\u7269\u8F66",onClick:()=>{k.push({path:"/cart"})}},null)])}});export{Vo as default};
|