|
@@ -10,15 +10,9 @@
|
|
<view class="userInfo" @click.capture="toUserInfo">
|
|
<view class="userInfo" @click.capture="toUserInfo">
|
|
<!-- <u-avatar :src="userInfo.avatar" size="120rpx"></u-avatar> -->
|
|
<!-- <u-avatar :src="userInfo.avatar" size="120rpx"></u-avatar> -->
|
|
<view class="logo-title">
|
|
<view class="logo-title">
|
|
- <view class="user-name" v-if="hasLogin">
|
|
|
|
- <span>{{userInfo.displayName||userInfo.username}}</span>
|
|
|
|
- <span class="role-tag" v-if="isDriverUser">{{$t('mine.driver')}}</span>
|
|
|
|
- <span class="role-tag" v-if="isDealerUser">{{$t('mine.dealer')}}</span>
|
|
|
|
- <span class="role-tag" v-if="isAuditUser">{{$t('mine.auditUser')}}</span>
|
|
|
|
- <span class="role-tag" v-if="isTransUser">{{$t('order.transporter')}}</span>
|
|
|
|
|
|
+ <view class="user-name">
|
|
|
|
+ <span>退出登录</span>
|
|
</view>
|
|
</view>
|
|
- <text class="user-name" v-else>{{$t('mine.notLogged')}}</text>
|
|
|
|
- <text class="user-phone">{{userInfo.phone}}</text>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -103,83 +97,6 @@
|
|
icon: "file-text",
|
|
icon: "file-text",
|
|
to: '/subpages/order/dealerList?index=0'
|
|
to: '/subpages/order/dealerList?index=0'
|
|
},
|
|
},
|
|
- gridList: [{
|
|
|
|
- title: this.$t("mine.reviewed"),
|
|
|
|
- icon: "../../static/czzn-img/info/info-order.png",
|
|
|
|
- dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=0',
|
|
|
|
- driverTo: '/subpages/order/driverList?orderType=0&orderStatus=0'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: this.$t("mine.unpaid"),
|
|
|
|
- icon: "../../static/czzn-img/info/info-jc.png",
|
|
|
|
- dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=1',
|
|
|
|
- driverTo: '/subpages/order/driverList?orderType=0&orderStatus=1'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: this.$t("mine.weigh"),
|
|
|
|
- icon: "../../static/czzn-img/info/info-gb.png",
|
|
|
|
- dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=3',
|
|
|
|
- driverTo: '/subpages/order/driverList?orderType=0&orderStatus=3'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: this.$t("mine.ongoing"),
|
|
|
|
- icon: "../../static/czzn-img/info/info-cc.png",
|
|
|
|
- dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=2',
|
|
|
|
- driverTo: '/subpages/order/driverList?orderType=0&orderStatus=2'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: this.$t("mine.invalid"),
|
|
|
|
- icon: "../../static/czzn-img/info/info-zf.png",
|
|
|
|
- dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=4',
|
|
|
|
- driverTo: '/subpages/order/driverList?orderType=0&orderStatus=4'
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- ],
|
|
|
|
- driverMenuList: [{
|
|
|
|
- title: this.$t("mine.vehicle"),
|
|
|
|
- icon: "../../static/czzn-img/info/info-cl.png",
|
|
|
|
- to: '/subpages/driver/driverList',
|
|
|
|
- count: 0,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: this.$t("mine.feedback"),
|
|
|
|
- icon: imgUtil.feedbackIcon,
|
|
|
|
- to: '/substaticpages/info/feedback',
|
|
|
|
- count: 0,
|
|
|
|
- },
|
|
|
|
- // {
|
|
|
|
- // title: this.$t("mine.mp"),
|
|
|
|
- // icon: "../../static/czzn-img/info/info-msg.png",
|
|
|
|
- // to: '/subpages/mp/index',
|
|
|
|
- // count: 0,
|
|
|
|
- // },
|
|
|
|
- ],
|
|
|
|
- dealerMenuList: [{
|
|
|
|
- title: this.$t("mine.enterprise"),
|
|
|
|
- icon: imgUtil.enterpriseIcon,
|
|
|
|
- to: '/subpages/tenant/list',
|
|
|
|
- count: 0,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: this.$t("mine.driver"),
|
|
|
|
- icon: imgUtil.driverIcon,
|
|
|
|
- to: '/subpages/driver/dealerList',
|
|
|
|
- count: 0,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: this.$t("mine.feedback"),
|
|
|
|
- icon: imgUtil.feedbackIcon,
|
|
|
|
- to: '/substaticpages/info/feedback',
|
|
|
|
- count: 0,
|
|
|
|
- },
|
|
|
|
- // {
|
|
|
|
- // title: this.$t("mine.mp"),
|
|
|
|
- // icon: "../../static/czzn-img/info/info-msg.png",
|
|
|
|
- // to: '/subpages/mp/index',
|
|
|
|
- // count: 0,
|
|
|
|
- // },
|
|
|
|
- ],
|
|
|
|
-
|
|
|
|
role: [],
|
|
role: [],
|
|
userType: "0",
|
|
userType: "0",
|
|
tenantCount: 0,
|
|
tenantCount: 0,
|
|
@@ -273,15 +190,37 @@
|
|
setUserInfo: "user/login",
|
|
setUserInfo: "user/login",
|
|
}),
|
|
}),
|
|
toUserInfo() {
|
|
toUserInfo() {
|
|
- if(this.hasLogin){
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/substaticpages/info/userInfo",
|
|
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: this.$t('settings.tips'),
|
|
|
|
+ content: this.$t('settings.exitLogin'),
|
|
|
|
+ cancelText: this.$t('settings.cancelText'),
|
|
|
|
+ confirmText: this.$t('settings.confirmText'),
|
|
|
|
+ success: res => {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ uni.removeStorageSync('token')
|
|
|
|
+ uni.removeStorageSync('tenantId')
|
|
|
|
+ uni.removeStorageSync('userId')
|
|
|
|
+ uni.removeStorageSync('userName')
|
|
|
|
+ uni.removeStorageSync('userInfo')
|
|
|
|
+ uni.removeStorageSync('userType')
|
|
|
|
+ uni.removeStorageSync('tenantInfo')
|
|
|
|
+ uni.removeStorageSync('currentTenantId')
|
|
|
|
+ uni.removeStorageSync('currentVehicleInfo')
|
|
|
|
+ uni.removeStorageSync('isAuditUser')
|
|
|
|
+ uni.removeStorageSync('isDealerUser')
|
|
|
|
+ uni.removeStorageSync('isDriverUser')
|
|
|
|
+ uni.removeStorageSync('enterpriseInfo')
|
|
|
|
+ uni.removeStorageSync('serverAddress');
|
|
|
|
+ uni.removeStorageSync('serverPrefix');
|
|
|
|
+ uni.reLaunch({
|
|
|
|
+ url: '/pages/login/login'
|
|
|
|
+ });
|
|
|
|
+ getApp().globalData.tabIndex = 'home';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ fail: () => {},
|
|
|
|
+ complete: () => {}
|
|
});
|
|
});
|
|
- }else{
|
|
|
|
- uni.reLaunch({
|
|
|
|
- url: "/pages/login/login"
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
toPage(url) {
|
|
toPage(url) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|