| | |
| | | <view class="header"> |
| | | <view class="header-img"> |
| | | <view class="header-image-left" @click='tologin'> |
| | | <image lazyLoad @tap="chooseImage" data-ptpid="4c7f-1f6c-b145-b80f" |
| | | :src="avatarUrl + '?imageView2/0/w/180'" v-if="avatarUrl"></image> |
| | | <view class="header-name">{{ userName || (isLogin ? '暂无小主信息' : '登录开启赚钱之旅哦') }}</view> |
| | | <up-avatar :src="userInfo.avatar" shape="circle" size='60'></up-avatar> |
| | | <view class="header-name">{{ userInfo.nickname || (isLogin ? '暂无小主信息' : '登录开启赚钱之旅哦') }}</view> |
| | | </view> |
| | | <view @tap="changRole" class="header-image-right chuany-flex chuany-align-center chuany-justify-center" |
| | | data-ptpid="e758-138d-b914-343f"> |
| | |
| | | </view> |
| | | <view class="num-box"> |
| | | <view @tap="goWallet" class="num-item" data-ptpid="ef57-17f4-bbea-280f"> |
| | | <view class="num-bold">{{ money }}元</view> |
| | | <view class="num-bold">{{ balance }}元</view> |
| | | <view class="num-text"> |
| | | <text class="c-m-r-10">{{ identity=='enterprise' ? '企业余额' : '立即提现' }}</text> |
| | | <up-icon name="arrow-right-double"></up-icon> |
| | |
| | | 我的企业 |
| | | </view> |
| | | </view> |
| | | <view class="tool_item" @click="toPage('/otherPages/member/sendCompany/sendCompany')"> |
| | | <view class="tool_item" @click="toWorkerRecord"> |
| | | <image src="@/static/image/record.png" mode="aspectFit" class="item_img"></image> |
| | | <view class="tool_label"> |
| | | 打卡记录 |
| | | </view> |
| | | </view> |
| | | <!-- <view class="tool_item" @click="toPage('/otherPages/member/sendCompany/sendCompany')"> |
| | | <image src="@/static/image/server.png" mode="aspectFit" class="item_img"></image> |
| | | <view class="tool_label"> |
| | | 服务中心 |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="text">已完成</view> |
| | | </view> |
| | | </view> --> |
| | | <inner-banner className="mg32" :list="bannerList" ptpId="1ab7-1b95-8e0e-3b22"></inner-banner> |
| | | <view class="nav-box" v-if="identity=='enterprise'"> |
| | | <view @tap="item.cb" class="nav-item" :data-index="index" data-ptpid="58ac-1481-a7d3-b98e" |
| | | v-for="(item, index) in navList" :key="item.name"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | var n = ['https://qiniu-image.qtshe.com/719defaultAvatar1.png', 'https://qiniu-image.qtshe.com/719defaultAvatar2.png', |
| | | 'https://qiniu-image.qtshe.com/719defaultAvatar3.png' |
| | | ]; |
| | | var app = getApp(); |
| | | export default { |
| | | |
| | | data() { |
| | | return { |
| | | identity: '', |
| | | money: '0.00', |
| | | score: 0, |
| | | perfectResume: false, |
| | | bannerList: [], |
| | | navList: [ |
| | | // { |
| | | // icon: 'iconmy_collect_normal', |
| | | // name: '我的收藏', |
| | | // num: 0, |
| | | // cb: function () { |
| | | // uni.navigateTo({ |
| | | // url: '/pages/collect/collect' |
| | | // }); |
| | | // } |
| | | // }, |
| | | |
| | | // { |
| | | // icon: 'iconmy_new_normal', |
| | | // name: '服务中心', |
| | | // cb: function () { |
| | | // uni.navigateTo({ |
| | | // url: '/pages/webview/webview?targetUrl=' + encodeURIComponent(l + '/service/index') |
| | | // }); |
| | | // } |
| | | // }, |
| | | // { |
| | | // { |
| | | // icon: 'icon-huabanfuben', |
| | | // name: '用户设置', |
| | | // cb: this.pushImg |
| | | // } |
| | | // name: '工人打卡记录', |
| | | // cb: function() { |
| | | // uni.navigateTo({ |
| | | // url: '/pages/company/index' |
| | | // }); |
| | | // } |
| | | // }, |
| | | ], |
| | | navList1: [{ |
| | | icon: 'icon-dingdan', |
| | |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | { |
| | | icon: 'icon-fuwutuandui', |
| | | name: '工作记录', |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // { |
| | | // icon: 'icon-huabanfuben', |
| | | // name: '用户设置', |
| | | // cb: function() { |
| | | |
| | | // } |
| | | // } |
| | | ], |
| | | userApplyStatistics: { |
| | | allCount: 0, |
| | | hasApplyCount: 0, |
| | | applyOngoingCount: 0, |
| | | applySuccessCount: 0 |
| | | }, |
| | | isDialog: false, |
| | | signInfo: { |
| | | attendanceNumber: '', |
| | | attendanceIntegralList: '', |
| | | attendanceTotal: '', |
| | | beansList: '' |
| | | }, |
| | | beansList: [5, 5, 5, 5, 50, 5, 100], |
| | | attendance: false, |
| | | userName: '', |
| | | avatarUrl: 'https://qiniu-image.qtshe.com/719defaultAvatar2.png', |
| | | isLogin: false, |
| | | userInfo: {}, |
| | | balance: '0.00' |
| | | }; |
| | | }, |
| | | onLoad: function() { |
| | | |
| | | |
| | | }, |
| | | onShow: function() { |
| | | let that = this |
| | | uni.hideShareMenu(); |
| | | this.userInfo = this.$db.get('userInfo') ? JSON.parse(this.$db.get('userInfo')) : {} |
| | | this.token = this.$db.get('userToken') ? this.$db.get('userToken') : '' |
| | | uni.getStorage({ |
| | | key: 'identity', |
| | | success: function(res) { |
| | | that.identity = res.data |
| | | if (res.data == 'worker') { |
| | | that.balance = that.$common.moneySub(that.userInfo.userWorker.tiXianZonge, that |
| | | .userInfo.userWorker.yiTiXianJine) |
| | | } else { |
| | | console.log(that.identity, that.userInfo.userWorker.tiXianZonge, |
| | | 'userInfo.userWorker.tiXianZonge'); |
| | | that.balance = that.userInfo.userCompany.chongZhiYue ? that.userInfo.userCompany |
| | | .chongZhiYue : '0.00' |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | onShow: function() { |
| | | this.resourceBanner(); |
| | | |
| | | this.token = this.$db.get('userToken') ? this.$db.get('userToken') : '' |
| | | // this.userInfo = this.$db.get('userInfo') ? JSON.parse(this.$db.get('userInfo')) : {} |
| | | // this.token = this.$db.get('userToken') ? this.$db.get('userToken') : '' |
| | | this.isLogin = this.token ? true : false; |
| | | }, |
| | | onShareAppMessage: function() { |
| | |
| | | url: '/pages/enterprise/index' |
| | | }) |
| | | }, |
| | | checkToken: function(t) {}, |
| | | |
| | | loginOutInit: function() {}, |
| | | |
| | | getQtbaoMoney: function() {}, |
| | | |
| | | checkNumber: function(t) {}, |
| | | |
| | | getSignInfo: function(t) {}, |
| | | |
| | | changRole: function() { |
| | | toWorkerRecord() { |
| | | uni.navigateTo({ |
| | | url: '/pages/company/index' |
| | | }); |
| | | }, |
| | | changRole() { |
| | | this.identity = this.identity === 'enterprise' ? 'worker' : 'enterprise' |
| | | console.log(this.identity, 'this.identity'); |
| | | uni.setStorage({ |
| | | key: 'identity', |
| | | data: this.identity, |
| | | }); |
| | | if (this.identity == 'worker') { |
| | | this.balance = this.$common.moneySub(this.userInfo.userWorker.tiXianZonge, this.userInfo.userWorker |
| | | .yiTiXianJine) |
| | | } else { |
| | | this.balance = this.userInfo.userCompany.chongZhiYue ? this.userInfo.userCompany.chongZhiYue : |
| | | '0.00' |
| | | } |
| | | }, |
| | | |
| | | handleReset: function() {}, |
| | | |
| | | resourceBanner: function() {}, |
| | | |
| | | navTap: function(t) {}, |
| | | |
| | | loginSuccess: function() {}, |
| | | |
| | | chooseImage: function(t) {}, |
| | | |
| | | getImage: function(t) {}, |
| | | |
| | | goWallet: function() { |
| | | goWallet() { |
| | | uni.navigateTo({ |
| | | url: '/pages/wallet/index', |
| | | fail: function(err) { |
| | | fail(err) { |
| | | console.log(err); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | skipToQtsbean: function() {}, |
| | | |
| | | gotoMyJob: function(t) {}, |
| | | |
| | | // 跳转到简历完善页面 |
| | | skipToResume: function() { |
| | | uni.navigateTo({ |
| | | url: '/mine/resume/resume', |
| | | fail: function(err) { |
| | | console.log(err); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |