Sfoglia il codice sorgente

Merge branch 'master' of http://git.huaml.com/zhh/front-end into module_s

fuwei 5 anni fa
parent
commit
5ae4937faa

+ 280 - 265
ghs/src/admin/ad/list.vue

@@ -1,73 +1,88 @@
 <template>
-  <div class="app-content">
-    <app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" @change="change" itemWidth="50%" />
-    <div class="list-wrap">
-      <block v-if="!$util.isEmpty(list.data)">
-        <div class="list" v-for="(item, index) in list.data" :key="index">
-          <div class="list-img">
-            <app-img height="100%" mode :src="item.adImgUrl | default_img" alt="广告图片" />
-          </div>
-          <div class="list-right">
-            <div class="app-size-28 app-color-0">{{ item.adName }}</div>
-            <div v-if="item.endTime == '4102416000'">永久有效</div>
-            <div v-else>{{ item.endTime | formatTime }} 到期</div>
-            <div class="list-option">
-              <div>
-                <div>
-                  <span>状态:</span>
-                  <span
-                    :style="{color: item.status == 1 ? '#09BB07' : '#FF0000'}"
-                  >{{ item.status == 1 ? '启用' : '禁用'}}</span>
-                </div>
-              </div>
-              <div class="operate-icon-wrap">
-                <div class="operate-icon" @click="operateFn(item, index)">
-                  <i
-                    class="iconfont"
-                    :class="[ operateIndex == index ? 'iconcaozuojihuo' : 	'iconcaozuo']"
-                    style="font-size:48rpx;"
-                  ></i>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-        <!-- 操作 -->
-        <operate-module
-          @clickFn="operateList"
-          v-if="operateShow"
-          :top="operateTop"
-          :right="30"
-          :btnData="btnData"
-        />
-      </block>
-      <block v-else>
-        <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
-      </block>
-    </div>
-    <!-- 按钮 -->
-    <div class="app-footer">
-      <div
-        class="admin-button-com middle blue"
-        @click="pageTo({
-				url: '/admin/ad/add',
-				query: {
-					type: tabIndex
-				}
-			})"
-      >添加</div>
-    </div>
-    <!-- 删除提示 -->
-    <modal-module
-      :show="delModal"
-      @cancel="modalCancel"
-      @click="delModalClick"
-      content="确定删除该广告吗?"
-      color="#333"
-      :size="32"
-      padding="30rpx 30rpx"
-    ></modal-module>
-  </div>
+	<div class="app-content">
+		<app-tabs
+			:tabs="tabs"
+			:isFixed="true"
+			:currentTab="tabIndex"
+			@change="change"
+			itemWidth="50%"
+		/>
+		<div class="list-wrap">
+			<block v-if="!$util.isEmpty(list.data)">
+				<div class="list" v-for="(item, index) in list.data" :key="index">
+					<div class="list-img">
+						<app-img
+							height="100%"
+							mode
+							:src="item.adImgUrl | default_img"
+							alt="广告图片"
+						/>
+					</div>
+					<div class="list-right">
+						<div class="app-size-28 app-color-0">{{ item.adName }}</div>
+						<div v-if="item.endTime == '4102416000'">永久有效</div>
+						<div v-else>{{ item.endTime | formatTime }} 到期</div>
+						<div class="list-option">
+							<div>
+								<div>
+									<span>状态:</span>
+									<span :style="{ color: item.status == 1 ? '#09BB07' : '#FF0000' }">{{
+										item.status == 1 ? "启用" : "禁用"
+									}}</span>
+								</div>
+							</div>
+							<div class="operate-icon-wrap">
+								<div class="operate-icon" @click="operateFn(item, index)">
+									<i
+										class="iconfont"
+										:class="[operateIndex == index ? 'iconcaozuojihuo' : 'iconcaozuo']"
+										style="font-size:48rpx;"
+									></i>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+				<!-- 操作 -->
+				<operate-module
+					@clickFn="operateList"
+					v-if="operateShow"
+					:top="operateTop"
+					:right="30"
+					:btnData="btnData"
+				/>
+			</block>
+			<block v-else>
+				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+			</block>
+		</div>
+		<!-- 按钮 -->
+		<div class="app-footer">
+			<div
+				class="admin-button-com middle blue"
+				@click="
+					pageTo({
+						url: '/admin/ad/add',
+						query: {
+							type: tabIndex
+						}
+					})
+				"
+			>
+				添加
+			</div>
+		</div>
+		<!-- 删除提示 -->
+		<modal-module
+			:show="delModal"
+			@cancel="modalCancel"
+			@click="delModalClick"
+			content="确定删除该广告吗?"
+			color="#333"
+			:size="32"
+			padding="30rpx 30rpx"
+		></modal-module>
+	</div>
 </template>
 
 <script>
@@ -80,211 +95,211 @@ import { list } from "@/mixins";
 // api
 import { getList, del, updateStatus } from "@/api/ad";
 export default {
-  name: "ad-list",
-  components: {
-    AppTabs,
-    OperateModule,
-    AppWrapperEmpty,
-    ModalModule,
-    AppImg
-  },
-  mixins: [list],
-  data() {
-    return {
-      tabIndex: 0,
-      tabs: [
-        {
-          name: "门店轮播图"
-        },
-        {
-          name: "商城首页轮播图"
-        }
-      ],
-      // 操作菜单
-      operateData: {},
-      operateShow: false,
-      operateIndex: null,
-      operateTop: 0,
-      // 删除弹窗
-      delModal: false
-    };
-  },
-  computed: {
-    btnData() {
-      return [
-        {
-          text: "编辑",
-          icon: "iconbianji",
-          click: () => {
-            this.$util.pageTo({
-              url: "/admin/ad/add",
-              query: {
-                type: this.tabIndex,
-                id: this.operateData.id
-              }
-            });
-          }
-        },
-        {
-          text: this.operateData.status == 1 ? "下架" : "启用",
-          icon: this.operateData.status == 1 ? "iconxiajia" : "iconqiyong",
-          click: () => {
-            this.changeStatusFn();
-          }
-        },
-        {
-          text: "删除",
-          icon: "iconshanchu1",
-          click: () => {
-            this.delModal = true;
-          }
-        }
-      ];
-    }
-  },
-  onPullDownRefresh() {
-    this.resetList();
-    this._list().then(res => {
-      uni.stopPullDownRefresh();
-    });
-  },
-  onReachBottom() {
-    if (!this.list.finished) {
-      this._list().then(res => {
-        uni.stopPullDownRefresh();
-      });
-    } else {
-      uni.stopPullDownRefresh();
-    }
-  },
-  onLoad() {
-    // this.init()
-  },
-  methods: {
-    operateList(index) {
-      if (index === 0) {
-        this.$util.pageTo({
-          url: "/admin/ad/add",
-          query: {
-            type: this.tabIndex,
-            id: this.operateData.id
-          }
-        });
-        this.operateCloseFn();
-      } else if (index === 1) {
-        this.changeStatusFn();
-      } else if (index === 2) {
-        this.delModal = true;
-      }
-    },
-    async init() {
-      this._list();
-    },
-    _list() {
-      return getList({ type: this.tabIndex }).then(res => {
-        this.completes(res);
-      });
-    },
-    change(e) {
-      if (this.tabIndex == e.index) {
-        return false;
-      } else {
-        this.tabIndex = e.index;
-        this.operateCloseFn();
-        this.resetList();
-        this._list();
-      }
-    },
-    // 操作按钮
-    operateFn(item, index) {
-      if (this.operateIndex == index) {
-        this.operateCloseFn();
-      } else {
-        this.operateData = item;
-        this.operateData.index = index;
-        this.operateIndex = index;
-        this.operateTop = (index + 1) * 214;
-        this.operateShow = true;
-      }
-    },
-    // 关闭操作按钮
-    operateCloseFn() {
-      this.operateData = {};
-      this.operateIndex = null;
-      this.operateShow = false;
-    },
-    // 删除弹窗
-    modalCancel() {
-      this.delModal = false;
-    },
-    delModalClick(e) {
-      let index = e.index;
-      if (index === 0) {
-        this.modalCancel();
-      } else {
-        del({ id: this.operateData.id }).then(res => {
-          this.modalCancel();
-          this.operateCloseFn();
-          this.$msg("删除成功!");
-          this.resetList();
-          this._list();
-        });
-      }
-    },
-    changeStatusFn() {
-      let status = this.operateData.status == 1 ? 0 : 1;
-      updateStatus({ id: this.operateData.id, status: status }).then(res => {
-        this.list.data[this.operateData.index].status = status;
-        this.operateCloseFn();
-        this.$msg("操作成功!");
-      });
-    }
-  }
+	name: "ad-list",
+	components: {
+		AppTabs,
+		OperateModule,
+		AppWrapperEmpty,
+		ModalModule,
+		AppImg
+	},
+	mixins: [list],
+	data() {
+		return {
+			tabIndex: 0,
+			tabs: [
+				{
+					name: "门店轮播图"
+				},
+				{
+					name: "商城首页轮播图"
+				}
+			],
+			// 操作菜单
+			operateData: {},
+			operateShow: false,
+			operateIndex: null,
+			operateTop: 0,
+			// 删除弹窗
+			delModal: false
+		};
+	},
+	computed: {
+		btnData() {
+			return [
+				{
+					text: "编辑",
+					icon: "iconbianji",
+					click: () => {
+						this.$util.pageTo({
+							url: "/admin/ad/add",
+							query: {
+								type: this.tabIndex,
+								id: this.operateData.id
+							}
+						});
+					}
+				},
+				{
+					text: this.operateData.status == 1 ? "下架" : "启用",
+					icon: this.operateData.status == 1 ? "iconxiajia" : "iconqiyong",
+					click: () => {
+						this.changeStatusFn();
+					}
+				},
+				{
+					text: "删除",
+					icon: "iconshanchu1",
+					click: () => {
+						this.delModal = true;
+					}
+				}
+			];
+		}
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this._list().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onReachBottom() {
+		if (!this.list.finished) {
+			this._list().then(res => {
+				uni.stopPullDownRefresh();
+			});
+		} else {
+			uni.stopPullDownRefresh();
+		}
+	},
+	onLoad() {
+		// this.init()
+	},
+	methods: {
+		operateList(index) {
+			if (index === 0) {
+				this.$util.pageTo({
+					url: "/admin/ad/add",
+					query: {
+						type: this.tabIndex,
+						id: this.operateData.id
+					}
+				});
+				this.operateCloseFn();
+			} else if (index === 1) {
+				this.changeStatusFn();
+			} else if (index === 2) {
+				this.delModal = true;
+			}
+		},
+		async init() {
+			this._list();
+		},
+		_list() {
+			return getList({ type: this.tabIndex }).then(res => {
+				this.completes(res);
+			});
+		},
+		change(e) {
+			if (this.tabIndex == e.index) {
+				return false;
+			} else {
+				this.tabIndex = e.index;
+				this.operateCloseFn();
+				this.resetList();
+				this._list();
+			}
+		},
+		// 操作按钮
+		operateFn(item, index) {
+			if (this.operateIndex == index) {
+				this.operateCloseFn();
+			} else {
+				this.operateData = item;
+				this.operateData.index = index;
+				this.operateIndex = index;
+				this.operateTop = (index + 1) * 214;
+				this.operateShow = true;
+			}
+		},
+		// 关闭操作按钮
+		operateCloseFn() {
+			this.operateData = {};
+			this.operateIndex = null;
+			this.operateShow = false;
+		},
+		// 删除弹窗
+		modalCancel() {
+			this.delModal = false;
+		},
+		delModalClick(e) {
+			let index = e.index;
+			if (index === 0) {
+				this.modalCancel();
+			} else {
+				del({ id: this.operateData.id }).then(res => {
+					this.modalCancel();
+					this.operateCloseFn();
+					this.$msg("删除成功!");
+					this.resetList();
+					this._list();
+				});
+			}
+		},
+		changeStatusFn() {
+			let status = this.operateData.status == 1 ? 0 : 1;
+			updateStatus({ id: this.operateData.id, status: status }).then(res => {
+				this.list.data[this.operateData.index].status = status;
+				this.operateCloseFn();
+				this.$msg("操作成功!");
+			});
+		}
+	}
 };
 </script>
 
 <style lang="scss" scoped>
 .app-content {
-  min-height: calc(100vh - 200px);
-  padding-top: 100px;
-  padding-bottom: 100px;
+	min-height: calc(100vh - 200px);
+	padding-top: 100px;
+	padding-bottom: 100px;
 }
 .list-wrap {
-  width: 100%;
-  position: relative;
-  background-color: #fff;
-  .list {
-    @include disFlex(center, flex-start);
-    padding: 20px 30px;
-    .list-img {
-      width: 300px;
-      height: 168px;
-      & img {
-        height: 100% !important;
-      }
-    }
-    .list-right {
-      width: calc(100% - 320px);
-      color: $fontColor3;
-      margin-left: 20px;
-      & > div {
-        margin-top: 20px;
-        &:first-child {
-          margin-top: 0;
-        }
-      }
-      .list-option {
-        @include disFlex(flex-end, space-between);
-      }
-    }
-  }
+	width: 100%;
+	position: relative;
+	background-color: #fff;
+	.list {
+		@include disFlex(center, flex-start);
+		padding: 20px 30px;
+		.list-img {
+			width: 300px;
+			height: 168px;
+			& img {
+				height: 100% !important;
+			}
+		}
+		.list-right {
+			width: calc(100% - 320px);
+			color: $fontColor3;
+			margin-left: 20px;
+			& > div {
+				margin-top: 20px;
+				&:first-child {
+					margin-top: 0;
+				}
+			}
+			.list-option {
+				@include disFlex(flex-end, space-between);
+			}
+		}
+	}
 }
 // 按钮
 .app-footer {
-  justify-content: flex-end;
-  .admin-button-com {
-    width: 160px;
-    margin-right: 30px;
-  }
+	justify-content: flex-end;
+	.admin-button-com {
+		width: 160px;
+		margin-right: 30px;
+	}
 }
 </style>

+ 6 - 6
ghs/src/api/inventory/index.js

@@ -3,41 +3,41 @@ import https from "@/plugins/luch-request_0.0.7/request";
 /** *
  * 盘点列表
  */
-export const getCheckOrderListApi = status => {
+export const getCheckOrderListApi = async status => {
 	return https.get("/check-order/list", { status });
 };
 
 /** *
  * 编辑草稿 ,保存入库
  */
-export const updateCheckOrderApi = data => {
+export const updateCheckOrderApi = async data => {
 	return https.post("/check-order/update-order", data);
 };
 
 /** *
  * 编辑草稿 ,继续保存到草稿
  */
-export const updateCheckOrderToDraftApi = data => {
+export const updateCheckOrderToDraftApi = async data => {
 	return https.post("/check-order/update-draft", data);
 };
 
 /** *
  * 盘点存草稿
  */
-export const savaCheckOrderDraftApi = data => {
+export const savaCheckOrderDraftApi = async data => {
 	return https.post("/check-order/create-draft", data);
 };
 
 /** *
  * 盘点订单详情
  */
-export const getCheckOrderDetailApi = orderSn => {
+export const getCheckOrderDetailApi = async orderSn => {
 	return https.get("/check-order/detail", { orderSn });
 };
 
 /** *
  * 盘点确认
  */
-export const savaCheckOrderApi = data => {
+export const savaCheckOrderApi = async data => {
 	return https.post("/check-order/create-order", data);
 };

+ 22 - 15
ghs/src/api/invite/index.js

@@ -1,51 +1,58 @@
-import https from '@/plugins/luch-request_0.0.7/request'
+import https from "@/plugins/luch-request_0.0.7/request";
+
+/** *
+ * 赚钱分红 邀请开店
+ */
+export const appyleListApi = async data => {
+	return https.get("/apply/list", data);
+};
 
 /** *
  * 列表 b
  */
 export const getProfile = data => {
-	return https.get('/invite/profile', data)
-}
+	return https.get("/invite/profile", data);
+};
 
 /** *
  * 列表 b
  */
 export const getList = data => {
-	return https.get('/invite/list', data)
-}
+	return https.get("/invite/list", data);
+};
 // ============================================================
 
 /** *
  * 列表 b
  */
 export const getListB = data => {
-	return https.get('/invite/list', data)
-}
+	return https.get("/invite/list", data);
+};
 
 /** *
  * 详情 b
  */
 export const getDet = data => {
-	return https.get('/invite/detail', data)
-}
+	return https.get("/invite/detail", data);
+};
 
 /** *
  * 兑奖 b
  */
 export const give = data => {
-	return https.get('/invite/give', data)
-}
+	return https.get("/invite/give", data);
+};
 
 /** *
  * 奖励设置详情 b
  */
 export const inviteAssetDet = data => {
-	return https.get('/invite-asset/detail', data)
-}
+	return https.get("/invite-asset/detail", data);
+};
 
 /** *
  * 奖励设置详情 b
  */
 export const inviteAssetUpdate = data => {
-	return https.post('/invite-asset/update', data)
-}
+	return https.post("/invite-asset/update", data);
+};

+ 3 - 3
ghs/src/api/purchase/index.js

@@ -3,20 +3,20 @@ import https from "@/plugins/luch-request_0.0.7/request";
 /** *
  * 采购订单详情
  */
-export const getPurchaseDetailApi = orderSn => {
+export const getPurchaseDetailApi = async orderSn => {
 	return https.get("/purchase-order/detail", { orderSn });
 };
 
 /** *
  * 采购列表
  */
-export const getPurchaseListApi = data => {
+export const getPurchaseListApi = async data => {
 	return https.get("/purchase-order/list", data);
 };
 
 /** *
  * 采购确认
  */
-export const createPurchaseOrderApi = data => {
+export const createPurchaseOrderApi = async data => {
 	return https.post("/purchase-order/create-order", data);
 };

+ 33 - 6
ghs/src/pagesInvite/inviteItem.vue

@@ -6,16 +6,16 @@
 			alt="商品图"
 		/>
 		<view class="item-info">
-			<view class="info-title">{{ info.orderNo }}</view>
+			<view class="info-title">{{ info.name }}</view>
 			<view class="info-row">
-				<text class="info-tag">{{ info.dateTime }}</text>
-				<text class="info-tag">{{ info.count }} </text>
-				<text class="info-tag light">{{ info.count }} </text>
+				<text class="info-tag">{{ info.adminName }}</text>
+				<text class="info-tag">{{ info.mobile }} </text>
+				<text class="info-tag light">{{ info.fee }} </text>
 			</view>
 		</view>
 		<view :class="['status']">
-			<text v-if="info.status == '01'" :class="['iconfont', 'icondagou']"> </text>
-			<text v-else class="status-name">审核中</text>
+			<text v-if="info.status == '2'" :class="['iconfont', 'icondagou']"> </text>
+			<text v-else class="status-name">{{ getStatusName }}</text>
 		</view>
 	</view>
 </template>
@@ -26,6 +26,33 @@ export default {
 		info: {
 			required: true
 		}
+	},
+	computed: {
+		getStatusName() {
+			//1审核中 2审核通过,试用中 3审核未通过 4已付费,使用中 5试用到期失效
+			let name = "";
+			switch (this.info.status) {
+				case "1":
+					name = "审核中";
+					break;
+				case "2":
+					name = "审核通过,试用中";
+					break;
+				case "3":
+					name = "审核未通过";
+					break;
+				case "4":
+					name = "已付费,使用中";
+					break;
+				case "5":
+					name = "试用到期失效";
+					break;
+
+				default:
+					break;
+			}
+			return name;
+		}
 	}
 };
 </script>

+ 131 - 64
ghs/src/pagesInvite/list.vue

@@ -1,34 +1,50 @@
 <template>
 	<view class="invite-page">
 		<view class="tabs">
-			<Tabs :tabs="pageTabs" :itemWidth="'50%'" :padding="0"></Tabs>
+			<Tabs
+				:tabs="pageTabs"
+				:currentTab="pageIndex"
+				@change="changePageTab"
+				:itemWidth="'50%'"
+				:padding="0"
+			></Tabs>
 		</view>
 		<view class="info-view">
 			<view class="info-main">
-				<image
-					class="logo"
-					src="https://img.huaml.com/uploads/12358/202005/29/de74c55596d304b85e79154958e8bf57_small.jpeg"
-					alt="商品图"
-				/>
+				<image class="logo" :src="merchantInfo.logo" alt="商品图" />
 				<view class="content">
-					<view class="name"> 纯彩花艺</view>
-					<view class="mark"> 一级代理</view>
+					<view class="name"> {{ merchantInfo.merchantName || "" }}</view>
+					<view class="mark"> {{ merchantInfo.shopName || "" }}</view>
 				</view>
 				<image
+					v-if="pageIndex == 0"
 					class="btn"
-					src="/static/images/invite/invite_shop.png"
+					src="/static/images/invite/invite_supplier.png"
 					alt="商品图"
 				/>
 				<image
+					v-else
 					class="btn"
-					src="/static/images/invite/invite_supplier.png"
+					src="/static/images/invite/invite_shop.png"
 					alt="商品图"
 				/>
 			</view>
 			<view class="info-list">
-				<view class="info-item" v-for="(item, index) in infoList" :key="index">
-					<view class="item-value">{{ item.value || "" }}</view>
-					<view class="item-name">{{ item.name || "" }}</view>
+				<view class="info-item">
+					<view class="item-value">帐户余额(¥)</view>
+					<view class="item-name">{{ balance }}</view>
+				</view>
+				<view class="info-item">
+					<view class="item-value">已邀请</view>
+					<view class="item-name">{{ invitedNum }}</view>
+				</view>
+				<view class="info-item">
+					<view class="item-value">已付费</view>
+					<view class="item-name">{{ payNum }}</view>
+				</view>
+				<view class="info-item">
+					<view class="item-value">累计收益(¥)</view>
+					<view class="item-name">{{ income }}</view>
 				</view>
 			</view>
 		</view>
@@ -36,98 +52,149 @@
 			花店列表
 		</view>
 		<view class="tabs">
-			<Tabs :tabs="tabs" :itemWidth="'20%'" :padding="0"></Tabs>
+			<Tabs
+				:tabs="tabs"
+				:currentTab="tabIndex"
+				@change="change"
+				:itemWidth="'20%'"
+				:padding="0"
+			></Tabs>
 		</view>
 		<scroll-view scroll-y class="invite-list">
-			<InviteItem v-for="(item, index) in inviteList" :info="item" :key="index">
-			</InviteItem>
+			<block v-if="!$util.isEmpty(list.data)">
+				<InviteItem v-for="(item, index) in list.data" :info="item" :key="index">
+				</InviteItem>
+			</block>
+			<block v-else>
+				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+			</block>
 		</scroll-view>
 	</view>
 </template>
 <script>
 import Tabs from "@/components/plugin/tabs";
 import InviteItem from "./inviteItem";
+import { appyleListApi } from "@/api/invite/index";
+import { getMerchantDetail } from "@/api/merchant/index";
+import { list } from "@/mixins";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
 export default {
+	name: "赚钱分红-邀请开店",
 	components: {
 		Tabs,
-		InviteItem
+		InviteItem,
+		AppWrapperEmpty
 	},
+	mixins: [list],
 	data() {
 		return {
+			merchantInfo: {},
+			pageIndex: 0,
 			pageTabs: [
 				{
 					name: "供应商",
-					key: ""
+					key: "1"
 				},
 				{
 					name: "零售商",
-					key: "01"
+					key: "2"
 				}
 			],
+			tabIndex: 0,
 			tabs: [
 				{
 					name: "全部",
-					key: ""
+					key: "0"
 				},
 				{
 					name: "待审核",
-					key: "01"
+					key: "1"
 				},
 				{
 					name: "试用中",
-					key: "02"
-				},
-				{
-					name: "已付费",
-					key: "03"
-				},
-				{
-					name: "已到期",
-					key: "04"
-				}
-			],
-			infoList: [
-				{
-					name: "帐户余额(¥)",
-					value: "3092"
+					key: "2"
 				},
 				{
-					name: "已邀请",
-					value: "32"
+					name: "未通过",
+					key: "3"
 				},
 				{
 					name: "已付费",
-					value: "1387"
+					key: "4"
 				},
 				{
-					name: "累计收益(¥)",
-					value: "824.27"
+					name: "已到期",
+					key: "5"
 				}
 			],
-			inviteList: [
-				{
-					orderNo: "PD20201217212800156",
-					name: "小许",
-					dateTime: "2020-7-10 21:50",
-					count: "101",
-					status: "02"
-				},
-				{
-					orderNo: "PD20201217212800156",
-					name: "小许",
-					dateTime: "2020-7-10 21:50",
-					count: "101",
-					status: "02"
-				},
-				{
-					orderNo: "PD20201217212800156",
-					name: "小许",
-					dateTime: "2020-7-10 21:50",
-					count: "101",
-					status: "01"
-				}
-			]
+			balance: "", //余额
+			invitedNum: "", //已邀请
+			payNum: "", //已付费数量
+			income: "" //累计收益
 		};
+	},
+	onLoad() {
+		this.init();
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this._list().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onReachBottom() {
+		if (!this.list.finished) {
+			this._list().then(res => {
+				uni.stopPullDownRefresh();
+			});
+		} else {
+			uni.stopPullDownRefresh();
+		}
+	},
+	methods: {
+		async initMerchant() {
+			try {
+				const { data } = await getMerchantDetail();
+				this.merchantInfo = data;
+			} catch (error) {}
+		},
+		async init() {
+			this._list();
+		},
+		_list() {
+			return appyleListApi({
+				status: this.tabs[this.tabIndex].key,
+				style: this.pageTabs[this.pageIndex].key
+			}).then(res => {
+				const {
+					data: { balance, invitedNum, payNum, income }
+				} = res;
+				this.balance = balance;
+				this.invitedNum = invitedNum;
+				this.payNum = payNum;
+				this.income = income;
+				this.completes(res);
+			});
+		},
+		change(e) {
+			if (this.tabIndex == e.index) {
+				return false;
+			} else {
+				this.tabIndex = e.index;
+				// this.operateCloseFn();
+				this.resetList();
+				this._list();
+			}
+		},
+		changePageTab(e) {
+			if (this.pageIndex == e.index) {
+				return false;
+			} else {
+				this.pageIndex = e.index;
+				this.resetList();
+				this._list();
+			}
+		}
 	}
 };
 </script>