123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588 |
- <template>
- <view>
- <view class="padding-top padding-lr">
- <view class="flex justify-between padding-lr-sm align-center infobox">
- <view class="cu-avatar lg round" v-if="workerinfo!=false"
- :style="'background-image:url('+workerinfo.tilpic+');'"></view>
- <view class="workerinfo padding-left-sm">
- <view class="text-df padding-bottom-xs">{{workerinfo.title}}</view>
- <view class="text-gray text-sm flex" v-if="workerinfo.status==1">
- <view class="cu-capsule round margin-right-sm">
- <view class="cu-tag sm bg-red">
- <text class="cuIcon-safe"></text>
- </view>
- <view class="cu-tag sm line-red">待审核</view>
- </view>
- </view>
- <view class="text-gray text-sm flex" v-else>
- <image :src="$getImageUrl('static/images/applet/worker/verified.png')" style="width: 120rpx;" mode="widthFix"></image>
- <!-- <view class="cu-capsule round margin-right-sm">
- <view class="cu-tag sm bg-blue">
- <text class="cuIcon-safe"></text>
- </view>
- <view class="cu-tag sm line-blue">已认证</view>
- </view> -->
- </view>
- </view>
- <view class="btnbox action text-right text-lg">
- <image :src="$getImageUrl('static/images/applet/worker/worker_icon1.png')" class="iconimage"
- @tap="getShopCode" v-if="appplatform!='ios'"></image>
- <image :src="$getImageUrl('static/images/applet/worker/worker_icon2.png')" class="iconimage"
- data-pageurl="/pages/worker/winfo" @click="goPage"></image>
- <!-- <text class="cuIcon cuIcon-share padding-xs round" @tap="getShopCode"></text>
- <text class="cuIcon cuIcon-settings padding-xs round margin-left-lg" data-pageurl="/pages/worker/winfo" @click="goPage"></text> -->
- </view>
- </view>
- <view class="text-center padding-top grid col-3 margin-bottom-sm">
- <view class="padding-tb-sm">
- <view class="text-xxl">{{countobj[1]}}</view>
- <view class="text-gray text-sm">昨日浏览</view>
- </view>
- <view class="padding-tb-sm">
- <view class="text-xxl">{{countobj[2]}}</view>
- <view class="text-gray text-sm">今日浏览</view>
- </view>
- <view class="padding-tb-sm">
- <view class="text-xxl">{{countobj[3]}}</view>
- <view class="text-gray text-sm">累计访客</view>
- </view>
- </view>
- </view>
- <!-- 轮播图 -->
- <swiper class="screen-swiper square-dot padding-lr margin-bottom" :indicator-dots="true" :circular="true"
- :autoplay="true" @change="cardSwiper" interval="5000" duration="500" indicator-color="#8799a3"
- indicator-active-color="#0081ff">
- <block v-for="(item,index) in slide" :key="index">
- <swiper-item class="radius" @tap="pageUrl(item.stype, item.tilurl)">
- <image :src="item.tilpic" mode="scaleToFill"></image>
- </swiper-item>
- </block>
- </swiper>
- <!-- 导航 -->
- <view class="text-center solid-bottom padding-lr margin-bottom">
- <view class="cu-list grid col-1 no-border shadow shadow-lg radius echo-grid"
- style="padding: 0rpx !important;" v-if="workerinfo.wtype==1">
- <view class="cu-item" data-pageurl="/pages/worker/wcomform" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker/worker_comjobs.png')" mode="scaleToFill"></image>
- <text>发布招聘</text>
- </view>
- <!-- <view class="cu-item" data-pageurl="/pages/mall/mall" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker_mall.png')" mode="scaleToFill"></image>
- <text>积分商城</text>
- </view> -->
- </view>
- <view class="cu-list grid col-3 no-border shadow shadow-lg radius echo-grid"
- style="padding: 0rpx !important;" v-else>
- <view class="cu-item" data-pageurl="/pages/worker/wcomform" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker/worker_comjobs.png')" mode="scaleToFill"></image>
- <text>发布招聘</text>
- </view>
- <view class="cu-item" data-pageurl="/pages/demand/demandform" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker/worker_demand.png')" mode="scaleToFill"></image>
- <text>发布派遣</text>
- </view>
- <view class="cu-item" data-pageurl="/pages/supply/supplyform" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker/worker_supply.png')" mode="scaleToFill"></image>
- <text>发布供人</text>
- </view>
- <!-- <view class="cu-item" data-pageurl="/pages/mall/mall" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker_mall.png')" mode="scaleToFill"></image>
- <text>积分商城</text>
- </view> -->
- </view>
- </view>
- <view class="padding-lr-lg padding-tb-xs">
- <text class="text-gray">其他功能</text>
- </view>
- <view class="padding-lr margin-tb-sm">
- <view class="cu-list grid col-3 no-border shadow shadow-lg radius echo-grid workernav-grid">
- <view class="cu-item" data-pageurl="/pages/worker/wcomlist" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker/workernav1.png')" mode="scaleToFill"></image>
- <text>我的招聘</text>
- </view>
- <view class="cu-item" data-pageurl="/pages/worker/invite" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker/workernav8.png')" mode="scaleToFill"></image>
- <text>我的邀请</text>
- </view>
- <view v-if="workerinfo.wtype==2" class="cu-item" data-pageurl="/pages/demand/wdemandlist" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker/workernav3.png')" mode="scaleToFill"></image>
- <text>派遣订单</text>
- </view>
- <view class="cu-item" data-pageurl="/pages/supply/wsupplylist" @tap="goPage" v-if="workerinfo.wtype==2">
- <image :src="$getImageUrl('static/images/applet/worker/workernav2.png')" mode="scaleToFill"></image>
- <text>我的供人</text>
- </view>
- <view class="cu-item" data-pageurl="/pages/worker/wcomlog" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker/workernav6.png')" mode="scaleToFill"></image>
- <text>招聘报名记录</text>
- </view>
- <view class="cu-item" data-pageurl="/pages/worker/wreportlist" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/worker/workernav13.png')" mode="scaleToFill"></image>
- <text>悬赏记录</text>
- </view>
- <view class="cu-item" data-pageurl="/pages/demand/snatch" @tap="goPage" v-if="workerinfo.wtype==2">
- <image :src="$getImageUrl('static/images/applet/worker/workernav4.png')" mode="scaleToFill"></image>
- <text>我接的派遣</text>
- </view>
- <!-- <view class="cu-item" data-pageurl="/pages/my/myintegral" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/workernav5.png')" mode="scaleToFill"></image>
- <text>我的积分</text>
- </view> -->
- <!-- <view v-if="workerinfo.wtype==1" class="cu-item" data-pageurl="/pages/worker/wupdate" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/workernav10.png')" mode="scaleToFill"></image>
- <text>升级到派遣</text>
- </view> -->
- <!--
- <view class="cu-item" data-pageurl="/pages/form/form?formid=3" @click="goHome">
- <image :src="$getImageUrl('static/images/applet/workernav7.png')" mode="scaleToFill"></image>
- <text>切换身份</text>
- </view>
-
- <view class="cu-item" data-pageurl="/pages/form/form?formid=3" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/workernav7.png')" mode="scaleToFill"></image>
- <text>申请加盟</text>
- </view>
-
- <view class="cu-item" data-pageurl="/pages/form/form?formid=5" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/workernav8.png')" mode="scaleToFill"></image>
- <text>工厂招聘</text>
- </view>
- -->
- <view class="cu-item" data-pageurl="/pages/worker/outjoblist" @tap="goPage" v-if="workerinfo.wtype==2">
- <image :src="$getImageUrl('static/images/applet/worker/workernav1.png')" mode="scaleToFill"></image>
- <text>省外招聘</text>
- </view>
- <view class="cu-item" data-pageurl="/pages/worker/wshare" @tap="goPage" v-if="appplatform!='ios'">
- <image :src="$getImageUrl('static/images/applet/worker/workernav9.png')" mode="scaleToFill"></image>
- <text>获客海报</text>
- </view>
- <!-- <view class="cu-item" data-pageurl="/pages/article/article" @tap="goPage">
- <image :src="$getImageUrl('static/images/applet/workernav11.png')" mode="scaleToFill"></image>
- <text>资讯中心</text>
- </view> -->
- <!-- <view class="cu-item" data-pageurl="/pages/worker/mpaccount" @tap="goPage" v-if="appplatform!='ios' && workerinfo.wtype==2">
- <image :src="$getImageUrl('static/images/applet/workernav12.png')" mode="scaleToFill"></image>
- <text>嵌入公众号</text>
- </view> -->
- </view>
- </view>
- <!-- <view class="padding-sm"></view> -->
- <view class="padding-lg"></view>
- <view class="cu-bar tabbar bg-white foot">
- <view class="action text-red" @tap="goNavPage('/pages/worker/worker')">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/windexSelected.png"></image>
- </view>
- 首页
- </view>
- <view class="action text-gray" @tap="goNavPage('/pages/demand/demand')" v-if="workerinfo.wtype==2">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/wdemand.png"></image>
- </view>
- 抢单大厅
- </view>
- <!-- #ifndef MP-WEIXIN -->
- <view class="action text-gray videoimg" @tap="goNavPage('/pages/video/video')">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/video.png"></image>
- </view>
- 录视频
- </view>
- <!-- #endif -->
- <view class="action text-gray" @tap="goNavPage('/pages/resume/resume')">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/resume.png"></image>
- </view>
- 简历
- </view>
- <view class="action text-gray" @tap="goNavPage('/pages/supply/supply')" v-if="workerinfo.wtype==2">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/wsupply.png"></image>
- </view>
- 共享用工
- </view>
- <!--
- <view class="action text-gray" @tap="goNavPage('/pages/worker/workerlist')">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/wworker.png"></image>
- </view>
- 企业1
- </view>
- -->
- </view>
- <button class="cu-btn bg-themeBtn lg shadow echo-gohome" @tap="goHome"> 切换身份 </button>
- <wxContact></wxContact>
- <view class="padding-xl"></view>
- <view class="cu-modal" :class="modal.name=='regworker'?'show':''" @tap="hideModal">
- <view class="cu-dialog picmodal" @tap.stop="">
- <view class="bg-img">
- <image mode="widthFix" style="display: block;" :src="picregworker" v-if="picregworker"></image>
- <view class="cu-bar justify-end text-white picmodalclose">
- <view class="action" @tap="hideModal">
- <text class="cuIcon-close "></text>
- </view>
- </view>
- </view>
- <view class="cu-bar bg-white radius">
- <view class="action margin-0 flex-sub solid-left" @tap="getWorkerIntegral">立即领取</view>
- </view>
- </view>
- </view>
- <!-- <view class="cu-modal" :class="modal.name=='regworker'?'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-lg">
- <view class="solid-bottom text-xsl padding-bottom">
- <text class=" cuIcon-selection text-red"></text>
- </view>
- <view class="text-xl">
- 恭喜您,注册的劳务公司账号审核通过,获得 {{intregworker}} 积分,请点击领取...
- </view>
- </view>
- <view class="cu-bar bg-white justify-end">
- <view class="action">
- <button class="cu-btn" @tap="hideModal">取消</button>
- <button class="cu-btn bg-blue margin-left" @tap="getWorkerIntegral">立即领取</button>
- </view>
- </view>
- </view>
- </view> -->
- <view class="cu-modal" :class="modal.name=='shopcode'?'show':''" @tap="hideModal">
- <view class="cu-dialog picmodal" @tap.stop="">
- <view class="bg-img">
- <image mode="widthFix" :src="modal.shopcode" v-if="modal.shopcode"></image>
- <view class="cu-bar justify-end text-white picmodalclose">
- <view class="action" @tap="hideModal">
- <text class="cuIcon-close "></text>
- </view>
- </view>
- </view>
- <view class="cu-bar bg-white margin-top-xs">
- <view class="action margin-0 flex-sub solid-left" @tap="saveImage">保存到相册</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- var _this;
- export default {
- data() {
- return {
- appplatform: "",
- isRotate: false,
- userinfo: false,
- workerinfo: {},
- picregworker: "",
- intregworker: 0,
- slide: {},
- cardCur: 0,
- countobj: {
- tentry: 0,
- entry: 0
- },
- modal: {
- name: "",
- shopcode: ""
- }
- }
- },
- onLoad: function() {
- _this = this;
- //#ifdef APP-PLUS
- _this.appplatform = uni.getSystemInfoSync().platform;
- //#endif
- _this.userinfo = uni.getStorageSync('userinfo') || false;
- _this.workerinfo = uni.getStorageSync('workerinfo') || false;
- if (_this.workerinfo === false) {
- uni.reLaunch({
- url: "/pages/my/my"
- });
- return false;
- }
- _this.$req.ajax({
- path: "worker/pageworker",
- data: {
- userid: _this.userinfo.id,
- workerid: _this.workerinfo.id
- }
- }).then((data) => {
- _this.countobj = data.countobj;
- _this.slide = data.slide;
- _this.picregworker = data.picregworker;
- _this.intregworker = data.intregworker;
- if (_this.intregworker > 0) {
- _this.modal.name = "regworker";
- }
- _this.workerinfo = data.workerinfo;
- uni.setStorageSync('workerinfo', _this.workerinfo);
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- methods: {
- getWorkerIntegral: function() {
- if (_this.isRotate) {
- return false;
- }
- _this.isRotate = true;
- _this.$req.ajax({
- title: "积分发放中...",
- path: "worker/getworkerintegral",
- data: {
- userid: _this.userinfo.id,
- workerid: _this.workerinfo.id
- }
- }).then((data) => {
- uni.showToast({
- title: '积分领取成功',
- duration: 2000
- });
- _this.intregworker = 0;
- _this.modal.name = "";
- _this.isRotate = false;
- }).catch((err) => {
- uni.showModal({
- title: '温馨提示',
- content: err,
- showCancel: false
- });
- _this.isRotate = false;
- });
- },
- saveImage: function() {
- uni.downloadFile({
- url: _this.modal.shopcode, //仅为示例,并非真实的资源
- success: (res) => {
- if (res.statusCode === 200) {
- uni.saveImageToPhotosAlbum({
- filePath: res.tempFilePath,
- success: function() {
- uni.showModal({
- title: '信息提示',
- content: "已保存到手机相册,注意查收。",
- showCancel: false
- });
- }
- });
- }
- }
- });
- },
- getShopCode: function() {
- _this.$req.ajax({
- title: "微店二维码生成中...",
- path: "worker/getshopcode",
- data: {
- workerid: _this.workerinfo.id,
- parentid: _this.userinfo == false ? 0 : _this.userinfo.id
- }
- }).then((data) => {
- _this.modal.shopcode = data.shopcode;
- _this.modal.name = "shopcode";
- }).catch((err) => {
- uni.showModal({
- title: '温馨提示',
- content: err,
- showCancel: false
- });
- });
- },
- hideModal: function() {
- _this.modal.name = "";
- },
- goHome: function() {
- uni.setStorageSync('identityinfo', false);
- uni.setStorageSync('workerinfo', null);
- uni.reLaunch({
- url: "/pages/index/home"
- });
- },
- workerOut: function() {
- uni.setStorageSync('workerinfo', null);
- uni.reLaunch({
- url: "/pages/index/home"
- });
- },
- goNavPage: function(pageurl) {
- _this.userinfo = _this.checkLogin("/pages/my/my");
- if (_this.userinfo === false) {
- return false;
- }
- uni.redirectTo({
- url: pageurl
- });
- },
- goPage: function(e) {
- var pageurl = e.currentTarget.dataset.pageurl;
- uni.navigateTo({
- url: pageurl,
- fail: function() {
- uni.switchTab({
- url: pageurl
- });
- }
- });
- },
- cardSwiper: function(e) {
- _this.cardCur = e.detail.current
- },
- pageUrl: function(type, tilurl) {
- if (type == 1) {
- uni.navigateTo({
- url: tilurl,
- fail: function() {
- uni.switchTab({
- url: tilurl
- });
- }
- });
- } else {
- uni.navigateTo({
- url: '/pages/tool/webview?pagesrc=' + encodeURIComponent(tilurl)
- });
- }
- },
- }
- }
- </script>
- <style>
- .workernav-grid image {
- width: 70rpx;
- height: 70rpx;
- margin-bottom: 10rpx;
- }
- .infobox {}
- .infobox .cu-avatar {
- width: 100rpx;
- }
- .infobox .workerinfo {
- width: 380rpx;
- }
- .infobox .btnbox {
- width: 190rpx;
- }
- .codebox {
- /* width: 690rpx;
- margin: 0rpx auto 0rpx auto;
- border-radius: 8rpx;
- overflow: hidden; */
- }
- .iconimage {
- width: 34rpx;
- height: 34rpx;
- margin-left: 30rpx;
- }
- .echo-grid image {
- width: 48rpx;
- height: 48rpx;
- margin-bottom: 10rpx;
- }
- .wnavbox {}
- .wnavbox .wcomitem {
- width: 340rpx !important;
- margin-bottom: 15rpx;
- }
- .wnavbox .wcomitem image {
- display: block;
- width: 70rpx;
- height: 70rpx;
- }
- .wnavbox .wcomitem .wcomtil {
- width: 210rpx;
- line-height: 90rpx;
- padding-left: 20rpx;
- color: #0081FF;
- font-size: 30rpx;
- }
- .picmodal {
- width: 640rpx;
- background-color: transparent;
- }
- .picmodal image {
- width: 100%;
- }
- .picmodal .bg-img {
- position: relative;
- }
- .picmodalclose {
- position: absolute;
- top: 0rpx;
- right: 0rpx;
- }
- .screen-swiper {
- min-height: 160rpx;
- height: 160rpx;
- }
- </style>
|