From a0b5604fcefa0c7900ecc50830b718f77bba8f39 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期五, 15 七月 2022 14:43:40 +0800
Subject: [PATCH] add cluster pwd

---
 src/views/index/index.vue |   51 +++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 39 insertions(+), 12 deletions(-)

diff --git a/src/views/index/index.vue b/src/views/index/index.vue
index d20f751..2157312 100644
--- a/src/views/index/index.vue
+++ b/src/views/index/index.vue
@@ -12,11 +12,11 @@
       <li
         v-for="(item, index) in bannerList"
         :key="index"
-        @click="toggleBanner(index + 1)"
+        @click="toggleBanner(index)"
       >
         <button
           class="inner"
-          :class="{ active: activeBanner == index + 1 }"
+          :class="{ active: activeBanner == index }"
         ></button>
       </li>
     </ul>
@@ -26,7 +26,7 @@
         <!-- 鎺ㄨ崘鍗$墖 -->
         <commendCard :commendCardData="commendCardData"></commendCard>
         <!-- 鐢ㄦ埛card -->
-        <userCard></userCard>
+        <userCard :userCardArr="userCardArr"></userCard>
       </div>
     </div>
 
@@ -115,6 +115,7 @@
   getIndexModelRecommend,
   getModelList,
 } from "@/api/product";
+import { getUserOrderInfo } from "@/api/order";
 
 export default {
   name: "Index",
@@ -136,6 +137,7 @@
     this.getBanner();
     this.getRecommend();
     this.getModule();
+    this.getUserBuyInfo();
   },
   data() {
     return {
@@ -159,10 +161,11 @@
           router: "/trialCenter",
         },
       ], //鎺ㄨ崘鍗$墖鏁版嵁
-      activeBanner: 1, //閫変腑鐨刡anner
+      activeBanner: 0, //閫変腑鐨刡anner
       activeCommend: 3, //閫変腑鐨勬帹鑽恡abs
       commendData: [], //鎺ㄨ崘tab鐨勬暟鎹�
       productData: [],
+      userCardArr: [],
       productData1: [
         {
           router: "/",
@@ -209,12 +212,14 @@
           typeId: 2,
           pic: "/images/index/杈圭紭璁$畻璁惧.png",
           name: "杈圭紭璁$畻璁惧",
-          desc: "涓�绉嶉儴缃插湪杩戝満渚х殑楂樺彲鐢ㄧ殑杞‖涓�浣撲骇鍝侊紝鎻愬崌搴旂敤绋嬪簭鐨勫揩閫熷搷搴旇兘鍔涖�佽妭鐪佸甫瀹芥祦閲忔垚鏈�",
+          desc:
+            "涓�绉嶉儴缃插湪杩戝満渚х殑楂樺彲鐢ㄧ殑杞‖涓�浣撲骇鍝侊紝鎻愬崌搴旂敤绋嬪簭鐨勫揩閫熷搷搴旇兘鍔涖�佽妭鐪佸甫瀹芥祦閲忔垚鏈�",
           product: [
             {
               name: "杈圭紭璁$畻璁惧1",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -238,7 +243,8 @@
             {
               name: "杈圭紭璁$畻璁惧2",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -262,7 +268,8 @@
             {
               name: "杈圭紭璁$畻璁惧3",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -286,7 +293,8 @@
             {
               name: "杈圭紭璁$畻璁惧4",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -310,7 +318,8 @@
             {
               name: "杈圭紭璁$畻璁惧5",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -334,7 +343,8 @@
             {
               name: "杈圭紭璁$畻璁惧6",
               title: "LE-V-S003 楂樻�ц兘杈圭紭璁$畻涓绘満",
-              des: "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
+              des:
+                "涓撲负楂樻�ц兘瑙嗛搴旂敤鎵撻�狅紝寮烘倣鐨勫弻蹇楀己澶勭悊鍣紝杞绘澗搴斿楂樼畻鍔涘簲鐢ㄥ満鏅殑闇�姹傘��",
               content: [
                 {
                   key: "鐗圭偣",
@@ -364,6 +374,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;
@@ -397,7 +425,6 @@
       this.activeCommend = id;
       this.getRecommend();
     },
-   
   },
   beforeRouteLeave(to, from, next) {
     let userInfo = sessionStorage.getItem("userInfo");

--
Gitblit v1.8.0