2 lines
2.1 KiB
JavaScript
2 lines
2.1 KiB
JavaScript
"use strict";var e=(e,t,o)=>new Promise(((r,i)=>{var s=e=>{try{a(o.next(e))}catch(t){i(t)}},n=e=>{try{a(o.throw(e))}catch(t){i(t)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,n);a((o=o.apply(e,t)).next())}));const t=require("../api/promotion/diy.js"),o=require("../../../../common/vendor.js"),r=require("../platform/index.js"),i=require("../router/index.js"),s=require("./user.js"),n=require("./sys.js"),a=o.defineStore({id:"app",state:()=>({info:{name:"",logo:"",version:"",copyright:"",copytime:"",cdnurl:"",filesystem:""},platform:{share:{methods:[],forwardInfo:{},posterInfo:{},linkAddress:""},bind_mobile:0},template:{basic:{},home:{style:{},data:[]},user:{style:{},data:[]}},shareInfo:{},has_wechat_trade_managed:0}),actions:{init(t=null){return e(this,null,(function*(){(yield r._platform.checkNetwork())||i.$router.error("NetworkError"),yield l(this.template,t);{this.info={name:"芋道商城",logo:"https://static.iocoder.cn/ruoyi-vue-pro-logo.png",version:"2.2.0",copyright:"全部开源,个人与企业可 100% 免费使用",copytime:"Copyright© 2018-2024",cdnurl:"https://file.sheepjs.com",filesystem:"qcloud"},this.platform={share:{methods:["poster","link"],linkAddress:"http://127.0.0.1:3000",posterInfo:{user_bg:"/static/img/shop/config/user-poster-bg.png",goods_bg:"/static/img/shop/config/goods-poster-bg.png",groupon_bg:"/static/img/shop/config/groupon-poster-bg.png"}},bind_mobile:0},this.has_wechat_trade_managed=0;n.sys().setTheme();const e=s.user();return e.isLogin&&e.loginAfter(),Promise.resolve(!0)}}))}},persist:{enabled:!0,strategies:[{key:"app-store"}]}}),l=(o,r)=>e(exports,null,(function*(){var e;const{data:s}=r?yield t.DiyApi.getDiyTemplate(r):yield t.DiyApi.getUsedDiyTemplate();if(!s)return void i.$router.error("TemplateError");const n=null==(e=null==s?void 0:s.property)?void 0:e.tabBar;n&&(o.basic.tabbar=n,(null==n?void 0:n.theme)&&(o.basic.theme=null==n?void 0:n.theme)),o.home=null==s?void 0:s.home,o.user=null==s?void 0:s.user})),p=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));exports.__vite_glob_0_0=p,exports.app=a;
|