website/dist/static/js/WxJump-CJaK2fbT.js
2025-12-31 09:47:04 +08:00

2 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{r as p,X as l,G as u,v as d,I as t,Y as o}from"./element-plus-DZJYzj-x.js";import{s as f}from"./http-CXqMkAuQ.js";import{_ as x}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./index-CxaHgdBG.js";const g="/static/png/indexQRcode-Bs8M_Qwn.png";function h(){return f({url:"/api/admin/shop/wxqrcode/common/wxurlscheme",method:"post"})}const w={class:"wrapper"},_={__name:"WxJump",setup(v){const n=p("weixin://dl/business/?t=RNOoY1cRSDv"),a=/MicroMessenger/i.test(navigator.userAgent);function i(){return a?window.wx?(wx.miniProgram.navigateTo({url:"/pages/index/index"}),!0):(o.warning("微信JSSDK未加载将使用Scheme跳转"),!1):!1}async function c(){var s;try{const e=await h();e.code===0&&((s=e.data)!=null&&s.openlink)?n.value=e.data.openlink:o.error("获取Scheme失败"+(e.msg||"无有效链接"))}catch(e){console.error("接口请求异常:",e)}}function m(){if(!n.value){o.warning("Scheme为空无法跳转");return}location.href=n.value}function r(){i()||m()}return l(async()=>{await c(),r()}),(s,e)=>(d(),u("div",w,[e[0]||(e[0]=t("div",null,[t("img",{src:g,alt:"小程序二维码",class:"qr-img",style:{width:"300px",height:"300px","margin-bottom":"20px"}})],-1)),e[1]||(e[1]=t("div",{class:"text-container"},[t("p",{class:"desc-text"},"小发同城,和您一起享受本地生活服务")],-1)),t("button",{id:"openBtn",class:"btn",onClick:r}," 立即打开 ")]))}},M=x(_,[["__scopeId","data-v-886718d0"]]);export{M as default};