diff --git a/yunshop-front-master/src/views/member/tool/my_relationship_v2.vue b/yunshop-front-master/src/views/member/tool/my_relationship_v2.vue index d265a45..3460478 100644 --- a/yunshop-front-master/src/views/member/tool/my_relationship_v2.vue +++ b/yunshop-front-master/src/views/member/tool/my_relationship_v2.vue @@ -19,7 +19,7 @@ 我的市场 - {{ myReferral.uid }} @@ -59,7 +59,7 @@
昵称:{{ my_referral_parents.nickname }}
- <!– 会员ID: –> + {{ my_referral_parents.uid }}
@@ -102,22 +102,23 @@

{{agent.agent_order_count?agent.agent_order_count:"客户总订单"}}({{ $i18n.t("元") }})

{{ myReferral.team_order_money }}

-
+
注:所有数据为截至到昨天汇总数据!
订单数、订单总额统计{{member_order_status*1 ? '已支付' : '已完成'}}的订单数据
- --> +
+ @@ -335,6 +336,78 @@
+
+ + +
+ +
+ +
+
+
+ +
+ +
+
+ +
    +
  • +
    + {{ item.nickname }} +
    +
    + {{ item.id }} +
    +
  • +
  • + {{item.realname}} +
  • +
  • + {{ item.createtime }} +
  • +
+
+
+
+ +
+
+ +
+
+
+
+
    +
  • 订单数:{{ item.child_order_total }}个
  • +
  • {{name}}数量:{{ item.team_total }}个
  • + +
+
    +
  • 订单总额:{{ item.child_order_money }}{{ $i18n.t("元") }}
  • +
  • {{name}}订单:{{ item.team_order_money }}{{ $i18n.t("元") }}
  • + +
+
+
+
+ +
diff --git a/yunshop-front-master/src/views/member/tool/my_relationship_v2_controller.js b/yunshop-front-master/src/views/member/tool/my_relationship_v2_controller.js index c29006f..f3f1c80 100644 --- a/yunshop-front-master/src/views/member/tool/my_relationship_v2_controller.js +++ b/yunshop-front-master/src/views/member/tool/my_relationship_v2_controller.js @@ -7,6 +7,7 @@ import Modal from "components/modal"; var currentTabIndex = "0"; //标记 防止重复加载 +var is_all_content = false; var is_first_content = false; var is_second_content = false; var is_third_content = false; @@ -40,11 +41,13 @@ export default { self_info:'', total: 0, + level0: '', level1: '', level2: '', level3: '', activeName: "first", + all_content: [], first_content: [], second_content: [], third_content: [], @@ -64,13 +67,15 @@ export default { filterSort: -1, filterLevelData: [], filterLeveSort: -1, + level0_page: 0, level1_page: 0, level2_page: 0, level3_page: 0, - + btnShow0: true, btnShow1: true, btnShow2: true, btnShow3: true, + keyword0:'', keyword1:'', keyword2:'', keyword3:'', @@ -120,6 +125,7 @@ export default { initData() { currentTabIndex = "0"; + is_all_content = false; is_first_content = false; is_second_content = false; is_third_content = false; @@ -129,11 +135,13 @@ export default { this.my_referral_parents = {}; this.self_info = ''; this.total = 0; + this.level0 = { level: "全部", total: 0 }; this.level1 ={ level: "一级", total: 0 }; this.level2 = { level: "二级", total: 0 }; this.level3 = { level: "三级", total: 0 }; this.activeName = "first"; + this.all_content = []; this.first_content = []; this.second_content = []; this.third_content = []; @@ -154,24 +162,23 @@ export default { this.isShowClient=false; this.show_parents = 0; - - // this.level1_page=0; - // this.level2_page=0; - // this.level3_page=0; - }, pageInit() { + this.level0_page = 0; this.level1_page = 0; this.level2_page = 0; this.level3_page = 0; + this.all_content = []; this.first_content = []; this.second_content = []; this.third_content = []; + this.btnShow0 = true; this.btnShow1 = true; this.btnShow2 = true; this.btnShow3 = true; + this.keyword0 = ''; this.keyword1 = ''; this.keyword2 = ''; this.keyword3 = ''; @@ -203,7 +210,7 @@ export default { that.new_content = []; that.is_link = response.data.is_link || false; - that.getData(response.data.agent_data); + that.getData();// response.data.agent_data that.member_order_status = response.data.set.member_order_status; } else { Toast(response.msg); @@ -234,9 +241,11 @@ export default { // console.log(response,'打印response') // if (response.result == 1) { that.total = data.total; + that.level0 = data.level0 || {}; that.level1 = data.level1; that.level2 = data.level2; that.level3 = data.level3; + if (!that.fun.isTextEmpty(that.level1) && that.level1.is_show) { that.activeName = "first"; currentTabIndex = "0"; @@ -258,10 +267,12 @@ export default { return; } - // } - // }, function (response) { - // - // }); + if (!that.fun.isTextEmpty(that.level0) && that.level0.is_show) { + that.activeName = "all"; + currentTabIndex = "-1"; + that.setDataByTabIndex();//获取数据 + return; + } }, openPop() { @@ -298,6 +309,13 @@ export default { this.page = 1; this.total_page = 0; switch (currentTabIndex) { + case "-1": + that.relationLevel = "0"; + page = 1; + that.level0_page = page; + that.btnShow0 = true; + keyword = that.keyword0; + break; case "0": that.relationLevel = "1"; page = 1; @@ -341,6 +359,9 @@ export default { that.total_page = response.data.last_page; that.page = response.data.current_page; switch (currentTabIndex) { + case "-1": + that.level0.total = response.data.total; + break; case "0": that.level1.total = response.data.total; break; @@ -391,6 +412,11 @@ export default { if (flag) { this.getData(); } + }else if (currentTabIndex == "-1" && !is_all_content) { + is_all_content = true; + this.relationLevel = "0"; + + if (flag) this.getData(); } }, @@ -410,6 +436,9 @@ export default { case "third": index = "2"; break; + case "all": + index = "-1"; + break; default: break; @@ -571,6 +600,11 @@ export default { // var level_content = []; //var appendto switch (currentTabIndex) { + case "-1": + that.relationLevel = "0"; + page = that.level0_page + 1; + that.level0_page = page; + break; case "0": that.relationLevel = "1"; page = that.level1_page + 1; @@ -638,6 +672,9 @@ export default { }, hidebutton() { switch (currentTabIndex) { + case "-1": + this.btnShow0 = false; + break; case "0": this.btnShow1 = false; break; @@ -658,6 +695,13 @@ export default { var page = 1; let keyword = ''; switch (currentTabIndex) { + case "-1": + that.relationLevel = "0"; + page = 1; + that.level0_page = page; + that.btnShow0 = true; + keyword = that.keyword0; + break; case "0": that.relationLevel = "1"; page = 1; @@ -722,6 +766,9 @@ export default { }, }, computed:{ + labelValue0(){ + return `${this.title0 || this.level0.level}(${this.level0.total}人)`; + }, labelValue1(){ return `${this.title1 || this.level1.level}(${this.level1.total}人)`; },