Merge remote-tracking branch 'origin/master'

This commit is contained in:
ChuShiZ 2024-08-23 23:34:46 +08:00
commit 43aef69366
3 changed files with 21 additions and 20 deletions

View File

@ -1,6 +1,5 @@
<template>
<view class="bottoms">
<view class="box" :class="{active: aindex == 1}" @click="getgogo(1)" v-if="role == 'user' ">
<view class="imgs">
<image mode="aspectFit" src="@/static/icons/tabbar/home.png" v-show="aindex != 1"></image>
@ -79,7 +78,7 @@
}
},
props: {
msg: String
msg: String|Number
},
onLoad() {
console.log('tabbag', uni.getStorageSync('identity'));
@ -207,8 +206,6 @@
})
}
}
}

View File

@ -315,9 +315,11 @@
if (this.sfindex == 'user') {
getInfo().then((res) => {
let userJson = {}
userJson.userId = res.data.user.userId
uni.setStorageSync('userInfo', res.data.user)
uni.setStorageSync('userId', res.data.user.userId)
userJson.userId = res.data.user.id
let userInfo = res.data.user.info
userInfo.id = res.data.user.id
uni.setStorageSync('userInfo', userInfo)
uni.setStorageSync('userId', res.data.user.id)
uni.setStorageSync('role', res.data.roles)
this.goselect()
})
@ -328,10 +330,11 @@
method: 'get',
}).then((res) => {
let userJson = {}
userJson.userId = res.data.user.userId
userJson.userId = res.data.user.id
uni.setStorageSync('userInfo', res.data.user)
uni.setStorageSync('role', res.data.roles)
uni.setStorageSync('userId', res.data.user.userId)
let roles = res.data.role.map(item=>{item.name})
uni.setStorageSync('role', roles)
uni.setStorageSync('userId', res.data.user.id)
this.goselect()
})
}

View File

@ -20,9 +20,9 @@
<view class="c-title" v-if="!userinfo" @click="gologin">立即登录</view>
<view class="c-title" v-else>
<view style="display: flex; align-items: center;">
<text>{{userinfo.info.nickname || '用户昵称'}}</text>
<text>{{ userinfo.nickname || '用户昵称'}}</text>
</view>
<text style="font-size: 14px;font-weight: normal;color: #88b4fb">{{userinfo.info.phonenumber || '未填写手机号码'}}</text>
<text style="font-size: 14px;font-weight: normal;color: #88b4fb">{{userinfo.phonenumber || '未填写手机号码'}}</text>
</view>
</view>
@ -43,9 +43,9 @@
<view class="back-button" @click="goHuanche">去还车</view>
</view>
<view class="bai-box">
<view class="bai-box" v-if="role === 'user'">
<view class="b-title">我的订单</view>
<image class="sanjiao" src="../../static/my/sanjiao.png">
<image class="sanjiao" src="../../static/my/sanjiao.png"/>
<view class="sige">
<view class="s-box" @click="goorder(2)">
<view class="simg">
@ -76,7 +76,7 @@
</view>
<view class="dai-box">
<view class="vinput" @click="goAssess()">
<view class="vinput" @click="goAssess()" v-if="role === 'user'">
<view class="dix">
<view class="d-img">
<image src="../../static/my/编组 18@2x.png" mode=""></image>
@ -87,7 +87,7 @@
<uni-icons type="right" size="20" color="#000000"></uni-icons>
</view>
</view>
<view class="vinput" @click="gogogog()">
<view class="vinput" @click="gogogog()" v-if="role === 'user'">
<view class="dix">
<view class="d-img">
<image src="../../static/my/编组 19@2x.png" mode=""></image>
@ -109,7 +109,7 @@
<uni-icons type="right" size="20" color="#000000"></uni-icons>
</view>
</view>
<view class="vinput" @click="gosj()">
<view class="vinput" @click="gosj()" v-if="role === 'user'">
<view class="dix">
<view class="d-img">
<image src="../../static/my/编组 20@2x.png" mode=""></image>
@ -165,6 +165,7 @@
export default {
data() {
return {
role: 'user',
show: false,
title: '修改昵称',
indicatorDots: false,
@ -187,7 +188,7 @@
}
},
mounted() {
this.role = uni.getStorageSync('identity');
},
onShow() {
console.log('what?', uni.getStorageSync('userInfo'));