shish пре 5 година
родитељ
комит
c457b94ed9
1 измењених фајлова са 28 додато и 3 уклоњено
  1. 28 3
      ghsApp/src/admin/home/member.vue

+ 28 - 3
ghsApp/src/admin/home/member.vue

@@ -1,5 +1,14 @@
 <template>
 <template>
   <div class="app-main app-content">
   <div class="app-main app-content">
+    <app-tabs
+      :tabs="tabs"
+      :isFixed="true"
+      :currentTab="tabIndex"
+      :height="100"
+      @change="change"
+      itemWidth="50%"
+      :isAdd="true"
+    />
     <block v-if="!$util.isEmpty(list.data)">
     <block v-if="!$util.isEmpty(list.data)">
       <block v-for="(item, index) in list.data" :key="index">
       <block v-for="(item, index) in list.data" :key="index">
         <tui-list-cell
         <tui-list-cell
@@ -82,7 +91,17 @@ export default {
   mixins: [list],
   mixins: [list],
   data() {
   data() {
     return {
     return {
-      tabIndex: 0
+      tabIndex: 0,
+      tabs: [
+        {
+          name: "全部",
+          value: 0
+        },
+        {
+          name: "会员",
+          value: 0
+        }
+      ]
     };
     };
   },
   },
   onPullDownRefresh() {
   onPullDownRefresh() {
@@ -109,7 +128,9 @@ export default {
     },
     },
     // 列表
     // 列表
     _list() {
     _list() {
-      return getList({
+      let type = JSON.parse(JSON.stringify(this.tabIndex));
+      type = type == 0 ? -1 : type;
+		return getList({
         search: "",
         search: "",
         page: this.list.page,
         page: this.list.page,
         ...this.form,
         ...this.form,
@@ -118,6 +139,10 @@ export default {
         if (this.$util.isEmpty(res.data)){
         if (this.$util.isEmpty(res.data)){
           return false;
           return false;
         }
         }
+
+        this.tabs[0].value = res.data.allNum;
+        this.tabs[1].value = res.data.isOpenNum;
+
       });
       });
     },
     },
     change(e) {
     change(e) {
@@ -141,7 +166,7 @@ export default {
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .app-content {
 .app-content {
-  padding-top: 22rpx;
+  padding-top: 120px;
   padding-bottom: 20px;
   padding-bottom: 20px;
 }
 }
 .tabs-wrap {
 .tabs-wrap {