1import{h as i,c as h,E as _,C as p,b as v,u as w}from"./index-CIzLHlU0.js";import{k,m as q}from"./pay-DOx876lO.js";import{_ as P}from"./_plugin-vue_export-helper-DlAUqK2U.js";const C={class:"wrapper"},$={__name:"weChatPay",setup(W){const c=w(),d=i(()=>c.query.code),r=i(()=>c.query.state),a=i(()=>c.query.order_no),l=()=>{k(a.value).then(({data:t})=>{const{mp_appid:o}=t;let n=document.createElement("a");n.href=`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${o}&redirect_uri=${window.location.origin}/goodsWeChatPay?order_no=${a.value}&response_type=code&scope=snsapi_base&state=2#wechat_redirect`,n.click()})},u=()=>{q({order_no:a.value,code:d.value,payType:"WX_JSAPI",frontUrl:`${window.location.origin}/goodsWeChatPay?order_no=${a.value}&state=3`}).then(({data:t})=>{const{appId:o,timeStamp:n,nonceStr:m,signType:g,paySign:f,package:y}=t;WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:o,timeStamp:n,nonceStr:m,signType:g,paySign:f,package:y},function(e){console.log(e),(e==null?void 0:e.err_msg)=="get_brand_wcpay_request:ok"?s():(e==null?void 0:e.err_msg)=="get_brand_wcpay_request:cancel"?(_.warning({title:"æç¤º",message:"已忶ï¼"}),reject(!1)):(e==null?void 0:e.err_msg)=="get_brand_wcpay_request:fail"&&_.error({title:"é误",message:"æ¯ä»å¤±è´¥ï¼"})})})},s=()=>{const t=p.get(`redirect_uri_${a.value}`);t&&(p.remove(`redirect_uri_${a.value}`),window.open(t,"_self"))};return r.value==1?l():r.value==2?u():r.value==3&&s(),(t,o)=>(v(),h("div",C))}},B=P($,[["__scopeId","data-v-a0948a86"]]);export{B as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.