Browse Source

✨ 全局:默认暂时写死

YunaiV 1 year ago
parent
commit
3280d65be5
4 changed files with 30 additions and 49 deletions
  1. 0 12
      sheep/api/app.js
  2. 0 14
      sheep/api/index2.js
  3. 0 10
      sheep/api/pay.js
  4. 30 13
      sheep/store/app.js

+ 0 - 12
sheep/api/app.js

@@ -1,18 +1,6 @@
 import request from '@/sheep/request';
 import request from '@/sheep/request';
 
 
 export default {
 export default {
-  // 系统初始化
-  init: (templateId) =>
-    request({
-      url: 'init',
-      params: {
-        templateId,
-      },
-      custom: {
-        showError: false,
-        showLoading: false,
-      },
-    }),
   // 自定义页面
   // 自定义页面
   page: (id) =>
   page: (id) =>
     request({
     request({

+ 0 - 14
sheep/api/index2.js

@@ -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',
-    }),
-};

+ 0 - 10
sheep/api/pay.js

@@ -1,16 +1,6 @@
 import request from '@/sheep/request';
 import request from '@/sheep/request';
 
 
 export default {
 export default {
-	// 预支付
-	prepay: (data) =>
-		request({
-			url: 'pay/prepay',
-			method: 'POST',
-			data,
-			custom: {
-				loadingMsg: '支付中',
-			},
-		}),
 	// 发起提现
 	// 发起提现
 	withdraw: {
 	withdraw: {
 		list: (params) =>
 		list: (params) =>

+ 30 - 13
sheep/store/app.js

@@ -50,7 +50,7 @@ const app = defineStore({
   actions: {
   actions: {
     // 获取Shopro应用配置和模板
     // 获取Shopro应用配置和模板
     async init(templateId = null) {
     async init(templateId = null) {
-      //检查网络
+      // 检查网络
       const networkStatus = await $platform.checkNetwork();
       const networkStatus = await $platform.checkNetwork();
       if (!networkStatus) {
       if (!networkStatus) {
         $router.error('NetworkError');
         $router.error('NetworkError');
@@ -58,19 +58,36 @@ const app = defineStore({
 
 
       // 加载装修配置
       // 加载装修配置
       await adaptTemplate(this.template, templateId)
       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();
         const sysStore = sys();