Browse Source
Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into milestone-20251031-简版功能开发
zhaowenkang/feature-20251028181547-行情页面
Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into milestone-20251031-简版功能开发
zhaowenkang/feature-20251028181547-行情页面
44 changed files with 2687 additions and 1982 deletions
-
17api/deepExploration/deepExploration.js
-
37api/member.js
-
11api/setting/general.js
-
16api/setting/nextPwd.js
-
45api/setting/password.js
-
30api/start/login.js
-
2components/deepExploration_header.vue
-
25components/login-prompt.vue
-
12package-lock.json
-
7package.json
-
25pages.json
-
823pages/deepExploration/MainForceActions.vue
-
69pages/deepMate/deepMate.vue
-
583pages/home/member.vue
-
655pages/marketSituation/chartExample.vue
-
641pages/marketSituation/marketCondition.vue
-
15pages/marketSituation/marketOverview.vue
-
60pages/setting/account.vue
-
245pages/setting/createPwd.vue
-
59pages/setting/email.vue
-
38pages/setting/font.vue
-
335pages/setting/general.vue
-
2pages/setting/introduce.vue
-
1pages/setting/market.vue
-
11pages/setting/message.vue
-
303pages/setting/nextPwd.vue
-
102pages/setting/password.vue
-
54pages/setting/phone.vue
-
50pages/setting/push.vue
-
23pages/setting/server.vue
-
21pages/setting/theme.vue
-
3pages/start/Registration/Registration.vue
-
56pages/start/index/index.vue
-
95pages/start/recoverPassword/recoverPassword.vue
-
33static/language/en.js
-
7static/language/ms.js
-
7static/language/th.js
-
7static/language/vi.js
-
33static/language/zh_CN.js
-
33static/language/zh_HK.js
-
1stores/index.js
-
44stores/modules/login.js
-
17utils/http.js
-
16vue.config.js
@ -0,0 +1,37 @@ |
|||||
|
import util from '../common/util.js' |
||||
|
|
||||
|
/*export const getUserInfo = (data = {}) => { |
||||
|
return util.request( |
||||
|
'/api/my/userInfo', |
||||
|
(res) => { |
||||
|
console.log('用户信息请求成功:', res); |
||||
|
}, |
||||
|
{data}, |
||||
|
|
||||
|
(err) => { |
||||
|
console.log('用户信息请求失败:', err); |
||||
|
} |
||||
|
); |
||||
|
}; |
||||
|
*/ |
||||
|
|
||||
|
import { |
||||
|
http |
||||
|
} from '../utils/http' |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 用户信息获取接口 |
||||
|
* @param data |
||||
|
* @returns {Promise<unknown>} |
||||
|
*/ |
||||
|
export const getUserInfo = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/api/my/userInfo', |
||||
|
data: data, |
||||
|
header:{ |
||||
|
token:'014de5283d2930af6481ede591afd087' |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
import { http } from '../../utils/http' |
||||
|
|
||||
|
|
||||
|
|
||||
|
export const getSetting = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/api/my/getSetting', |
||||
|
data: data, |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
import {http} from '../../utils/http' |
||||
|
|
||||
|
/** |
||||
|
* 修改密码 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const updatePassword = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/api/my/updatePassword', |
||||
|
data: |
||||
|
data |
||||
|
, |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
import { |
||||
|
http |
||||
|
} from '../../utils/http' |
||||
|
|
||||
|
/** |
||||
|
* 验证码发送 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const sendEmail = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/UserLogin/sendEmail', |
||||
|
data: data, |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 验证码验证 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const validateCode = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/api/my/validateCode', |
||||
|
data: data, |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export const sendPhone = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/UserLogin/sendPhone', |
||||
|
data: data, |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export const changeBind = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/api/my/bindEmailOrPhone', |
||||
|
data: data, |
||||
|
}) |
||||
|
} |
||||
@ -1,294 +1,305 @@ |
|||||
<template> |
<template> |
||||
<view class="main"> |
|
||||
<view class="top"> |
|
||||
<view class="bell"> |
|
||||
<image class="image-bell" src="/static/my/bell.png"></image> |
|
||||
</view> |
|
||||
<view class="msg"> |
|
||||
<view class="msg-left"> |
|
||||
<view class="avatar"></view> |
|
||||
</view> |
|
||||
<view class="msg-center"> |
|
||||
<view style="display: flex;"> |
|
||||
<view class="userInfo">{{ username }}</view> |
|
||||
<image class="image-editName" src="/static/my/editName.png"></image> |
|
||||
</view> |
|
||||
<view class="userId">ID:{{ dccode }}</view> |
|
||||
</view> |
|
||||
<view class="msg-right"> |
|
||||
<image class="image-attendance" src="/static/my/Check-in.png" /> |
|
||||
<span style="font-size:10px;">签到</span> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
<view class="settings-buttons"> |
|
||||
<view class="setting-btn" @click="goToMarket"> |
|
||||
<image src="/static/my/MarketSettings.png" class="setting-icon" /> |
|
||||
<text>行情设置</text> |
|
||||
</view> |
|
||||
<view class="setting-btn" @click="goToGeneral"> |
|
||||
<image src="/static/my/Settings.png" class="setting-icon" /> |
|
||||
<text>通用设置</text> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
<view class="share" @click="goToShare"> |
|
||||
<image class="img-share" src="/static/my/share.png" mode="widthFix" /> |
|
||||
</view> |
|
||||
</view> |
|
||||
<view class="bottom"> |
|
||||
<view class="list-item" @click="goToAccount"> |
|
||||
<image src="/static/my/security.png" class="list-icon" /> |
|
||||
<text>账号与安全</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
<view class="list-item"> |
|
||||
<image src="/static/my/connection.png" class="list-icon" /> |
|
||||
<text>联系我们</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
<view class="list-item" @click="goToNewVersion"> |
|
||||
<image src="/static/my/update.png" class="list-icon" /> |
|
||||
<text>新版本更新</text> |
|
||||
<view class="update-tip">有新版本可更新 |
|
||||
<view class="circle"></view> |
|
||||
</view> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
<view class="list-item"> |
|
||||
<image src="/static/my/opinion.png" class="list-icon" /> |
|
||||
<text>意见反馈</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
<view class="list-item" @click="goToAbout"> |
|
||||
<image src="/static/my/about.png" class="list-icon" /> |
|
||||
<text>关于DeepChart</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
</view> |
|
||||
<footerBar class="static-footer" :type="type"></footerBar> |
|
||||
</view> |
|
||||
|
<view class="main"> |
||||
|
<view class="top"> |
||||
|
<view class="bell"> |
||||
|
<image class="image-bell" src="/static/my/bell.png"></image> |
||||
|
</view> |
||||
|
<view class="msg"> |
||||
|
<view class="msg-left"> |
||||
|
<view class="avatar"></view> |
||||
|
</view> |
||||
|
<view class="msg-center"> |
||||
|
<view style="display: flex;"> |
||||
|
<view class="userInfo">{{ username }}</view> |
||||
|
<image class="image-editName" src="/static/my/editName.png"></image> |
||||
|
</view> |
||||
|
<view class="userId">ID:{{ dccode }}</view> |
||||
|
</view> |
||||
|
<view class="msg-right"> |
||||
|
<image class="image-attendance" src="/static/my/Check-in.png"/> |
||||
|
<span style="font-size:10px;">签到</span> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="settings-buttons"> |
||||
|
<view class="setting-btn" @click="goToMarket"> |
||||
|
<image src="/static/my/MarketSettings.png" class="setting-icon"/> |
||||
|
<text>行情设置</text> |
||||
|
</view> |
||||
|
<view class="setting-btn" @click="goToGeneral"> |
||||
|
<image src="/static/my/Settings.png" class="setting-icon"/> |
||||
|
<text>通用设置</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="share" @click="goToShare"> |
||||
|
<image class="img-share" src="/static/my/share.png" mode="widthFix"/> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="bottom"> |
||||
|
<view class="list-item" @click="goToAccount"> |
||||
|
<image src="/static/my/security.png" class="list-icon"/> |
||||
|
<text>账号与安全</text> |
||||
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
||||
|
</view> |
||||
|
<view class="list-item"> |
||||
|
<image src="/static/my/connection.png" class="list-icon"/> |
||||
|
<text>联系我们</text> |
||||
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
||||
|
</view> |
||||
|
<view class="list-item" @click="goToNewVersion"> |
||||
|
<image src="/static/my/update.png" class="list-icon"/> |
||||
|
<text>新版本更新</text> |
||||
|
<view class="update-tip">有新版本可更新 |
||||
|
<view class="circle"></view> |
||||
|
</view> |
||||
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
||||
|
</view> |
||||
|
<view class="list-item"> |
||||
|
<image src="/static/my/opinion.png" class="list-icon"/> |
||||
|
<text>意见反馈</text> |
||||
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
||||
|
</view> |
||||
|
<view class="list-item" @click="goToAbout"> |
||||
|
<image src="/static/my/about.png" class="list-icon"/> |
||||
|
<text>关于DeepChart</text> |
||||
|
<uni-icons type="arrowright" size="16" class="arrow"/> |
||||
|
</view> |
||||
|
</view> |
||||
|
<footerBar class="static-footer" :type="type"></footerBar> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script setup> |
<script setup> |
||||
import { |
|
||||
ref, |
|
||||
onMounted |
|
||||
} from 'vue' |
|
||||
import { |
|
||||
ArrowRight |
|
||||
} from '@element-plus/icons-vue' |
|
||||
import footerBar from '../../components/footerBar.vue' |
|
||||
|
|
||||
const type = ref('member') |
|
||||
const iSMT = ref(0) |
|
||||
const username = ref('演示机EVA') |
|
||||
const dccode = ref('90047681') |
|
||||
const goToGeneral = () => { |
|
||||
uni.navigateTo({ |
|
||||
url: '/pages/setting/general' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
const goToMarket = () => { |
|
||||
uni.navigateTo({ |
|
||||
url: '../setting/market' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
const goToAccount = () => { |
|
||||
uni.navigateTo({ |
|
||||
url:'../setting/account' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
const goToNewVersion = () =>{ |
|
||||
uni.navigateTo({ |
|
||||
url:'../setting/newVersion' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
const goToAbout = () =>{ |
|
||||
uni.navigateTo({ |
|
||||
url:'../setting/about' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
const goToShare = () =>{ |
|
||||
uni.navigateTo({ |
|
||||
url:'../setting/share' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
onMounted(() => { |
|
||||
// 状态栏高度 |
|
||||
iSMT.value = uni.getSystemInfoSync().statusBarHeight |
|
||||
console.log('??????????????', iSMT.value) |
|
||||
}) |
|
||||
|
import { |
||||
|
ref, |
||||
|
onMounted |
||||
|
} from 'vue' |
||||
|
import { |
||||
|
ArrowRight |
||||
|
} from '@element-plus/icons-vue' |
||||
|
import footerBar from '../../components/footerBar.vue' |
||||
|
import {getUserInfo} from "@/api/member" |
||||
|
|
||||
|
const type = ref('member') |
||||
|
const iSMT = ref(0) |
||||
|
const username = ref('') |
||||
|
const dccode = ref('') |
||||
|
|
||||
|
const userInfoRes = ref()// 用户身份信息 |
||||
|
userInfoRes.value = getUserInfo() |
||||
|
userInfoRes.value.then(res => { |
||||
|
username.value = res.data.username |
||||
|
dccode.value = res.data.dccode |
||||
|
console.log('用户信息', userInfoRes.value) |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
const goToGeneral = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '/pages/setting/general' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const goToMarket = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '../setting/market' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const goToAccount = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '../setting/account' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const goToNewVersion = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '../setting/newVersion' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const goToAbout = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '../setting/about' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const goToShare = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '../setting/share' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
onMounted(() => { |
||||
|
// 状态栏高度 |
||||
|
iSMT.value = uni.getSystemInfoSync().statusBarHeight |
||||
|
console.log('??????????????', iSMT.value) |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped> |
<style scoped> |
||||
.static-footer { |
|
||||
position: fixed; |
|
||||
bottom: 0; |
|
||||
} |
|
||||
|
|
||||
.top { |
|
||||
height: 47vh; |
|
||||
background-color: white; |
|
||||
} |
|
||||
|
|
||||
.bell { |
|
||||
height: 9.6vh; |
|
||||
display: flex; |
|
||||
align-items: flex-end; |
|
||||
justify-content: flex-end; |
|
||||
padding-right: 50rpx; |
|
||||
} |
|
||||
|
|
||||
.image-bell { |
|
||||
width: 13px; |
|
||||
height: 16px; |
|
||||
} |
|
||||
|
|
||||
.msg { |
|
||||
height: 10.7vh; |
|
||||
display: flex; |
|
||||
margin-top: 3vh; |
|
||||
margin-bottom: 3vh; |
|
||||
} |
|
||||
|
|
||||
.msg-left { |
|
||||
width: 33.6vw; |
|
||||
display: flex; |
|
||||
justify-content: center; |
|
||||
align-items: center; |
|
||||
} |
|
||||
|
|
||||
.avatar { |
|
||||
width: 175rpx; |
|
||||
height: 175rpx; |
|
||||
border-radius: 50%; |
|
||||
background-color: black; |
|
||||
} |
|
||||
|
|
||||
.msg-center { |
|
||||
width: 51.7vw; |
|
||||
padding-left: 2.5vh; |
|
||||
display: flex; |
|
||||
flex-direction: column; |
|
||||
justify-content: center; |
|
||||
} |
|
||||
|
|
||||
.userInfo { |
|
||||
font-size: 20px; |
|
||||
} |
|
||||
|
|
||||
.userId { |
|
||||
font-size: 14px; |
|
||||
margin-top: 1vh; |
|
||||
} |
|
||||
|
|
||||
.image-editName { |
|
||||
width: 40rpx; |
|
||||
height: 40rpx; |
|
||||
margin-left: 2vw; |
|
||||
} |
|
||||
|
|
||||
.msg-right { |
|
||||
width: 14.7vw; |
|
||||
display: flex; |
|
||||
flex-direction: column; |
|
||||
justify-content: center; |
|
||||
} |
|
||||
|
|
||||
.image-attendance { |
|
||||
width: 43rpx; |
|
||||
height: 43rpx; |
|
||||
} |
|
||||
|
|
||||
.settings-buttons { |
|
||||
display: flex; |
|
||||
justify-content: space-around; |
|
||||
} |
|
||||
|
|
||||
.setting-btn { |
|
||||
width: 349rpx; |
|
||||
height: 135rpx; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
justify-content: center; |
|
||||
background-color: rgb(243, 243, 243); |
|
||||
border-radius: 8%; |
|
||||
} |
|
||||
|
|
||||
.setting-icon { |
|
||||
width: 64.7rpx; |
|
||||
height: 64.7rpx; |
|
||||
margin-right: 25rpx; |
|
||||
} |
|
||||
|
|
||||
.setting-btn text { |
|
||||
font-size: 28rpx; |
|
||||
font-weight: bold; |
|
||||
color: #333; |
|
||||
} |
|
||||
|
|
||||
.share { |
|
||||
height: 12.6vh; |
|
||||
display: flex; |
|
||||
justify-content: center; |
|
||||
align-items: center; |
|
||||
} |
|
||||
|
|
||||
.img-share { |
|
||||
width: 720rpx; |
|
||||
height: 160rpx; |
|
||||
} |
|
||||
|
|
||||
.bottom { |
|
||||
height: 44.5vh; |
|
||||
margin-top: 1vh; |
|
||||
background-color: rgb(255, 255, 255); |
|
||||
} |
|
||||
|
|
||||
.list-item { |
|
||||
width: 670rpx; |
|
||||
height: 7vh; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
margin: 0rpx 40rpx; |
|
||||
border-bottom: 1rpx solid #eee; |
|
||||
} |
|
||||
|
|
||||
.list-item:last-child{ |
|
||||
border-bottom: none; |
|
||||
} |
|
||||
|
|
||||
.list-icon { |
|
||||
width: 42rpx; |
|
||||
height: 42rpx; |
|
||||
margin-right: 18rpx; |
|
||||
} |
|
||||
|
|
||||
.arrow { |
|
||||
margin-left: auto; |
|
||||
} |
|
||||
|
|
||||
.update-tip { |
|
||||
display: flex; |
|
||||
color: #999; |
|
||||
font-size: 24rpx; |
|
||||
align-items: center; |
|
||||
margin-left: 200rpx; |
|
||||
justify-content: center; |
|
||||
} |
|
||||
|
|
||||
.circle { |
|
||||
width: 10rpx; |
|
||||
height: 10rpx; |
|
||||
border-radius: 50%; |
|
||||
background-color: red; |
|
||||
margin-left: 10rpx; |
|
||||
} |
|
||||
|
.static-footer { |
||||
|
position: fixed; |
||||
|
bottom: 0; |
||||
|
} |
||||
|
|
||||
|
.top { |
||||
|
height: 47vh; |
||||
|
background-color: white; |
||||
|
} |
||||
|
|
||||
|
.bell { |
||||
|
height: 9.6vh; |
||||
|
display: flex; |
||||
|
align-items: flex-end; |
||||
|
justify-content: flex-end; |
||||
|
padding-right: 50rpx; |
||||
|
} |
||||
|
|
||||
|
.image-bell { |
||||
|
width: 13px; |
||||
|
height: 16px; |
||||
|
} |
||||
|
|
||||
|
.msg { |
||||
|
height: 10.7vh; |
||||
|
display: flex; |
||||
|
margin-top: 3vh; |
||||
|
margin-bottom: 3vh; |
||||
|
} |
||||
|
|
||||
|
.msg-left { |
||||
|
width: 33.6vw; |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.avatar { |
||||
|
width: 175rpx; |
||||
|
height: 175rpx; |
||||
|
border-radius: 50%; |
||||
|
background-color: black; |
||||
|
} |
||||
|
|
||||
|
.msg-center { |
||||
|
width: 51.7vw; |
||||
|
padding-left: 2.5vh; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.userInfo { |
||||
|
font-size: 20px; |
||||
|
} |
||||
|
|
||||
|
.userId { |
||||
|
font-size: 14px; |
||||
|
margin-top: 1vh; |
||||
|
} |
||||
|
|
||||
|
.image-editName { |
||||
|
width: 40rpx; |
||||
|
height: 40rpx; |
||||
|
margin-left: 2vw; |
||||
|
} |
||||
|
|
||||
|
.msg-right { |
||||
|
width: 14.7vw; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.image-attendance { |
||||
|
width: 43rpx; |
||||
|
height: 43rpx; |
||||
|
} |
||||
|
|
||||
|
.settings-buttons { |
||||
|
display: flex; |
||||
|
justify-content: space-around; |
||||
|
} |
||||
|
|
||||
|
.setting-btn { |
||||
|
width: 349rpx; |
||||
|
height: 135rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
background-color: rgb(243, 243, 243); |
||||
|
border-radius: 8%; |
||||
|
} |
||||
|
|
||||
|
.setting-icon { |
||||
|
width: 64.7rpx; |
||||
|
height: 64.7rpx; |
||||
|
margin-right: 25rpx; |
||||
|
} |
||||
|
|
||||
|
.setting-btn text { |
||||
|
font-size: 28rpx; |
||||
|
font-weight: bold; |
||||
|
color: #333; |
||||
|
} |
||||
|
|
||||
|
.share { |
||||
|
height: 12.6vh; |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.img-share { |
||||
|
width: 720rpx; |
||||
|
height: 160rpx; |
||||
|
} |
||||
|
|
||||
|
.bottom { |
||||
|
height: 44.5vh; |
||||
|
margin-top: 1vh; |
||||
|
background-color: rgb(255, 255, 255); |
||||
|
} |
||||
|
|
||||
|
.list-item { |
||||
|
width: 670rpx; |
||||
|
height: 7vh; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
margin: 0rpx 40rpx; |
||||
|
border-bottom: 1rpx solid #eee; |
||||
|
} |
||||
|
|
||||
|
.list-item:last-child { |
||||
|
border-bottom: none; |
||||
|
} |
||||
|
|
||||
|
.list-icon { |
||||
|
width: 42rpx; |
||||
|
height: 42rpx; |
||||
|
margin-right: 18rpx; |
||||
|
} |
||||
|
|
||||
|
.arrow { |
||||
|
margin-left: auto; |
||||
|
} |
||||
|
|
||||
|
.update-tip { |
||||
|
display: flex; |
||||
|
color: #999; |
||||
|
font-size: 24rpx; |
||||
|
align-items: center; |
||||
|
margin-left: 200rpx; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.circle { |
||||
|
width: 10rpx; |
||||
|
height: 10rpx; |
||||
|
border-radius: 50%; |
||||
|
background-color: red; |
||||
|
margin-left: 10rpx; |
||||
|
} |
||||
</style> |
</style> |
||||
@ -1,655 +0,0 @@ |
|||||
<template> |
|
||||
<view style="width: 750rpx; height: 750rpx;"> |
|
||||
<l-echart ref="chartRef" @finished="initChart"></l-echart> |
|
||||
</view> |
|
||||
</template> |
|
||||
<script setup> |
|
||||
import { ref, computed, onMounted } from 'vue'; |
|
||||
|
|
||||
const chartRef = ref(null) |
|
||||
// 获取系统信息,替代 window.innerWidth |
|
||||
const systemInfo = uni.getSystemInfoSync() |
|
||||
const screenWidth = ref(systemInfo.screenWidth || 375) // 默认值 375px |
|
||||
|
|
||||
// 生成30天的交易信号数据 |
|
||||
const generateAIGoldBullData = () => { |
|
||||
const data = [] |
|
||||
|
|
||||
for (let i = 0; i < 30; i++) { |
|
||||
// 模拟交易信号 [索引, 买入信号, 卖出信号, 持有信号, 强度, 成交量] |
|
||||
const buySignal = Math.random() > 0.7 ? 1 : 0 // 30%概率买入信号 |
|
||||
const sellSignal = Math.random() > 0.8 ? 1 : 0 // 20%概率卖出信号 |
|
||||
const holdSignal = Math.random() > 0.5 ? 1 : 0 // 50%概率持有信号 |
|
||||
const strength = Math.floor(Math.random() * 3) + 1 // 信号强度1-3 |
|
||||
const volume = Math.floor(Math.random() * 2000) + 500 // 成交量500-2500 |
|
||||
|
|
||||
data.push([i, buySignal, sellSignal, holdSignal, strength, volume]) |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 添加缺失的变量定义 |
|
||||
var option |
|
||||
const AIGoldBull = ref({ |
|
||||
JN: generateAIGoldBullData() |
|
||||
}) |
|
||||
|
|
||||
// 模拟多语言数据 |
|
||||
const t = ref({ |
|
||||
suoxie: 'zh', |
|
||||
tianxian: '天线', |
|
||||
feixian: '飞线', |
|
||||
zhoongxian: '中线', |
|
||||
liuxian: '流线', |
|
||||
Klinetext_5: 'K线5', |
|
||||
Klinetext_6: 'K线6', |
|
||||
maipan: '买盘', |
|
||||
maipan1: '卖盘' |
|
||||
}) |
|
||||
|
|
||||
// 生成30天的模拟K线数据 [日期, 开盘, 最高, 最低, 收盘] |
|
||||
const generateKLineData = () => { |
|
||||
const data = [] |
|
||||
let basePrice = 2450 // 黄金基础价格 |
|
||||
|
|
||||
for (let i = 0; i < 30; i++) { |
|
||||
const date = new Date(2024, 0, i + 1).toISOString().split('T')[0] |
|
||||
|
|
||||
// 模拟价格波动 |
|
||||
const volatility = (Math.random() - 0.5) * 50 // ±25的波动 |
|
||||
const open = basePrice + volatility |
|
||||
|
|
||||
const highVolatility = Math.random() * 30 + 10 // 10-40的向上波动 |
|
||||
const lowVolatility = Math.random() * 30 + 10 // 10-40的向下波动 |
|
||||
|
|
||||
const high = Math.max(open, open + highVolatility) |
|
||||
const low = Math.min(open, open - lowVolatility) |
|
||||
|
|
||||
const closeVolatility = (Math.random() - 0.5) * 20 |
|
||||
const close = Math.max(low, Math.min(high, open + closeVolatility)) |
|
||||
|
|
||||
data.push([date, |
|
||||
Math.round(open * 100) / 100, |
|
||||
Math.round(high * 100) / 100, |
|
||||
Math.round(low * 100) / 100, |
|
||||
Math.round(close * 100) / 100 |
|
||||
]) |
|
||||
|
|
||||
basePrice = close // 下一天的基础价格 |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 生成30天的成交量和技术指标数据 [日期, 成交量1, 成交量2, 指标1, 指标2, 指标3] |
|
||||
const generateWaveVolData = () => { |
|
||||
const data = [] |
|
||||
|
|
||||
for (let i = 0; i < 30; i++) { |
|
||||
const date = new Date(2024, 0, i + 1).toISOString().split('T')[0] |
|
||||
|
|
||||
// 模拟成交量数据 |
|
||||
const vol1 = Math.floor(Math.random() * 2000) + 800 // 800-2800 |
|
||||
const vol2 = Math.floor(Math.random() * 1500) + 600 // 600-2100 |
|
||||
|
|
||||
// 模拟技术指标 |
|
||||
const indicator1 = Math.floor(Math.random() * 30) + 40 // 40-70 |
|
||||
const indicator2 = Math.floor(Math.random() * 40) + 50 // 50-90 |
|
||||
const indicator3 = Math.floor(Math.random() * 35) + 60 // 60-95 |
|
||||
|
|
||||
data.push([date, vol1, vol2, indicator1, indicator2, indicator3]) |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 生成30天的移动平均线数据 [MA5, MA10, MA20, MA30] |
|
||||
const generateFTLineData = () => { |
|
||||
const data = [] |
|
||||
let ma5Base = 2450 |
|
||||
let ma10Base = 2445 |
|
||||
let ma20Base = 2440 |
|
||||
let ma30Base = 2435 |
|
||||
|
|
||||
for (let i = 0; i < 30; i++) { |
|
||||
// 模拟移动平均线的平滑变化 |
|
||||
ma5Base += (Math.random() - 0.5) * 10 |
|
||||
ma10Base += (Math.random() - 0.5) * 8 |
|
||||
ma20Base += (Math.random() - 0.5) * 6 |
|
||||
ma30Base += (Math.random() - 0.5) * 4 |
|
||||
|
|
||||
data.push([ |
|
||||
Math.round(ma5Base * 100) / 100, |
|
||||
Math.round(ma10Base * 100) / 100, |
|
||||
Math.round(ma20Base * 100) / 100, |
|
||||
Math.round(ma30Base * 100) / 100 |
|
||||
]) |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 生成模拟数据 |
|
||||
const mockKLineData = generateKLineData() |
|
||||
const mockWaveVolData = generateWaveVolData() |
|
||||
const mockFTLineData = generateFTLineData() |
|
||||
|
|
||||
// 生成RSI指标数据 (相对强弱指数) |
|
||||
const generateRSIData = () => { |
|
||||
const data = [] |
|
||||
for (let i = 0; i < 30; i++) { |
|
||||
const rsi = Math.random() * 60 + 20 // RSI值在20-80之间 |
|
||||
data.push(Math.round(rsi * 100) / 100) |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 生成MACD指标数据 |
|
||||
const generateMACDData = () => { |
|
||||
const data = [] |
|
||||
for (let i = 0; i < 30; i++) { |
|
||||
const macd = (Math.random() - 0.5) * 20 // MACD值在-10到10之间 |
|
||||
const signal = (Math.random() - 0.5) * 15 // 信号线 |
|
||||
const histogram = macd - signal // 柱状图 |
|
||||
|
|
||||
data.push([ |
|
||||
Math.round(macd * 100) / 100, |
|
||||
Math.round(signal * 100) / 100, |
|
||||
Math.round(histogram * 100) / 100 |
|
||||
]) |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 生成布林带数据 |
|
||||
const generateBollingerData = () => { |
|
||||
const data = [] |
|
||||
let middleLine = 2450 |
|
||||
|
|
||||
for (let i = 0; i < 30; i++) { |
|
||||
middleLine += (Math.random() - 0.5) * 10 |
|
||||
const upperBand = middleLine + Math.random() * 30 + 20 // 上轨 |
|
||||
const lowerBand = middleLine - Math.random() * 30 - 20 // 下轨 |
|
||||
|
|
||||
data.push([ |
|
||||
Math.round(upperBand * 100) / 100, |
|
||||
Math.round(middleLine * 100) / 100, |
|
||||
Math.round(lowerBand * 100) / 100 |
|
||||
]) |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 生成成交量分析数据 |
|
||||
const generateVolumeAnalysisData = () => { |
|
||||
const data = [] |
|
||||
for (let i = 0; i < 30; i++) { |
|
||||
const buyVolume = Math.floor(Math.random() * 1500) + 500 // 买入量 |
|
||||
const sellVolume = Math.floor(Math.random() * 1500) + 500 // 卖出量 |
|
||||
const netVolume = buyVolume - sellVolume // 净买入量 |
|
||||
|
|
||||
data.push([buyVolume, sellVolume, netVolume]) |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 生成市场情绪数据 |
|
||||
const generateMarketSentimentData = () => { |
|
||||
const sentiments = ['极度恐慌', '恐慌', '中性', '贪婪', '极度贪婪'] |
|
||||
const data = [] |
|
||||
|
|
||||
for (let i = 0; i < 30; i++) { |
|
||||
const sentimentIndex = Math.floor(Math.random() * 100) // 0-100的情绪指数 |
|
||||
const sentimentLabel = sentiments[Math.floor(sentimentIndex / 20)] |
|
||||
|
|
||||
data.push({ |
|
||||
date: new Date(2024, 0, i + 1).toISOString().split('T')[0], |
|
||||
index: sentimentIndex, |
|
||||
label: sentimentLabel, |
|
||||
fearGreedRatio: Math.random() * 100 |
|
||||
}) |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 生成重要新闻事件数据 |
|
||||
const generateNewsEventsData = () => { |
|
||||
const events = [ |
|
||||
'美联储利率决议', |
|
||||
'非农就业数据发布', |
|
||||
'通胀数据公布', |
|
||||
'地缘政治紧张', |
|
||||
'央行政策变化', |
|
||||
'经济数据超预期', |
|
||||
'市场技术突破', |
|
||||
'大宗商品价格波动' |
|
||||
] |
|
||||
|
|
||||
const data = [] |
|
||||
for (let i = 0; i < 10; i++) { // 生成10个随机事件 |
|
||||
const randomDay = Math.floor(Math.random() * 30) + 1 |
|
||||
const event = events[Math.floor(Math.random() * events.length)] |
|
||||
const impact = Math.floor(Math.random() * 5) + 1 // 影响力1-5 |
|
||||
|
|
||||
data.push({ |
|
||||
date: new Date(2024, 0, randomDay).toISOString().split('T')[0], |
|
||||
event: event, |
|
||||
impact: impact, |
|
||||
type: Math.random() > 0.5 ? 'positive' : 'negative' |
|
||||
}) |
|
||||
} |
|
||||
return data.sort((a, b) => new Date(a.date) - new Date(b.date)) |
|
||||
} |
|
||||
|
|
||||
// 生成价格预测数据 |
|
||||
const generatePricePredictionData = () => { |
|
||||
const data = [] |
|
||||
let currentPrice = 2450 |
|
||||
|
|
||||
for (let i = 0; i < 7; i++) { // 未来7天预测 |
|
||||
const date = new Date(2024, 1, i + 1).toISOString().split('T')[0] // 2月份 |
|
||||
|
|
||||
// 模拟AI预测的价格区间 |
|
||||
const prediction = currentPrice + (Math.random() - 0.5) * 100 |
|
||||
const confidence = Math.random() * 40 + 60 // 60-100%的置信度 |
|
||||
const upperBound = prediction + Math.random() * 50 |
|
||||
const lowerBound = prediction - Math.random() * 50 |
|
||||
|
|
||||
data.push({ |
|
||||
date: date, |
|
||||
predicted_price: Math.round(prediction * 100) / 100, |
|
||||
confidence: Math.round(confidence), |
|
||||
upper_bound: Math.round(upperBound * 100) / 100, |
|
||||
lower_bound: Math.round(lowerBound * 100) / 100 |
|
||||
}) |
|
||||
|
|
||||
currentPrice = prediction |
|
||||
} |
|
||||
return data |
|
||||
} |
|
||||
|
|
||||
// 模拟提取的绘图数据 |
|
||||
const extractedDrawData = { |
|
||||
KLine20: mockKLineData, |
|
||||
WAVEVOL: mockWaveVolData, |
|
||||
FTLINE: mockFTLineData, |
|
||||
RSI: generateRSIData(), |
|
||||
MACD: generateMACDData(), |
|
||||
BOLLINGER: generateBollingerData(), |
|
||||
VOLUME_ANALYSIS: generateVolumeAnalysisData(), |
|
||||
MARKET_SENTIMENT: generateMarketSentimentData(), |
|
||||
NEWS_EVENTS: generateNewsEventsData(), |
|
||||
PRICE_PREDICTION: generatePricePredictionData() |
|
||||
} |
|
||||
|
|
||||
const fnShowEcharts4 = (extractedDrawData) => { |
|
||||
const splitData = (b) => { |
|
||||
const a = JSON.parse(JSON.stringify(b)) |
|
||||
let categoryData = [] |
|
||||
let values = [] |
|
||||
for (let i = 0; i < a.length; i++) { |
|
||||
categoryData.push(a[i].splice(0, 1)[0]) |
|
||||
values.push(a[i]) |
|
||||
} |
|
||||
return { |
|
||||
categoryData, |
|
||||
values |
|
||||
} |
|
||||
} |
|
||||
var bodongliang = splitData(extractedDrawData.WAVEVOL) |
|
||||
function bodongliangData(values, i) { |
|
||||
return values.map((subArray) => subArray[i]) |
|
||||
} |
|
||||
function calculateMA(index, data) { |
|
||||
let result = [] |
|
||||
if (data.FTLINE) { |
|
||||
data.FTLINE.forEach((item) => { |
|
||||
result.push(item[index]) |
|
||||
}) |
|
||||
} |
|
||||
return result |
|
||||
} |
|
||||
function vwToPx(vw) { |
|
||||
return (screenWidth.value * vw) / 100 |
|
||||
} |
|
||||
var dealData = splitData(extractedDrawData.KLine20) |
|
||||
var dealGnBullData = AIGoldBull.value.JN |
|
||||
const textEcharts = t.value |
|
||||
const firstLegend = computed(() => { |
|
||||
if (screenWidth.value < 768) { |
|
||||
if (textEcharts.suoxie === 'en' || textEcharts.suoxie === 'th') { |
|
||||
return '2%' |
|
||||
} else if (textEcharts.suoxie === 'kr') { |
|
||||
return '2%' |
|
||||
} else { |
|
||||
return '2%' |
|
||||
} |
|
||||
} else { |
|
||||
return textEcharts.suoxie === 'en' || |
|
||||
textEcharts.suoxie === 'th' || |
|
||||
textEcharts.suoxie === 'kr' |
|
||||
? '9%' |
|
||||
: '9%' |
|
||||
} |
|
||||
}) |
|
||||
const processBarData = (data) => { |
|
||||
const barData = [] |
|
||||
data.forEach((item) => { |
|
||||
let color |
|
||||
switch (item[4]) { |
|
||||
case 1: |
|
||||
color = '#13E113' |
|
||||
break |
|
||||
case 2: |
|
||||
color = '#FF0E00' |
|
||||
break |
|
||||
case 3: |
|
||||
color = '#0000FE' |
|
||||
break |
|
||||
case 4: |
|
||||
color = '#1397FF' |
|
||||
break |
|
||||
} |
|
||||
barData.push({ |
|
||||
value: item[5], |
|
||||
itemStyle: { |
|
||||
normal: { |
|
||||
color: color |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
}) |
|
||||
return { barData } |
|
||||
} |
|
||||
const { barData } = processBarData(dealGnBullData) |
|
||||
option = { |
|
||||
tooltip: { |
|
||||
trigger: 'axis', |
|
||||
axisPointer: { |
|
||||
type: 'cross' |
|
||||
}, |
|
||||
backgroundColor: 'rgba(119, 120, 125, 0.6)', |
|
||||
borderWidth: 1, |
|
||||
borderColor: '#77787D', |
|
||||
padding: 10, |
|
||||
textStyle: { |
|
||||
color: '#fff' |
|
||||
} |
|
||||
}, |
|
||||
axisPointer: { |
|
||||
link: [ |
|
||||
{ |
|
||||
xAxisIndex: 'all' |
|
||||
} |
|
||||
], |
|
||||
label: { |
|
||||
backgroundColor: '#77787D' |
|
||||
} |
|
||||
}, |
|
||||
toolbox: { |
|
||||
show: false |
|
||||
}, |
|
||||
grid: [ |
|
||||
{ |
|
||||
left: screenWidth.value > 768 ? '10%' : '12%', |
|
||||
right: screenWidth.value > 768 ? '4%' : '6%', |
|
||||
top: screenWidth.value > 768 ? '10%' : '12%', |
|
||||
height: screenWidth.value > 768 ? '35%' : '34%', |
|
||||
containLabel: false |
|
||||
}, |
|
||||
{ |
|
||||
left: screenWidth.value > 768 ? '10%' : '12%', |
|
||||
right: screenWidth.value > 768 ? '4%' : '6%', |
|
||||
top: screenWidth.value > 768 ? '48%' : '48%', |
|
||||
height: screenWidth.value > 768 ? '19%' : '21%', |
|
||||
containLabel: false |
|
||||
}, |
|
||||
{ |
|
||||
left: screenWidth.value > 768 ? '10%' : '12%', |
|
||||
right: screenWidth.value > 768 ? '4%' : '6%', |
|
||||
top: screenWidth.value > 768 ? '70%' : '71%', |
|
||||
height: screenWidth.value > 768 ? '19%' : '21%', |
|
||||
containLabel: false |
|
||||
} |
|
||||
], |
|
||||
xAxis: [ |
|
||||
{ |
|
||||
type: 'category', |
|
||||
data: dealData.categoryData, |
|
||||
boundaryGap: true, |
|
||||
axisLine: { onZero: false }, |
|
||||
splitLine: { show: false }, |
|
||||
min: 'dataMin', |
|
||||
max: 'dataMax', |
|
||||
axisPointer: { |
|
||||
z: 100, |
|
||||
label: { |
|
||||
show: false // 不显示标签 |
|
||||
} |
|
||||
}, |
|
||||
axisLine: { |
|
||||
lineStyle: { |
|
||||
color: 'black' |
|
||||
} |
|
||||
}, // |
|
||||
axisLabel: { show: false }, |
|
||||
axisTick: { show: false } |
|
||||
}, |
|
||||
{ |
|
||||
type: 'category', |
|
||||
gridIndex: 1, |
|
||||
data: dealData.categoryData, |
|
||||
boundaryGap: true, |
|
||||
axisPointer: { |
|
||||
z: 100, |
|
||||
label: { |
|
||||
show: false // 不显示标签 |
|
||||
} |
|
||||
}, |
|
||||
axisLine: { lineStyle: { color: 'black' } }, |
|
||||
axisLabel: { |
|
||||
show: false, |
|
||||
interval: 'auto' |
|
||||
}, |
|
||||
axisTick: { show: false } |
|
||||
}, |
|
||||
{ |
|
||||
type: 'category', |
|
||||
gridIndex: 2, |
|
||||
data: dealData.categoryData, |
|
||||
boundaryGap: true, |
|
||||
axisLine: { lineStyle: { color: 'black' } }, |
|
||||
axisLabel: { |
|
||||
show: true, |
|
||||
interval: 'auto', |
|
||||
fontSize: screenWidth.value > 768 ? 15 : 9 |
|
||||
}, |
|
||||
axisTick: { show: false } |
|
||||
} |
|
||||
], |
|
||||
yAxis: [ |
|
||||
{ |
|
||||
scale: true, |
|
||||
gridIndex: 0, |
|
||||
position: 'left', |
|
||||
axisLabel: { |
|
||||
inside: false, |
|
||||
align: 'right', |
|
||||
fontSize: screenWidth.value > 768 ? 15 : 9 |
|
||||
}, |
|
||||
axisLine: { |
|
||||
show: true, |
|
||||
lineStyle: { |
|
||||
fontSize: '', |
|
||||
color: 'black' |
|
||||
} |
|
||||
}, |
|
||||
axisTick: { show: false }, |
|
||||
splitLine: { show: false } |
|
||||
}, |
|
||||
{ |
|
||||
scale: true, |
|
||||
gridIndex: 1, |
|
||||
splitNumber: 4, |
|
||||
min: 0, |
|
||||
minInterval: 1, |
|
||||
axisLabel: { |
|
||||
show: true, |
|
||||
fontSize: screenWidth.value > 768 ? 15 : 9, |
|
||||
margin: 8, |
|
||||
}, |
|
||||
axisLine: { show: true, lineStyle: { color: 'black' } }, |
|
||||
axisTick: { show: false }, |
|
||||
splitLine: { show: true, lineStyle: { type: 'dashed' } }, |
|
||||
boundaryGap: ['20%', '20%'] |
|
||||
}, |
|
||||
{ |
|
||||
scale: true, |
|
||||
gridIndex: 2, |
|
||||
splitNumber: 2, |
|
||||
axisLabel: { |
|
||||
show: true, |
|
||||
fontSize: screenWidth.value > 768 ? 15 : 9 |
|
||||
}, |
|
||||
axisLine: { show: true, lineStyle: { color: 'black' } }, |
|
||||
axisTick: { show: false }, |
|
||||
splitLine: { show: false } |
|
||||
} |
|
||||
], |
|
||||
dataZoom: [ |
|
||||
{ |
|
||||
type: 'inside', |
|
||||
xAxisIndex: [0, 1, 2], |
|
||||
start: 50, |
|
||||
end: 100 |
|
||||
}, |
|
||||
{ |
|
||||
show: true, |
|
||||
xAxisIndex: [0, 1, 2], |
|
||||
type: 'slider', |
|
||||
start: 50, |
|
||||
end: 100 |
|
||||
} |
|
||||
], |
|
||||
series: [ |
|
||||
{ |
|
||||
type: 'candlestick', |
|
||||
name: '日K', |
|
||||
xAxisIndex: 0, |
|
||||
yAxisIndex: 0, |
|
||||
data: dealData.values, |
|
||||
itemStyle: { |
|
||||
normal: { |
|
||||
color0: 'red', |
|
||||
color: 'green', |
|
||||
borderColor0: 'red', |
|
||||
borderColor: 'green' |
|
||||
} |
|
||||
}, |
|
||||
gridIndex: 1 |
|
||||
}, |
|
||||
{ |
|
||||
name: '成交量', |
|
||||
type: 'bar', |
|
||||
barWidth: '70%', |
|
||||
xAxisIndex: 1, |
|
||||
yAxisIndex: 1, |
|
||||
data: barData, |
|
||||
}, |
|
||||
// { |
|
||||
// name: textEcharts.feixian, |
|
||||
// type: 'line', |
|
||||
// data: calculateMA(1, extractedDrawData), |
|
||||
// smooth: true, |
|
||||
// symbol: 'none', |
|
||||
// xAxisIndex: 2, |
|
||||
// yAxisIndex: 2, |
|
||||
// itemStyle: { |
|
||||
// normal: { |
|
||||
// color: '#00a32e', |
|
||||
// lineStyle: { |
|
||||
// color: '#00a32e', |
|
||||
// width: 2, |
|
||||
// type: 'solid' |
|
||||
// } |
|
||||
// } |
|
||||
// } |
|
||||
// }, |
|
||||
// { |
|
||||
// name: textEcharts.zhoongxian, |
|
||||
// type: 'line', |
|
||||
// data: calculateMA(2, extractedDrawData), |
|
||||
// smooth: true, |
|
||||
// symbol: 'none', |
|
||||
// xAxisIndex: 2, |
|
||||
// yAxisIndex: 2, |
|
||||
// itemStyle: { |
|
||||
// normal: { |
|
||||
// color: '#de0000', |
|
||||
// lineStyle: { |
|
||||
// color: '#de0000', |
|
||||
// width: 2, |
|
||||
// type: 'solid' |
|
||||
// } |
|
||||
// } |
|
||||
// } |
|
||||
// }, |
|
||||
// { |
|
||||
// name: textEcharts.tianxian, |
|
||||
// type: 'line', |
|
||||
// data: calculateMA(3, extractedDrawData), |
|
||||
// smooth: true, |
|
||||
// symbol: 'none', |
|
||||
// xAxisIndex: 2, |
|
||||
// yAxisIndex: 2, |
|
||||
// itemStyle: { |
|
||||
// normal: { |
|
||||
// color: '#ffb300', |
|
||||
// lineStyle: { |
|
||||
// color: '#ffb300', |
|
||||
// width: 2, |
|
||||
// type: 'solid' |
|
||||
// } |
|
||||
// } |
|
||||
// } |
|
||||
// }, |
|
||||
// { |
|
||||
// name: textEcharts.liuxian, |
|
||||
// type: 'line', |
|
||||
// data: calculateMA(4, extractedDrawData), |
|
||||
// smooth: true, |
|
||||
// symbol: 'none', |
|
||||
// xAxisIndex: 2, |
|
||||
// yAxisIndex: 2, |
|
||||
// itemStyle: { |
|
||||
// normal: { |
|
||||
// color: '#00c8ff', |
|
||||
// lineStyle: { |
|
||||
// color: '#00c8ff', |
|
||||
// width: 2, |
|
||||
// type: 'solid' |
|
||||
// } |
|
||||
// } |
|
||||
// } |
|
||||
// }, |
|
||||
] |
|
||||
} |
|
||||
initChart() |
|
||||
} |
|
||||
|
|
||||
// 组件挂载时初始化图表 |
|
||||
onMounted(() => { |
|
||||
// 调用图表初始化函数 |
|
||||
fnShowEcharts4(extractedDrawData) |
|
||||
}) |
|
||||
|
|
||||
|
|
||||
// 初始化图表 |
|
||||
const initChart = async () => { |
|
||||
if (!chartRef.value) return |
|
||||
|
|
||||
try { |
|
||||
const chart = await chartRef.value.init(echarts) |
|
||||
chart.setOption(option) |
|
||||
} catch (error) { |
|
||||
console.error('图表初始化失败:', error) |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
@ -0,0 +1,245 @@ |
|||||
|
<template> |
||||
|
<view class="main"> |
||||
|
<view :style="{height:iSMT+'px'}"></view> |
||||
|
|
||||
|
<view class="tab"> |
||||
|
<view class="tab-item" :class="{active: activeTab === 'email'}" @click="activeTab = 'email'">邮箱</view> |
||||
|
<view class="tab-item" :class="{active: activeTab === 'phone'}" @click="activeTab = 'phone'">手机号</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="switch-tab"> |
||||
|
<view class="input-list" v-if="activeTab === 'email'"> |
||||
|
<image src="/static/my/changeEmail.png" mode="aspectFit"></image> |
||||
|
<input type="text" placeholder="请输入邮箱" class="input" v-model="userEmail" /> |
||||
|
<button class="code-btn" :class="{disabled: gettingCode}" @click="getCode" :disabled="gettingCode"> |
||||
|
{{ gettingCode ? `重新发送 ${time}s` : '获取验证码' }} |
||||
|
</button> |
||||
|
</view> |
||||
|
|
||||
|
<view class="input-list" v-else> |
||||
|
<image src="/static/my/changeBindPhone.png" mode="aspectFit"></image> |
||||
|
<input type="number" placeholder="请输入手机号" class="input" v-model="userPhone" /> |
||||
|
<button class="code-btn" :class="{disabled: gettingCode}" @click="getCode" :disabled="gettingCode"> |
||||
|
{{ gettingCode ? `重新发送 ${time}s` : '获取验证码' }} |
||||
|
</button> |
||||
|
</view> |
||||
|
|
||||
|
<view class="input-list"> |
||||
|
<image src="/static/my/verification.png" mode="aspectFit"></image> |
||||
|
<input type="text" placeholder="请输入验证码" class="input" v-model="verifyCode" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="btn-area"> |
||||
|
<button class="next-btn" @click="goToPwdNext">下一步</button> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
import { |
||||
|
ref, |
||||
|
onMounted |
||||
|
} from 'vue' |
||||
|
import { |
||||
|
sendEmail, |
||||
|
validateCode, |
||||
|
sendPhone |
||||
|
} from "@/api/setting/password"; |
||||
|
|
||||
|
const iSMT = ref(0) |
||||
|
const activeTab = ref('email') |
||||
|
const gettingCode = ref(false) |
||||
|
const time = ref(60) |
||||
|
|
||||
|
const userEmail = ref('') |
||||
|
const userPhone = ref('') |
||||
|
const verifyCode = ref('') |
||||
|
|
||||
|
|
||||
|
const getCode = () => { |
||||
|
if (gettingCode.value) return |
||||
|
gettingCode.value = true |
||||
|
|
||||
|
time.value = 2 |
||||
|
|
||||
|
const timer = setInterval(() => { |
||||
|
time.value-- |
||||
|
if (time.value <= 0) { |
||||
|
clearInterval(timer) |
||||
|
gettingCode.value = false |
||||
|
time.value = 2 |
||||
|
} |
||||
|
}, 1000) |
||||
|
if (activeTab.value === 'email') { |
||||
|
sendEmail({ |
||||
|
email: userEmail.value |
||||
|
}) |
||||
|
} else { |
||||
|
sendPhone({ |
||||
|
phone: userPhone.value |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
const goToPwdNext = async () => { |
||||
|
if (!userEmail.value) { |
||||
|
uni.showToast({ |
||||
|
title: '请输入邮箱', |
||||
|
icon: 'none' |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
if (!verifyCode.value) { |
||||
|
uni.showToast({ |
||||
|
title: '请输入验证码', |
||||
|
icon: 'none' |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
try { |
||||
|
let param; |
||||
|
if (activeTab.value === 'email') { |
||||
|
param = { |
||||
|
loginType: 'EMAIL', |
||||
|
account: userEmail.value, |
||||
|
verifyCode: verifyCode.value |
||||
|
} |
||||
|
} else { |
||||
|
param = { |
||||
|
loginType: 'PHONE', |
||||
|
account: userPhone.value, |
||||
|
verifyCode: verifyCode.value |
||||
|
} |
||||
|
} |
||||
|
const res = await validateCode(param) |
||||
|
console.log('看看参数', param) |
||||
|
console.log('看看结果', res) |
||||
|
// 如果返回成功 |
||||
|
if (res.code === 200) { |
||||
|
uni.showToast({ |
||||
|
title: '验证成功', |
||||
|
icon: 'success' |
||||
|
}) |
||||
|
uni.navigateTo({ |
||||
|
url: '../setting/nextPwd' |
||||
|
}) |
||||
|
} else { |
||||
|
uni.showToast({ |
||||
|
title: res.msg || '验证失败', |
||||
|
icon: 'none' |
||||
|
}) |
||||
|
} |
||||
|
} catch (err) { |
||||
|
console.error(err) |
||||
|
uni.showToast({ |
||||
|
title: '请求出错', |
||||
|
icon: 'none' |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
onMounted(() => { |
||||
|
// 获取状态栏高度 |
||||
|
iSMT.value = uni.getSystemInfoSync().statusBarHeight; |
||||
|
}) |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
.tab { |
||||
|
display: flex; |
||||
|
height: 8vh; |
||||
|
background-color: #fff; |
||||
|
border-bottom: 1rpx solid #eee; |
||||
|
} |
||||
|
|
||||
|
.tab-item { |
||||
|
flex: 1; |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
font-size: 32rpx; |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.tab-item.active { |
||||
|
color: #000; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.tab-item.active::after { |
||||
|
content: ''; |
||||
|
position: absolute; |
||||
|
bottom: 0; |
||||
|
left: 50%; |
||||
|
transform: translateX(-50%); |
||||
|
width: 40rpx; |
||||
|
height: 6rpx; |
||||
|
background-color: #000; |
||||
|
/* ????? */ |
||||
|
} |
||||
|
|
||||
|
.switch-tab { |
||||
|
background-color: #fff; |
||||
|
padding: 0 60rpx; |
||||
|
} |
||||
|
|
||||
|
.input-list { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
height: 7vh; |
||||
|
border-bottom: 1rpx solid #eee; |
||||
|
} |
||||
|
|
||||
|
.input-list image { |
||||
|
width: 40rpx; |
||||
|
height: 40rpx; |
||||
|
margin-right: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.input { |
||||
|
flex: 1; |
||||
|
height: 14vh; |
||||
|
font-size: 28rpx; |
||||
|
} |
||||
|
|
||||
|
.code-btn { |
||||
|
width: 200rpx; |
||||
|
height: 60rpx; |
||||
|
font-size: 24rpx; |
||||
|
border-radius: 10rpx; |
||||
|
background-color: #eee; |
||||
|
color: #666; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.code-btn.disabled { |
||||
|
background-color: #ccc; |
||||
|
color: #999; |
||||
|
} |
||||
|
|
||||
|
.btn-area { |
||||
|
height: 8vh; |
||||
|
background-color: white; |
||||
|
padding-top: 120rpx; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.next-btn { |
||||
|
width: 610rpx; |
||||
|
height: 85rpx; |
||||
|
background-color: #000; |
||||
|
color: #fff; |
||||
|
font-size: 30rpx; |
||||
|
border-radius: 40rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
</style> |
||||
@ -1,165 +1,186 @@ |
|||||
<template> |
<template> |
||||
<view class="main"> |
|
||||
<view :style="{height:iSMT+'px'}"></view> |
|
||||
<view class="top"> |
|
||||
<view class="top-list"> |
|
||||
<text>语言</text> |
|
||||
<text class="language">中文(简体)</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
<view class="top-list" @click="goToFont"> |
|
||||
<text>字体大小</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
<view class="top-list" @click="goToTheme"> |
|
||||
<text>主题切换</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
|
|
||||
<view class="center"> |
|
||||
<view class="center-list" @click="goToMessage"> |
|
||||
<text>消息推送</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
<view class="bottom"> |
|
||||
<view class="bottom-list" @click="goToServer"> |
|
||||
<text>切换服务器</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
<view class="bottom-list" @click="clearCache"> |
|
||||
<text>清理缓存</text> |
|
||||
<text class="cache">{{ cache }}M</text> |
|
||||
<uni-icons type="arrowright" size="16" class="arrow" /> |
|
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
<view class="main"> |
||||
|
<view :style="{height:iSMT+'px'}"></view> |
||||
|
<view class="top"> |
||||
|
<view class="top-list"> |
||||
|
<text class="label">语言</text> |
||||
|
<text class="language">{{settingRes.language}}</text> |
||||
|
<uni-icons type="arrowright" size="16" /> |
||||
|
</view> |
||||
|
<view class="top-list" @click="goToFont"> |
||||
|
<text class="label">字体大小</text> |
||||
|
<uni-icons type="arrowright" size="16" /> |
||||
|
</view> |
||||
|
<view class="top-list" @click="goToTheme"> |
||||
|
<text class="label">主题切换</text> |
||||
|
<uni-icons type="arrowright" size="16" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
|
||||
|
<view class="center"> |
||||
|
<view class="center-list" @click="goToMessage"> |
||||
|
<text class="label">消息推送</text> |
||||
|
<uni-icons type="arrowright" size="16" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="bottom"> |
||||
|
<view class="bottom-list" @click="goToServer"> |
||||
|
<text class="label">切换服务器</text> |
||||
|
<uni-icons type="arrowright" size="16" /> |
||||
|
</view> |
||||
|
<view class="bottom-list" @click="clearCache"> |
||||
|
<text class="label">清理缓存</text> |
||||
|
<text class="cache">{{ cache }}M</text> |
||||
|
<uni-icons type="arrowright" size="16" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script setup> |
<script setup> |
||||
import { |
|
||||
ref, |
|
||||
onMounted |
|
||||
} from 'vue' |
|
||||
const iSMT = ref(0) |
|
||||
const cache = ref('45.5') |
|
||||
|
|
||||
const goToFont = () => { |
|
||||
uni.navigateTo({ |
|
||||
url: '/pages/setting/font' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
const goToTheme = () => { |
|
||||
uni.navigateTo({ |
|
||||
url: '/pages/setting/theme' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
const goToMessage = () => { |
|
||||
uni.navigateTo({ |
|
||||
url: '/pages/setting/message' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
const goToServer = () => { |
|
||||
uni.navigateTo({ |
|
||||
url: '/pages/setting/server' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
const clearCache = () => { |
|
||||
cache.value = 0 |
|
||||
uni.showToast({ |
|
||||
title: '清理成功', |
|
||||
icon: 'success', |
|
||||
duration: 1500 |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
onMounted(() => { |
|
||||
// 状态栏高度 |
|
||||
iSMT.value = uni.getSystemInfoSync().statusBarHeight; |
|
||||
console.log('看看高度', iSMT.value) |
|
||||
}) |
|
||||
|
import { |
||||
|
ref, |
||||
|
onMounted |
||||
|
} from 'vue' |
||||
|
import {getUserInfo} from "@/api/member"; |
||||
|
const iSMT = ref(0) |
||||
|
const cache = ref('45.5') |
||||
|
|
||||
|
const settingRes = ref({}) |
||||
|
|
||||
|
const settingPromise = getUserInfo() |
||||
|
settingPromise.then(res => { |
||||
|
if (res.code === 200){ |
||||
|
settingRes.value.language = res.data.language; |
||||
|
settingRes.value.fontSize = res.data.fontSize; |
||||
|
settingRes.value.theme = res.data.theme; |
||||
|
settingRes.value.serverSelection = res.data.serverSelection; |
||||
|
console.log('用户信息', res.data) |
||||
|
}else { |
||||
|
console.log('用户信息请求失败:', res.message); |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
const goToFont = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '/pages/setting/font' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const goToTheme = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '/pages/setting/theme' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const goToMessage = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '/pages/setting/message' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const goToServer = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '/pages/setting/server' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const clearCache = () => { |
||||
|
cache.value = 0 |
||||
|
uni.showToast({ |
||||
|
title: '清理成功', |
||||
|
icon: 'success', |
||||
|
duration: 1500 |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
onMounted(() => { |
||||
|
// 状态栏高度 |
||||
|
iSMT.value = uni.getSystemInfoSync().statusBarHeight; |
||||
|
console.log('看看高度', iSMT.value) |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
.top { |
|
||||
margin-top: 1.5vh; |
|
||||
height: 21vh; |
|
||||
background-color: white; |
|
||||
} |
|
||||
|
|
||||
.top-list { |
|
||||
width: 630rpx; |
|
||||
height: 7vh; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
margin: 0 40rpx; |
|
||||
padding: 0 10rpx; |
|
||||
border-bottom: 1rpx solid #eee; |
|
||||
} |
|
||||
|
|
||||
.top-list:last-child { |
|
||||
border-bottom: none; |
|
||||
} |
|
||||
|
|
||||
.language { |
|
||||
margin-left: 55%; |
|
||||
font-size: 14px; |
|
||||
color: rgb(203, 203, 203); |
|
||||
} |
|
||||
|
|
||||
.arrow { |
|
||||
margin-left: auto; |
|
||||
} |
|
||||
|
|
||||
.center { |
|
||||
background-color: white; |
|
||||
height: 7vh; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
margin-top: 1vh; |
|
||||
} |
|
||||
|
|
||||
.center-list { |
|
||||
width: 630rpx; |
|
||||
margin: 0rpx 40rpx; |
|
||||
display: flex; |
|
||||
padding: 0 10rpx; |
|
||||
} |
|
||||
|
|
||||
.center-list>.arrow { |
|
||||
margin-right: 0; |
|
||||
} |
|
||||
|
|
||||
.bottom { |
|
||||
height: 13.5vh; |
|
||||
background-color: white; |
|
||||
margin-top: 1vh; |
|
||||
} |
|
||||
|
|
||||
.bottom-list { |
|
||||
width: 630rpx; |
|
||||
height: 7vh; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
margin: 0 40rpx; |
|
||||
padding: 0 10rpx; |
|
||||
border-bottom: 1rpx solid #eee; |
|
||||
} |
|
||||
|
|
||||
.cache { |
|
||||
margin-left: 55%; |
|
||||
font-size: 14px; |
|
||||
color: rgb(203, 203, 203); |
|
||||
} |
|
||||
|
|
||||
.bottom-list:last-child { |
|
||||
border-bottom: none; |
|
||||
} |
|
||||
|
.top { |
||||
|
margin-top: 1.5vh; |
||||
|
height: 21vh; |
||||
|
background-color: white; |
||||
|
} |
||||
|
|
||||
|
.top-list { |
||||
|
width: 630rpx; |
||||
|
height: 7vh; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
margin: 0 40rpx; |
||||
|
padding: 0 10rpx; |
||||
|
border-bottom: 1rpx solid #eee; |
||||
|
} |
||||
|
|
||||
|
.top-list:last-child { |
||||
|
border-bottom: none; |
||||
|
} |
||||
|
|
||||
|
.language { |
||||
|
margin-left: 70%; |
||||
|
font-size: 14px; |
||||
|
color: rgb(203, 203, 203); |
||||
|
} |
||||
|
|
||||
|
.arrow { |
||||
|
margin-left: auto; |
||||
|
} |
||||
|
|
||||
|
.center { |
||||
|
background-color: white; |
||||
|
height: 7vh; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
margin-top: 1vh; |
||||
|
} |
||||
|
|
||||
|
.center-list { |
||||
|
width: 630rpx; |
||||
|
margin: 0rpx 40rpx; |
||||
|
display: flex; |
||||
|
padding: 0 10rpx; |
||||
|
} |
||||
|
|
||||
|
.center-list > .arrow { |
||||
|
margin-right: 0; |
||||
|
} |
||||
|
|
||||
|
.bottom { |
||||
|
height: 13.5vh; |
||||
|
background-color: white; |
||||
|
margin-top: 1vh; |
||||
|
} |
||||
|
|
||||
|
.bottom-list { |
||||
|
width: 630rpx; |
||||
|
height: 7vh; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
margin: 0 40rpx; |
||||
|
padding: 0 10rpx; |
||||
|
border-bottom: 1rpx solid #eee; |
||||
|
} |
||||
|
|
||||
|
.cache { |
||||
|
font-size: 14px; |
||||
|
color: rgb(203, 203, 203); |
||||
|
} |
||||
|
|
||||
|
.bottom-list:last-child { |
||||
|
border-bottom: none; |
||||
|
} |
||||
|
|
||||
|
.label{ |
||||
|
flex:1; |
||||
|
font-size:28rpx; |
||||
|
} |
||||
</style> |
</style> |
||||
@ -1,144 +1,175 @@ |
|||||
<template> |
<template> |
||||
<view class="main"> |
|
||||
<view :style="{height:iSMT+'px'}"></view> |
|
||||
|
|
||||
<view style="height:1.5vh;" /> |
|
||||
|
|
||||
<view class="title"> |
|
||||
<text class="label">确认新密码</text> |
|
||||
</view> |
|
||||
|
|
||||
<view class="top"> |
|
||||
<view class="top-list"> |
|
||||
<view class="left"> |
|
||||
<img src="/static/my/unlock.png" /> |
|
||||
<input type="password" :type="pwdType" placeholder="请输入新密码" class="input" /> |
|
||||
<img :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'" |
|
||||
@click="changeEye(1)" /> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
<view class="top-list"> |
|
||||
<view class="left"> |
|
||||
<img src="/static/my/unlock.png" /> |
|
||||
<input type="password" :type="pwdType2" placeholder="再次确认" class="input" /> |
|
||||
<img :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'" |
|
||||
@click="changeEye(2)" /> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
<text class="tips">密码最少8位数</text> |
|
||||
</view> |
|
||||
|
|
||||
<view class="bottom"> |
|
||||
<button class="change-btn">确认</button> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
<view class="main"> |
||||
|
<view :style="{height:iSMT+'px'}"></view> |
||||
|
|
||||
|
<view style="height:1.5vh;"/> |
||||
|
|
||||
|
<view class="title"> |
||||
|
<text class="label">确认新密码</text> |
||||
|
</view> |
||||
|
|
||||
|
<view class="top"> |
||||
|
|
||||
|
|
||||
|
<view class="top-list"> |
||||
|
<view class="left"> |
||||
|
<img src="/static/my/unlock.png"/> |
||||
|
<input type="password" :type="pwdType" placeholder="请输入新密码" class="input" v-model="oldPassword" |
||||
|
/> |
||||
|
<img :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'" |
||||
|
@click="changeEye(1)"/> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="top-list"> |
||||
|
<view class="left"> |
||||
|
<img src="/static/my/unlock.png"/> |
||||
|
<input type="password" :type="pwdType2" placeholder="再次确认" class="input" v-model="newPassword"/> |
||||
|
<img :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'" |
||||
|
@click="changeEye(2)"/> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<text class="tips">密码最少8位数</text> |
||||
|
</view> |
||||
|
|
||||
|
<view class="bottom"> |
||||
|
<button class="change-btn" @click="confirmChange">确认</button> |
||||
|
</view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script setup> |
<script setup> |
||||
import { |
|
||||
ref, |
|
||||
onMounted |
|
||||
} from 'vue' |
|
||||
|
|
||||
const iSMT = ref(0) |
|
||||
const pwdType = ref('password') |
|
||||
const pwdType2 = ref('password') |
|
||||
|
|
||||
const changeEye = (type) => { |
|
||||
if (type === 1) { |
|
||||
pwdType.value = pwdType.value === 'password' ? 'text' : 'password' |
|
||||
} else { |
|
||||
pwdType2.value = pwdType2.value === 'password' ? 'text' : 'password' |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
onMounted(() => { |
|
||||
// 状态栏高度 |
|
||||
iSMT.value = uni.getSystemInfoSync().statusBarHeight; |
|
||||
console.log('看看高度', iSMT.value) |
|
||||
}) |
|
||||
|
import {onMounted, ref} from 'vue' |
||||
|
import {updatePassword} from "@/api/setting/nextPwd"; |
||||
|
|
||||
|
const iSMT = ref(0) |
||||
|
const pwdType = ref('password') |
||||
|
const pwdType2 = ref('password') |
||||
|
|
||||
|
// 绑定的数据 旧密码 新密码 确认密码 |
||||
|
const oldPassword = ref('') |
||||
|
const newPassword = ref('') |
||||
|
|
||||
|
// 点击确认按钮 |
||||
|
const confirmChange = async () => { |
||||
|
|
||||
|
if (newPassword.value !== oldPassword.value) { |
||||
|
uni.showToast({title: '两次输入的密码不一致', icon: 'none'}) |
||||
|
return |
||||
|
} |
||||
|
const updatePasswordPromise = updatePassword({ |
||||
|
oldPassword: oldPassword.value, |
||||
|
newPassword: newPassword.value |
||||
|
}) |
||||
|
updatePasswordPromise |
||||
|
.then(res => { |
||||
|
if (res.code === 200) { |
||||
|
uni.showToast({ title: '修改成功', icon: 'success' }); |
||||
|
} else { |
||||
|
uni.showToast({ title: res.message,icon: 'none' }); |
||||
|
} |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
console.log('修改密码失败:', err); |
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
const changeEye = (type) => { |
||||
|
if (type === 1) { |
||||
|
pwdType.value = pwdType.value === 'password' ? 'text' : 'password' |
||||
|
} else { |
||||
|
pwdType2.value = pwdType2.value === 'password' ? 'text' : 'password' |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
onMounted(() => { |
||||
|
// 状态栏高度 |
||||
|
iSMT.value = uni.getSystemInfoSync().statusBarHeight; |
||||
|
console.log('看看高度', iSMT.value) |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
.title { |
|
||||
height: 8.5vh; |
|
||||
background-color: white; |
|
||||
} |
|
||||
|
|
||||
.label { |
|
||||
height: 8.5vh; |
|
||||
font-size: 40rpx; |
|
||||
font-weight: bold; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
padding: 0 60rpx; |
|
||||
} |
|
||||
|
|
||||
.top { |
|
||||
height: auto; |
|
||||
background-color: white; |
|
||||
display: flex; |
|
||||
flex-direction: column; |
|
||||
align-items: center; |
|
||||
} |
|
||||
|
|
||||
.top-list { |
|
||||
width: 630rpx; |
|
||||
height: 7vh; |
|
||||
margin: 0rpx 40rpx; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
border-bottom: 1rpx solid #eee; |
|
||||
} |
|
||||
|
|
||||
.left { |
|
||||
flex: 1; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
} |
|
||||
|
|
||||
.input { |
|
||||
flex: 1; |
|
||||
height: 70rpx; |
|
||||
font-size: 29rpx; |
|
||||
margin-left: 20rpx; |
|
||||
} |
|
||||
|
|
||||
.bottom { |
|
||||
height: 22vh; |
|
||||
background-color: white; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
justify-content: center; |
|
||||
} |
|
||||
|
|
||||
.change-btn { |
|
||||
height: 85rpx; |
|
||||
width: 610rpx; |
|
||||
padding: 0 20rpx; |
|
||||
background-color: black; |
|
||||
color: white; |
|
||||
border-radius: 40rpx; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
justify-content: center; |
|
||||
} |
|
||||
|
|
||||
.img { |
|
||||
position: absolute; |
|
||||
right: 0; |
|
||||
top: 50%; |
|
||||
transform: translateY(-50%); |
|
||||
} |
|
||||
|
|
||||
.tips { |
|
||||
font-size: 24rpx; |
|
||||
color: #999; |
|
||||
margin-top: 20rpx; |
|
||||
margin-left: 60rpx; |
|
||||
align-self: flex-start; |
|
||||
/* 这是左对齐 */ |
|
||||
} |
|
||||
|
.title { |
||||
|
height: 8.5vh; |
||||
|
background-color: white; |
||||
|
} |
||||
|
|
||||
|
.label { |
||||
|
height: 8.5vh; |
||||
|
font-size: 40rpx; |
||||
|
font-weight: bold; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
padding: 0 60rpx; |
||||
|
} |
||||
|
|
||||
|
.top { |
||||
|
height: auto; |
||||
|
background-color: white; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.top-list { |
||||
|
width: 630rpx; |
||||
|
height: 7vh; |
||||
|
margin: 0rpx 40rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
border-bottom: 1rpx solid #eee; |
||||
|
} |
||||
|
|
||||
|
.left { |
||||
|
flex: 1; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.input { |
||||
|
flex: 1; |
||||
|
height: 70rpx; |
||||
|
font-size: 29rpx; |
||||
|
margin-left: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.bottom { |
||||
|
height: 22vh; |
||||
|
background-color: white; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.change-btn { |
||||
|
height: 85rpx; |
||||
|
width: 610rpx; |
||||
|
padding: 0 20rpx; |
||||
|
background-color: black; |
||||
|
color: white; |
||||
|
border-radius: 40rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.img { |
||||
|
position: absolute; |
||||
|
right: 0; |
||||
|
top: 50%; |
||||
|
transform: translateY(-50%); |
||||
|
} |
||||
|
|
||||
|
.tips { |
||||
|
font-size: 24rpx; |
||||
|
color: #999; |
||||
|
margin-top: 20rpx; |
||||
|
margin-left: 60rpx; |
||||
|
align-self: flex-start; |
||||
|
/* 这是左对齐 */ |
||||
|
} |
||||
</style> |
</style> |
||||
@ -1,56 +0,0 @@ |
|||||
<template> |
|
||||
<view class="content"> |
|
||||
<image class="logo" src="/static/logo.png"></image> |
|
||||
<view class="text-area"> |
|
||||
<text class="title" @click="showLoginPrompt">{{ title }}</text> |
|
||||
</view> |
|
||||
<LoginPrompt ref="loginPrompt"></LoginPrompt> |
|
||||
<button @click="toDeepMate">deepMate</button> |
|
||||
</view> |
|
||||
</template> |
|
||||
|
|
||||
<script setup> |
|
||||
import { ref } from "vue"; |
|
||||
import { useUserStore } from "../../../stores/modules/userInfo"; |
|
||||
const title = ref("请先登录"); |
|
||||
const loginPrompt = ref(null); |
|
||||
|
|
||||
const userStore = useUserStore(); |
|
||||
function showLoginPrompt() { |
|
||||
userStore.clearUserInfo(); |
|
||||
} |
|
||||
|
|
||||
function toDeepMate() { |
|
||||
uni.navigateTo({ |
|
||||
url: "/pages/deepMate/deepMate", |
|
||||
}); |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.content { |
|
||||
display: flex; |
|
||||
flex-direction: column; |
|
||||
align-items: center; |
|
||||
justify-content: center; |
|
||||
} |
|
||||
|
|
||||
.logo { |
|
||||
height: 200rpx; |
|
||||
width: 200rpx; |
|
||||
margin-top: 200rpx; |
|
||||
margin-left: auto; |
|
||||
margin-right: auto; |
|
||||
margin-bottom: 50rpx; |
|
||||
} |
|
||||
|
|
||||
.text-area { |
|
||||
display: flex; |
|
||||
justify-content: center; |
|
||||
} |
|
||||
|
|
||||
.title { |
|
||||
font-size: 36rpx; |
|
||||
color: #8f8f94; |
|
||||
} |
|
||||
</style> |
|
||||
@ -1,14 +1,21 @@ |
|||||
|
/** @format */ |
||||
|
|
||||
export default { |
export default { |
||||
language: { |
|
||||
"name": "Simplified Chinese" |
|
||||
}, |
|
||||
components: { |
|
||||
footerBar: { |
|
||||
homepage: '首页', |
|
||||
marketSituation: '行情', |
|
||||
deepMate: 'DeepMate', |
|
||||
deepExploration: '深度探索', |
|
||||
member: '我的', |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
|
language: { |
||||
|
name: "Simplified Chinese", |
||||
|
}, |
||||
|
components: { |
||||
|
footerBar: { |
||||
|
homepage: "首页", |
||||
|
marketSituation: "行情", |
||||
|
deepMate: "DeepMate", |
||||
|
deepExploration: "深度探索", |
||||
|
member: "我的", |
||||
|
}, |
||||
|
}, |
||||
|
marketSituation: { |
||||
|
globalIndex: "全球指数", |
||||
|
globalIndexMore:'查看更多', |
||||
|
warn:'全球指数为试运行,免费开放,有诸多不足请见谅' |
||||
|
}, |
||||
|
}; |
||||
@ -1,15 +1,22 @@ |
|||||
|
/** @format */ |
||||
|
|
||||
// 中文简体
|
// 中文简体
|
||||
export default { |
export default { |
||||
language: { |
|
||||
name: '中文简体' |
|
||||
}, |
|
||||
components: { |
|
||||
footerBar:{ |
|
||||
homepage: '首页', |
|
||||
marketSituation: '行情', |
|
||||
deepMate: 'DeepMate', |
|
||||
deepExploration: '深度探索', |
|
||||
member: '我的', |
|
||||
}, |
|
||||
}, |
|
||||
} |
|
||||
|
language: { |
||||
|
name: "中文简体", |
||||
|
}, |
||||
|
components: { |
||||
|
footerBar: { |
||||
|
homepage: "首页", |
||||
|
marketSituation: "行情", |
||||
|
deepMate: "DeepMate", |
||||
|
deepExploration: "深度探索", |
||||
|
member: "我的", |
||||
|
}, |
||||
|
}, |
||||
|
marketSituation: { |
||||
|
globalIndex: "全球指数", |
||||
|
globalIndexMore:'查看更多', |
||||
|
warn:'全球指数为试运行,免费开放,有诸多不足请见谅' |
||||
|
}, |
||||
|
}; |
||||
@ -1,15 +1,22 @@ |
|||||
|
/** @format */ |
||||
|
|
||||
// 中文繁体
|
// 中文繁体
|
||||
export default { |
export default { |
||||
language: { |
|
||||
name: "中文繁体" |
|
||||
}, |
|
||||
components: { |
|
||||
footerBar: { |
|
||||
homepage: '首页', |
|
||||
marketSituation: '行情', |
|
||||
deepMate: 'DeepMate', |
|
||||
deepExploration: '深度探索', |
|
||||
member: '我的', |
|
||||
}, |
|
||||
}, |
|
||||
} |
|
||||
|
language: { |
||||
|
name: "中文繁体", |
||||
|
}, |
||||
|
components: { |
||||
|
footerBar: { |
||||
|
homepage: "首页", |
||||
|
marketSituation: "行情", |
||||
|
deepMate: "DeepMate", |
||||
|
deepExploration: "深度探索", |
||||
|
member: "我的", |
||||
|
}, |
||||
|
}, |
||||
|
marketSituation: { |
||||
|
globalIndex: "全球指数", |
||||
|
globalIndexMore:'查看更多', |
||||
|
warn:'全球指数为试运行,免费开放,有诸多不足请见谅' |
||||
|
}, |
||||
|
}; |
||||
@ -0,0 +1,44 @@ |
|||||
|
import { defineStore } from 'pinia' |
||||
|
import { ref } from 'vue' |
||||
|
|
||||
|
// 定义 Store
|
||||
|
export const useLoginStore = defineStore( |
||||
|
'login', |
||||
|
() => { |
||||
|
// 会员信息
|
||||
|
const loginInfo = ref("true") |
||||
|
|
||||
|
// 保存会员信息,登录时使用
|
||||
|
const setLoginInfo = (val) => { |
||||
|
loginInfo.value = val |
||||
|
} |
||||
|
|
||||
|
// 清理会员信息,退出时使用
|
||||
|
const clearLoginInfo = () => { |
||||
|
loginInfo.value = undefined |
||||
|
} |
||||
|
|
||||
|
// 记得 return
|
||||
|
return { |
||||
|
loginInfo, |
||||
|
setLoginInfo, |
||||
|
clearLoginInfo, |
||||
|
} |
||||
|
}, |
||||
|
// TODO: 持久化
|
||||
|
{ |
||||
|
// 网页端持久化
|
||||
|
// persist: true,
|
||||
|
// 小程序端持久化
|
||||
|
persist: { |
||||
|
storage: { |
||||
|
getItem(key) { |
||||
|
return uni.getStorageSync(key) |
||||
|
}, |
||||
|
setItem(key, value) { |
||||
|
uni.setStorageSync(key, value) |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
) |
||||
@ -1,14 +1,24 @@ |
|||||
module.exports = { |
module.exports = { |
||||
devServer: { |
devServer: { |
||||
proxy: { |
|
||||
|
/* proxy: { |
||||
'/api': { // 你的目标服务器的请求路径前缀
|
'/api': { // 你的目标服务器的请求路径前缀
|
||||
target: 'https://hwjb.homilychart.com', // 目标服务器的地址
|
target: 'https://hwjb.homilychart.com', // 目标服务器的地址
|
||||
changeOrigin: true, // 是否跨域
|
changeOrigin: true, // 是否跨域
|
||||
secure: false, // 如果是https接口,需要配置这个参数
|
secure: false, // 如果是https接口,需要配置这个参数
|
||||
pathRewrite: { |
pathRewrite: { |
||||
'^/': '/testApi' // 将 /api 替换为 /testApi,以便正确请求目标服务器的资源
|
|
||||
|
'^/api': '' // 将 /api 替换为 /testApi,以便正确请求目标服务器的资源
|
||||
} |
} |
||||
} |
} |
||||
} |
|
||||
|
} */ |
||||
|
proxy: { |
||||
|
'/api': { // 你的目标服务器的请求路径前缀
|
||||
|
target: 'http://192.168.40.8:9000', // 目标服务器的地址
|
||||
|
changeOrigin: true, // 是否跨域
|
||||
|
secure: false, // 如果是https接口,需要配置这个参数
|
||||
|
pathRewrite: { |
||||
|
'^/api': '' // 将 /api 替换为 /testApi,以便正确请求目标服务器的资源
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
} |
} |
||||
} |
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue