Skip to content

Commit

Permalink
markdown + signUp login auto push to mempage
Browse files Browse the repository at this point in the history
JohnLing73 committed Oct 5, 2021
1 parent 3764bcb commit 55cc9fc
Showing 3 changed files with 40 additions and 30 deletions.
41 changes: 30 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -7,35 +7,54 @@
- Vue CLI
- Vuex with module setting
- VueRouter
- Navigation Guard
- HTML
- SCSS with RWD
- JavaScript
- Firebase as backend
- Other Packages:
- Swiper.js
- GSAP
- animejs


## **免責聲明:** 本專案為履歷作品,無營利之用途,如有疏漏發生盜用之情形,請盡速聯絡本人(dudulala73@gmail.com),將立即撤銷素材之使用。

- ## **網站主要功能**
- 商品面
- 過濾出選擇條件的商品
- 價格區間、關鍵字
- 購物車
- 顯示選擇商品、計價
- 過濾出符合選擇條件的商品
- 選擇條件
- 商品子類別
- 商品顏色
- 價格區間
- 商品評分
- 商品評價 **(規劃中)**
- 商品留言 **(規劃中)**
- 登入 / 註冊功能
- 註冊表單驗證
- 發註冊信

- Firebase設定透過信箱驗證
- 簡易註冊表單驗證
- 會員中心
- 購物車 **(會員專屬)**
- 顯示所選擇商品、價格、顏色、規格、數量
- 總價計算
- 願望清單 **(會員專屬)**
- 顯示清單商品、價格、顏色、規格
- **整體購物流程 (規劃中)**

- ## **網站頁面**
- (首頁)商品頁面
- 首頁
- 商品頁面
- 商品內容內頁
- 會員中心
- 購物流程頁面
- **購物流程頁面 (規劃中)**
- 確認購物明細
- 確認付款明細
- 付款成功 (重新導向至會員中心頁面) / 付款失敗
- 註冊頁面
- 註冊/登入頁面
- 會員中心
- 會員個資
- **會員訂單(規劃中)**
- 會員購物車
- 會員願望清單

## 下載本專案後請安裝 node module 資料夾中所有套件
```
28 changes: 9 additions & 19 deletions src/pages/SignPage/TheSign.vue
Original file line number Diff line number Diff line change
@@ -23,9 +23,6 @@
:class="{ invalidStyle: inputMailInvalid === 'Invalid' }"
>
<label for="email">Email</label>
<span class="invalid-warning" v-if="inputMailInvalid === 'Invalid'"
>(Please Input Valid Email!)</span
>
<input
name="email"
id="email"
@@ -39,10 +36,7 @@
class="form-each"
:class="{ invalidStyle: inputMemberIdValid === 'Invalid' }"
>
<label for="account">Member Id</label>
<span v-if="inputMemberIdValid === 'Invalid'" class="invalid-warning">
(Please Input Valid Id!)
</span>
<label for="account">Member Name</label>
<input
name="account"
id="account"
@@ -72,9 +66,9 @@
class="form-each"
:class="{ invalidStyle: inputBirthValid === 'Invalid' }"
>
<label for="birth">Birth (YYYY/MM/DD)</label>
<label for="birth">Birth</label>
<span v-if="inputBirthValid === 'Invalid'" class="invalid-warning">
(Please Input Valid Birth!)
Valid Birth(YYYY/MM/DD)!
</span>
<input
name="birth"
@@ -90,9 +84,6 @@
:class="{ invalidStyle: inputLocationValid === 'Invalid' }"
>
<label for="location">Location</label>
<span v-if="inputLocationValid === 'Invalid'" class="invalid-warning">
(Please Input Valid Location!)
</span>
<input
name="location"
id="location"
@@ -101,9 +92,9 @@
@blur="checkNormalValid"
/>
</div>
<p v-if="allowSignUp === false">
<!-- <p v-if="allowSignUp === false">
Please fill the form correctly to Sign Up
</p>
</p> -->
<div class="btn-container">
<base-button v-if="signStatus === 'signUp'" :link="false" @click="signUp">Sign Up</base-button>
<base-button v-else :link="false" @click="signIn">Sign In</base-button>
@@ -129,7 +120,7 @@ form {
}
.form-each {
margin: 1.5rem 3rem;
min-width: 300px;
width: 300px;
label {
display: inline-block;
margin-bottom: 0.5rem;
@@ -321,7 +312,7 @@ export default {
birth: this.birth,
location: this.location,
});
this.autoPush();
await this.signIn();
} catch (error) {
this.error = error.response.data.error.message;
}
@@ -364,8 +355,7 @@ export default {
autoPush() {
if(this.$store.state.auth.userId) {
this.signSuccess = true;
console.log(this.memEmail);
this.$router.push('/member/' + this.memEmail + '/profile');
this.$router.push('/member/' + this.email + '/profile');
}
},
//Function about input validation
@@ -387,7 +377,7 @@ export default {
this.inputMemberIdValid = "Valid";
this.allowSignUp = true;
}
if (this.password === "" && this.password.length < 7) {
if (this.password === "" || this.password.length < 7) {
this.inputPasswordValid = "Invalid";
this.allowSignUp = false;
return;
1 change: 1 addition & 0 deletions src/store/modules/auth/actions.js
Original file line number Diff line number Diff line change
@@ -94,6 +94,7 @@ export default {
const userId = context.rootGetters.userId;
const token = context.getters.token;
const response = await axios.get(`https://resume-store-fd4de-default-rtdb.firebaseio.com/users/${userId}.json?auth=` + token);
console.log(response.data);
if(response.data.cart && response.data.wishlist) {
context.commit('userInfo', {
memId: response.data.memberId,

0 comments on commit 55cc9fc

Please sign in to comment.