fyw 3 tahun lalu
induk
melakukan
b00cfe1111

+ 2 - 1
.env.development

@@ -1 +1,2 @@
-VUE_APP_BASE_URL = "http://test-shoes-api.hiyd.com"
+VUE_APP_BASE_URL = "http://shoes-api.hiyd.com"
+VUE_APP_TEST_BASE_URL = "http://test-shoes-api.hiyd.com"

+ 2 - 1
.env.production

@@ -1 +1,2 @@
-VUE_APP_BASE_URL = "http://test-shoes-api.hiyd.com"
+VUE_APP_BASE_URL = "http://shoes-api.hiyd.com"
+VUE_APP_TEST_BASE_URL = "http://test-shoes-api.hiyd.com"

+ 0 - 0
dist/css/about.e7eaff63.css → dist/css/about.5b4840af.css


+ 0 - 0
dist/css/app.b8e811db.css → dist/css/app.ecaf10b2.css


+ 1 - 1
dist/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>sport-web</title><link href="css/about.e7eaff63.css" rel="prefetch"><link href="js/about.0dea3d7c.js" rel="prefetch"><link href="css/app.b8e811db.css" rel="preload" as="style"><link href="js/app.75c395f4.js" rel="preload" as="script"><link href="js/chunk-vendors.ec05ee11.js" rel="preload" as="script"><link href="css/app.b8e811db.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but sport-web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.ec05ee11.js"></script><script src="js/app.75c395f4.js"></script></body></html>
+<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>sport-web</title><link href="css/about.5b4840af.css" rel="prefetch"><link href="js/about.2f3b3bed.js" rel="prefetch"><link href="css/app.ecaf10b2.css" rel="preload" as="style"><link href="js/app.07b135f9.js" rel="preload" as="script"><link href="js/chunk-vendors.318333dc.js" rel="preload" as="script"><link href="css/app.ecaf10b2.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but sport-web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.318333dc.js"></script><script src="js/app.07b135f9.js"></script></body></html>

File diff ditekan karena terlalu besar
+ 0 - 0
dist/js/about.2f3b3bed.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/js/app.07b135f9.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/js/chunk-vendors.318333dc.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/js/chunk-vendors.ec05ee11.js


+ 6 - 3
src/router/index.ts

@@ -8,11 +8,14 @@ const routes: Array<RouteRecordRaw> = [
     component: layout
   },
   {
+    path: "/test-share",
+    name: "TestShare",
+    component: () =>
+      import(/* webpackChunkName: "about" */ "../views/sport-share-link.vue")
+  },
+  {
     path: "/share",
     name: "Share",
-    // route level code-splitting
-    // this generates a separate chunk (about.[hash].js) for this route
-    // which is lazy-loaded when the route is visited.
     component: () =>
       import(/* webpackChunkName: "about" */ "../views/sport-share-link.vue")
   }

+ 5 - 2
src/services/config.ts

@@ -1,8 +1,11 @@
 import axios from "axios";
+import { useRoute } from 'vue-router'
 
-const BaseUrl =
-  process.env.NODE_ENV === "production" ? process.env.VUE_APP_BASE_URL : "api/";
+// const BaseUrl =
+//   process.env.NODE_ENV === "production" ? process.env.VUE_APP_BASE_URL : "api/";
 
 export function get(url: string) {
+  const route = useRoute()
+  const BaseUrl = route.name === 'Share'? process.env.VUE_APP_BASE_URL:process.env.VUE_APP_TEST_BASE_URL
   return axios.get(BaseUrl + url);
 }

+ 2 - 1
src/views/share.ts

@@ -25,10 +25,11 @@ export function initShare(hash: string) {
   });
 
   watchEffect(async function() {
+    const res = await getShare(hash);
     const {
       data: { user, consume, duration, period },
       created_at
-    } = (await getShare(hash)).data.data;
+    } = res.data.data;
 
     state.user = user;
     state.consume = consume;

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini