From 41f60633cbdaed2c633f90e43ca0c83fb3fdb975 Mon Sep 17 00:00:00 2001
From: zzzz <690498789@qq.com>
Date: Fri, 19 Apr 2024 04:30:14 +0800
Subject: [PATCH] first

---
 /dev/null                               |    0 
 src/API/userCenter.js                   |   10 +++++
 src/page/quotes.vue                     |    1 
 src/components/perpetual-open/index.vue |   51 +++++++++++++++++++------
 src/page/register/index.vue             |   19 ++-------
 src/request/httpAxios.js                |    4 +-
 6 files changed, 56 insertions(+), 29 deletions(-)

diff --git a/dist1.zip b/dist1.zip
deleted file mode 100644
index 2cd576c..0000000
--- a/dist1.zip
+++ /dev/null
Binary files differ
diff --git a/src/API/userCenter.js b/src/API/userCenter.js
index d829297..6b4e253 100644
--- a/src/API/userCenter.js
+++ b/src/API/userCenter.js
@@ -290,6 +290,15 @@
     params
   );
 };
+//判断后台是否开启谷歌验证
+const invitationCode = (params) => {
+  return httpAxios({
+    url: "/api/user/invitationCode",
+    method: "get",
+    isLoading: false,
+    params,
+  });
+};
 
 const apiList = {
   getConfigurationByKey,
@@ -317,6 +326,7 @@
   _getNews,
   _getPopupNews,
   _getIsGoogleAuth,
+  invitationCode,
 };
 
 export default apiList;
diff --git a/src/components/perpetual-open/index.vue b/src/components/perpetual-open/index.vue
index 3b18666..9e127cd 100644
--- a/src/components/perpetual-open/index.vue
+++ b/src/components/perpetual-open/index.vue
@@ -2,20 +2,42 @@
   <!-- 永续合约开仓页 -->
   <div class="perpetual-open">
     <!-- 隐藏杠杠   全仓     k 线图入口 -->
-    <!-- <div class="flex header-open">
+    <div class="flex header-open">
       <div class="flex flex-1 pt-34">
-        <div class="w-180 h-60 lh-60 text-center rounded inputBackground textColor">
+        <div
+          class="w-180 h-60 lh-60 text-center rounded inputBackground textColor"
+        >
           {{ $t("全仓") }}
         </div>
-        <div class="w-140 h-60 lh-60 ml-29 rounded tabBackground textColor" v-if="selectIndex / 1 === 1">
-          <div @click="showOptions = !showOptions" style="height: 100%; box-sizing: border-box"
-            class="relative word-30 pl-28 pr-10 w-140 h-60 select-wrap flex justify-between items-center">
+        <div
+          class="w-140 h-60 lh-60 ml-29 rounded tabBackground textColor"
+          v-if="selectIndex / 1 === 1"
+        >
+          <div
+            @click="showOptions = !showOptions"
+            style="height: 100%; box-sizing: border-box"
+            class="relative word-30 pl-28 pr-10 w-140 h-60 select-wrap flex justify-between items-center"
+          >
             {{ form.lever_rate }}x
-            <img src="../../assets/image/public/grey-select.png" alt="select-icon" class="w-22 h-11" />
-            <div v-if="showOptions" class="options w-140 absolute top-97 left-0 z-10">
-              <div class="w-full" @click.stop="handleChoose(item)" :class="{
-                'option-active': form.lever_rate === item.lever_rate,
-              }" :value="item.lever_rate" v-for="item in initData.lever" :key="item.id">
+            <img
+              src="../../assets/image/public/grey-select.png"
+              alt="select-icon"
+              class="w-22 h-11"
+            />
+            <div
+              v-if="showOptions"
+              class="options w-140 absolute top-97 left-0 z-10"
+            >
+              <div
+                class="w-full"
+                @click.stop="handleChoose(item)"
+                :class="{
+                  'option-active': form.lever_rate === item.lever_rate,
+                }"
+                :value="item.lever_rate"
+                v-for="item in initData.lever"
+                :key="item.id"
+              >
                 {{ item.lever_rate }}x
               </div>
             </div>
@@ -23,9 +45,14 @@
         </div>
       </div>
       <div>
-        <img src="../../assets/image/public/k-line.png" alt="line-img" class="w-38 h-35" @click="jump" />
+        <img
+          src="../../assets/image/public/k-line.png"
+          alt="line-img"
+          class="w-38 h-35"
+          @click="jump"
+        />
       </div>
-    </div> -->
+    </div>
     <div class="pt-30 pb-20">
       <div class="flex">
         <div class="mr-30">
diff --git a/src/page/quotes.vue b/src/page/quotes.vue
index d16946d..d270ece 100644
--- a/src/page/quotes.vue
+++ b/src/page/quotes.vue
@@ -138,6 +138,7 @@
       this.sortVal = val;
     },
     async fetchQoutes() {
+      console.log(this.coinList, "======");
       // 现货/合约
       if (!this.coinList.length) {
         await this.SET_COIN_LIST();
diff --git a/src/page/register/index.vue b/src/page/register/index.vue
index a5745f4..baec0ff 100644
--- a/src/page/register/index.vue
+++ b/src/page/register/index.vue
@@ -93,7 +93,6 @@
 import img1 from "../../assets/image/slider/1.png";
 import img2 from "../../assets/image/slider/2.png";
 import { getStorage } from "@/utils/utis";
-import { log } from "qrcode/lib/core/galois-field";
 // /sendVerifyCode
 export default {
   props: {},
@@ -247,22 +246,12 @@
       }
       this.show = true;
     },
-    changeIndex(index) {
-      this.activeIndex = index;
-      switch (index) {
-        case 0:
-        case 1: {
-          this.isArea = false;
-          break;
-        }
-        case 2: {
-          this.isArea = true;
-          break;
-        }
-      }
-    },
+
     async registerApi() {
       this.$store.state.user.userInfo.token = undefined;
+      await AxiosuserCenter.invitationCode({
+        code: this.form.usercode,
+      });
       Axios.registerUser({
         username: this.form.email,
         password: this.form.password,
diff --git a/src/request/httpAxios.js b/src/request/httpAxios.js
index 09e2557..e4129a4 100644
--- a/src/request/httpAxios.js
+++ b/src/request/httpAxios.js
@@ -7,8 +7,8 @@
 axios.defaults.headers.post["Content-Type"] =
   "application/x-www-form-urlencoded";
 
-let baseUrl = "https://stock.niveshnav.com/wap/";
-// let baseUrl = "http://192.168.0.105:18080/wap/";
+// let baseUrl = "https://stock.niveshnav.com/wap/";
+let baseUrl = "http://192.168.0.105:18080/wap/";
 
 // 创建
 const request = axios.create({

--
Gitblit v1.9.3