parent
545d4259c4
commit
0961aa610b
2
.env
2
.env
|
@ -1,5 +1,5 @@
|
||||||
# 版本号
|
# 版本号
|
||||||
SHOPRO_VERSION=v1.8.3
|
SHOPRO_VERSION=v2.3.0
|
||||||
|
|
||||||
# 后端接口 - 正式环境(通过 process.env.NODE_ENV 非 development)
|
# 后端接口 - 正式环境(通过 process.env.NODE_ENV 非 development)
|
||||||
SHOPRO_BASE_URL=http://api-dashboard.yudao.iocoder.cn
|
SHOPRO_BASE_URL=http://api-dashboard.yudao.iocoder.cn
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "shopro",
|
"id": "shopro",
|
||||||
"name": "shopro",
|
"name": "shopro",
|
||||||
"displayName": "芋道商城",
|
"displayName": "芋道商城",
|
||||||
"version": "2.2.0",
|
"version": "2.3.0",
|
||||||
"description": "芋道商城,一套代码,同时发行到iOS、Android、H5、微信小程序多个平台,请使用手机扫码快速体验强大功能",
|
"description": "芋道商城,一套代码,同时发行到iOS、Android、H5、微信小程序多个平台,请使用手机扫码快速体验强大功能",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prettier": "prettier --write \"{pages,sheep}/**/*.{js,json,tsx,css,less,scss,vue,html,md}\""
|
"prettier": "prettier --write \"{pages,sheep}/**/*.{js,json,tsx,css,less,scss,vue,html,md}\""
|
||||||
|
|
|
@ -43,7 +43,7 @@ const app = defineStore({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
shareInfo: {}, // 全局分享信息
|
shareInfo: {}, // 全局分享信息
|
||||||
has_wechat_trade_managed: 0 // 小程序发货信息管理 0 没有 || 1 有
|
has_wechat_trade_managed: 0, // 小程序发货信息管理 0 没有 || 1 有
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
// 获取Shopro应用配置和模板
|
// 获取Shopro应用配置和模板
|
||||||
|
@ -55,14 +55,14 @@ const app = defineStore({
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载装修配置
|
// 加载装修配置
|
||||||
await adaptTemplate(this.template, templateId)
|
await adaptTemplate(this.template, templateId);
|
||||||
|
|
||||||
// TODO 芋艿:未来支持管理后台可配;对应 https://api.shopro.sheepjs.com/shop/api/init
|
// TODO 芋艿:未来支持管理后台可配;对应 https://api.shopro.sheepjs.com/shop/api/init
|
||||||
if (true) {
|
if (true) {
|
||||||
this.info = {
|
this.info = {
|
||||||
name: '芋道商城',
|
name: '芋道商城',
|
||||||
logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png',
|
logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png',
|
||||||
version: '2.2.0',
|
version: '2.3.0',
|
||||||
copyright: '全部开源,个人与企业可 100% 免费使用',
|
copyright: '全部开源,个人与企业可 100% 免费使用',
|
||||||
copytime: 'Copyright© 2018-2024',
|
copytime: 'Copyright© 2018-2024',
|
||||||
|
|
||||||
|
@ -71,15 +71,15 @@ const app = defineStore({
|
||||||
};
|
};
|
||||||
this.platform = {
|
this.platform = {
|
||||||
share: {
|
share: {
|
||||||
methods: ["poster", "link"],
|
methods: ['poster', 'link'],
|
||||||
linkAddress: "http://127.0.0.1:3000", // TODO 芋艿:可以考虑改到 .env 那
|
linkAddress: 'http://127.0.0.1:3000', // TODO 芋艿:可以考虑改到 .env 那
|
||||||
posterInfo: {
|
posterInfo: {
|
||||||
"user_bg": "/static/img/shop/config/user-poster-bg.png",
|
user_bg: '/static/img/shop/config/user-poster-bg.png',
|
||||||
"goods_bg": "/static/img/shop/config/goods-poster-bg.png",
|
goods_bg: '/static/img/shop/config/goods-poster-bg.png',
|
||||||
"groupon_bg": "/static/img/shop/config/groupon-poster-bg.png"
|
groupon_bg: '/static/img/shop/config/groupon-poster-bg.png',
|
||||||
}
|
|
||||||
},
|
},
|
||||||
bind_mobile: 0
|
},
|
||||||
|
bind_mobile: 0,
|
||||||
};
|
};
|
||||||
this.has_wechat_trade_managed = 0;
|
this.has_wechat_trade_managed = 0;
|
||||||
|
|
||||||
|
@ -111,24 +111,24 @@ const app = defineStore({
|
||||||
// todo: @owen 先做数据适配,后期重构
|
// todo: @owen 先做数据适配,后期重构
|
||||||
const adaptTemplate = async (appTemplate, templateId) => {
|
const adaptTemplate = async (appTemplate, templateId) => {
|
||||||
const { data: diyTemplate } = templateId
|
const { data: diyTemplate } = templateId
|
||||||
// 查询指定模板,一般是预览时使用
|
? // 查询指定模板,一般是预览时使用
|
||||||
? await DiyApi.getDiyTemplate(templateId)
|
await DiyApi.getDiyTemplate(templateId)
|
||||||
: await DiyApi.getUsedDiyTemplate();
|
: await DiyApi.getUsedDiyTemplate();
|
||||||
// 模板不存在
|
// 模板不存在
|
||||||
if (!diyTemplate) {
|
if (!diyTemplate) {
|
||||||
$router.error('TemplateError');
|
$router.error('TemplateError');
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const tabBar = diyTemplate?.property?.tabBar;
|
const tabBar = diyTemplate?.property?.tabBar;
|
||||||
if (tabBar) {
|
if (tabBar) {
|
||||||
appTemplate.basic.tabbar = tabBar
|
appTemplate.basic.tabbar = tabBar;
|
||||||
if (tabBar?.theme) {
|
if (tabBar?.theme) {
|
||||||
appTemplate.basic.theme = tabBar?.theme;
|
appTemplate.basic.theme = tabBar?.theme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
appTemplate.home = diyTemplate?.home;
|
appTemplate.home = diyTemplate?.home;
|
||||||
appTemplate.user = diyTemplate?.user;
|
appTemplate.user = diyTemplate?.user;
|
||||||
}
|
};
|
||||||
|
|
||||||
export default app;
|
export default app;
|
||||||
|
|
Loading…
Reference in New Issue