From fd3acb28d3907caec733cbf270e687859902727c Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期一, 11 七月 2022 18:21:09 +0800 Subject: [PATCH] user order count --- src/views/index/index.vue | 44 ++++++++++++++++++++++++++++++++++++-------- 1 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/views/index/index.vue b/src/views/index/index.vue index abe630c..2157312 100644 --- a/src/views/index/index.vue +++ b/src/views/index/index.vue @@ -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 { @@ -163,6 +165,7 @@ 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; -- Gitblit v1.8.0