Skip to content

Commit b564d91

Browse files
author
oguzhan.onder
committed
After service calling toast message and some improvements
1 parent 30b2c22 commit b564d91

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"bootstrap": "^4.4.1",
1818
"vue": "~2.6.12",
1919
"vue-resource": "^1.5.1",
20-
"vue-router": "^3.4.4",
20+
"vue-router": "^3.4.3",
2121
"vuex": "^3.5.1"
2222
},
2323
"browserslist": [

src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
return {}
3131
},
3232
created() {
33-
if (this.getIsLoading) {
33+
if (this.getIsLogin) {
3434
this.$store.dispatch("getTradeResult");
3535
}
3636
},
3737
computed: {
38-
...mapGetters(["getIsLoading", "getMyToast"]),
38+
...mapGetters(["getIsLoading", "getMyToast","getIsLogin"]),
3939
}
4040
}
4141
</script>

src/util/router.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ const Register = resolve =>{
3535
})
3636
}
3737
*/
38+
const DashBoard = () => System.import('../components/Dashboard');
39+
const TheContainer = () => System.import('../containers/TheContainer');
40+
const ProductPurchase = () => System.import('../components/ProductPurchase');
41+
const ProductSell = () => System.import('../components/ProductSell');
42+
const UserConfirmation = () => System.import('../components/UserConfirmation');
43+
const Login = () => System.import('../components/Login');
44+
const Register = () => System.import('../components/Register');
45+
3846

3947
Vue.use(VueRouter);
4048

@@ -45,15 +53,15 @@ const routes = [
4553
path: '/',
4654
redirect: '/dashboard',
4755
name: 'Home',
48-
component: () => System.import('../containers/TheContainer'),
56+
component: TheContainer,
4957
beforeEnter(to, from, next) {
5058
controlLogin(next);
5159
},
5260
children: [
5361
{
5462
path: 'dashboard',
5563
name: 'Dashboard',
56-
component: () => System.import('../components/Dashboard'),
64+
component: DashBoard,
5765
beforeEnter(to, from, next) {
5866
controlLogin(next);
5967
}
@@ -79,15 +87,15 @@ const routes = [
7987
{
8088
path: "purchase",
8189
name: "ProductPurchase",
82-
component: () => System.import('../components/ProductPurchase'),
90+
component: ProductPurchase,
8391
beforeEnter(to, from, next) {
8492
controlLogin(next);
8593
}
8694
},
8795
{
8896
path: "sell",
8997
name: "ProductSell",
90-
component: () => System.import('../components/ProductSell'),
98+
component: ProductSell,
9199
beforeEnter(to, from, next) {
92100
controlLogin(next);
93101
}
@@ -99,15 +107,15 @@ const routes = [
99107
{
100108
path: "/user/registrationConfirm",
101109
name: "UserConfirmation",
102-
component: () => System.import('../components/UserConfirmation'),
110+
component: UserConfirmation,
103111
children: [
104-
{path: ":param", component: () => System.import('../components/UserConfirmation')}
112+
{path: ":param", component: UserConfirmation}
105113
]
106114
},
107115
{
108116
path: "/login",
109117
name: "Login",
110-
component: () => System.import('../components/Login'),
118+
component: Login,
111119
beforeEnter(to, from, next) {
112120
initSet();
113121
if (store.getters.getIsLogin && util.common.getToken() != null) {
@@ -120,7 +128,7 @@ const routes = [
120128
{
121129
path: "/register",
122130
name: "Register",
123-
component: () => System.import('../components/Register'),
131+
component: Register,
124132
},
125133
{
126134
path: "*", redirect: "/dashboard",

0 commit comments

Comments
 (0)