|
@@ -4,20 +4,22 @@
|
|
|
<view class="userCard flex align_center justify_between" @click="toUser">
|
|
|
<view class="userCard-info flex align_center justify_between">
|
|
|
<view>
|
|
|
- <u-image v-if="!hasLogin" src="/static/def_personal_avatar.png" width="60" height="60"></u-image>
|
|
|
- <open-data v-else type="userAvatarUrl" class="user-photo"></open-data>
|
|
|
+ <u-image v-if="!hasLogin" src="/static/def_personal_avatar.png" width="80" height="80"></u-image>
|
|
|
+ <u-image v-if="userInfo.sex==1" src="/static/def_patient_boy@2x.png" width="80" height="80"></u-image>
|
|
|
+ <u-image v-if="userInfo.sex==0" src="/static/def_patient_girl@2x.png" width="80" height="80"></u-image>
|
|
|
</view>
|
|
|
<view>
|
|
|
<view v-if="!hasLogin" style="font-size: 40rpx;">
|
|
|
请点击登录
|
|
|
</view>
|
|
|
- <view v-else>
|
|
|
- <view>{{userInfo.userNameCN}}</view>
|
|
|
- <view>{{userInfo.orgName}}</view>
|
|
|
+ <view v-else style="color: gold;">
|
|
|
+ <view>{{userInfo.name}}</view>
|
|
|
+ <view>{{userInfo.mobile}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
+ <text v-if="hasLogin">退出</text>
|
|
|
<u-icon name="arrow-right"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -43,6 +45,9 @@
|
|
|
<view class="des">请登录后查看套餐记录</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <uni-popup ref="openModal" type="center">
|
|
|
+ <uni-popup-dialog content="确定退出登录吗?" @confirm="onOk" title="提示"></uni-popup-dialog>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -51,10 +56,12 @@
|
|
|
mapState,
|
|
|
mapMutations,
|
|
|
} from 'vuex'
|
|
|
+ import uniPopup from '@/components/uni-popup/uni-popup.vue'
|
|
|
+ import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
|
|
|
import { listLookUp, getLookUpDatas } from '@/api/data.js';
|
|
|
- import { scanVinLogQueryRoll, getScanVinLogList }from '@/api/car.js'
|
|
|
export default {
|
|
|
components: {
|
|
|
+ uniPopup,uniPopupDialog
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -134,8 +141,20 @@
|
|
|
uni.navigateTo({
|
|
|
url:"/pages/login/login"
|
|
|
})
|
|
|
+ }else{
|
|
|
+ // 退出登录
|
|
|
+ this.$refs.openModal.open()
|
|
|
}
|
|
|
},
|
|
|
+ onOk(){
|
|
|
+ this.$refs.openModal.close()
|
|
|
+ this.$store.dispatch('userLogout');
|
|
|
+ setTimeout(function(){
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ });
|
|
|
+ },300)
|
|
|
+ },
|
|
|
toDetail(item){
|
|
|
uni.navigateTo({
|
|
|
url:"/pages/bundelDetail/index"
|
|
@@ -154,7 +173,7 @@
|
|
|
flex-direction: column;
|
|
|
.userCard{
|
|
|
padding:1.2em 1em;
|
|
|
- background-image: linear-gradient(#58c4c4 10%,#65e2e2);
|
|
|
+ background-image: linear-gradient(#58c4c4 30%,#65e2e2);
|
|
|
.userCard-info{
|
|
|
> view{
|
|
|
&:last-child{
|