lxf 1 hafta önce
ebeveyn
işleme
c0ae544b8a
2 değiştirilmiş dosya ile 15 ekleme ve 2 silme
  1. 1 1
      src/router/landing.js
  2. 14 1
      src/view/landing/index.vue

+ 1 - 1
src/router/landing.js

@@ -1,7 +1,7 @@
 import { lan } from "@/utils/config";
 export default [
   {
-    path: '/:locale' + lan + '?/landing/page',
+    path: '/:locale' + lan + '?/landing/page/:code?',
     component: () => import(/* webpackChunkName: "landing" */ '@/view/landing/index.vue'),
     name: 'landing',
     meta: { mustLogin: false }

+ 14 - 1
src/view/landing/index.vue

@@ -521,6 +521,7 @@ export default {
       form: {
         account: "",
         password: "",
+        recommend_code: ""
       },
       checked: false,
       codeShow: false,
@@ -581,6 +582,13 @@ export default {
       }, 200)
     }
   },
+  created () {
+    var code = (this.$route.params.code || '')
+    if (code) {
+      this.form.recommend_code = code
+      setSession('recommend_code', JSON.stringify(code))
+    }
+  },
   mounted() {
     setTimeout(() => {
       this.readonly = false
@@ -647,7 +655,9 @@ export default {
             account: account,
             password: this.form.password,
             verifyCode: this.form.verifyCode,
-            area_code: this.phoneCountry.area_code
+            recommend_code: this.form.recommend_code,
+            area_code: this.phoneCountry.area_code,
+            client: this.getClient(),
           })
             .then((res) => {
               this.$notify({
@@ -835,6 +845,9 @@ export default {
         description: this.$t('html.description'),
         keywords: this.$t('html.keywords')
       })
+      if (!this.sendDisable) {
+        this.sendText = this.$t('register.l11')
+      }
       if (this.isLogin) {
         updateUserLanguage({
           language: lan