"use strict";const e=require("../api/promotion/diy.js"),t=require("../../common/vendor.js"),o=require("../platform/index.js"),r=require("../router/index.js"),s=require("./user.js"),i=require("./sys.js"),a=t.defineStore({id:"app",state:()=>({info:{name:"",logo:"",version:"",copyright:"",copytime:"",cdnurl:"",filesystem:""},platform:{share:{methods:[],forwardInfo:{},posterInfo:{},linkAddress:""},bind_mobile:0},chat:{},template:{basic:{},home:{style:{},data:[]},user:{style:{},data:[]}},shareInfo:{},has_wechat_trade_managed:0}),actions:{async init(e=null){await o._platform.checkNetwork()||r.$router.error("NetworkError"),await n(this.template,e);{this.info={name:"常来此购",logo:"/static/zxlogo.png",version:"1.1.13",copyright:"全部开源，个人与企业可 100% 免费使用",copytime:"Copyright© 2018-2024",cdnurl:"https://file.sheepjs.com",filesystem:"qcloud"},this.platform={share:{methods:["poster","link"],linkAddress:"http://192.168.0.110:8000/#/",posterInfo:{user_bg:"/static/user-poster-bg.jpg",goods_bg:"/static/user-poster-bg.jpg",groupon_bg:"/static/img/shop/config/groupon-poster-bg.png"}},bind_mobile:0},this.chat={chat_domain:"https://api.shopro.sheepjs.com/chat",room_id:"admin"},this.has_wechat_trade_managed=0;i.sys().setTheme();const e=s.user();return e.isLogin&&e.loginAfter(),Promise.resolve(!0)}}},persist:{enabled:!0,strategies:[{key:"app-store"}]}}),n=async(t,o)=>{var s;const{data:i}=o?await e.DiyApi.getDiyTemplate(o):await e.DiyApi.getUsedDiyTemplate();if(!i)return void r.$router.error("TemplateError");const a=null==(s=null==i?void 0:i.property)?void 0:s.tabBar;a&&(t.basic.tabbar=a,(null==a?void 0:a.theme)&&(t.basic.theme=null==a?void 0:a.theme)),t.home=null==i?void 0:i.home,t.user=null==i?void 0:i.user},p=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));exports.__vite_glob_0_0=p,exports.app=a;
