From 07d14cf6edbef9436aa5909bcb6b2329ecc6f9a2 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期五, 15 七月 2022 14:44:44 +0800
Subject: [PATCH] 禅道bug

---
 src/views/index/index.vue |  128 +++++++++++++++++++++++++++++-------------
 1 files changed, 88 insertions(+), 40 deletions(-)

diff --git a/src/views/index/index.vue b/src/views/index/index.vue
index abe630c..5556fe2 100644
--- a/src/views/index/index.vue
+++ b/src/views/index/index.vue
@@ -8,25 +8,27 @@
     <div class="bannerLink" @click="jump"></div>
 
     <!-- 杞挱鍥炬帶鍒跺櫒 -->
-    <ul class="bannerControl">
-      <li
-        v-for="(item, index) in bannerList"
-        :key="index"
-        @click="toggleBanner(index)"
-      >
-        <button
-          class="inner"
-          :class="{ active: activeBanner == index }"
-        ></button>
-      </li>
-    </ul>
+    <div class="bannerControl">
+      <ul>
+        <li
+          v-for="(item, index) in bannerList"
+          :key="index"
+          @click="toggleBanner(index)"
+        >
+          <button
+            class="inner"
+            :class="{ active: activeBanner == index }"
+          ></button>
+        </li>
+      </ul>
+    </div>
 
     <div class="overCard">
       <div class="heart">
         <!-- 鎺ㄨ崘鍗$墖 -->
         <commendCard :commendCardData="commendCardData"></commendCard>
         <!-- 鐢ㄦ埛card -->
-        <userCard></userCard>
+        <userCard :userCardArr="userCardArr"></userCard>
       </div>
     </div>
 
@@ -39,7 +41,7 @@
           :class="{ active: activeCommend === 3 }"
           @click="selecTab(3)"
         >
-          <img src="/images/index/绠楁硶.png" alt="" />
+          <img src="/images/index/sdk.png" alt="" />
           <div class="label">绠楁硶</div>
         </div>
 
@@ -48,7 +50,7 @@
           :class="{ active: activeCommend === 4 }"
           @click="selecTab(4)"
         >
-          <img src="/images/index/搴旂敤.png" alt="" />
+          <img src="/images/index/app.png" alt="" />
           <div class="label">搴旂敤</div>
         </div>
       </div>
@@ -115,6 +117,7 @@
   getIndexModelRecommend,
   getModelList,
 } from "@/api/product";
+import { getUserOrderInfo } from "@/api/order";
 
 export default {
   name: "Index",
@@ -136,24 +139,25 @@
     this.getBanner();
     this.getRecommend();
     this.getModule();
+    this.getUserBuyInfo();
   },
   data() {
     return {
       commendCardData: [
         {
-          img: "/images/index/鍏ㄦ皯浜戣绠�.png",
+          img: "/images/index/compute.png",
           title: "鍏ㄦ皯浜戣绠�",
-          des: "浜戞湇鍔$壒鎯狅紝闄愭椂3鎶樿捣锛屼綆鑷�659鍏�/3骞�",
+          des: "浜戞湇鍔$壒鎯狅紝闄愭椂3鎶樿捣",
           router: "/",
         },
         {
-          img: "/images/index/鍞墠鍜ㄨ.png",
+          img: "/images/index/beforeSell.png",
           title: "鍞墠鍜ㄨ",
           des: "鑷寸數0315-2233066锛岄鍙栨偍鐨勪笓灞炴潈鐩�",
           router: "/",
         },
         {
-          img: "/images/index/璇曠敤涓績.png",
+          img: "/images/index/trialCenter.png",
           title: "璇曠敤涓績",
           des: "绠楁硶鍏嶈垂璇曠敤锛屼负鎮ㄦ彁渚� 0 闂ㄦ瀹炶返鏈轰細",
           router: "/trialCenter",
@@ -163,11 +167,12 @@
       activeCommend: 3, //閫変腑鐨勬帹鑽恡abs
       commendData: [], //鎺ㄨ崘tab鐨勬暟鎹�
       productData: [],
+      userCardArr: [],
       productData1: [
         {
           router: "/",
           typeId: 1,
-          pic: "/images/index/浜戞湇鍔�.png",
+          pic: "/images/index/modelbgc2.png",
           name: "浜戞湇鍔�",
           desc: "涓�閿喘涔帮紝寮�鍚疉I搴旂敤涔嬫梾",
           product: {
@@ -207,14 +212,16 @@
         {
           router: "/",
           typeId: 2,
-          pic: "/images/index/杈圭紭璁$畻璁惧.png",
+          pic: "/images/index/modelbgc.png",
           name: "杈圭紭璁$畻璁惧",
-          desc: "涓�绉嶉儴缃插湪杩戝満渚х殑楂樺彲鐢ㄧ殑杞‖涓�浣撲骇鍝侊紝鎻愬崌搴旂敤绋嬪簭鐨勫揩閫熷搷搴旇兘鍔涖�佽妭鐪佸甫瀹芥祦閲忔垚鏈�",
+          desc:
+            "涓�绉嶉儴缃插湪杩戝満渚х殑楂樺彲鐢ㄧ殑杞‖涓�浣撲骇鍝侊紝鎻愬崌搴旂敤绋嬪簭鐨勫揩閫熷搷搴旇兘鍔涖�佽妭鐪佸甫瀹芥祦閲忔垚鏈�",
           product: [
             {
               name: "杈圭紭璁$畻璁惧1",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -233,12 +240,13 @@
                   ],
                 },
               ],
-              img: "/images/index/璁惧鍥�.png",
+              img: "/images/index/equipment.png",
             },
             {
               name: "杈圭紭璁$畻璁惧2",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -257,12 +265,13 @@
                   ],
                 },
               ],
-              img: "/images/index/璁惧鍥�.png",
+              img: "/images/index/equipment.png",
             },
             {
               name: "杈圭紭璁$畻璁惧3",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -281,12 +290,13 @@
                   ],
                 },
               ],
-              img: "/images/index/璁惧鍥�.png",
+              img: "/images/index/equipment.png",
             },
             {
               name: "杈圭紭璁$畻璁惧4",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -305,12 +315,13 @@
                   ],
                 },
               ],
-              img: "/images/index/璁惧鍥�.png",
+              img: "/images/index/equipment.png",
             },
             {
               name: "杈圭紭璁$畻璁惧5",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -329,12 +340,13 @@
                   ],
                 },
               ],
-              img: "/images/index/璁惧鍥�.png",
+              img: "/images/index/equipment.png",
             },
             {
               name: "杈圭紭璁$畻璁惧6",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -353,7 +365,7 @@
                   ],
                 },
               ],
-              img: "/images/index/璁惧鍥�.png",
+              img: "/images/index/equipment.png",
             },
           ],
         },
@@ -364,6 +376,24 @@
     };
   },
   methods: {
+    getUserBuyInfo() {
+      getUserOrderInfo({}).then((res) => {
+        this.userCardArr = [
+          {
+            num: res.data.needPay,
+            label: "寰呬粯娆�",
+          },
+          {
+            num: res.data.needRenewal,
+            label: "寰呯画璐�",
+          },
+          {
+            num: "_",
+            label: "娑堟伅涓績",
+          },
+        ];
+      });
+    },
     // 鍒囨崲banner
     toggleBanner(i) {
       this.activeBanner = i;
@@ -378,7 +408,9 @@
     },
     //杞挱鍥捐烦杞繛鎺�
     jump() {
-      window.open(this.bannerList[this.activeBanner - 1].url);
+      if (this.bannerList[this.activeBanner].url) {
+        window.open(this.bannerList[this.activeBanner].url);
+      }
     },
     //鑾峰彇鎺ㄨ崘鍒楄〃
     async getRecommend() {
@@ -421,14 +453,22 @@
   .bannerControl {
     position: absolute;
     width: 1280px;
-    height: 24px;
+    height: calc(28.18vw - 92px);
+    min-height: 278px;
     bottom: 80px;
-    top: 462px;
+    top: 62px;
     left: 0;
     right: 0;
     transform: none;
     margin: 0 auto;
     z-index: 2;
+
+    ul {
+      position: absolute;
+      bottom: 0;
+      right: 0;
+      left: 0;
+    }
 
     li {
       display: inline-block;
@@ -461,16 +501,24 @@
     top: 60px;
     position: absolute;
     width: 100%;
-    height: 410px;
+    height: calc(28.18vw - 132px);
+    min-height: 236px;
     cursor: pointer;
+    z-index: 3;
   }
 
   .overCard {
     position: absolute;
-    top: 394px;
+    height: calc(28.18vw + 38px);
+    min-height: 408px;
     width: 100%;
+    top: 62px;
 
     .heart {
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      right: 0;
       display: flex;
       width: 1280px;
       margin: 0 auto;
@@ -530,7 +578,7 @@
   }
 
   .product {
-    background: url("/images/index/鑳屾櫙.png");
+    background: url("/images/index/background.png");
     overflow: hidden;
     min-width: 1280px;
 

--
Gitblit v1.8.0