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/api/order.ts | 7 +++++++ src/views/index/components/userCard.vue | 3 ++- src/views/index/index.vue | 44 ++++++++++++++++++++++++++++++++++++-------- 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/src/api/order.ts b/src/api/order.ts index 740ac42..5178063 100644 --- a/src/api/order.ts +++ b/src/api/order.ts @@ -18,6 +18,13 @@ data: params }); }; +export const getUserOrderInfo = (params: any) => { + return request({ + url: "/saas/api-s/saasOrder/getUserOrderInfo", + method: "post", + data: params + }); +}; /* 鍙栨秷璁㈠崟 diff --git a/src/views/index/components/userCard.vue b/src/views/index/components/userCard.vue index c7eb57c..1ac012f 100644 --- a/src/views/index/components/userCard.vue +++ b/src/views/index/components/userCard.vue @@ -25,6 +25,7 @@ <script> export default { props: { + userBuyInfo:Object, userCardArr: { type: Array, default: () => { @@ -35,7 +36,7 @@ }, { num: "_", - label: "寰呮秷璐�", + label: "寰呯画璐�", }, { num: "_", 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