|
|
@@ -1,23 +1,31 @@
|
|
|
<template>
|
|
|
<div class="app-content">
|
|
|
+ <app-tabs borderLeft :tabs="optionsType" :currentTab="roleIndex" @change="roleChange" itemWidth="50%" :padding="0" />
|
|
|
<div class="rank-wrap">
|
|
|
<div class="user-blo">
|
|
|
<div class="user-wrap">
|
|
|
<div class="user-wrap-left">
|
|
|
<app-avatar-module :width="100" />
|
|
|
<div class="user-det">
|
|
|
- <!-- <div class="user-name">{{ userInfo.merchantName }}</div> -->
|
|
|
+ <div class="user-name">{{ userInfo.merchantName }}</div>
|
|
|
<div class="app-color-3">三级代理</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- #ifdef H5 -->
|
|
|
- <div class="user-wrap-right" @click="showShare = true">
|
|
|
+ <!-- <div class="user-wrap-right" @click="showShare = true">
|
|
|
<img :src="`${constant.imgUrl}/retail/interest/invite-store.png`" alt mode="widthFix" />
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<!-- #endif -->
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
- <button class="user-wrap-right" open-type="share">
|
|
|
+ <button
|
|
|
+ v-if="roleIndex == 1"
|
|
|
+ class="user-wrap-right" open-type="share">
|
|
|
<img :src="`${constant.imgUrl}/retail/interest/invite-store.png`" alt mode="widthFix" />
|
|
|
+ </button>
|
|
|
+ <button
|
|
|
+ v-else
|
|
|
+ class="user-wrap-right" open-type="share">
|
|
|
+ <img :src="`${constant.imgUrl}/ghs/me/yqghs.png`" alt mode="widthFix" />
|
|
|
</button>
|
|
|
<!-- #endif -->
|
|
|
</div>
|
|
|
@@ -70,7 +78,8 @@ import AppShareMask from "@/components/module/app-share-mask";
|
|
|
import { list, share } from "@/mixins";
|
|
|
// api
|
|
|
import { getUser } from "@/utils/auth";
|
|
|
-import { assetDet, applyList } from "@/api/proxy";
|
|
|
+// assetDet
|
|
|
+import { applyList } from "@/api/store/index";
|
|
|
export default {
|
|
|
name: "my-invite-list",
|
|
|
components: {
|
|
|
@@ -86,6 +95,15 @@ export default {
|
|
|
showShare: false,
|
|
|
data: {},
|
|
|
tabIndex: 0,
|
|
|
+ roleIndex: 0,
|
|
|
+ optionsType:[
|
|
|
+ {
|
|
|
+ name:'供货商'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name:'零售店铺'
|
|
|
+ }
|
|
|
+ ],
|
|
|
tabs: [
|
|
|
{
|
|
|
name: "全部"
|
|
|
@@ -130,8 +148,16 @@ export default {
|
|
|
},
|
|
|
onLoad() {},
|
|
|
methods: {
|
|
|
+ roleChange(e){
|
|
|
+ if (this.roleIndex == e.index) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ this.roleIndex = e.index;
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
+ },
|
|
|
init() {
|
|
|
- this._assetDet();
|
|
|
+ // this._assetDet();
|
|
|
this._applyList();
|
|
|
getUser().then(res => {
|
|
|
let params = {
|
|
|
@@ -143,21 +169,25 @@ export default {
|
|
|
this.jweixinFn(params);
|
|
|
});
|
|
|
},
|
|
|
- _assetDet() {
|
|
|
- assetDet().then(res => {
|
|
|
- if (this.$util.isEmpty(res.data)) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- this.data = res.data;
|
|
|
+ // _assetDet() {
|
|
|
+ // assetDet().then(res => {
|
|
|
+ // if (this.$util.isEmpty(res.data)) {
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // this.data = res.data;
|
|
|
+ // this.userData[0].value = res.data.balance | 0.0;
|
|
|
+ // this.userData[1].value = res.data.inviteNum | 0;
|
|
|
+ // this.userData[2].value = res.data.payNum | 0;
|
|
|
+ // this.userData[3].value = res.data.income | 0.0;
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ _applyList() {
|
|
|
+ let status = this.getStatus(this.tabIndex);
|
|
|
+ return applyList({ status: status, style:this.roleIndex==0?2:1}).then(res => {
|
|
|
this.userData[0].value = res.data.balance | 0.0;
|
|
|
this.userData[1].value = res.data.inviteNum | 0;
|
|
|
this.userData[2].value = res.data.payNum | 0;
|
|
|
this.userData[3].value = res.data.income | 0.0;
|
|
|
- });
|
|
|
- },
|
|
|
- _applyList() {
|
|
|
- let status = this.getStatus(this.tabIndex);
|
|
|
- return applyList({ status: status }).then(res => {
|
|
|
this.completes(res);
|
|
|
});
|
|
|
},
|
|
|
@@ -206,6 +236,7 @@ export default {
|
|
|
// 头部
|
|
|
.rank-wrap {
|
|
|
background-color: #fff;
|
|
|
+ margin-top: 20upx;
|
|
|
.user-blo {
|
|
|
padding: 40px 30px 28px 30px;
|
|
|
}
|