| | |
| | | <template>
|
| | | <view class="main_app">
|
| | | <view class="title_wrap">
|
| | | <view class="name" v-if="userInfo.realname">{{ userInfo.realname || "" }},欢迎登录~</view>
|
| | | <view class="name" v-if="userInfo.realname">{{ userInfo.realname || userInfo.username || "" }},欢迎登录~</view>
|
| | | <view class="name" v-else>请先登录</view>
|
| | | <view class="btn" @click="loginOut">{{
|
| | | userInfo.realname ? "退出登录" : "去登录"
|
| | | userInfo.username ? "账号解绑" : "去登录"
|
| | | }}</view>
|
| | | </view>
|
| | | <view class="banner_wrap">
|
| | |
| | | stagingHead,
|
| | | wxAuthorize,
|
| | | refreshToken,
|
| | | app_url
|
| | | app_url, |
| | | delHkUserOpenid
|
| | | } from '@/api'
|
| | | export default {
|
| | | data() {
|
| | |
| | | onLoad() {
|
| | | const ywinfo = uni.getStorageSync('ywinfo') || {}
|
| | | if (ywinfo.ywid && ywinfo.type == 2) {
|
| | | setTimeout(() => {
|
| | | uni.removeStorageSync('ywinfo')
|
| | | }, 500)
|
| | | uni.setStorageSync('ywinfo',{})
|
| | | const yw = ywinfo.yw
|
| | | if (yw == 1 || yw == 6) {
|
| | | this.jump('/pages/staff/meetingDetail?id=' + ywinfo.ywid)
|
| | | } else if (yw == 2) {
|
| | | this.jump('/pages/staff/task/visitorApprove?id=' + ywinfo.ywid)
|
| | | } else if (yw == 3) {
|
| | | this.jump('/pages/staff/task/visitorReport?id=' + ywinfo.ywid)
|
| | | } else if (yw == 4) {
|
| | | this.jump('/pages/staff/task/vDangetAppr?id=' + ywinfo.ywid)
|
| | | } else if (yw == 7) {
|
| | | this.jump('/pages/staff/task/driver?id=' + ywinfo.ywid)
|
| | | } else if (yw == 5) {
|
| | | this.jump('/pages/staff/vehicle/index')
|
| | | }
|
| | | setTimeout(() => {
|
| | | if (yw == 1 || yw == 6) {
|
| | | this.jump('/pages/staff/meetingDetail?id=' + ywinfo.ywid)
|
| | | } else if (yw == 2) {
|
| | | this.jump('/pages/staff/task/visitorApprove?id=' + ywinfo.ywid)
|
| | | } else if (yw == 3) {
|
| | | this.jump('/pages/staff/task/visitorReport?id=' + ywinfo.ywid)
|
| | | } else if (yw == 4) {
|
| | | this.jump('/pages/staff/task/vDangetAppr?id=' + ywinfo.ywid)
|
| | | } else if (yw == 7) {
|
| | | this.jump('/pages/staff/task/driver?id=' + ywinfo.ywid)
|
| | | } else if (yw == 5) {
|
| | | this.jump('/pages/staff/vehicle/sendACarDetail?id=' + ywinfo.ywid)
|
| | | }
|
| | | }, 100)
|
| | | }
|
| | | },
|
| | | onShow() {
|
| | |
| | |
|
| | | },
|
| | | checkAuth(str) {
|
| | | const permissions = this.userInfo.permissions
|
| | | const permissions = this.userInfo.permissions || []
|
| | | return permissions.indexOf(str) > -1
|
| | | },
|
| | | loginOut() {
|
| | | logoutPost({
|
| | | isH5: 1
|
| | | }).then(res => { |
| | | const userInfo = uni.getStorageSync('userInfo') |
| | | const openId = uni.getStorageSync('openId') |
| | | this.$store.commit('empty') |
| | | setTimeout(() => { |
| | | window.location.href = app_url |
| | | }, 300) |
| | | if(openId){ |
| | | delHkUserOpenid({ |
| | | userName: userInfo.username, |
| | | openId |
| | | }).then(ress => { |
| | | setTimeout(() => { |
| | | window.location.href = app_url |
| | | }, 300) |
| | | }) |
| | | }else{ |
| | | setTimeout(() => { |
| | | window.location.href = app_url |
| | | }, 300) |
| | | } |
| | | |
| | | })
|
| | | },
|
| | | getTaskInfo() {
|
| | |
| | | width: 144rpx;
|
| | | height: 56rpx;
|
| | | border-radius: 36rpx;
|
| | | border: 1rpx solid $uni-color-primary;
|
| | | border: 1rpx solid #B2B2B2;
|
| | | font-size: 26rpx;
|
| | | color: $uni-color-primary;
|
| | | color: #666666;
|
| | | display: flex;
|
| | | justify-content: center;
|
| | | align-items: center;
|