Эх сурвалжийг харах

1. 修复ios 登录问题 2. 登录相关新增关闭按钮

gongyan 4 жил өмнө
parent
commit
022fedf61f

+ 18 - 0
README.md

@@ -6,6 +6,15 @@ node 10.16.0
 
 # 版本更新
 
+## v1.0.0
+
+初始版本
+
+## v1.0.1
+
+1. 修复 ios 登录问题(更改了获取 url 中参数的方法, 优先取哈希)
+2. 登录相关新增关闭页面按钮
+
 # pay
 
 ## order cp 给的参数都随机生成
@@ -208,3 +217,12 @@ appid
 -   [x] 鸿币支付
 -   [x] 鸿币充值
 -   [x] 鸿币支付优惠明细
+
+## 8.13
+
+> 页面新增返回按钮
+
+-   [x] 登录
+-   [x] 注册
+-   [x] 忘记密码
+-   [x] 快速登录

+ 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>

+ 50 - 0
src/components/Inner/Back.vue

@@ -0,0 +1,50 @@
+<template>
+  <!-- 页面上的返回 -->
+  <div class="inner_back">
+    <i class="iconfont icon-baseline-close-px" @click="back"></i>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Back",
+  components: {},
+  data() {
+    return {};
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {
+    // 关闭
+    back() {
+      window.location.href = `${this.$CONFIG.wcfmlCloseUrl}?uid=&data=`;
+    },
+  },
+};
+</script>
+
+<style lang='less' scoped>
+.inner_back {
+  float: right;
+  cursor: pointer;
+
+  .iconfont {
+    margin-right: 10 / @rem;
+    font-size: 50 / @rem;
+  }
+}
+
+// 正常横屏样式
+@media all and (orientation: landscape),
+  /** 伪竖屏*/all and (orientation: portrait) and (min-width: 600px) and (min-height: 800px) {
+  .inner_back {
+    .iconfont {
+      margin-top: 2 / @rem;
+      margin-right: 5 / @rem;
+      font-size: 25 / @rem;
+    }
+  }
+}
+</style>

+ 10 - 3
src/components/Menu/MenuPay/MenuHbPay.vue

@@ -47,7 +47,7 @@ export default {
     };
   },
   computed: {
-    ...mapState(["finance"]),
+    ...mapState(["finance", "userInfo"]),
     query() {
       return this.$store.state.query;
     },
@@ -67,7 +67,7 @@ export default {
     // 返回游戏内支付页面
     back() {
       this.showInnerControl("");
-      this.$utils.closePayPage();
+      this.$utils.closePayPage(this.userInfo.uid);
     },
 
     // 充值鸿币
@@ -256,13 +256,20 @@ export default {
   all and (device-aspect-ratio: 4/3) {
   .menu_hb_pay {
     width: 350 / @rem;
-    height: 250 / @rem;
+    height: 280 / @rem;
     left: 50%;
     top: 50%;
     margin-top: -125 / @rem;
     margin-left: -175 / @rem;
     padding: 7.5 / @rem 10 / @rem;
     border-radius: 20 / @rem;
+
+    .money,
+    .pay_money {
+      height: 40 / @rem;
+      line-height: 40 / @rem;
+      font-size: 15 / @rem;
+    }
   }
 }
 </style>

+ 1 - 0
src/config.js

@@ -31,6 +31,7 @@ const CONFIG = {
     storeUrl: "//h5.jhfly.cn/rxzr/activities/dazhuanpan", // 积分商城链接
     wcfmlLoginUrl: "jhfly://localhost/login", // 忘川伏魔录登录路由
     wcfmlPayUrl: "jhfly://localhost/pay", // 忘川伏魔录支付路由
+    wcfmlCloseUrl: "jhfly://localhost/close", // 忘川伏魔录关闭当前页路由 ?uid=xxx&data=yyy
     redirectUrl: "https://h5.jhfly.cn/redirect/?url=", // 重定向url地址
 }
 

+ 17 - 6
src/utils/utils.js

@@ -150,8 +150,8 @@ const utils = {
     getQueryString(name, search) {
         const str =
             search ||
-            window.location.search.substr(1) ||
-            window.location.hash.split("?")[1];
+            window.location.hash.split("?")[1] ||
+            window.location.search.substr(1);
         let result = querystring.parse(str)[name];
         // 当有重复参数时querystring.parse返回的是数组
         if (result instanceof Array) {
@@ -167,8 +167,8 @@ const utils = {
     getAllQueryString(search) {
         const str =
             search ||
-            window.location.search.substr(1) ||
-            window.location.hash.split("?")[1];
+            window.location.hash.split("?")[1] ||
+            window.location.search.substr(1)
 
         if (!str) {
             return null
@@ -345,13 +345,24 @@ const utils = {
     },
 
     // 关闭支付页面工具函数
-    closePayPage() {
+    closePayPage(uid) {
         // 忘川伏魔录
         const platform = this.getQueryString("platform");
+        const data = this.getQueryString("data");
         if (platform == "wcfml") {
-            window.location.href = $CONFIG.wcfmlPayUrl
+            window.location.href = `${$CONFIG.wcfmlCloseUrl}?uid=${uid}&data=${data}`
             return
         }
+    },
+
+    // 联系qq客服
+    onQQService() {
+        const { kfQQ } = _this.$CONFIG;
+        const urlMobil = `mqqwpa://im/chat?chat_type=wpa&uin=${kfQQ}&version=1&src_type=web&web_src=http:://wpa.b.qq.com`;
+        const urlPc = `http://wpa.qq.com/msgrd?v=3&uin=${kfQQ}&site=qq&menu=yes`;
+        const url = isPc ? urlPc : urlMobil;
+        window.open(url, "_brank");
     }
+
 };
 export default utils;

+ 2 - 3
src/views/Counter/Counter.vue

@@ -62,7 +62,7 @@ export default {
   },
   computed: {
     ...mapGetters(["getPayPlatform"]),
-    ...mapState(["query"]),
+    ...mapState(["query", "userInfo"]),
   },
   watch: {},
   created() {},
@@ -114,8 +114,7 @@ export default {
 
     // 返回游戏
     back() {
-      console.log("返回");
-      this.$utils.closePayPage();
+      this.$utils.closePayPage(this.userInfo.uid);
     },
   },
 };

+ 8 - 2
src/views/Forget/Forget.vue

@@ -2,7 +2,10 @@
   <div class="inner_box">
     <div class="forget">
       <!-- 标题 -->
-      <div class="title">忘记密码</div>
+      <div class="title">
+        忘记密码
+        <Back />
+      </div>
       <!-- 手机号 -->
       <div class="tel_input_box">
         <i class="red">*</i>
@@ -68,9 +71,12 @@
 </template>
 
 <script>
+import Back from "@/components/Inner/Back"; // 返回
 export default {
   name: "Forget",
-  components: {},
+  components: {
+    Back,
+  },
   inject: ["checkCode", "routeLink"],
   data() {
     return {

+ 0 - 2
src/views/GamePay/GamePay.vue

@@ -63,8 +63,6 @@ export default {
     close() {
       // 1. 展示游戏内充值
       this.showInnerControl("");
-      // 2. 关闭当前
-      console.log("gamepay close");
     },
   },
 };

+ 5 - 2
src/views/GamePay/GamePayBox.vue

@@ -9,6 +9,7 @@
 
 <script>
 import GamePayH5 from "@/views/GamePay/GamePayH5"; // 游戏内充值 h5
+import { mapState } from "vuex";
 export default {
   name: "GamePayBox",
   components: {
@@ -17,7 +18,9 @@ export default {
   data() {
     return {};
   },
-  computed: {},
+  computed: {
+    ...mapState(["userInfo"]),
+  },
   watch: {},
   created() {},
   mounted() {},
@@ -25,7 +28,7 @@ export default {
     // 返回
     back() {
       this.$emit("close");
-      this.$utils.closePayPage();
+      this.$utils.closePayPage(this.userInfo.uid);
     },
   },
 };

+ 0 - 1
src/views/Home/Home.vue

@@ -36,7 +36,6 @@ export default {
 
     // 关闭
     close() {
-      console.log("close");
     },
   },
 };

+ 9 - 8
src/views/Login/Login.vue

@@ -1,7 +1,10 @@
 <template>
   <div class="login">
     <div id="udb_login">
-      <div class="title">登录</div>
+      <div class="title">
+        登录
+        <Back />
+      </div>
       <div class="login_input" @keyup.enter="login">
         <!-- 手机号/账号 -->
         <div class="login_username">
@@ -76,9 +79,12 @@
 
 <script>
 import { mapActions, mapState } from "vuex";
+import Back from "@/components/Inner/Back"; // 返回
 export default {
   name: "Login",
-  components: {},
+  components: {
+    Back,
+  },
   inject: [
     "checkCode",
     "getFinance",
@@ -178,12 +184,10 @@ export default {
     onLogin() {
       // 登录接口
       const { account, password, isChecked } = this;
-
       if (!this.canLogin) {
         return;
       }
       this.canLogin = false;
-
       this.$api
         .login({
           passport: account,
@@ -198,9 +202,7 @@ export default {
             return;
           }
           // 成功
-
           // 存储信息
-          // localStorage.setItem("userInfo", JSON.stringify(data));
           this.$utils.writeStorage("", "userInfo", JSON.stringify(data));
           this.userInfoAction(data);
 
@@ -208,9 +210,8 @@ export default {
           if (isChecked) {
             this.rememberFun(account, password);
           }
-
           // 根据当前环境去做不同事情的登录工具函数
-          this.loginUtil(data, "Home");
+          this.loginUtil(data);
         });
     },
 

+ 1 - 1
src/views/Login/LoginBox.vue

@@ -105,7 +105,7 @@ export default {
     },
 
     // 登录工具函数
-    loginUtil(data, routeName, params) {
+    loginUtil(data) {
       if (this.platform === "wcfml") {
         this.wcfmlLogin(data);
       }

+ 8 - 2
src/views/Login/SelectLogin.vue

@@ -1,7 +1,10 @@
 <template>
   <div class="inner_box">
     <div class="select_login">
-      <div class="title">选择登录方式</div>
+      <div class="title">
+        选择登录方式
+        <Back />
+      </div>
       <div class="select_type clear">
         <div class="left" @click="quickHandler">
           <i class="iconfont icon-shandian"></i>
@@ -17,9 +20,12 @@
 </template>
 
 <script>
+import Back from "@/components/Inner/Back"; // 返回
 export default {
   name: "selectLogin",
-  components: {},
+  components: {
+    Back,
+  },
   inject: ["onQuickHandler"],
   data() {
     return {};

+ 8 - 2
src/views/Reg/Reg.vue

@@ -2,7 +2,10 @@
   <div class="inner_box">
     <div id="udb_reg_phone_password">
       <div class="udb_phone_code_box">
-        <div class="title">注册</div>
+        <div class="title">
+          注册
+          <Back />
+        </div>
         <div class="reg_input_box">
           <!-- 账密输入 -->
           <div class="phone_code">
@@ -116,9 +119,12 @@
 
 <script>
 import { mapState } from "vuex";
+import Back from "@/components/Inner/Back"; // 返回按钮
 export default {
   name: "RegPhonePwd",
-  components: {},
+  components: {
+    Back,
+  },
   inject: ["checkCode", "routeLink"],
   data() {
     return {

+ 9 - 5
src/views/Visitor/Visitor.vue

@@ -2,7 +2,10 @@
   <div class="visitor">
     <div class="inner_box" @click="close"></div>
     <div class="visitor_login">
-      <div class="title">账密截图</div>
+      <div class="title">
+        账密截图
+        <Back />
+      </div>
       <!-- 账密 -->
       <div class="account_box">
         <p>
@@ -32,9 +35,12 @@
 
 <script>
 import { mapActions, mapState } from "vuex";
+import Back from "@/components/Inner/Back"; // 返回
 export default {
   name: "Visitor",
-  components: {},
+  components: {
+    Back,
+  },
   inject: ["routeLink"],
   data() {
     return {
@@ -63,9 +69,7 @@ export default {
   },
   methods: {
     // 进入游戏
-    close() {
-      console.log("visitor close");
-    },
+    close() {},
 
     // 复制账密
     copy() {

BIN
wcfml 修复ios登录不成功问题 登录新增关闭按钮.zip