<template>
|
<view class="index-team o-h" v-if="!loadding">
|
<!-- #ifdef MP-WEIXIN || APP-PLUS -->
|
<view class="ww100" :style="'height:'+topBarTop()+'px;'"></view>
|
<view class="tc head_top" :style="topBarHeight() == 0 ? '': 'height:'+topBarHeight()+'px;'">
|
<view class="reg180" @click="goback"><text class="icon iconfont icon-jiantou"></text></view>
|
<view class="fb">{{titel}}</view>
|
</view>
|
<!-- #endif -->
|
<!--头部图片-->
|
<view class="banner d-c-c d-c">
|
<image :src="top_background" mode="widthFix"></image>
|
</view>
|
|
<!--是分销商-->
|
<template v-if="is_region && isData">
|
<!--金额信息-->
|
<view class="region-wrap pr m-0-20" style="margin-top: 300rpx;">
|
<view class="d-b-c border-b pb30 f28 lh150 user-info">
|
<view class="d-b-c">
|
<view class="photo">
|
<image :src="user.avatarUrl" mode="aspectFill"></image>
|
</view>
|
<view>
|
<view class="gray3 f32">{{ user.nickName }}</view>
|
<view class="d-s-c gray6 mt10">
|
<view class="region-level mr10">{{region.region_level.text}}</view>
|
<text>{{region.region.province}}</text>
|
<text v-if="region.region_level.value>1">-{{region.region.city}}</text>
|
<text v-if="region.region_level.value>2">-{{region.region.area}}</text>
|
</view>
|
</view>
|
|
</view>
|
<!-- <view>
|
<text class="gray3 f28 grade">{{ region.grade.name }}</text>
|
</view> -->
|
</view>
|
<view class="d-s-c p-30-0 top_dash">
|
<view class="flex-1 d-c-c d-c">
|
<view class="redF6">
|
<text class="f24">¥</text>
|
<text class="f40">{{ region.money }}</text>
|
</view>
|
<view class="pt20 f26 gray3">{{ info_words.index.words.money.value }}</view>
|
</view>
|
<view class="flex-1 d-c-c d-c">
|
<view class="">
|
<text class="f24">¥</text>
|
<text class="f40">{{ region.freeze_money }}</text>
|
</view>
|
<view class="pt20 f28 gray3">{{ info_words.index.words.freeze_money.value }}</view>
|
</view>
|
<view class="flex-1 d-c-c d-c">
|
<view class="">
|
<text class="f24">¥</text>
|
<text class="f40">{{ region.total_money }}</text>
|
</view>
|
<view class="pt20 f28 gray3">{{ info_words.index.words.total_money.value }}</view>
|
</view>
|
</view>
|
<view class="d-c-c pt30">
|
<button type="primary" class="btn-gcred flex-1" @click="gotoCash">{{ info_words.index.words.cash.value }}</button>
|
</view>
|
</view>
|
<!--图标入口-->
|
<view class="region-wrap m-0-20 p30 d-s-c f-w mt20 bg-white">
|
<view class="d-c-c d-c flex-1" @click="gotoPage('pages2/region/cash/list/list')">
|
<view>
|
<image class="region_index_img" src="../../../static/icon/icon-zijinmingxi.png" mode=""></image>
|
</view>
|
<text class="pt10 f26 mt20">{{ info_words.cash_list.title.value }}</text>
|
</view>
|
<view class="d-c-c d-c flex-1" @click="gotoPage('pages2/region/bonus/bonus')">
|
<view>
|
<image class="region_index_img" src="../../../static/icon/icon-fenxiaodingdan.png" mode=""></image>
|
</view>
|
<text class="pt10 f26 mt20">{{ info_words.bonus_list.title.value }}</text>
|
</view>
|
</view>
|
</template>
|
<!--不是区域代理-->
|
<template v-if="!is_region && isData">
|
<view class="no-team">
|
<view class="mt50 p-0-20 pt30 red f34 tc">{{ info_words.index.words.not_region.value }}</view>
|
<view class="p30 mt30">
|
<button type="primary" class="btn-gcred" @click="applyRegion">{{ info_words.index.words.apply_now.value }}</button>
|
</view>
|
<view class="p30">
|
<button type="primary" class="btn-gray" @click="gotoShop">{{ info_words.apply.words.goto_mall.value }}</button>
|
</view>
|
</view>
|
<view class="bottom-banner d-c-c d-c" v-if="description_pic!=''">
|
<image :src="description_pic" mode="widthFix"></image>
|
</view>
|
</template>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
/*是否加载完成*/
|
loadding: true,
|
indicatorDots: true,
|
autoplay: true,
|
interval: 2000,
|
duration: 500,
|
/*0:不是股东,1:申请中,2:已经是股东*/
|
is_region: false,
|
isData: false,
|
region: {},
|
/*顶部背景*/
|
top_background: '',
|
// 股东权益说明
|
description_pic: '',
|
/*基本信息*/
|
info_words: {},
|
words: {},
|
user: {},
|
titel: '',
|
setting: {}
|
};
|
},
|
onLoad(e) {
|
if (e.is_region) {
|
this.is_region = e.is_region;
|
}
|
},
|
onShow() {
|
uni.showLoading({
|
title: '加载中'
|
});
|
/*获取个人中心数据*/
|
this.getData();
|
},
|
methods: {
|
/*获取数据*/
|
getData() {
|
let self = this;
|
self._get('user.region/center', {}, function(data) {
|
self.info_words = data.data.words;
|
uni.setNavigationBarTitle({
|
title: self.info_words.index.title.value != '' ? self.info_words.index.title.value : self.info_words.index.title
|
.default
|
});
|
self.titel = data.data.words.index.title.value
|
self.is_region = data.data.is_region;
|
self.top_background = data.data.background;
|
self.region = data.data.region;
|
self.user = data.data.user;
|
self.setting = data.data.setting;
|
self.isData = true;
|
self.loadding = false;
|
uni.hideLoading();
|
});
|
},
|
|
/*申请股东*/
|
applyRegion() {
|
this.gotoPage('/pages2/region/apply/apply');
|
},
|
|
/*去商城逛逛*/
|
gotoShop() {
|
this.gotoPage('pages/index/index')
|
},
|
|
/*去分销中心*/
|
gotoAgent() {
|
this.gotoPage('pages/agent/index/index')
|
},
|
|
/*去分红中心*/
|
gotoTeam() {
|
this.gotoPage('pages2/region/index/index')
|
},
|
|
/*去提现*/
|
gotoCash() {
|
this.gotoPage('pages2/region/cash/apply/apply');
|
},
|
|
goback() {
|
uni.navigateBack();
|
},
|
/*跳转产品详情*/
|
gotoProductDetail(e) {
|
let url = 'pages/product/detail/detail?product_id=' + e
|
this.gotoPage(url);
|
},
|
}
|
};
|
</script>
|
|
<style>
|
page {
|
background-color: #f2f2f2;
|
}
|
|
.index-team .banner {
|
position: absolute;
|
width: 100%;
|
z-index: 0;
|
min-height: 167rpx;
|
/* padding-bottom: 60rpx; */
|
background-repeat: no-repeat;
|
background-size: 100%;
|
top: 0;
|
}
|
|
.index-team .banner image {
|
width: 100%;
|
}
|
|
.no-team {
|
margin-top: 290rpx;
|
position: relative;
|
background: #fff;
|
border-radius: 30rpx 30rpx 0 0;
|
}
|
|
.no-team-img {
|
padding-top: 60rpx;
|
}
|
|
.no-team-img image {
|
width: 300rpx;
|
}
|
|
.region-wrap {
|
border-radius: 12rpx;
|
background-position: -8px 52rpx;
|
background-size: 100% 100%;
|
background-image: radial-gradient(circle at 8px, transparent 0%, transparent 8px, #ffffff 8px, #ffffff 100%);
|
padding: 31rpx 25rpx 36rpx 25rpx;
|
}
|
|
.index-team .region-wrap .iconfont {
|
font-size: 60rpx;
|
}
|
|
.index-team .btn-gcred {
|
height: 88rpx;
|
line-height: 88rpx;
|
border-radius: 44rpx;
|
}
|
|
.index-team .btn-gray {
|
height: 88rpx;
|
line-height: 88rpx;
|
border-radius: 44rpx;
|
}
|
|
.reg180 {
|
padding-right: 20rpx;
|
text-align: right;
|
transform: rotateY(180deg);
|
position: absolute;
|
bottom: 0;
|
}
|
|
.icon-jiantou {
|
|
color: #FFFFFF;
|
font-size: 30rpx;
|
}
|
|
.head_top {
|
position: absolute;
|
width: 100%;
|
height: 30px;
|
line-height: 30px;
|
color: #FFFFFF;
|
font-size: 32rpx;
|
z-index: 2;
|
}
|
|
.top_dash {
|
border-bottom: 1rpx dashed #D9D9D9;
|
padding-bottom: 9px;
|
|
}
|
|
.region_index_img {
|
width: 90rpx;
|
height: 90rpx;
|
}
|
|
/* 商品列表样式 */
|
.section-product .item {
|
margin: 0 26rpx;
|
display: flex;
|
align-items: center;
|
padding-bottom: 29rpx;
|
padding-top: 29rpx;
|
}
|
|
.section-product .cover {
|
width: 150rpx;
|
height: 150rpx;
|
border-radius: 8px;
|
}
|
|
.section-product .info {
|
flex: 1;
|
padding-left: 30rpx;
|
box-sizing: border-box;
|
overflow: hidden;
|
}
|
|
.section-product .title {
|
width: 100%;
|
font-size: 26rpx;
|
display: -webkit-box;
|
overflow: hidden;
|
-webkit-line-clamp: 2;
|
-webkit-box-orient: vertical;
|
}
|
|
.vender .list .describe {
|
width: 100%;
|
white-space: nowrap;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
}
|
|
.section-product .describe {
|
margin-top: 20rpx;
|
font-size: 24rpx;
|
color: #999999;
|
display: -webkit-box;
|
-webkit-box-orient: vertical;
|
-webkit-line-clamp: 3;
|
overflow: hidden;
|
}
|
|
.section-product .price {
|
color: #F6220C;
|
font-size: 24rpx;
|
}
|
|
.section-product .price .num {
|
padding: 0 4rpx;
|
font-size: 32rpx;
|
}
|
|
.section-product .level-box {
|
margin-top: 20rpx;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
|
.section-product .level-box .key {
|
font-size: 24rpx;
|
color: #999999;
|
}
|
|
.section-product .level-box .num-wrap {
|
display: flex;
|
justify-content: flex-end;
|
align-items: center;
|
}
|
|
.section-product .level-box .icon-box {
|
width: 33rpx;
|
height: 33rpx;
|
border: 1px solid #c5c5c5;
|
background: #f2f2f2;
|
}
|
|
.section-product .level-box .icon-box .gray {
|
color: #cccccc;
|
}
|
|
.section-product .level-box .icon-box .gray3 {
|
color: #333333;
|
}
|
|
.section-product .level-box .text-wrap {
|
margin: 0 20rpx;
|
height: 33rpx;
|
border: none;
|
background: none;
|
}
|
|
.section-product .level-box .text-wrap input {
|
padding: 0 4rpx;
|
height: 33rpx;
|
line-height: 1;
|
width: 40rpx;
|
font-size: 32rpx;
|
text-align: center;
|
display: flex;
|
align-items: center;
|
min-height: 33rpx;
|
}
|
|
.section-product .icon-jiantou {
|
color: #999;
|
}
|
|
.user-info .photo,
|
.user-info .photo image {
|
width: 88rpx;
|
height: 88rpx;
|
border-radius: 50%;
|
}
|
|
.user-info .photo {
|
padding-right: 20rpx;
|
}
|
|
.user-info .grade {
|
display: block;
|
padding: 6rpx 20rpx;
|
font-size: 22rpx;
|
/* height: 36rpx; */
|
line-height: 36rpx;
|
border-radius: 40rpx;
|
background: $dominant-color;
|
color: #ffffff;
|
font-family: PingFang SC;
|
}
|
.region-level {
|
border-radius: 60rpx;
|
border: 2rpx solid #666;
|
font-size: 22rpx;
|
padding: 0 16rpx;
|
color: #666;
|
}
|
</style>
|