| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <template>
- <view class="">
- <view class="empty-page" v-if="vuex_agenter_type == 0">
- <image src="@/static/agent/empty.png" mode=""></image>
- <block v-if="!$isEmpty(vuex_userId)">
- <view class="tips">
- <text>您当前还不是代理身份</text>
- <text>快去查看代理权益吧~</text>
- </view>
- <view class="cu-btn btn round" @click="view">
- 点击查看
- </view>
- </block>
-
- <block v-else>
- <view class="tips">
- <text>当前用户还未登录</text>
- <text>快去登录查看代理权益吧~</text>
- </view>
- <view class="cu-btn btn round" @click="login">
- 点击登录
- </view>
- </block>
-
- </view>
- <view class="page" v-else>
- <view class="card">
- <view class="top">
- <image src="https://thirdwx.qlogo.cn/mmopen/vi_32/q6EwR5U6zFp8bYbUWb9HmFc5Q3R88x13Q0ZtOcVK5lO8AmtibQDRcuMA2Y7CmyuMCr6icceM3QibIKN2icAAxSvjpA/132" ></image>
- <view class="center text-lg" style="margin-left: 20rpx;margin-right: 10rpx;">黄明潘</view>
- <view class="center margin-left-10">
- <view class="cu-tag btn-bg-color sm" style="border-radius: 20rpx 20rpx 20rpx 0;padding: 10rpx;">
- 代理商
- </view>
- </view>
- </view>
- <view class="bottom">
- <view >
- <text>今日收益</text>
- <text class="text-price">108.00</text>
- </view>
- <view style="margin: 0 50rpx;">
- <text>总收益</text>
- <text class="text-price">888.00</text>
- </view>
- <view >
- <text>我的推广</text>
- <text >98</text>
- </view>
- </view>
- </view>
-
- <view class="menu">
- <view class="title">推广服务</view>
- <view class="margin-top-30">
- <view @click="$jump(item.path)" class="item" v-for="(item,index) in menuList" :key="index">
- <view class="center">
- <image style="width: 38rpx;height: 38rpx;margin-right: 10rpx;" :src="item.icon"></image>
- <text>{{item.name}}</text>
- </view>
- <view class="center">
- <text class="cuIcon-right"></text>
- </view>
- </view>
- </view>
-
- </view>
- </view>
- </view>
- </template>
- <script>
- export default{
- data(){
- return{
- menuList:[
- {
- icon:'/static/agent/topromote.png',
- name:'去推广',
- path:''
- },
- {
- icon:'/static/agent/mypromote.png',
- name:'我的推广',
- path:'/pages/agent/myPromote'
- },
- {
- icon:'/static/agent/myearnings.png',
- name:'我的收益',
- path:''
- },
- ]
- }
- },
- created() {
- this.judgeAgenterType()
- },
- methods:{
- login(){
- this.$emit('login')
- },
- view(){
- uni.navigateTo({
- url:"/pages/agent/agentDetail"
- })
- },
- judgeAgenterType(){
- if (this.$isEmpty(this.vuex_userId)) {
- return
- }
- let params={
- userId:this.vuex_userId,
- enabled:1
- }
- this.$api.agenter.list(params).then(res=>{
- if (!this.$isEmpty(res.data.records)) {
- let item=res.data.records[0]
- let type=this.$isEmpty(item.agenterTypeId)?2:1
- this.$u.vuex('vuex_agenter_type',type)
- }
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .page{
- background-color: #f6f6f6;
- height: 80vh;
- display: flex;
- margin: 20rpx;
- flex-direction: column;
- justify-content: flex-start;
- align-items: center;
-
- .card{
- padding:30rpx 40rpx;
- width: 100%;
- border-radius: 20rpx;
- background-image: linear-gradient(#1F2349,#465274);
- display: flex;
- flex-direction: column;
- justify-content: space-between;
-
-
- .top{
- color: #FFFFFF;
- display: flex;
-
- image{
- border-radius: 50%;
- width: 60rpx;
- height: 60rpx;
- }
- }
-
- .bottom{
- width: 100%;
- padding-top: 30rpx;
- display: flex;
- text-align: center;
- justify-content: space-around;
-
- view{
- text-align: center;
- display: flex;
- flex-direction: column;
-
- text:first-child{
- color: #A9ADB4;
- font-size: 26rpx;
- margin-bottom: 10rpx;
- }
- text:last-child{
- font-size: 34rpx;
- color: #F3D4B4;
- }
- }
- }
- }
-
- .menu{
- margin-top: 30rpx;
- width: 100%;
- background-color: #FFFFFF;
- border-radius: 20rpx;
- padding: 0 20rpx;
-
- .title{
- padding-top: 30rpx;
- padding-left: 20rpx;
- font-weight: 800;
- font-size: 34rpx;
- }
-
- .item{
- border-bottom: 1rpx solid #EFEFEF;
- padding:30rpx 20rpx;
- color: #252525;
- font-size: 30rpx;
- display: flex;
- justify-content: space-between;
- }
-
- .item:last-child{
- border: none;
- }
- }
- }
-
- .empty-page{
- background-color: #f6f6f6;
- height: 70vh;
- width: 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
-
- image{
- width: 280rpx;
- height: 240rpx;
- }
-
- .tips{
- margin-top: 20rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
-
- text:first-child{
- font-size: 32rpx;
- font-weight: 800;
- }
-
- text:last-child{
- margin-top: 20rpx;
- color: #999;
- font-size: 26rpx;
- }
- }
-
- .btn{
- width: 250rpx;
- margin-top: 100rpx;
- background-color: #F6F6F6;
- border: 1rpx solid #EF9944;
- color: #EF9944;
- }
- }
- </style>
|