"use strict";var a=require("../common/vendor.js");const r={data:()=>({payData:null,payExtraData:null}),onLoad(r){console.log(r),this.payData=JSON.parse(decodeURIComponent(r.openid));var e=a.index.getStorageSync("payExtraData");this.payExtraData=JSON.parse(e),console.log(this.payExtraData),console.log(this.payData),this.payOrder()},methods:{payOrder(){var r=this;a.index.showLoading({title:"处理中..."}),a.index.requestPayment({provider:"wxpay",timeStamp:r.payData.timeStamp,nonceStr:r.payData.nonceStr,package:r.payData.package,signType:r.payData.signType,paySign:r.payData.paySign,success:function(e){a.index.hideLoading(),1==r.payExtraData.orderType?a.index.redirectTo({url:"/pages_order/inquiryOrderPaySuccess?orderId="+r.payExtraData.orderId}):2==r.payExtraData.orderType?a.index.redirectTo({url:"/pages_order/storeOrderPaySuccess?orderId="+r.payExtraData.orderId}):3==r.payExtraData.orderType?a.index.redirectTo({url:"/pages_order/packageOrderPaySuccess?orderId="+r.payExtraData.orderId}):4==r.payExtraData.orderType?a.index.redirectTo({url:"/pages_order/courseOrderPaySuccess?orderId="+r.payExtraData.orderId}):5==r.payExtraData.orderType&&a.index.redirectTo({url:"/pages_order/userVipOrderOrderPaySuccess?orderId="+r.payExtraData.orderId})},fail:function(r){a.index.showToast({icon:"none",title:"fail:"+JSON.stringify(r)}),a.index.hideLoading()}})}}};var e=a._export_sfc(r,[["render",function(r,e,t,d,o,p){return{a:a.o((a=>p.payOrder()))}}],["__scopeId","data-v-489dd81c"]]);wx.createPage(e);
