From 27c419054caf6d2e31713372579126812a747edc Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期一, 09 五月 2022 10:53:23 +0800
Subject: [PATCH] 調整 忘記密碼url變數,新增 .env.prod

---
 PAMapp/pages/consultantLogin/index.vue |   13 +++----------
 PAMapp/.env.uat                        |    3 ++-
 PAMapp/package.json                    |    1 +
 PAMapp/.env.prod                       |    2 ++
 PAMapp/.env.dev                        |    3 ++-
 5 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/PAMapp/.env.dev b/PAMapp/.env.dev
index d98d903..d876dff 100644
--- a/PAMapp/.env.dev
+++ b/PAMapp/.env.dev
@@ -1 +1,2 @@
-BASE_URL='http://localhost:8080/api'
\ No newline at end of file
+BASE_URL='http://localhost:8080/api'
+CONSULTANT_FORGET_PASSWORD_URL = 'https://eserviceuat.pcalife.com.tw/sso/reset_password/agentInputUserInfo.html?sys=epos'
diff --git a/PAMapp/.env.prod b/PAMapp/.env.prod
new file mode 100644
index 0000000..2d85a14
--- /dev/null
+++ b/PAMapp/.env.prod
@@ -0,0 +1,2 @@
+BASE_URL='/pamapi/api'
+CONSULTANT_FORGET_PASSWORD_URL = 'https://www.eservice.pcalife.com.tw/sso/reset_password/agentInputUserInfo.html?sys=epos'
diff --git a/PAMapp/.env.uat b/PAMapp/.env.uat
index ae59f4c..6e1a065 100644
--- a/PAMapp/.env.uat
+++ b/PAMapp/.env.uat
@@ -1 +1,2 @@
-BASE_URL='/pamapi/api'
\ No newline at end of file
+BASE_URL='/pamapi/api'
+CONSULTANT_FORGET_PASSWORD_URL = 'https://eserviceuat.pcalife.com.tw/sso/reset_password/agentInputUserInfo.html?sys=epos'
diff --git a/PAMapp/package.json b/PAMapp/package.json
index 1ddfc31..556c247 100644
--- a/PAMapp/package.json
+++ b/PAMapp/package.json
@@ -10,6 +10,7 @@
     "generate": "nuxt generate",
     "generate.dev": "cross-env ENV=dev nuxt generate",
     "generate.uat": "cross-env ENV=uat nuxt generate",
+    "generate.prod": "cross-env ENV=prod nuxt generate",
     "test": "jest"
   },
   "dependencies": {
diff --git a/PAMapp/pages/consultantLogin/index.vue b/PAMapp/pages/consultantLogin/index.vue
index 7fb8f29..8289302 100644
--- a/PAMapp/pages/consultantLogin/index.vue
+++ b/PAMapp/pages/consultantLogin/index.vue
@@ -19,7 +19,7 @@
       <div class="pam-paragraph">
         <div class="password-Txt">
           <div class="pam-consultant-login__title ">撖Ⅳ</div>
-          <div class="password-reset" @click="passwordReset">敹��Ⅳ</div>
+          <div class="password-reset" @click="resetPassword">敹��Ⅳ</div>
         </div>
         <div class="position-r mt-10">
           <input :type="[ isShowPassword ? 'text' : 'password']"
@@ -133,15 +133,8 @@
       return !!(this.verificationCode && this.consultantDto.username && this.consultantDto.password);
     }
 
-    passwordReset() {
-       const uatResetUrl = 'https://eserviceuat.pcalife.com.tw/sso/reset_password/agentInputUserInfo.html?sys=epos'
-      const prodResetUrl ='https://www.eservice.pcalife.com.tw/sso/reset_password/agentInputUserInfo.html?sys=epos'
-      if (process.env.ENV === 'uat') {
-        window.open(uatResetUrl);
-      }
-      else {
-        window.open(prodResetUrl);
-      }
+    resetPassword() {
+        window.open(process.env.CONSULTANT_FORGET_PASSWORD_URL);
     }
 
 

--
Gitblit v1.8.0