import{p as e,n as t,m as a,o as s,c as o,w as r,i as n,a as d,g as p,r as i}from"./index-9695ba50.js";import{_ as l}from"./uni-popup.b4a91712.js";import{r as u}from"./uni-app.es.7c83792c.js";import{_ as c}from"./_plugin-vue_export-helper.1b428a4d.js";const h=c({data:()=>({orderNo:"",orderInfo:{}}),onLoad(e){e.orderNo&&(this.orderNo=e.orderNo,setTimeout((()=>{this.payEnsure()}),200)),this.orderInfo=JSON.parse(sessionStorage.getItem("orderInfo"))},methods:{checkOrder(){this.$request.get({url:`api/wx-pay/queryOrder/${this.orderNo}`,loadingTip:"加载中...",data:{}}).then((a=>{e(),"SUCCESS"===JSON.parse(a.data.body).trade_state&&t({url:`/newScale/EQtest/paySuccess?resultId=${this.orderInfo.resultId}&userId=${this.orderInfo.userId}`})}))},getH5Pay(a){let s=this;s.$request.get({url:`api/orderInfo/queryOrderByResultIdAndUserId/${this.orderInfo.userId}/${this.orderInfo.resultId}`,loadingTip:"加载中...",data:{}}).then((a=>{e(),a.data&&"支付成功"===a.data.orderStatus?t({url:`/newScale/EQtest/paySuccess?resultId=${this.orderInfo.resultId}&userId=${this.orderInfo.userId}`}):s.$request.post({url:"api/wx-pay/h5Pay",loadingTip:"加载中...",data:s.orderInfo}).then((e=>{let t=encodeURI(`http://hnhong-duo.com/webo/newScale/EQtest/paymentPage?orderNo=${e.data.orderNo}`);window.location.href=`${e.data.codeUrl}&redirect_url=${t}`}))}))},payEnsure(){this.$refs.popup.open()},uncompleteHandle(){this.$refs.popup.close()},completeHandle(){a({title:""}),this.checkOrder()}}},[["render",function(e,t,a,c,h,m){const g=p,f=n,y=u(i("uni-popup"),l);return s(),o(f,{class:"payment_bg"},{default:r((()=>[d(f,{class:"payment_info"},{default:r((()=>[d(g,{src:"https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/paymentPage/pay_scale_info.png",mode:"widthFix"}),d(g,{class:"pay_btn_sm",onClick:t[0]||(t[0]=e=>m.getH5Pay()),src:"https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/paymentPage/pay_button.png",mode:"widthFix"})])),_:1}),d(f,{class:"payment_desc"},{default:r((()=>[d(g,{src:"https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/paymentPage/pay_scale_desc.png",mode:"widthFix"})])),_:1}),d(f,{class:"pay_btn_lg",onClick:t[1]||(t[1]=e=>m.getH5Pay())},{default:r((()=>[d(g,{src:"https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/paymentPage/pay_button.png",mode:"widthFix"})])),_:1}),d(y,{ref:"popup",type:"center"},{default:r((()=>[d(f,{class:"pay_dialog"},{default:r((()=>[d(f,{class:"btn_area"},{default:r((()=>[d(g,{style:{"margin-right":"89rpx"},onClick:m.completeHandle,src:"https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/paymentPage/complete_btn.png",mode:"widthFix"},null,8,["onClick"]),d(g,{onClick:m.uncompleteHandle,src:"https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/paymentPage/uncomplete_btn.png",mode:"widthFix"},null,8,["onClick"])])),_:1})])),_:1})])),_:1},512)])),_:1})}],["__scopeId","data-v-a4d6d7e8"]]);export{h as default};