diff --git a/login-coba/theme.js b/login-coba/theme.js deleted file mode 100644 index a502892..0000000 --- a/login-coba/theme.js +++ /dev/null @@ -1,18 +0,0 @@ -var CustomTheme = { - light: { - dark: false, - colors: { - primary: "#FFC107", - // primary: "#2196F3", - "primary-lighten": "#E3F2FD", - "primary-darken": "#0D47A1", - white: "#FFFFFF", - secondary: "#03a9f4", - accent: "#ff5722", - error: "#f44336", - warning: "#ff9800", - info: "#2196f3", - success: "#4caf50", - }, - }, -} \ No newline at end of file diff --git a/loginv3/components/login.vue b/loginv3/components/login.vue new file mode 100644 index 0000000..6d1c412 --- /dev/null +++ b/loginv3/components/login.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/loginv3/images/bg-left.jpg b/loginv3/images/bg-left.jpg new file mode 100644 index 0000000..ca025a5 Binary files /dev/null and b/loginv3/images/bg-left.jpg differ diff --git a/loginv3/index.html b/loginv3/index.html new file mode 100644 index 0000000..295d7b8 --- /dev/null +++ b/loginv3/index.html @@ -0,0 +1,139 @@ + + + + + + WESTONE + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/loginv3/modules/login.js b/loginv3/modules/login.js new file mode 100644 index 0000000..8e21d56 --- /dev/null +++ b/loginv3/modules/login.js @@ -0,0 +1,64 @@ + +const URL = "/westone-api/v1/system/auth"; +const store = { + namespaced: true, + state() { + return { + count: 0, + data: null, + email: "", + password: "", + dialog_success: false + }; + }, + mutations: { + increment(state) { + state.count++; + }, + decrement(state) { + state.count--; + }, + setData(state, payload) { + state.data = payload; + }, + setEmail(state, data) { + state.email = data; + }, + setPassword(state, data) { + state.password = data; + }, + setDialogSuccess(state, data) { + state.dialog_success = data; + } + }, + actions: { + increment({ commit }) { + commit('increment'); + }, + decrement({ commit }) { + commit('decrement'); + }, + async loginState({ state, commit }) { + const params = { + email: state.email, + password: state.pasword + }; + + try { + const response = await axios.post(URL + '/login', params); + commit('setData', response.data); + } catch (error) { + commit('setError', error); + } + }, + async LoginParam({ commit }, params) { + try { + const response = await axios.post(URL + '/login', params); + commit('setData', response.data); + } catch (error) { + commit('setError', error); + } + } + } +}; +export default store \ No newline at end of file