gongyan 4 rokov pred
rodič
commit
5b52274ce6

+ 23 - 0
README.md

@@ -124,3 +124,26 @@ appid
 -   [x] compontent, android 存取数据
 -   [ ] router.js 路由守卫, android 存取数据
 -   [ ] 收银台页面, 进入收银台 调 queryOrder 接口, 如果用户点了关闭, queryOrder 没有返回值, 最多等两秒关闭, 如果有返回值, 即时关闭, (如果有多个订单查询, 也是这样, 最多等两秒, 只要有一个没有返回, 就最多等两秒)
+
+## 2021.7.15
+
+-   [ ] 登录成功之后跳转 home 页面, home 页面应该请求一次鸿币, 因为可能还没出结果, 就跳转过去 home 了, 返回值还没拿到
+
+> xjqy 登录逻辑
+> jhremember 获取逻辑: 优先从 localStorage 取, 否则从 url 中取, 取到的值都是 json string
+
+-   [x] 从链接中获取 jhremember 不存在, 展示选择登录方式
+-   [x] 存在, 直接展示 login, 并填充账号密码
+-   [x] 登录成功, 将 login 返回的用户信息, 前端的记住密码, 和 x-token 都传递给 xjqy
+        因为可能没法获取 存储的 x-token, 所以尝试一下登录完成之后先跳链接
+
+> xjqy 快速登录逻辑
+
+-   [ ] 登录成功, 携带用户信息, 在 url 里面, 携带 x-token 在 url 里面 携带密码信息在 url 里面
+
+
+> 读取路由中的信息修改
+> 路由中必有参数:
+> platform: xjqy
+> appid:777
+> data: 我存的数据

+ 67 - 72
build/webpack.test.conf.js

@@ -14,82 +14,77 @@ const HOST = process.env.HOST
 const PORT = process.env.PORT && Number(process.env.PORT)
 
 const devWebpackConfig = merge(baseWebpackConfig, {
-  module: {
-    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
-  },
-  // cheap-module-eval-source-map is faster for development
-  devtool: config.dev.devtool,
+    module: {
+        rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
+    },
+    // cheap-module-eval-source-map is faster for development
+    devtool: config.dev.devtool,
 
-  // these devServer options should be customized in /config/index.js
-  devServer: {
-    clientLogLevel: 'warning',
-    historyApiFallback: {
-      rewrites: [
-        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
-      ],
+    // these devServer options should be customized in /config/index.js
+    devServer: {
+        clientLogLevel: 'warning',
+        historyApiFallback: {
+            rewrites: [
+                { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
+            ],
+        },
+        hot: true,
+        contentBase: false, // since we use CopyWebpackPlugin.
+        compress: true,
+        host: HOST || config.dev.host,
+        port: PORT || config.dev.port,
+        open: config.dev.autoOpenBrowser,
+        overlay: config.dev.errorOverlay ? { warnings: false, errors: true } : false,
+        publicPath: config.dev.assetsPublicPath,
+        proxy: config.dev.proxyTable,
+        quiet: true, // necessary for FriendlyErrorsPlugin
+        watchOptions: {
+            poll: config.dev.poll,
+        }
     },
-    hot: true,
-    contentBase: false, // since we use CopyWebpackPlugin.
-    compress: true,
-    host: HOST || config.dev.host,
-    port: PORT || config.dev.port,
-    open: config.dev.autoOpenBrowser,
-    overlay: config.dev.errorOverlay
-      ? { warnings: false, errors: true }
-      : false,
-    publicPath: config.dev.assetsPublicPath,
-    proxy: config.dev.proxyTable,
-    quiet: true, // necessary for FriendlyErrorsPlugin
-    watchOptions: {
-      poll: config.dev.poll,
-    }
-  },
-  plugins: [
-    new webpack.DefinePlugin({
-      'process.env': require('../config/dev.env')
-    }),
-    new webpack.HotModuleReplacementPlugin(),
-    new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
-    new webpack.NoEmitOnErrorsPlugin(),
-    // https://github.com/ampedandwired/html-webpack-plugin
-    new HtmlWebpackPlugin({
-      filename: 'index.html',
-      template: 'index.html',
-      inject: true
-    }),
-    // copy custom static assets
-    new CopyWebpackPlugin([
-      {
-        from: path.resolve(__dirname, '../static'),
-        to: config.dev.assetsSubDirectory,
-        ignore: ['.*']
-      }
-    ])
-  ]
+    plugins: [
+        new webpack.DefinePlugin({
+            'process.env': require('../config/test.env')
+        }),
+        new webpack.HotModuleReplacementPlugin(),
+        new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
+        new webpack.NoEmitOnErrorsPlugin(),
+        // https://github.com/ampedandwired/html-webpack-plugin
+        new HtmlWebpackPlugin({
+            filename: 'index.html',
+            template: 'index.html',
+            inject: true
+        }),
+        // copy custom static assets
+        new CopyWebpackPlugin([{
+            from: path.resolve(__dirname, '../static'),
+            to: config.dev.assetsSubDirectory,
+            ignore: ['.*']
+        }])
+    ]
 })
 
 module.exports = new Promise((resolve, reject) => {
-  portfinder.basePort = process.env.PORT || config.dev.port
-  portfinder.getPort((err, port) => {
-    if (err) {
-      reject(err)
-    } else {
-      // publish the new Port, necessary for e2e tests
-      process.env.PORT = port
-      // add port to devServer config
-      devWebpackConfig.devServer.port = port
+    portfinder.basePort = process.env.PORT || config.dev.port
+    portfinder.getPort((err, port) => {
+        if (err) {
+            reject(err)
+        } else {
+            // publish the new Port, necessary for e2e tests
+            process.env.PORT = port
+                // add port to devServer config
+            devWebpackConfig.devServer.port = port
 
-      // Add FriendlyErrorsPlugin
-      devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
-        compilationSuccessInfo: {
-          messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
-        },
-        onErrors: config.dev.notifyOnErrors
-        ? utils.createNotifierCallback()
-        : undefined
-      }))
+            // Add FriendlyErrorsPlugin
+            devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
+                compilationSuccessInfo: {
+                    messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
+                },
+                onErrors: config.dev.notifyOnErrors ?
+                    utils.createNotifierCallback() : undefined
+            }))
 
-      resolve(devWebpackConfig)
-    }
-  })
-})
+            resolve(devWebpackConfig)
+        }
+    })
+})

+ 1 - 0
config/dev.env.js

@@ -5,4 +5,5 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
     NODE_ENV: '"development"',
     API_ROOT: '"//10.10.100.138:8080"', // 测试环境地址
+    xjqyLogin: '"jhfly://localhost/login"', // 仙界情缘登录地址
 })

+ 2 - 0
config/prod.env.js

@@ -2,4 +2,6 @@
 module.exports = {
     NODE_ENV: '"production"',
     API_ROOT: '"https://api.jhfly.cn"', // 正式环境地址
+    xjqyLogin: '"jhfly://localhost/login"', // 仙界情缘登录地址
+
 }

+ 9 - 0
config/test.env.js

@@ -0,0 +1,9 @@
+'use strict'
+const merge = require('webpack-merge')
+const prodEnv = require('./prod.env')
+
+module.exports = merge(prodEnv, {
+    NODE_ENV: '"development"',
+    API_ROOT: '"https://api.jhfly.cn"', // 测试环境地址
+    xjqyLogin: '"jhfly://localhost/login"', // 仙界情缘登录地址
+})

+ 2 - 2
index.html

@@ -32,9 +32,9 @@
     <title>关注惊鸿游戏公众号领福利</title>
 
 </head>
-<!-- <script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script> -->
+<script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
 <script>
-    // var vConsole = new VConsole();
+    var vConsole = new VConsole();
 </script>
 
 <body>

+ 1 - 1
package.json

@@ -8,7 +8,7 @@
         "build": "node build/build.js",
         "build:test": "node build/dev.js",
         "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
-        "start": "webpack-dev-server --inline --progress --config build/webpack.test.conf.js"
+        "test": "webpack-dev-server --inline --progress --config build/webpack.test.conf.js"
     },
     "dependencies": {
         "@nutui/nutui": "^2.2.13",

+ 8 - 10
src/App.vue

@@ -60,6 +60,7 @@ export default {
       "financeAction",
       "appidAction",
       "setConfigAction",
+      "platformAction",
     ]),
 
     /**
@@ -74,6 +75,10 @@ export default {
       const _appid = this.$utils.getQueryString("appid");
       const appid = _appid || this.CONFIG.appid;
       this.appidAction(appid);
+
+      // 获取当前android是哪个(针对特殊处理的包, 比如仙界情缘)
+      const platform = this.$utils.getQueryString("platform");
+      this.platformAction(platform);
     },
 
     // 获取用户信息
@@ -277,16 +282,9 @@ export default {
 
     // 跳转页面
     routeLink(routeName, params) {
-      const { query } = this;
-      this.$router
-        .push({
-          name: routeName,
-          query,
-          params,
-        })
-        .catch((err) => {
-          //   console.log(err);
-        });
+      const query = this.$utils.getAllQueryString();
+      this.queryAction({ ...query });
+      this.$utils.routeLink(routeName, query, params);
     },
   },
 };

+ 1 - 0
src/config.js

@@ -30,6 +30,7 @@ const CONFIG = {
     kfQQ: 3563681140, // 客服qq
     serviceUrl: "//kf.jhfly.cn/chatIndex?kefu_id=kefu2&refer=", // 惊鸿客服url
     storeUrl: "//h5.jhfly.cn/rxzr/activities/dazhuanpan", // 积分商城链接
+    xjqyLoginUrl: "jhfly://localhost/login", // 仙界情缘登录路由
 }
 
 

+ 1 - 1
src/main.js

@@ -20,7 +20,7 @@ Vue.prototype.$clipboard = Clipboard
 Vue.config.productionTip = false;
 
 /* eslint-disable no-new */
-new Vue({
+export default new Vue({
     el: "#app",
     router,
     store,

+ 2 - 1
src/router/index.js

@@ -1,5 +1,6 @@
 import Vue from 'vue'
 import Router from 'vue-router'
+import utils from '@/utils/utils'
 
 Vue.use(Router)
 const router = new Router({
@@ -70,7 +71,7 @@ const router = new Router({
 // 全局前置守卫
 router.beforeEach((to, from, next) => {
     // const isLogin = localStorage.getItem("userInfo");
-    const isLogin = this.$utils.readStorage("", "userInfo");
+    const isLogin = utils.readStorage("", "userInfo");
 
     if (to.matched.some(item => item.meta.isLogin)) {
         if (isLogin) {

+ 12 - 3
src/store/index.js

@@ -18,6 +18,11 @@ export default new Vuex.Store({
          * 
          */
         showGameInner: "",
+        /**
+         * android平台
+         * 仙界情缘: xjqy
+         */
+        platform: "",
     },
     getters: {
         // 获取当前支付平台的中文名
@@ -72,6 +77,10 @@ export default new Vuex.Store({
         showGameInnerAction(context, payload) {
             context.commit("showGameInnerMutation", payload)
         },
+        // 当前android平台
+        platformAction(context, payload) {
+            context.commit("platformMutation", payload)
+        },
     },
     mutations: {
         // 页面配置
@@ -102,9 +111,9 @@ export default new Vuex.Store({
         appidMutation(state, payload) {
             state.appid = payload
         },
-        // 显示的菜单
-        showGameInnerMutation(state, payload) {
-            state.showGameInner = payload
+        // 当前android平台
+        platformMutation(state, payload) {
+            state.platform = payload
         },
     }
 })

+ 1 - 1
src/utils/http.js

@@ -55,7 +55,7 @@ instance.interceptors.request.use(
 instance.interceptors.response.use(
     response => {
         if (response.data.code === 0 && response.headers["x-token"]) {
-            utils.writeStorage("", "x-token", response.headers["x-token"]);
+            utils.writeStorage("", "x-token", response.headers["x-token"], true);
         }
         return response.status === 200 ? Promise.resolve(response) : Promise.reject(response)
     },

+ 64 - 10
src/utils/utils.js

@@ -1,4 +1,5 @@
 import querystring from "querystring"
+import _this from "../main"
 var CryptoJS = require('crypto-js');
 var Md5 = require("js-md5");
 const utils = {
@@ -208,12 +209,25 @@ const utils = {
 
     // 记住密码工具函数
     rememberFun(account, password) {
+        if (window.android) {
+            return this.onRememberFun(account, password)
+        }
+        const platform = this.getQueryString("platform");
+
+        // 仙界情缘
+        if (platform === "xjqy") {
+            return this.onRememberFun(account, password)
+        }
+    },
+
+    // android 记住密码工具函数
+    onRememberFun(account, password) {
         const accountEnc = this.encrypt(account);
         const pwdEnc = this.encrypt(password);
         const accountPwd = `${accountEnc}&&${pwdEnc}`;
         // let accountLocal = JSON.parse(localStorage.getItem("jhremember"));
         let accountLocal = this.readStorage("", "jhremember");
-        accountLocal = JSON.parse(accountLocal);
+        accountLocal = accountLocal && JSON.parse(accountLocal);
 
         let accountList = []
 
@@ -247,7 +261,7 @@ const utils = {
         // 已经存有账密
         // 1.  判断账号是否存在
         const reAccount = accountList.filter((ele) => {
-            return ele.account === account;
+            return ele.account == account;
         });
         // 1 如果账号存在
         if (reAccount.length > 0) {
@@ -256,6 +270,9 @@ const utils = {
                 const _accountEcv = ele.split("&&")[0];
                 return _accountEcv !== accountEnc;
             });
+            accountList = accountList.filter((ele) => {
+                return ele.account !== account
+            })
         }
         // 2. 账号不存在 存
         accountLocal = accountLocal ? [accountPwd, ...accountLocal] : [accountPwd];
@@ -265,7 +282,6 @@ const utils = {
         });
         // localStorage.setItem("jhremember", JSON.stringify(accountLocal));
         this.writeStorage("", "jhremember", JSON.stringify(accountLocal));
-
         return accountList
     },
 
@@ -273,10 +289,15 @@ const utils = {
     readStorage(bookName, keyName) {
         // 安卓内部
         if (window.android) {
-            window.android.readStorage(bookName, keyName)
+            return window.android.readStorage(bookName, keyName);
         }
 
-        // 仙侠特制版
+        const platform = this.getQueryString("platform");
+        // 仙界情缘特制版
+        if (platform == "xjqy") {
+            let data = JSON.parse(decodeURI(decodeURIComponent(this.getQueryString('data')))) || {}
+            return localStorage.getItem(keyName) || data[keyName];
+        }
     },
 
     // 安卓内 存数据
@@ -284,9 +305,21 @@ const utils = {
         // 安卓内部
         if (window.android) {
             window.android.writeStorage(bookName, keyName, value)
+            return
         }
 
-        // 仙侠特制版
+        // 仙界情缘特制版
+        const platform = this.getQueryString("platform");
+        // 仙界情缘特制版
+        if (platform == "xjqy") {
+            localStorage.setItem(keyName, value);
+            const query = this.getAllQueryString();
+            let data = decodeURI(decodeURIComponent(query.data));
+            query.data = data ? JSON.parse(data) : {}
+            query.data[keyName] = value;
+            query.data = JSON.stringify(query.data)
+            this.routeLink("", query, "", _this)
+        }
     },
 
     // 安卓内 删除数据(keyName)
@@ -296,7 +329,9 @@ const utils = {
             window.android.deleteStorage(bookName, keyName)
         }
 
-        // 仙侠特制版
+        // 仙界情缘特制版
+        const platform = this.getQueryString("platform");
+        if (platform == "xjqy") {}
     },
 
     // 安卓内 销毁数据(bookName)
@@ -305,7 +340,7 @@ const utils = {
         if (window.android) {
             window.android.destoryStorage(bookName)
         }
-        // 仙特制版
+        // 仙界情缘特制版
     },
 
     // 获取所有bookName里面的key列表
@@ -314,7 +349,26 @@ const utils = {
         if (window.android) {
             window.android.getKeysInStorage(bookName)
         }
-        // 仙侠特制版
-    }
+        // 仙界情缘特制版
+    },
+
+    // 对象序列化工具函数
+    queryStringUtil(query) {
+        return querystring.stringify(query)
+    },
+
+    // vue-router跳转页面
+    routeLink(routeName, query, params) {
+        let _routeName = routeName || _this.$route.name
+        _this.$router
+            .push({
+                name: _routeName,
+                query,
+                params,
+            })
+            .catch((err) => {
+                //   console.log(err);
+            });
+    },
 };
 export default utils;

+ 14 - 10
src/views/Login/Login.vue

@@ -79,7 +79,13 @@ import { mapActions, mapState } from "vuex";
 export default {
   name: "Login",
   components: {},
-  inject: ["checkCode", "getFinance", "routeLink", "onQuickHandler"],
+  inject: [
+    "checkCode",
+    "getFinance",
+    "routeLink",
+    "onQuickHandler",
+    "loginUtil",
+  ],
   data() {
     return {
       isChecked: true, //记住密码是否选中
@@ -92,7 +98,7 @@ export default {
     };
   },
   computed: {
-    ...mapState(["query", "isWeChat", "appid"]),
+    ...mapState(["query", "appid", "platform"]),
   },
   watch: {},
   created() {},
@@ -125,8 +131,8 @@ export default {
     initAccountList() {
       //   const accountLocal = JSON.parse(localStorage.getItem("jhremember"));
       let accountLocal = this.$utils.readStorage("", "jhremember");
-      accountLocal = JSON.parse(accountLocal);
-      
+      accountLocal = accountLocal && JSON.parse(accountLocal);
+
       accountLocal &&
         accountLocal.length &&
         accountLocal.map((ele) => {
@@ -191,10 +197,7 @@ export default {
           if (code) {
             return;
           }
-          // 成功  进入游戏
-
-          // 获取鸿币余额
-          this.getFinance();
+          // 成功
 
           // 存储信息
           // localStorage.setItem("userInfo", JSON.stringify(data));
@@ -206,8 +209,8 @@ export default {
             this.rememberFun(account, password);
           }
 
-          this.routeLink("Home");
-          // 2. 未记住 不用管
+          // 根据当前环境去做不同事情的登录工具函数
+          this.loginUtil(data, "Home");
         });
     },
 
@@ -230,6 +233,7 @@ export default {
       accountLocal = JSON.parse(accountLocal);
       accountLocal.splice(accountIndex, 1);
       //   localStorage.setItem("jhremember", JSON.stringify(accountLocal));
+
       this.$utils.writeStorage("", "jhremember", JSON.stringify(accountLocal));
     },
 

+ 52 - 8
src/views/Login/LoginBox.vue

@@ -22,7 +22,7 @@
 import SelectLogin from "@/views/Login/SelectLogin"; // 选择登录方式页
 import Login from "@/views/Login/Login"; // 账号/手机号登录页
 import MenuService from "@/components/Menu/MenuService"; // 联系客服
-import { mapActions } from "vuex";
+import { mapActions, mapState } from "vuex";
 export default {
   name: "LoginBox",
   components: {
@@ -32,7 +32,10 @@ export default {
   },
   provide() {
     return {
+      // 游客登录工具函数
       onQuickHandler: this.onQuickHandler,
+      // 登录成功工具函数
+      loginUtil: this.loginUtil,
     };
   },
   data() {
@@ -42,13 +45,15 @@ export default {
     };
   },
   inject: ["checkCode", "getFinance", "routeLink"],
-  computed: {},
+  computed: {
+    ...mapState(["platform"]),
+  },
   watch: {},
   created() {},
   mounted() {
     // const jhremember = JSON.parse(localStorage.getItem("jhremember"));
     let jhremember = this.$utils.readStorage("", "jhremember");
-    jhremember = JSON.parse(jhremember);
+    jhremember = jhremember && JSON.parse(jhremember);
 
     const isRemember = jhremember && jhremember.length > 0;
     // 没有登录, 并且记住了密码 显示账号/手机号登录页面
@@ -63,11 +68,13 @@ export default {
     },
 
     // 游客登录工具函数
+
     onQuickHandler() {
       const { canQucikLogin } = this;
       if (!canQucikLogin) {
         return;
       }
+
       this.canQucikLogin = false;
       const promoCode = this.$utils.getQueryString("promoCode");
       const { appid } = this;
@@ -81,18 +88,55 @@ export default {
         }
         // 成功
         // 记住密码
-        this.$utils.rememberFun(data.passport, data.password);
+        const jhremember = this.$utils.rememberFun(
+          data.passport,
+          data.password
+        );
 
-        // 获取鸿币余额
-        this.getFinance();
+        if (window.android) {
+          this.getFinance();
+        }
 
         // 存储用户信息
         // localStorage.setItem("userInfo", JSON.stringify(data));
         this.$utils.writeStorage("", "userInfo", JSON.stringify(data));
-
         this.userInfoAction(data);
-        this.routeLink("Visitor", data);
+        this.routeLink("Visitor", {
+          userInfo: data,
+          jhremember,
+        });
+      });
+    },
+
+    // 登录工具函数
+    loginUtil(data, routeName, params) {
+      if (window.android) {
+        this.androidLogin(routeName, params);
+      }
+      if (this.platform === "xjqy") {
+        this.xjqyLogin(data);
+      }
+    },
+
+    // android 安卓登录工具函数
+    androidLogin(routeName, params) {
+      // 获取鸿币余额
+      this.getFinance();
+      this.routeLink(routeName, params);
+    },
+
+    // xjqy 仙界情缘登录工具函数
+    xjqyLogin(data) {
+      // 记住密码 todo
+      const savedata = this.$utils.getQueryString("data");
+
+      // 跳转对应登录链接
+      const query = this.$utils.queryStringUtil({
+        uid: data.uid,
+        data: encodeURIComponent(savedata),
       });
+      // window.open(`${this.$CONFIG.xjqyLoginUrl}?${query}`);  这个没法
+      window.location.href = `${this.$CONFIG.xjqyLoginUrl}?${query}`;
     },
   },
 };

+ 31 - 7
src/views/Visitor/Visitor.vue

@@ -7,11 +7,11 @@
       <div class="account_box">
         <p>
           <span class="left">账号:</span>
-          <span class="right">{{ $route.params.passport }}</span>
+          <span class="right">{{ $route.params.userInfo.passport }}</span>
         </p>
         <p>
           <span class="left">密码:</span>
-          <span class="right">{{ $route.params.password }}</span>
+          <span class="right">{{ $route.params.userInfo.password }}</span>
         </p>
       </div>
       <!-- 提示 -->
@@ -21,7 +21,7 @@
         class="close"
         id="copy"
         ref="copy"
-        :data-clipboard-text="`账号:${$route.params.passport} 密码:${$route.params.password}`"
+        :data-clipboard-text="`账号:${$route.params.userInfo.passport} 密码:${$route.params.userInfo.password}`"
         @click="close"
       >
         进入游戏
@@ -31,10 +31,11 @@
 </template>
 
 <script>
-import { mapActions } from "vuex";
+import { mapActions, mapState } from "vuex";
 export default {
   name: "Visitor",
   components: {},
+  inject: ["routeLink"],
   data() {
     return {
       clipboard: null, // 复制对象
@@ -49,7 +50,9 @@ export default {
       },
     },
   },
-  computed: {},
+  computed: {
+    ...mapState(["platform"]),
+  },
   watch: {},
   created() {},
   mounted() {
@@ -59,11 +62,13 @@ export default {
     this.clipboard && this.clipboard.destroy();
   },
   methods: {
-    ...mapActions(["isWeChat"]),
-
     // 进入游戏
     close() {
       console.log("visitor close");
+      // 安卓
+      if (window.android) {
+        return;
+      }
     },
 
     // 复制账密
@@ -71,6 +76,25 @@ export default {
       this.clipboard = new this.$clipboard("#copy");
       this.clipboard.on("success", () => {
         this.$toast.text("账号密码已复制,请注意保存");
+
+        const { platform } = this;
+        // xjqy 仙界情缘
+        if (platform === "xjqy") {
+          // 跳转对应登录链接
+          const { userInfo } = this.$route.params;
+          const data = this.$utils.getQueryString("data");
+          const query = this.$utils.queryStringUtil({
+            uid: userInfo.uid,
+            data: encodeURIComponent(data),
+          });
+
+          // 1. 返回登录页, 因为游戏内点击返回是返回到原来的url
+          this.routeLink("Login");
+
+          // 2. 调用xjqy的登录
+          // window.open(`${this.$CONFIG.xjqyLoginUrl}?${query}`);
+          window.location.href = `${this.$CONFIG.xjqyLoginUrl}?${query}`;
+        }
       });
     },
   },