123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <!-- <view class="container" :style="{'min-height':`calc(100vh - ${(statusBarHeight+navBareight)+'px'})` }"> -->
- <view class="container">
- <navBar title="推广中心" :back="true" color="#333333" background="#FFFFFF" />
- <view class="outerBox">
- <!-- <view class="navHeight" :style="{height:statusBarHeight+'px'}"></view> -->
- <view class="userBox">
- <image class="avatar" :src="!userInfo.avatar?picBase+'defaultAvatar.png':userInfo.avatar" mode="">
- </image>
- {{userInfo.name?userInfo.name:'默认用户'}}
- <view class="flag" :style="{'background-image':`url(${picBase+'dashi_bg.png'})`}">
- 推广大使
- <!-- <image src="../../../static/other/huangguan.png" mode="" class="hg_i"></image> -->
- </view>
- </view>
- <view class="card" :style="{'background-image':`url(${picBase+'center_c_bg.png'})`}">
- <!-- <image src="../../../static/other/liujiaoxing.png" mode="widthFix" class="ljx_i"></image> -->
- <view class="imgPos">
- </view>
- <view class="labelBox">
- 推广收入.
- <image :src="state?eyeSrc:eyeSrc2" mode="widthFix" class="eye" @click="handleShow"></image>
- </view>
- <view class="shouRu">
- <view class="left">
- 累计收入:{{state?'¥'+info.totalIncome:'******'}}
- </view>
- <view class="right">
- 可提现收入: {{state?'¥'+info.withdrawIncome:'******'}}
- </view>
- </view>
- </view>
- <view class="titleM">
- 推广大使权益
- </view>
- <view class="list">
- <view class="item" v-for="(item,index) in serList" @click="toPage(index)">
- <!-- <view class="iconBox"> -->
- <image :src="item.icon" mode="widthFix" class="iconBox"></image>
- <!-- </view> -->
- {{item.txt}}
- </view>
- </view>
- <!-- <view class="bLogo"> -->
- <image :src="picBase+'logo_b.png'" mode="" class="bLogo"></image>
- <!-- 短腿鹤伴读
- </view> -->
- </view>
- </view>
- </template>
- <script>
- // import navBar from '@/components/navBar/index.vue'
- import {
- getUserInfo,
- getYongjinList
- } from '@/api/index/index.js'
- export default {
- // components: {
- // navBar
- // },
- data() {
- return {
- statusBarHeight: 20,
- navBareight: 45,
- picBase: this.$picBase2,
- userInfo: null,
- state: true,
- eyeSrc: this.$picBase2 + 'zyan.png',
- eyeSrc2: this.$picBase2 + 'biyan.png',
- serList: [{
- txt: '推广团队',
- icon: this.$picBase2 + 'icon1.png'
- },
- {
- txt: '佣金明细',
- icon: this.$picBase2 + 'icon2.png'
- },
- {
- txt: '佣金提现',
- icon: this.$picBase2 + 'icon3.png'
- },
- {
- txt: '提现明细',
- icon: this.$picBase2 + 'icon2.png'
- },
- {
- txt: '分享海报',
- icon: this.$picBase2 + 'icon5.png'
- },
- ],
- info: {
- totalIncome: 0,
- withdrawIncome: 0,
- // data: []
- }
- }
- },
- onLoad() {
- this.getUserInfo()
- //获取手机系统信息 -- 状态栏高度
- let {
- statusBarHeight,
- windowWidth
- } = uni.getSystemInfoSync()
- this.statusBarHeight = statusBarHeight
- this.windowWidth = windowWidth
- },
- onShow() {
- this.getYongjinList()
- },
- methods: {
- async getYongjinList() {
- let res1 = await getYongjinList()
- console.log('佣金明细返回值--------', res1);
- if (res1.code == 0) {
- this.info = res1.data
- } else {
- this.$toast(res1.message)
- }
- },
- async getUserInfo() {
- let res1 = await getUserInfo()
- console.log('用户信息返回值--------', res1);
- if (res1.code == 0) {
- uni.setStorageSync('userInfo', res1.data)
- this.userInfo = res1.data
- } else {
- this.$toast(res1.message)
- }
- },
- handleShow() {
- this.state = !this.state
- },
- toPage(i) {
- if (i == 0) {
- uni.navigateTo({
- url: '/pages/my/team/index'
- })
- } else if (i == 1) {
- uni.navigateTo({
- url: '/pages/my/yongjinDetail/index'
- })
- } else if (i == 2) {
- uni.navigateTo({
- url: '/pages/my/cash/index'
- })
- } else if (i == 3) {
- uni.navigateTo({
- url: '/pages/my/cashRecord/index'
- })
- } else {
- uni.navigateTo({
- url: '/pages/my/tuiguangHaibao/index'
- })
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "./index.scss";
- </style>
|