123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- <template>
- <view>
- <view class="head">
- <view class="portrait">
- <image class="image" src="../../static/images/login/logo.png" mode="scaleToFill"></image>
- </view>
- <view>
- <view v-if="token" class="nickname">{{nickname}}</view>
- <view v-else class="nickname">您还未登录</view>
- <view>
- <text v-show="user_type===3" class="wddz">网店店主</text>
- <text v-show="user_type===2" class="zgcj">直供厂家</text>
- </view>
- </view>
- <view class="invite">
- <view class="invite-code">邀请码:{{invite_code}}</view>
- <view class="invite-progress">
- <template v-for="index in 5">
- <view v-if="index <= invite_num" class="item active"></view>
- <view v-else class="item"></view>
- </template>
- </view>
- <view class="invite-notes">再邀请{{5 - invite_num}}人获得一个月代理会员</view>
- <view v-if="vip_expire && Date.parse(vip_expire.replace('-','/')) > new Date()" class="invite-notes">会员到期时间:{{vip_expire | datetimeFilter('YYYY-MM-DD')}}</view>
- </view>
- </view>
- <view class="body">
- <view class="money">
- <view class="row">
- <view class="col">可提现金额(元):<text class="warning">{{$store.state.user.money}}</text></view>
- <view class="col"><button class="btn tixian-btn" @tap="goToWithdrew">立即提现</button></view>
- </view>
- <view v-if="user_type===2" class="row">
- <view class="col">保证金(元):<text>0.00</text><text class="tips">(保证金2000元)</text></view>
- <view class="col"><button class="btn jiaona-btn" @tap="goToDeposit">立即缴纳</button></view>
- </view>
- <view v-if="user_type===3" class="row">
- <view class="col">不可提现金额:<text>0</text></view>
- <!-- <view class="col"><button class="btn jiaona-btn">立即缴纳</button></view> -->
- </view>
- <view class="row statistics">
- <view class="item">
- <view class="num">{{total_settled_profit}}</view>
- <view>累计收益(元)</view>
- </view>
- <view class="item">
- <view class="num">0</view>
- <view>本月到账</view>
- </view>
- <view class="item">
- <view class="num">{{fans_num}}</view>
- <view>我的粉丝</view>
- </view>
- </view>
- </view>
- <view class="menu agent-menu">
- <view class="menu-item">
- <navigator url="/pages/user/user-profit" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/user/icon25.png" mode=""></image>
- </view>
- <view class="name">收益</view>
- </navigator>
- </view>
- <view class="menu-item">
- <navigator url="/" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/user/icon26.png" mode=""></image>
- </view>
- <view class="name">订单</view>
- </navigator>
- </view>
- <view class="menu-item">
- <navigator url="/pages/user/invitation-list" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/user/icon27.png" mode=""></image>
- </view>
- <view class="name">粉丝</view>
- </navigator>
- </view>
- <view class="menu-item">
- <navigator url="/pages/user/invite" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/user/icon28.png" mode=""></image>
- </view>
- <view class="name">邀请</view>
- </navigator>
- </view>
- </view>
- <navigator url="/pages/user/agent" open-type="navigate" hover-class="none">
- <view class="vip-center">
- <view class="text">代理会员中心<text class="sub">(特权独享)</text></view>
- </view>
- </navigator>
- <view class="menu">
- <view class="menu-item">
- <navigator url="/pages/user/money-log" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/menu/b8.png" mode="scaleToFill"></image>
- </view>
- <view class="name">账单明细</view>
- </navigator>
- </view>
- <view class="menu-item">
- <navigator url="/pages/order/order" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/menu/b7.png" mode=""></image>
- </view>
- <view class="name">订单管理</view>
- </navigator>
- </view>
- <view v-if="user_type===2">
- <navigator url="/pages/product/my-product" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/menu/b2.png" mode=""></image>
- </view>
- <view class="name">我的商品</view>
- </navigator>
- </view>
- <view v-if="user_type===3">
- <navigator url="/pages/user/collection" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/menu/b2.png" mode=""></image>
- </view>
- <view class="name">我的收藏</view>
- </navigator>
- </view>
- <view>
- <navigator url="/pages/user/strategy" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/menu/b1.png" mode=""></image>
- </view>
- <view class="name">新手攻略</view>
- </navigator>
- </view>
- </view>
- <view class="menu">
- <view>
- <navigator url="/pages/user/problem" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/menu/b3.png" mode=""></image>
- </view>
- <view class="name">常见问题</view>
- </navigator>
- </view>
- <view>
- <navigator url="/pages/user/kefu" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/menu/b4.png" mode=""></image>
- </view>
- <view class="name">联系客服</view>
- </navigator>
- </view>
- <view>
- <navigator url="/pages/user/notice" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/menu/b5.png" mode=""></image>
- </view>
- <view class="name">官方公告</view>
- </navigator>
- </view>
- <view>
- <navigator url="/pages/user/feedback" open-type="navigate" hover-class="none">
- <view class="icon">
- <image class="image" src="../../static/images/menu/b6.png" mode=""></image>
- </view>
- <view class="name">意见反馈</view>
- </navigator>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex'
- export default {
- data() {
- return {
- balance: '',
- deposit: ''
- };
- },
- computed: mapState({
- nickname: state => state.user.nickname,
- user_type: state => state.user.group_id,
- invite_code: state => state.user.invite_code,
- invite_num: state => state.user.invite_num,
- token: state => state.user.token,
- vip_expire: state => state.user.vip_expire,
- fans_num: state => state.user.fans_num,
- total_settled_profit: state => state.user.total_settled_profit
- }),
- onTabItemTap(e) {
- uni.$emit("refresh_userinfo");
- },
- onNavigationBarButtonTap(e) {
- // console.log(e)
- switch (e.index) {
- case 0:
- uni.navigateTo({
- url: '/pages/user/setting'
- });
- break;
- case 1:
- uni.navigateTo({
- url: '/pages/message/message'
- });
- break;
- default:
- break;
- }
- },
- methods: {
- goToWithdrew() {
- uni.navigateTo({
- url: "/pages/user/withdraw"
- })
- },
- goToDeposit() {
- uni.navigateTo({
- url: '/pages/order/deposit'
- });
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .head {
- background: $primary-color;
- display: flex;
- align-items: center;
- padding-bottom: 140upx;
- padding-top: 20upx;
- }
- .portrait {
- margin: 0 20upx;
- border: 10upx solid rgba(255, 255, 255, 0.5);
- border-radius: 128upx;
- overflow: hidden;
- width: 128upx;
- height: 128upx;
- .image {
- width: 128upx;
- height: 128upx;
- background: white;
- }
- }
- .nickname {
- font-size: 30upx;
- color: white;
- margin-bottom: 10upx;
- }
- .wddz,
- .zgcj {
- font-size: 24upx;
- color: white;
- border: 2upx solid white;
- border-radius: 20upx;
- width: 140upx;
- height: 36upx;
- line-height: 36upx;
- text-align: center;
- text-indent: 20upx;
- display: inline-block;
- padding: 0;
- background: url(../../static/images/do.png) no-repeat;
- background-size: 21upx 21upx;
- background-position: 10upx;
- }
- .invite {
- text-align: right;
- flex-grow: 1;
- margin-right: 20upx;
- color: white;
- .invite-code {
- font-size: 30upx;
- }
- .invite-notes {
- font-size: 24upx;
- }
- .invite-progress {
- .item {
- border: 2upx solid white;
- display: inline-block;
- width: 36upx;
- transform: scaleX(0.9);
- font-size: 0;
- border-radius: 2upx;
- &.active {
- border-color: yellow;
- }
- }
- &::after {
- content: "";
- background: url(../../static/images/vip.png) no-repeat;
- background-size: 42upx 42upx;
- width: 42upx;
- height: 42upx;
- display: inline-block;
- position: relative;
- top: 16upx;
- }
- margin-bottom: 20upx;
- }
- }
- .body {
- padding: 20upx;
- position: relative;
- top: -120upx;
- .money {
- background: white;
- border-radius: 20upx;
- padding: 20upx;
- font-family: "Roboto", sans-serif;
- .row {
- color: #333;
- display: flex;
- align-items: center;
- margin-bottom: 20upx;
- .warning {
- color: $primary-color;
- font-weight: bold;
- font-family: "Roboto-Bold", sans-serif;
- }
- .tips {
- color: #CCC;
- font-size: 24upx;
- }
- &:last-child {
- margin-bottom: 0;
- }
- & .col:first-child {
- flex-grow: 1;
- font-size: 28upx;
- }
- & .col:last-child {
- // text-align: right;
- font-size: 28upx;
- }
- }
- .btn {
- background-color: $primary-color;
- color: white;
- font-size: 26upx;
- padding: 5upx 20upx;
- border-radius: 40upx;
- line-height: normal;
- }
- }
- }
- .vip-center {
- background: url(../../static/images/center5.png) no-repeat;
- background-size: 710upx 78upx;
- color: white;
- padding: 0 20upx;
- margin-top: 20upx;
- height: 78upx;
- .text {
- margin-left: 50upx;
- background-color: #ff5454;
- font-weight: bold;
- line-height: 60upx;
- display: inline-block;
- margin-top: 10upx;
- .sub {
- font-size: 24upx;
- }
- }
- }
- .menu {
- display: flex;
- background: white;
- border-radius: 20upx;
- padding: 30upx 20upx;
- margin-top: 20upx;
- justify-content: space-between;
- .name {
- font-size: 28upx;
- margin-top: 10upx;
- }
- .icon {
- text-align: center;
- }
- .icon .image {
- width: 60upx;
- height: 60upx;
- }
- }
- .statistics {
- border-top: 2upx #EEEEEE solid;
- padding-top: 20upx;
- text-align: center;
- font-size: 28upx;
- .item {
- flex: 1;
- }
- .num {
- color: #ff5454;
- font-weight: bold;
- }
- }
- .agent-menu{
- padding: 15upx 0;
- .menu-item{
- flex: 1;
- text-align: center;
- .name{
- margin-top: 0;
- }
- }
- }
- </style>
|