99AI/public/assets/index-7b15fb79.js

2 lines
6.2 KiB
JavaScript
Raw Normal View History

2024-07-07 13:09:08 +08:00
import{f as U}from"./crami-99ee44eb.js";import{f as F}from"./order-8be5c617.js";import{_ as X}from"./titleBar.vue_vue_type_script_setup_true_lang-a53d5875.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang-f425914e.js";import{a as K,u as Z,t as o}from"./index-d64a7cc4.js";import{u as ee}from"./useBasicLayout-a4f17bae.js";import{d as ae,e as d,r as w,f as te,U as c,X as r,M as e,a8 as M,a3 as a,W as k,H as P,F as B,a6 as j,a5 as m,S as f,a4 as l,c as se}from"./vue-10b4afc0.js";import{e as oe,Y as le,X as W,v,B as E}from"./naive-ui-fedd20b1.js";import"./vueuse-motion-d4cdaf7b.js";const ne={class:"main min-h-screen bg-center h-full flex flex-col overflow-hidden bg-white dark:bg-gray-900"},re={key:0,class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-x-6 gap-y-10 px-4"},ie=["onClick"],de={class:"w-full rounded-t-xl overflow-hidden border dark:border-[#ffffff17] relative",style:{height:"40%"}},ce=["src"],fe={class:"absolute left-1/2 bottom-0 transform -translate-x-1/2 -translate-y-1/2 text-lg text-[#fff] ]"},ue={class:"p-5 text-lg h-[160px] border-b dark:border-[#ffffff17] overflow-hidden relative"},pe={class:"absolute bottom-1 right-2 font-semibold text-red-500 italic"},ye={class:"flex p-4 border-b dark:border-[#ffffff17] flex-col space-y-4"},ge={key:0,class:"flex justify-between"},me={key:1,class:"flex justify-between"},he={key:2,class:"flex justify-between"},xe={class:"px-4 flex-1 flex items-center justify-between"},ve={class:"flex items-end"},_e={class:"ml-2 text-[#3076fd] text-lg"},be=a("div",{class:"line"},null,-1),we={key:1,class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-x-6 gap-y-10 px-4"},ke={class:"w-full rounded-t-xl overflow-hidden",style:{height:"40%"}},Ne={class:"p-5 text-lg h-[160px] border-b dark:border-[#ffffff17] overflow-ellipsis"},Se={class:"flex p-4 border-b dark:border-[#ffffff17] flex-col space-y-4"},Ce={class:"px-4 flex-1 flex items-center justify-between"},Je=ae({__name:"index",setup(Me){const i=K(),{isMobile:y}=ee(),_=oe(),h=Z(),T=d(()=>{var n;const t=window.navigator.userAgent.toLowerCase();return t.match(/MicroMessenger/i)&&((n=t==null?void 0:t.match(/MicroMessenger/i))==null?void 0:n[0])==="micromessenger"}),u=d(()=>{const{payHupiStatus:t,payEpayStatus:n,payMpayStatus:s,payWechatStatus:p,payLtzfStatus:b}=i.globalConfig;return Number(p)===1?"wechat":Number(s)===1?"mpay":Number(t)===1?"hupi":Number(n)===1?"epay":Number(b)===1?"ltzf":null}),D=d(()=>i.globalConfig.model3Name||o("pay.baseModelQuota")),H=d(()=>i.globalConfig.model4Name)||o("pay.advancedModelQuota"),I=d(()=>i.globalConfig.drawMjName)||o("pay.MJDrawingQuota"),J=d(()=>Number(i.globalConfig.isHideModel3Point)===1),L=d(()=>Number(i.globalConfig.isHideModel4Point)===1),z=d(()=>Number(i.globalConfig.isHideDrawMjPoint)===1),G=d(()=>{const{payEpayChannel:t,payMpayChannel:n}=i.globalConfig;return u.value==="wechat"?["wxpay"]:u.value==="epay"?t?JSON.parse(t):[]:u.value==="mpay"?n?JSON.parse(n):[]:u.value==="hupi"?["wxpay"]:u.value==="ltzf"?["wxpay"]:[]}),N=w([]),S=w(1),g=w(!1);async function C(){try{g.value=!0;const t=await U({status:1,type:S.value,size:30});N.value=t.data.rows,g.value=!1}catch{g.value=!1}}const O=d(()=>y.value?o("pay.welcomeTipMobile"):o("pay.welcomeTipDesktop"));function A(t){S.value=t,C()}async function R(t){G.value.length||_.warning(o("pay.paymentNotEnabled")),V(t)}async function V(t){if(T.value&&u.value==="wechat"&&Number(i.globalConfig.payWechatStatus)===1){if(typeof WeixinJSBridge>"u")document.addEventListener?document.addEventListener("WeixinJSBridgeReady",x,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",x),document.attachEvent("onWeixinJSBridgeReady",x));else{const n=await F({goodsId:t.id,payType:"jsapi"}),{success:s,data:p}=n;s&&x(p)}return}h.updateOrderInfo({pkgInfo:t}),h.updateGoodsDialog(!1),h.updatePayDialog(!0)}function x(t){const{appId:n,timeStamp:s,nonceStr:p,package:b,signType:$,paySign:q}=t;n&&WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n,timeStamp:s,nonceStr:p,package:b,signType:$,paySign:q},Q=>{Q.err_msg==="get_bran