|
|
@ -2,9 +2,9 @@ |
|
|
<LoginPrompt ref="loginwPrompt"></LoginPrompt> |
|
|
<LoginPrompt ref="loginwPrompt"></LoginPrompt> |
|
|
<view class="main"> |
|
|
<view class="main"> |
|
|
<view class="top"> |
|
|
<view class="top"> |
|
|
<view class="bell"> |
|
|
|
|
|
|
|
|
<!-- <view class="bell"> |
|
|
<image class="image-bell" src="/static/my/bell.png"></image> |
|
|
<image class="image-bell" src="/static/my/bell.png"></image> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> --> |
|
|
<view class="msg"> |
|
|
<view class="msg"> |
|
|
<view class="msg-left"> |
|
|
<view class="msg-left"> |
|
|
<view class="avatar"></view> |
|
|
<view class="avatar"></view> |
|
|
@ -24,47 +24,47 @@ |
|
|
|
|
|
|
|
|
<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" /> |
|
|
<text>行情设置</text> |
|
|
<text>行情设置</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="setting-btn" @click="goToGeneral"> |
|
|
<view class="setting-btn" @click="goToGeneral"> |
|
|
<image src="/static/my/Settings.png" class="setting-icon"/> |
|
|
|
|
|
|
|
|
<image src="/static/my/Settings.png" class="setting-icon" /> |
|
|
<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> |
|
|
</view> |
|
|
</view> |
|
|
<view class="bottom"> |
|
|
<view class="bottom"> |
|
|
<view class="list-item" @click="goToAccount"> |
|
|
<view class="list-item" @click="goToAccount"> |
|
|
<image src="/static/my/security.png" class="list-icon"/> |
|
|
|
|
|
|
|
|
<image src="/static/my/security.png" class="list-icon" /> |
|
|
<text>账号与安全</text> |
|
|
<text>账号与安全</text> |
|
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
|
|
|
|
|
|
|
|
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
|
</view> |
|
|
</view> |
|
|
<view class="list-item"> |
|
|
|
|
|
<image src="/static/my/connection.png" class="list-icon"/> |
|
|
|
|
|
|
|
|
<!-- <view class="list-item"> |
|
|
|
|
|
<image src="/static/my/connection.png" class="list-icon" /> |
|
|
<text>联系我们</text> |
|
|
<text>联系我们</text> |
|
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
|
|
|
|
|
|
|
|
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
|
</view> |
|
|
</view> |
|
|
<view class="list-item" @click="goToNewVersion"> |
|
|
<view class="list-item" @click="goToNewVersion"> |
|
|
<image src="/static/my/update.png" class="list-icon"/> |
|
|
|
|
|
|
|
|
<image src="/static/my/update.png" class="list-icon" /> |
|
|
<text>新版本更新</text> |
|
|
<text>新版本更新</text> |
|
|
<view class="update-tip">有新版本可更新 |
|
|
<view class="update-tip">有新版本可更新 |
|
|
<view class="circle"></view> |
|
|
<view class="circle"></view> |
|
|
</view> |
|
|
</view> |
|
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
|
|
|
|
|
|
|
|
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
|
</view> |
|
|
</view> |
|
|
<view class="list-item"> |
|
|
<view class="list-item"> |
|
|
<image src="/static/my/opinion.png" class="list-icon"/> |
|
|
|
|
|
|
|
|
<image src="/static/my/opinion.png" class="list-icon" /> |
|
|
<text>意见反馈</text> |
|
|
<text>意见反馈</text> |
|
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
|
|
|
|
</view> --> |
|
|
<view class="list-item" @click="goToAbout"> |
|
|
<view class="list-item" @click="goToAbout"> |
|
|
<image src="/static/my/about.png" class="list-icon"/> |
|
|
|
|
|
|
|
|
<image src="/static/my/about.png" class="list-icon" /> |
|
|
<text>关于DeepChart</text> |
|
|
<text>关于DeepChart</text> |
|
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
|
|
|
|
|
|
|
|
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<footerBar class="static-footer" :type="type"></footerBar> |
|
|
<footerBar class="static-footer" :type="type"></footerBar> |
|
|
@ -72,61 +72,98 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import { |
|
|
|
|
|
|
|
|
import { |
|
|
ref, |
|
|
ref, |
|
|
onMounted |
|
|
onMounted |
|
|
} from 'vue' |
|
|
|
|
|
import { |
|
|
|
|
|
|
|
|
} from 'vue' |
|
|
|
|
|
import { |
|
|
ArrowRight |
|
|
ArrowRight |
|
|
} from '@element-plus/icons-vue' |
|
|
|
|
|
import footerBar from '../../components/footerBar.vue' |
|
|
|
|
|
import {getUserInfo} from "@/api/member" |
|
|
|
|
|
import { useUserStore } from "../../stores/modules/userInfo" |
|
|
|
|
|
const userStore = useUserStore() |
|
|
|
|
|
|
|
|
|
|
|
const type = ref('member') |
|
|
|
|
|
const iSMT = ref(0) |
|
|
|
|
|
const username = ref('') |
|
|
|
|
|
const dccode = ref('') |
|
|
|
|
|
|
|
|
|
|
|
const userInfoRes = ref()// 用户身份信息 |
|
|
|
|
|
userInfoRes.value = getUserInfo() |
|
|
|
|
|
userInfoRes.value.then(res => { |
|
|
|
|
|
|
|
|
} from '@element-plus/icons-vue' |
|
|
|
|
|
import footerBar from '../../components/footerBar.vue' |
|
|
|
|
|
import { |
|
|
|
|
|
getUserInfo, |
|
|
|
|
|
updateUserInfo |
|
|
|
|
|
} from "@/api/member" |
|
|
|
|
|
import { |
|
|
|
|
|
useUserStore |
|
|
|
|
|
} from "../../stores/modules/userInfo" |
|
|
|
|
|
const userStore = useUserStore() |
|
|
|
|
|
|
|
|
|
|
|
const type = ref('member') |
|
|
|
|
|
const iSMT = ref(0) |
|
|
|
|
|
const username = ref('') |
|
|
|
|
|
const dccode = ref('') |
|
|
|
|
|
const avatarUrl = ref('') |
|
|
|
|
|
const isEditingName = ref(false) |
|
|
|
|
|
const editingName = ref('') |
|
|
|
|
|
|
|
|
|
|
|
const userInfoRes = ref() // 用户身份信息 |
|
|
|
|
|
userInfoRes.value = getUserInfo() |
|
|
|
|
|
userInfoRes.value.then(res => { |
|
|
username.value = res.data.dcname |
|
|
username.value = res.data.dcname |
|
|
dccode.value = res.data.dccode |
|
|
dccode.value = res.data.dccode |
|
|
|
|
|
avatarUrl.value = res.data.avatar |
|
|
console.log('用户信息', userInfoRes.value) |
|
|
console.log('用户信息', userInfoRes.value) |
|
|
}) |
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const startEditName = () => { |
|
|
|
|
|
isEditingName.value = true |
|
|
|
|
|
editingName.value = username.value |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const finishEditName = async () => { |
|
|
|
|
|
if (editingName.value.trim() === '' || editingName.value === username.value) { |
|
|
|
|
|
isEditingName.value = false |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
try { |
|
|
|
|
|
await updateUserInfo({ |
|
|
|
|
|
dcname: editingName.value |
|
|
|
|
|
}) |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '昵称修改成功', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
} catch (err) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '修改失败,请重试', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
} finally { |
|
|
|
|
|
isEditingName.value = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const goToGeneral = () => { |
|
|
|
|
|
|
|
|
const goToGeneral = () => { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/pages/setting/general' |
|
|
url: '/pages/setting/general' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const goToMarket = () => { |
|
|
|
|
|
|
|
|
const goToMarket = () => { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '../setting/market' |
|
|
url: '../setting/market' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const goToAccount = () => { |
|
|
|
|
|
|
|
|
const goToAccount = () => { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '../setting/account' |
|
|
url: '../setting/account' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const goToNewVersion = () => { |
|
|
|
|
|
|
|
|
const goToNewVersion = () => { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '../setting/newVersion' |
|
|
url: '../setting/newVersion' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const goToAbout = () => { |
|
|
|
|
|
|
|
|
const goToAbout = () => { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '../setting/about' |
|
|
url: '../setting/about' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const goToShare = () => { |
|
|
const goToShare = () => { |
|
|
console.log('用户信息==========',userStore.userInfo.isVisitor) |
|
|
console.log('用户信息==========',userStore.userInfo.isVisitor) |
|
|
@ -142,99 +179,100 @@ const goToShare = () => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
// 状态栏高度 |
|
|
// 状态栏高度 |
|
|
iSMT.value = uni.getSystemInfoSync().statusBarHeight |
|
|
iSMT.value = uni.getSystemInfoSync().statusBarHeight |
|
|
console.log('??????????????', iSMT.value) |
|
|
console.log('??????????????', iSMT.value) |
|
|
console.log('通信来的用户身份',userStore.userInfo) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
console.log('通信来的用户身份', userStore.userInfo) |
|
|
|
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
|
.static-footer { |
|
|
|
|
|
|
|
|
.static-footer { |
|
|
position: fixed; |
|
|
position: fixed; |
|
|
bottom: 0; |
|
|
bottom: 0; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.top { |
|
|
|
|
|
|
|
|
.top { |
|
|
height: 50vh; |
|
|
height: 50vh; |
|
|
background-color: white; |
|
|
background-color: white; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.bell { |
|
|
|
|
|
|
|
|
.bell { |
|
|
height: 9.6vh; |
|
|
height: 9.6vh; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: flex-end; |
|
|
align-items: flex-end; |
|
|
justify-content: flex-end; |
|
|
justify-content: flex-end; |
|
|
padding-right: 50rpx; |
|
|
padding-right: 50rpx; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.image-bell { |
|
|
|
|
|
|
|
|
.image-bell { |
|
|
width: 26rpx; |
|
|
width: 26rpx; |
|
|
height: 32rpx; |
|
|
height: 32rpx; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.msg { |
|
|
|
|
|
|
|
|
.msg { |
|
|
height: 10.7vh; |
|
|
height: 10.7vh; |
|
|
display: flex; |
|
|
display: flex; |
|
|
margin-top: 3vh; |
|
|
margin-top: 3vh; |
|
|
margin-bottom: 3vh; |
|
|
margin-bottom: 3vh; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.msg-left { |
|
|
|
|
|
|
|
|
.msg-left { |
|
|
width: 252rpx; |
|
|
width: 252rpx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.avatar { |
|
|
|
|
|
|
|
|
.avatar { |
|
|
width: 175rpx; |
|
|
width: 175rpx; |
|
|
height: 175rpx; |
|
|
height: 175rpx; |
|
|
border-radius: 50%; |
|
|
border-radius: 50%; |
|
|
background-color: black; |
|
|
background-color: black; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.msg-center { |
|
|
|
|
|
|
|
|
.msg-center { |
|
|
width: 388rpx; |
|
|
width: 388rpx; |
|
|
padding-left: 2.5vh; |
|
|
padding-left: 2.5vh; |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.userInfo { |
|
|
|
|
|
font-size: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.userInfo { |
|
|
|
|
|
font-size: 30rpx; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.userId { |
|
|
|
|
|
|
|
|
.userId { |
|
|
font-size: 14px; |
|
|
font-size: 14px; |
|
|
margin-top: 1vh; |
|
|
margin-top: 1vh; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.image-editName { |
|
|
|
|
|
|
|
|
.image-editName { |
|
|
width: 40rpx; |
|
|
width: 40rpx; |
|
|
height: 40rpx; |
|
|
height: 40rpx; |
|
|
margin-left: 15rpx; |
|
|
margin-left: 15rpx; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.msg-right { |
|
|
|
|
|
|
|
|
.msg-right { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.image-attendance { |
|
|
|
|
|
|
|
|
.image-attendance { |
|
|
width: 43rpx; |
|
|
width: 43rpx; |
|
|
height: 43rpx; |
|
|
height: 43rpx; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.settings-buttons { |
|
|
|
|
|
|
|
|
.settings-buttons { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-around; |
|
|
justify-content: space-around; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.setting-btn { |
|
|
|
|
|
|
|
|
.setting-btn { |
|
|
width: 349rpx; |
|
|
width: 349rpx; |
|
|
height: 135rpx; |
|
|
height: 135rpx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
@ -243,75 +281,79 @@ onMounted(() => { |
|
|
background-color: rgb(243, 243, 243); |
|
|
background-color: rgb(243, 243, 243); |
|
|
border-radius: 8%; |
|
|
border-radius: 8%; |
|
|
margin-bottom: 1vh; |
|
|
margin-bottom: 1vh; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.setting-icon { |
|
|
|
|
|
|
|
|
.setting-icon { |
|
|
width: 64.7rpx; |
|
|
width: 64.7rpx; |
|
|
height: 64.7rpx; |
|
|
height: 64.7rpx; |
|
|
margin-right: 25rpx; |
|
|
margin-right: 25rpx; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.setting-btn text { |
|
|
|
|
|
|
|
|
.setting-btn text { |
|
|
font-size: 28rpx; |
|
|
font-size: 28rpx; |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
color: #333; |
|
|
color: #333; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.share { |
|
|
|
|
|
|
|
|
.share { |
|
|
height: 12.6vh; |
|
|
height: 12.6vh; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.img-share { |
|
|
|
|
|
|
|
|
.img-share { |
|
|
width: 720rpx; |
|
|
width: 720rpx; |
|
|
height: 160rpx; |
|
|
height: 160rpx; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.bottom { |
|
|
|
|
|
|
|
|
.bottom { |
|
|
height: 44.5vh; |
|
|
height: 44.5vh; |
|
|
margin-top: 1vh; |
|
|
margin-top: 1vh; |
|
|
background-color: rgb(255, 255, 255); |
|
|
background-color: rgb(255, 255, 255); |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.list-item { |
|
|
|
|
|
|
|
|
.list-item { |
|
|
width: 670rpx; |
|
|
width: 670rpx; |
|
|
height: 7vh; |
|
|
height: 7vh; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
margin: 0rpx 40rpx; |
|
|
margin: 0rpx 40rpx; |
|
|
border-bottom: 1rpx solid #eee; |
|
|
border-bottom: 1rpx solid #eee; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.list-item:last-child { |
|
|
|
|
|
|
|
|
.list-item:last-child { |
|
|
border-bottom: none; |
|
|
border-bottom: none; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.list-icon { |
|
|
|
|
|
|
|
|
.list-icon { |
|
|
width: 42rpx; |
|
|
width: 42rpx; |
|
|
height: 42rpx; |
|
|
height: 42rpx; |
|
|
margin-right: 18rpx; |
|
|
margin-right: 18rpx; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.arrow { |
|
|
|
|
|
|
|
|
.arrow { |
|
|
margin-left: auto; |
|
|
margin-left: auto; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.update-tip { |
|
|
|
|
|
|
|
|
.update-tip { |
|
|
display: flex; |
|
|
display: flex; |
|
|
color: #999; |
|
|
color: #999; |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
margin-left: 200rpx; |
|
|
margin-left: 200rpx; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.circle { |
|
|
|
|
|
|
|
|
.circle { |
|
|
width: 10rpx; |
|
|
width: 10rpx; |
|
|
height: 10rpx; |
|
|
height: 10rpx; |
|
|
border-radius: 50%; |
|
|
border-radius: 50%; |
|
|
background-color: red; |
|
|
background-color: red; |
|
|
margin-left: 10rpx; |
|
|
margin-left: 10rpx; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.edit-input { |
|
|
|
|
|
background-color: #999; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |