import{f as a,y as s,C as e,o as t,c as o,w as u,a_ as n,a$ as r,d as l,a as c,u as i,h as _,t as p,m as f,g as m,i as d}from"./index-d76b1e7a.js";import{_ as v}from"./uv-navbar.59911b60.js";import{o as b,u as y,r as x}from"./useRouter.2bdb47a0.js";import{_ as g}from"./logo.c1538e7d.js";import{t as j}from"./order.6c3b873a.js";import{C as k}from"./config.166461d9.js";import{_ as N}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uv-status-bar.66ab7702.js";/* empty css                                                                      */import"./uv-icon.5730d4d2.js";import"./uv-navbar.vue_vue_type_style_index_0_scoped_8d8b32e4_lang.3fde2b65.js";import"./api.9246a192.js";const C=N({__name:"index",setup(N){const{getParams:C,goBack:h,push:w,pushToTab:L}=y(),I=a(0),F=s((()=>0===I.value?"支付中...":1===I.value?"支付成功":2===I.value?"支付失败":void 0));function O(a){w({url:"/pages/orderList/orderList"},{data:{type:a},type:"reLaunch"})}function P(){L({url:"/pages/index/index"})}return a({}),b((async a=>{e({content:"请确认支付是否完成",success:async()=>{await async function(){const a=n(k.PAY_INFO);if(a){const s=JSON.parse(a),e=await j(s);I.value=e?1:2,r(k.PAY_INFO)}else O(0)}()}});const s=C(a);s&&1===s.type?I.value=1:I.value=2})),(a,s)=>{const e=x(m("uv-navbar"),v),n=d,r=l;return t(),o(r,{class:"pay-status"},{default:u((()=>[c(e,{fixed:!1,title:i(F),"left-arrow":"",onLeftClick:i(h)},null,8,["title","onLeftClick"]),c(r,{class:"status-main flex flex-column flex-ai__center"},{default:u((()=>[2===Number(I.value)?(t(),o(n,{key:0,class:"icon",src:"/assets/pay-error-371ff458.png"})):0===Number(I.value)?(t(),o(n,{key:1,class:"icon col-icon",src:g})):(t(),o(n,{key:2,class:"icon",src:"/assets/pay-success-81dd9d9e.png"})),c(r,{class:"text"},{default:u((()=>[_(p(i(F)),1)])),_:1})])),_:1}),c(r,{class:"button-group flex flex-ai__center flex-jc__center"},{default:u((()=>[1===Number(I.value)?(t(),o(r,{key:0,class:"animation-button button white-button",onClick:P},{default:u((()=>[_(" 继续逛逛 ")])),_:1})):f("",!0),1===Number(I.value)?(t(),o(r,{key:1,class:"animation-button button",onClick:s[0]||(s[0]=a=>O(1))},{default:u((()=>[_(" 查看订单 ")])),_:1})):f("",!0),2===Number(I.value)?(t(),o(r,{key:2,class:"animation-button button",onClick:s[1]||(s[1]=a=>O(0))},{default:u((()=>[_(" 重新支付 ")])),_:1})):f("",!0)])),_:1})])),_:1})}}},[["__scopeId","data-v-37dfbf28"]]);export{C as default};
