123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <template>
- <view>
- <view class="header">
- <image
- :src="brokerinfo.type == 1 ? $getImageUrl('static/images/applet/broker/topBg.png') : $getImageUrl('static/images/applet/broker/topBgRed.png')"
- class="header-image" mode="widthFix"></image>
- <view class="header-notice" @click="goPage('/pages/broker/brokerNotice')">
- <u-icon name="volume" color="#E0E0E0" size="28"></u-icon>
- <view>公告</view>
- </view>
- </view>
- <view class="cu-bar bg-white solid-bottom">
- <view class="action">
- <text class="cuIcon-title text-orange "></text> {{income_title}}
- </view>
- <view class="action">
- <button class="cu-btn bg-green shadow" @click="goNavPage('/pages/broker/income')">详情</button>
- </view>
- </view>
- <view class="lw-table">
- <view class="lw-table-item padding">
- <view :class="{'text-price':brokerinfo.type == 1}" class="lw-table-value text-bold text-red">
- {{statistics.income_total}}
- </view>
- <view class="lw-table-title text-gray padding-top-xs">{{income_total_title}}</view>
- </view>
- <view class="lw-table-item padding">
- <view :class="{'text-price':brokerinfo.type == 1}" class="lw-table-value text-bold text-red">
- {{statistics.income}}
- </view>
- <view class="lw-table-title text-gray padding-top-xs">{{income_now_title}}</view>
- </view>
- </view>
- <view class="cu-bar bg-white solid-bottom margin-top">
- <view class="action">
- <text class="cuIcon-title text-orange "></text> 我发展的用户
- </view>
- </view>
- <view class="lw-table">
- <view class="lw-table-item padding" @click="goNavPage('/pages/broker/myuser')">
- <view class="lw-table-value text-bold text-black">{{statistics.user}}</view>
- <view class="lw-table-title text-gray padding-top-xs">求职用户</view>
- </view>
- <view class="lw-table-item padding" @click="goNavPage('/pages/broker/myworker')">
- <view class="lw-table-value text-bold text-black">{{statistics.worker}}</view>
- <view class="lw-table-title text-gray padding-top-xs">雇主用户</view>
- </view>
- </view>
- <view class="cu-list grid col-3 no-border margin-top">
- <view class="cu-item text-center" @click="showAgent">
- <image class="myicon" :src="$getImageUrl('static/images/applet/broker/agent.png')"
- style="width: 50rpx;height: 50rpx;"></image>
- <text>门店信息</text>
- </view>
- <view class="cu-item text-center" @click="goNavPage('/pages/broker/broker')">
- <image class="myicon" :src="$getImageUrl('static/images/applet/broker/code.png')"
- style="width: 50rpx;height: 50rpx;"></image>
- <text>我的邀请码</text>
- </view>
- <view class="cu-item text-center" @click="goNavPage('/pages/broker/myorder')">
- <image class="myicon" :src="$getImageUrl('static/images/applet/broker/order.png')"
- style="width: 50rpx;height: 50rpx;"></image>
- <text>劳务订单</text>
- <view style="color: #888;font-size: 26rpx;">(针对劳务机构)</view>
- </view>
- <view class="cu-item text-center" @click="goNavPage('/pages/my/myentry')">
- <image class="myicon" :src="$getImageUrl('static/images/applet/broker/record.png')"
- style="width: 50rpx;height: 50rpx;"></image>
- <text>悬赏报备记录</text>
- </view>
- </view>
-
- <view class="cu-modal" :class="modalName=='agentModal'?'show':''">
- <view class="cu-dialog">
- <view class="cu-bar bg-white justify-end">
- <view class="content">我的门店</view>
- <view class="action" @tap="hideModal">
- <text class="cuIcon-close text-red"></text>
- </view>
- </view>
- <view class="padding-xl text-left text-lg">
- <view>门店名:{{statistics.agent.title}}</view>
- <view class="margin-top-sm">联系人:{{statistics.agent.realname}}</view>
- <view class="margin-top-sm">电话:{{statistics.agent.mobile}}</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- var _this;
- export default {
- data() {
- return {
- userinfo: {},
- brokerinfo: {},
- statistics: {
- income_total: 0,
- income: 0,
- user: 0,
- worker: 0,
- agent: {},
- },
- modalName: '',
- };
- },
- onLoad: function() {
- _this = this;
- _this.userinfo = uni.getStorageSync('userinfo') || false;
- _this.brokerinfo = uni.getStorageSync('brokerinfo') || false;
- if (_this.userinfo === false || _this.brokerinfo === false) {
- uni.reLaunch({
- url: "/pages/my/my"
- });
- return false;
- }
- _this.init();
- },
- methods: {
- goPage(src) {
- uni.navigateTo({
- url: '/pages/broker/brokerNotice'
- });
- },
-
- init: function() {
- _this.$req.ajax({
- path: "broker/center",
- data: {
- brokerid: _this.brokerinfo.id
- }
- }).then((data) => {
- _this.statistics = data
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- goNavPage: function(pageurl) {
- _this.userinfo = _this.checkLogin("/pages/my/my");
- if (_this.userinfo === false) {
- return false;
- }
- uni.navigateTo({
- url: pageurl,
- fail: function() {
- uni.switchTab({
- url: pageurl
- });
- }
- });
- },
- hideModal: function(e) {
- _this.modalName = null;
- },
- showAgent: function() {
- _this.modalName = "agentModal";
- },
- },
- computed: {
- income_title() {
- return _this.brokerinfo.type == 1 ? '我的收益' : '我的积分';
- },
- income_total_title() {
- return _this.brokerinfo.type == 1 ? '总收益' : '总积分';
- },
- income_now_title() {
- return _this.brokerinfo.type == 1 ? '当前收益' : '剩余积分';
- },
- income_unit() {
- return _this.brokerinfo.type == 1 ? '元' : '分';
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .header {
- height: 146rpx;
- position: relative;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- .header-image {
- width: 750rpx;
- position: absolute;
- top: 0;
- left: 0;
- z-index: -1;
- }
- .header-notice {
- padding-right: 40rpx;
- font-size: 25rpx;
- color: #E0E0E0;
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- }
- .lw-table {
- display: flex;
- align-items: center;
- justify-content: space-around;
- background: white;
- padding: 20rpx 0;
- }
- .lw-table .lw-table-item {
- text-align: center;
- }
- .lw-table .lw-table-value {
- font-size: 40rpx;
- }
- </style>
|