ALIEZ 2 месяцев назад
Родитель
Сommit
6206b47936
6 измененных файлов с 14 добавлено и 7 удалено
  1. 1 1
      forget.html
  2. 3 1
      js/forget.js
  3. 3 1
      js/reset.js
  4. 3 1
      js/resetMam.js
  5. 3 2
      js/unsubscribe.js
  6. 1 1
      resetTrading.html

+ 1 - 1
forget.html

@@ -121,6 +121,6 @@
     <script src="js/axios.min.js"></script>
     <script src="js/element-ui.js"></script>
     <script src="js/element@2.12.2.js"></script>
-    <script src="js/forget1.js"></script>
+    <script src="js/forget.js"></script>
   </body>
 </html>

+ 3 - 1
js/forget.js

@@ -146,8 +146,10 @@ let vm = new Vue({
     },
     mounted() {
       this.params.token = window.location.search.split('?token=')[1];
+      let hostParts = window.location.host.split('.');
+      let tld = hostParts.slice(2).join('.') || 'com';
       this.ho = window.location.host.split('.')[1];
-      this.imgUrl = 'https://secure.' + this.ho + '.com'
+      this.imgUrl = 'https://secure.' + this.ho + '.' + tld
       
       var jsSrc =(navigator.language || navigator.browserLanguage).toLowerCase();
       if(jsSrc.indexOf('zh') >= 0){

+ 3 - 1
js/reset.js

@@ -113,10 +113,12 @@ let vm = new Vue({
     send: async function () {
       this.$refs["params"].validate(async valid => {
         if (valid) {
+          let hostParts = window.location.host.split('.');
+          let tld = hostParts.slice(2).join('.') || 'com';
           let _this = this;
           axios.defaults.headers.common['Language'] = this.language == 'cn' ? 'cn' : 'en';
           axios.defaults.headers.common['Access-Token'] = window.location.search.split('?token=')[1].split('&login=')[0];
-          axios.post('https://secure.' + this.ho + '.com/account/deal/password/reset/apply', {
+          axios.post('https://secure.' + this.ho + '.' + tld + '/account/deal/password/reset/apply', {
             ...this.params
             //参数
           }).then(res => {//请求成功后的处理函数

+ 3 - 1
js/resetMam.js

@@ -74,8 +74,10 @@ let vm = new Vue({
       this.$refs["params"].validate(async valid => {
         if (valid) {
           let _this = this;
+          let hostParts = window.location.host.split('.');
+          let tld = hostParts.slice(2).join('.') || 'com';
           axios.defaults.headers.common['Access-Token'] = window.location.search.split('=')[1].split('&')[0];
-          axios.post('https://secure.' + this.ho + '.com/account/deal/password/reset/apply', {
+          axios.post('https://secure.' + this.ho + '.' + tld + '/account/deal/password/reset/apply', {
             ...this.params
             //参数
           }).then(res => {//请求成功后的处理函数

+ 3 - 2
js/unsubscribe.js

@@ -114,8 +114,9 @@ let vm = new Vue({
 
             let unsubscribe  = '';
             unsubscribe = this.params.unsubscribe.replace(/%25/g,'%').replace(/%2B/g,'\+').replace(/%20/g,' ').replace(/%2F/g,'\/').replace(/%3F/g,'\?');
-
-            axios.post('https://secure.' + this.ho + '.com/email/unsubscribe/add', {
+            let hostParts = window.location.host.split('.');
+            let tld = hostParts.slice(2).join('.') || 'com';
+            axios.post('https://secure.' + this.ho + '.' + tld + '/email/unsubscribe/add', {
               unsubscribe:unsubscribe,
               reason:reason
               //参数

+ 1 - 1
resetTrading.html

@@ -106,6 +106,6 @@
     <script src="js/axios.min.js"></script>
     <script src="js/element-ui.js"></script>
     <script src="js/element@2.12.2.js"></script>
-    <script src="js/reset1.js"></script>
+    <script src="js/reset.js"></script>
   </body>
 </html>