11 Commits

  1. 2
      api/start/login.js
  2. 13
      pages/home/member.vue

2
api/start/login.js

@ -16,7 +16,7 @@ import { http } from '../../utils/http'
export const LoginApi = (data) => { export const LoginApi = (data) => {
return http({ return http({
method: 'POST', method: 'POST',
url: '/UserLogin/login',
url: '/api/userLogin',
data: data:
data data
, ,

13
pages/home/member.vue

@ -29,7 +29,6 @@
<span style="font-size:10px;">签到</span> <span style="font-size:10px;">签到</span>
</view> --> </view> -->
</view> </view>
<view class="settings-buttons"> <view class="settings-buttons">
<view class="setting-btn" @click="goToMarket"> <view class="setting-btn" @click="goToMarket">
<image src="/static/my/MarketSettings.png" class="setting-icon" /> <image src="/static/my/MarketSettings.png" class="setting-icon" />
@ -40,7 +39,6 @@
<text>通用设置</text> <text>通用设置</text>
</view> </view>
</view> </view>
<view class="share" @click="goToShare"> <view class="share" @click="goToShare">
<image class="img-share" src="/static/my/share.png" mode="widthFix" /> <image class="img-share" src="/static/my/share.png" mode="widthFix" />
</view> </view>
@ -130,7 +128,14 @@
}) })
uni.showToast({ uni.showToast({
title: '昵称修改成功', title: '昵称修改成功',
icon: 'none'
icon: 'none',
})
userInfoRes.value = getUserInfo()
userInfoRes.value.then(res => {
username.value = res.data.dcname
dccode.value = res.data.dccode
avatarUrl.value = res.data.avatar
console.log('用户信息', userInfoRes.value)
}) })
} catch (err) { } catch (err) {
uni.showToast({ uni.showToast({
@ -175,7 +180,7 @@
const goToShare = () => { const goToShare = () => {
console.log('用户信息==========', userStore.userInfo.isVisitor) console.log('用户信息==========', userStore.userInfo.isVisitor)
if (userStore.userInfo.isVisitor) {
if (userStore.userInfo.visitor) {
uni.showToast({ uni.showToast({
title: '请先登录', title: '请先登录',
icon: 'none' icon: 'none'

Loading…
Cancel
Save