From 3280d65be5618363b9ac6d1dc8b8ccc53292fb10 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 28 Dec 2023 23:36:52 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E5=85=A8=E5=B1=80=EF=BC=9A?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=9A=82=E6=97=B6=E5=86=99=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/api/app.js | 12 ------------ sheep/api/index2.js | 14 -------------- sheep/api/pay.js | 10 ---------- sheep/store/app.js | 43 ++++++++++++++++++++++++++++++------------- 4 files changed, 30 insertions(+), 49 deletions(-) delete mode 100644 sheep/api/index2.js diff --git a/sheep/api/app.js b/sheep/api/app.js index 05081248..4f4f4157 100644 --- a/sheep/api/app.js +++ b/sheep/api/app.js @@ -1,18 +1,6 @@ import request from '@/sheep/request'; export default { - // 系统初始化 - init: (templateId) => - request({ - url: 'init', - params: { - templateId, - }, - custom: { - showError: false, - showLoading: false, - }, - }), // 自定义页面 page: (id) => request({ diff --git a/sheep/api/index2.js b/sheep/api/index2.js deleted file mode 100644 index 1c068bf8..00000000 --- a/sheep/api/index2.js +++ /dev/null @@ -1,14 +0,0 @@ -import request2 from '@/sheep/request2'; - -export default { - decorate: () => - request2({ - url: 'promotion/decorate/list?page=1', - method: 'GET', - }), - spids: () => - request2({ - url: 'product/spu/page?recommendType=best&pageNo=1&pageSize=10', - method: 'GET', - }), -}; diff --git a/sheep/api/pay.js b/sheep/api/pay.js index bcc17425..c49f89f0 100644 --- a/sheep/api/pay.js +++ b/sheep/api/pay.js @@ -1,16 +1,6 @@ import request from '@/sheep/request'; export default { - // 预支付 - prepay: (data) => - request({ - url: 'pay/prepay', - method: 'POST', - data, - custom: { - loadingMsg: '支付中', - }, - }), // 发起提现 withdraw: { list: (params) => diff --git a/sheep/store/app.js b/sheep/store/app.js index 577204ed..73fb5872 100644 --- a/sheep/store/app.js +++ b/sheep/store/app.js @@ -50,7 +50,7 @@ const app = defineStore({ actions: { // 获取Shopro应用配置和模板 async init(templateId = null) { - //检查网络 + // 检查网络 const networkStatus = await $platform.checkNetwork(); if (!networkStatus) { $router.error('NetworkError'); @@ -58,19 +58,36 @@ const app = defineStore({ // 加载装修配置 await adaptTemplate(this.template, templateId) - const res = await appApi.init(templateId); - if (res.error === 0) { - this.info = res.data.app; - this.platform = res.data.platform; - // TODO 芋艿:未接入 - // this.template = res.data.template; - // this.has_wechat_trade_managed = res.data.has_wechat_trade_managed; - // if (!res.data.template) { - // $router.error('TemplateError'); - // } - // TODO 芋艿:未接入 - // this.chat = res.data.chat; + // TODO 芋艿:未来支持管理后台可配;对应 https://api.shopro.sheepjs.com/shop/api/init + if (true) { + this.info = { + name: '芋道商城', + logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.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: "https://shopro.sheepjs.com/#/", + 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.chat = { + chat_domain: "https://api.shopro.sheepjs.com/chat", + room_id: "admin" + } + this.has_wechat_trade_managed = 0; // 加载主题 const sysStore = sys();