Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into milestone-20251031-简版功能开发
zhaowenkang/feature-20251028181547-行情页面
-
2.hbuilderx/launch.json
-
0api/deepMate.js
-
68api/deepMate/deepMate.js
-
116api/start/login.js
-
42components/DeepMate.vue
-
8components/MarketOverview.vue
-
45components/footerBar.vue
-
183components/login-prompt.vue
-
47main.js
-
13manifest.json
-
271package-lock.json
-
7package.json
-
108pages.json
-
69pages/blank/blank.vue
-
1714pages/deepMate/deepMate.vue
-
71pages/home/deepExploration.vue
-
26pages/home/home.vue
-
1050pages/start/Registration/Registration.vue
-
1341pages/start/Registration/list.js
-
13pages/start/agreement/agreement.vue
-
56pages/start/index/index.vue
-
1341pages/start/login/list.js
-
1187pages/start/login/login.vue
-
69pages/start/login/verification.js
-
13pages/start/privacy/privacy.vue
-
1012pages/start/recoverPassword/recoverPassword.vue
-
170pages/start/select/select.vue
-
73pages/start/startup/startup.vue
-
138server/login.json
-
BINstatic/flag/ad.png
-
BINstatic/flag/ae.png
-
BINstatic/flag/af.png
-
BINstatic/flag/ag.png
-
BINstatic/flag/ai.png
-
BINstatic/flag/al.png
-
BINstatic/flag/am.png
-
BINstatic/flag/an.png
-
BINstatic/flag/ao.png
-
BINstatic/flag/aq.png
-
BINstatic/flag/ar.png
-
BINstatic/flag/as.png
-
BINstatic/flag/at.png
-
BINstatic/flag/au.png
-
BINstatic/flag/aw.png
-
BINstatic/flag/ax.png
-
BINstatic/flag/az.png
-
BINstatic/flag/ba.png
-
BINstatic/flag/bb.png
-
BINstatic/flag/bd.png
-
BINstatic/flag/be.png
-
BINstatic/flag/bf.png
-
BINstatic/flag/bg.png
-
BINstatic/flag/bh.png
-
BINstatic/flag/bi.png
-
BINstatic/flag/bj.png
-
BINstatic/flag/bl.png
-
BINstatic/flag/bm.png
-
BINstatic/flag/bn.png
-
BINstatic/flag/bo.png
-
BINstatic/flag/bq.png
-
BINstatic/flag/br.png
-
BINstatic/flag/bs.png
-
BINstatic/flag/bt.png
-
BINstatic/flag/bv.png
-
BINstatic/flag/bw.png
-
BINstatic/flag/by.png
-
BINstatic/flag/bz.png
-
BINstatic/flag/ca.png
-
BINstatic/flag/cc.png
-
BINstatic/flag/cd.png
-
BINstatic/flag/cf.png
-
BINstatic/flag/cg.png
-
BINstatic/flag/ch.png
-
BINstatic/flag/ci.png
-
BINstatic/flag/ck.png
-
BINstatic/flag/cl.png
-
BINstatic/flag/cm.png
-
BINstatic/flag/cn.png
-
BINstatic/flag/co.png
-
BINstatic/flag/cr.png
-
BINstatic/flag/cu.png
-
BINstatic/flag/cv.png
-
BINstatic/flag/cw.png
-
BINstatic/flag/cx.png
-
BINstatic/flag/cy.png
-
BINstatic/flag/cz.png
-
BINstatic/flag/de.png
-
BINstatic/flag/dj.png
-
BINstatic/flag/dk.png
-
BINstatic/flag/dm.png
-
BINstatic/flag/do.png
-
BINstatic/flag/dz.png
-
BINstatic/flag/ec.png
-
BINstatic/flag/ee.png
-
BINstatic/flag/eg.png
-
BINstatic/flag/eh.png
-
BINstatic/flag/er.png
-
BINstatic/flag/es.png
-
BINstatic/flag/et.png
-
BINstatic/flag/eu.png
@ -0,0 +1,68 @@ |
|||||
|
import { http } from '../../utils/http' |
||||
|
|
||||
|
|
||||
|
|
||||
|
export const getData = () => { |
||||
|
return http({ |
||||
|
method: 'GET', |
||||
|
url: '/ka', |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 意图识别 |
||||
|
* POST /api/deepMate/dmFirst |
||||
|
* headers: token, content-type: application/json, contentType: application/json, version, client |
||||
|
* body: { content, language, marketList } |
||||
|
*/ |
||||
|
export const postIntent = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/api/deepMate/dmFirst', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取股票信息 |
||||
|
* headers: token, content-type: application/json, contentType: application/json, version, client |
||||
|
* body: { language, token, recordId, parentId, stockId } |
||||
|
*/ |
||||
|
export const postStock = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/api/deepMate/dmSecond', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取历史记录 |
||||
|
*/ |
||||
|
|
||||
|
export const postHistory = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/api/deepMate/dmList', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 历史记录详情 |
||||
|
*/ |
||||
|
|
||||
|
export const postHistoryDetail = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/api/deepMate/clickRecord', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
@ -0,0 +1,116 @@ |
|||||
|
import { http } from '../../utils/http' |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* @param data 模拟手机号码 |
||||
|
* { |
||||
|
"loginType":"EMAIL", //登录方式
|
||||
|
"account":"q614588746@163.com" , //登陆账号 手机号/邮箱/dccode
|
||||
|
"verifyCode":"837012", //验证码
|
||||
|
"password":"", //密码
|
||||
|
"useCode":"true", //是否使用验证码 true/false
|
||||
|
"idToken":"", //第三方登录idToken
|
||||
|
} |
||||
|
*/ |
||||
|
export const LoginApi = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/UserLogin/login', |
||||
|
data: |
||||
|
data |
||||
|
, |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 发送邮箱验证码 |
||||
|
* @param {*} email |
||||
|
* @returns |
||||
|
*/ |
||||
|
export const SendEmailCodeApi = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/UserLogin/sendEmail', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 发送手机验证码 |
||||
|
* @param {*} email |
||||
|
* @returns |
||||
|
*/ |
||||
|
export const SendPhoneCodeApi = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/UserLogin/sendPhone', |
||||
|
data:data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 注册 |
||||
|
*/ |
||||
|
|
||||
|
export const registerApi = (data) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/UserLogin/register', |
||||
|
data: data, |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改密码 |
||||
|
* |
||||
|
*/ |
||||
|
|
||||
|
export const updatePassword = (data) => { |
||||
|
return http({ |
||||
|
method: 'GET', |
||||
|
url: '/updatePassword', |
||||
|
data: { |
||||
|
data |
||||
|
}, |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过苹果登录 |
||||
|
*/ |
||||
|
|
||||
|
export const postLoginAppleSimpleAPI = (phoneNumber) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/login', |
||||
|
data: { |
||||
|
phoneNumber, |
||||
|
}, |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过谷歌登录 |
||||
|
*/ |
||||
|
|
||||
|
export const postLoginGoogleSimpleAPI = (phoneNumber) => { |
||||
|
return http({ |
||||
|
method: 'POST', |
||||
|
url: '/login/wxMin/simple', |
||||
|
data: { |
||||
|
phoneNumber, |
||||
|
}, |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
@ -0,0 +1,183 @@ |
|||||
|
<template> |
||||
|
<view class="login-prompt" v-if="showPrompt"> |
||||
|
<view class="mask" :class="{ 'mask-show': showAnimation }"></view> |
||||
|
<view class="prompt-content" :class="{ 'slide-up': showAnimation }"> |
||||
|
<text class="prompt-title">登录以获得更好的体验</text> |
||||
|
<button class="login-btn" @click="goLogin">登录</button> |
||||
|
<button class="visitor-btn" @click="continueAsVisitor"> |
||||
|
以访客身份继续 |
||||
|
</button> |
||||
|
<text class="prompt-title-small" @click="goRegister" |
||||
|
>如果您还没有账号,点击注册</text |
||||
|
> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
import { ref, nextTick, onMounted } from "vue"; |
||||
|
import { useUserStore } from "../stores/modules/userInfo"; |
||||
|
import { useDeviceStore } from "../stores/modules/deviceInfo"; |
||||
|
import { LoginApi } from "../api/start/login"; |
||||
|
const deviceId = ref(""); |
||||
|
|
||||
|
const userStore = useUserStore(); |
||||
|
const deviceStore = useDeviceStore(); |
||||
|
// 初始化 |
||||
|
onMounted(() => { |
||||
|
if (!userStore.userInfo) { |
||||
|
show(); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
// 定义响应式数据 |
||||
|
const showPrompt = ref(false); |
||||
|
const showAnimation = ref(false); |
||||
|
|
||||
|
// 显示弹窗 |
||||
|
const show = () => { |
||||
|
showPrompt.value = true; |
||||
|
// 在下一帧触发动画 |
||||
|
nextTick(() => { |
||||
|
setTimeout(() => { |
||||
|
showAnimation.value = true; |
||||
|
}, 10); |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
// 隐藏弹窗 |
||||
|
const hide = () => { |
||||
|
showAnimation.value = false; |
||||
|
// 等待动画结束后再隐藏 |
||||
|
setTimeout(() => { |
||||
|
showPrompt.value = false; |
||||
|
}, 300); |
||||
|
}; |
||||
|
|
||||
|
// 跳转到登录页面 |
||||
|
const goLogin = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: "/pages/start/login/login", |
||||
|
}); |
||||
|
hide(); |
||||
|
}; |
||||
|
// 跳转到登录页面 |
||||
|
const goRegister = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: "/pages/start/Registration/Registration", |
||||
|
}); |
||||
|
hide(); |
||||
|
}; |
||||
|
|
||||
|
// 以访客身份继续 |
||||
|
const continueAsVisitor = async () => { |
||||
|
// 设置访客模式 |
||||
|
const res = await LoginApi({ |
||||
|
loginType: "VISITOR", //登录方式EMAIL,PHONE,DCCODE,APPLE,GOOGLE,VISITOR |
||||
|
account: "", //登陆账号 手机号/邮箱/dccode |
||||
|
verifyCode: "", //验证码 |
||||
|
password: "", //密码 |
||||
|
useCode: "", //是否使用验证码 true/false |
||||
|
idToken: "", //第三方登录idToken |
||||
|
deviceId: deviceStore.deviceInfo.deviceId, |
||||
|
}); |
||||
|
|
||||
|
if (res.code === 200) { |
||||
|
userStore.setUserInfo(res.data); |
||||
|
hide(); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
// 暴露方法给外部使用 |
||||
|
defineExpose({ |
||||
|
show, |
||||
|
hide, |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.login-prompt { |
||||
|
position: fixed; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
z-index: 999; |
||||
|
} |
||||
|
|
||||
|
.mask { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
background-color: rgba(0, 0, 0, 0.8); |
||||
|
opacity: 0; |
||||
|
transition: opacity 0.3s ease; |
||||
|
} |
||||
|
|
||||
|
.mask.mask-show { |
||||
|
opacity: 1; |
||||
|
} |
||||
|
|
||||
|
.prompt-content { |
||||
|
position: absolute; |
||||
|
bottom: 0; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
height: 400rpx; |
||||
|
border-radius: 20rpx 20rpx 0 0; |
||||
|
background-color: white; |
||||
|
padding: 20rpx 70rpx; |
||||
|
transform: translateY(100%); |
||||
|
transition: transform 0.3s ease; |
||||
|
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3); |
||||
|
} |
||||
|
|
||||
|
.prompt-content.slide-up { |
||||
|
transform: translateY(0); |
||||
|
} |
||||
|
|
||||
|
.prompt-title { |
||||
|
display: block; |
||||
|
text-align: center; |
||||
|
font-size: 40rpx; |
||||
|
font-weight: 700; |
||||
|
color: #000000; |
||||
|
margin-top: 30rpx; |
||||
|
margin-bottom: 40rpx; |
||||
|
} |
||||
|
|
||||
|
.login-btn { |
||||
|
width: 100%; |
||||
|
height: 80rpx; |
||||
|
background-color: rgb(0, 0, 0); |
||||
|
color: white; |
||||
|
font-size: 32rpx; |
||||
|
line-height: 80rpx; |
||||
|
border-radius: 40rpx; |
||||
|
margin-bottom: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.visitor-btn { |
||||
|
width: 100%; |
||||
|
height: 80rpx; |
||||
|
background-color: #f5f5f5; |
||||
|
color: #333; |
||||
|
font-size: 32rpx; |
||||
|
line-height: 80rpx; |
||||
|
border-radius: 40rpx; |
||||
|
} |
||||
|
.prompt-title-small { |
||||
|
display: block; |
||||
|
text-align: center; |
||||
|
font-size: 24rpx; |
||||
|
color: #6a6a6a; |
||||
|
margin-top: 30rpx; |
||||
|
margin-bottom: 40rpx; |
||||
|
line-height: 15.5px; |
||||
|
letter-spacing: 0.3px; |
||||
|
font-style: normal; |
||||
|
font-family: "PingFang SC"; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,69 @@ |
|||||
|
<template> |
||||
|
<view class="blank-page"> |
||||
|
<!-- 返回按钮 --> |
||||
|
<view class="back-button" @click="goBack"> |
||||
|
<text class="back-icon">←</text> |
||||
|
<text class="back-text">返回</text> |
||||
|
</view> |
||||
|
|
||||
|
<text class="tip">当前特斯拉该如何布局?</text> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
// 返回到 deepMate 页面 |
||||
|
const goBack = () => { |
||||
|
uni.navigateTo({ |
||||
|
url: '/pages/deepMate/deepMate' |
||||
|
}); |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.blank-page { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
height: 100vh; |
||||
|
background-color: #ffffff; |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.back-button { |
||||
|
position: absolute; |
||||
|
top: 60rpx; |
||||
|
left: 30rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
padding: 20rpx 30rpx; |
||||
|
background-color: #f5f5f5; |
||||
|
border-radius: 50rpx; |
||||
|
cursor: pointer; |
||||
|
transition: all 0.3s ease; |
||||
|
} |
||||
|
|
||||
|
.back-button:hover { |
||||
|
background-color: #e0e0e0; |
||||
|
} |
||||
|
|
||||
|
.back-button:active { |
||||
|
transform: scale(0.95); |
||||
|
} |
||||
|
|
||||
|
.back-icon { |
||||
|
font-size: 32rpx; |
||||
|
color: #333333; |
||||
|
margin-right: 10rpx; |
||||
|
} |
||||
|
|
||||
|
.back-text { |
||||
|
font-size: 28rpx; |
||||
|
color: #333333; |
||||
|
} |
||||
|
|
||||
|
.tip { |
||||
|
color: #999999; |
||||
|
font-size: 28rpx; |
||||
|
} |
||||
|
</style> |
||||
1714
pages/deepMate/deepMate.vue
File diff suppressed because it is too large
View File
@ -1,28 +1,63 @@ |
|||||
<template> |
<template> |
||||
<view class="main"> |
|
||||
<!-- 顶部状态栏占位 --> |
|
||||
<view class="top" :style="{height:iSMT+'px'}"></view> |
|
||||
<view>深度探索</view> |
|
||||
<footerBar class="static-footer" :type="type"></footerBar> |
|
||||
</view> |
|
||||
|
<view class="content"> |
||||
|
<view class="text-area"> </view> |
||||
|
<LoginPrompt ref="loginPrompt"></LoginPrompt> |
||||
|
<text class="title" @click="showLoginPrompt">{{ title }}</text> |
||||
|
<text class="title" @click="showLoginPrompt">{{ title }}</text> |
||||
|
<text class="title" @click="showLoginPrompt">{{ title }}</text> |
||||
|
<text class="title" @click="showLoginPrompt">{{ title }}</text> |
||||
|
<text class="title" @click="showLoginPrompt">{{ title }}</text> |
||||
|
<text class="title" @click="showLoginPrompt">{{ title }}</text> |
||||
|
|
||||
|
<button @click="showLoginPrompt">deepMate</button> |
||||
|
<text class="title" @click="showLoginPrompt">{{ title }}</text> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script setup> |
<script setup> |
||||
import { ref,onMounted } from 'vue' |
|
||||
import footerBar from '../../components/footerBar.vue' |
|
||||
|
import { ref } from "vue"; |
||||
|
import { useUserStore } from "../../stores/modules/userInfo"; |
||||
|
const title = ref("请先登录"); |
||||
|
const loginPrompt = ref(null); |
||||
|
|
||||
|
const userStore = useUserStore(); |
||||
|
function showLoginPrompt() { |
||||
|
userStore.clearUserInfo(); |
||||
|
} |
||||
|
|
||||
const type = ref('deepExploration') |
|
||||
const iSMT = ref(0) |
|
||||
|
console.log(userStore.userInfo); |
||||
|
|
||||
onMounted(() => { |
|
||||
// 状态栏高度 |
|
||||
iSMT.value = uni.getSystemInfoSync().statusBarHeight; |
|
||||
}) |
|
||||
|
function toDeepMate() { |
||||
|
uni.navigateTo({ |
||||
|
url: "/pages/deepMate/deepMate", |
||||
|
}); |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped> |
|
||||
.static-footer { |
|
||||
position: fixed; |
|
||||
bottom: 0; |
|
||||
|
<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> |
</style> |
||||
1050
pages/start/Registration/Registration.vue
File diff suppressed because it is too large
View File
1341
pages/start/Registration/list.js
File diff suppressed because it is too large
View File
@ -0,0 +1,13 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
用户协议 |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,56 @@ |
|||||
|
<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> |
||||
1341
pages/start/login/list.js
File diff suppressed because it is too large
View File
1187
pages/start/login/login.vue
File diff suppressed because it is too large
View File
@ -0,0 +1,69 @@ |
|||||
|
|
||||
|
function verificationPhone(countryCode,phoneNumber) { |
||||
|
switch (countryCode) { |
||||
|
case '+86': |
||||
|
return verificationChina(phoneNumber); |
||||
|
case '+1': |
||||
|
return verificationAmerica(phoneNumber); |
||||
|
case '+65': |
||||
|
return verificationSingapore(phoneNumber); |
||||
|
case '+60': |
||||
|
return verificationMalaysia(phoneNumber); |
||||
|
case '+66': |
||||
|
return verificationThailand(phoneNumber); |
||||
|
case '+852': |
||||
|
return verificationHongKong(phoneNumber); |
||||
|
case '+84': |
||||
|
return verificationVietnam(phoneNumber); |
||||
|
default: |
||||
|
return true; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function verificationChina(phoneNumber){ |
||||
|
const phoneRegex = /^1[3-9]\d{9}$/; |
||||
|
return phoneRegex.test(phoneNumber); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function verificationAmerica(phoneNumber){ |
||||
|
const phoneRegex = /^[2-9]\d{2}[- ]?\d{4}$/; |
||||
|
return phoneRegex.test(phoneNumber); |
||||
|
} |
||||
|
function verificationSingapore(phoneNumber){ |
||||
|
const phoneRegex = /^[89]\d{7}$/; |
||||
|
return phoneRegex.test(phoneNumber); |
||||
|
} |
||||
|
function verificationMalaysia(phoneNumber){ |
||||
|
const phoneRegex = /^01\d{8}$/; |
||||
|
return phoneRegex.test(phoneNumber); |
||||
|
} |
||||
|
|
||||
|
function verificationHongKong(phoneNumber){ |
||||
|
const phoneRegex = /^0[896]\d{8}$/; |
||||
|
return phoneRegex.test(phoneNumber); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function verificationThailand(phoneNumber){ |
||||
|
const phoneRegex = /^[5-9]\d{7}$/; |
||||
|
return phoneRegex.test(phoneNumber); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
function verificationVietnam(phoneNumber){ |
||||
|
const phoneRegex = /^(0)?[3-9]\d{8}$/; |
||||
|
return phoneRegex.test(phoneNumber); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
function verificationEmail(email) { |
||||
|
const emailRegex = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/; |
||||
|
return emailRegex.test(email); |
||||
|
} |
||||
|
|
||||
|
export {verificationPhone,verificationEmail} |
||||
@ -0,0 +1,13 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
隐私政策 |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
|
||||
|
</style> |
||||
1012
pages/start/recoverPassword/recoverPassword.vue
File diff suppressed because it is too large
View File
@ -0,0 +1,170 @@ |
|||||
|
<template> |
||||
|
<view class="login-container"> |
||||
|
<!-- 顶部标题 --> |
||||
|
<view class="title-section"> |
||||
|
<text class="main-title">DeepChart</text> |
||||
|
</view> |
||||
|
<view class="subtitle-section"> |
||||
|
<text class="subtitle">您的股市随身顾问</text> |
||||
|
</view> |
||||
|
|
||||
|
<!-- 手机卡片样式 --> |
||||
|
<view class="phone-card"> </view> |
||||
|
|
||||
|
<!-- 登录注册按钮 --> |
||||
|
<view class="button-group"> |
||||
|
<button class="login-button" @click="toLogin">登录</button> |
||||
|
<button class="register-button" @click="toRegistration">注册</button> |
||||
|
</view> |
||||
|
|
||||
|
<footerBar class="static-footer" :type="type"></footerBar> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
import footerBar from "../../../components/footerBar"; |
||||
|
import { ref, reactive, toRefs, watch } from "vue"; |
||||
|
|
||||
|
|
||||
|
const type = ref("member"); |
||||
|
|
||||
|
function toRegistration() { |
||||
|
uni.redirectTo({ |
||||
|
url: "/pages/start/Registration/Registration", |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
function toLogin() { |
||||
|
uni.redirectTo({ |
||||
|
url: "/pages/start/login/login", |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.login-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; |
||||
|
/* justify-content: space-between; */ |
||||
|
padding: 40rpx; |
||||
|
height: 90vh; |
||||
|
background-color: #ffffff; |
||||
|
overflow: hidden; |
||||
|
max-height: 100vh; |
||||
|
-webkit-overflow-scrolling: none; |
||||
|
} |
||||
|
|
||||
|
.title-section { |
||||
|
text-align: center; |
||||
|
margin-top: 120rpx; |
||||
|
|
||||
|
margin-bottom: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.main-title { |
||||
|
text-align: center; |
||||
|
font-size: 64rpx; |
||||
|
font-weight: 300; |
||||
|
color: #000000; |
||||
|
margin-bottom: 10rpx; |
||||
|
} |
||||
|
.subtitle-section { |
||||
|
margin-bottom: 80rpx; |
||||
|
} |
||||
|
.subtitle { |
||||
|
/* font-weight: bold; */ |
||||
|
font-size: 32rpx; |
||||
|
color: #333333; |
||||
|
} |
||||
|
|
||||
|
.phone-card { |
||||
|
background-image: url("/static/select.png"); |
||||
|
background-repeat: no-repeat; |
||||
|
background-size: contain; |
||||
|
background-position: center; |
||||
|
/* background-position: center; */ |
||||
|
/* min-width: 300rpx; */ |
||||
|
|
||||
|
width: 420rpx; |
||||
|
height: 786rpx; |
||||
|
border-radius: 50rpx; |
||||
|
padding: 40rpx; |
||||
|
/* box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.3); */ |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
.button-group { |
||||
|
display: flex; |
||||
|
gap: 40rpx; |
||||
|
margin: 80rpx 0; |
||||
|
width: 100%; |
||||
|
max-width: 600rpx; |
||||
|
} |
||||
|
|
||||
|
.login-button { |
||||
|
flex: 1; |
||||
|
background-color: #f5f5f5; |
||||
|
color: #000000; |
||||
|
border-radius: 60rpx; |
||||
|
font-size: 32rpx; |
||||
|
padding: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.register-button { |
||||
|
flex: 1; |
||||
|
background-color: #000000; |
||||
|
color: #ffffff; |
||||
|
border-radius: 60rpx; |
||||
|
font-size: 32rpx; |
||||
|
padding: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.bottom-nav { |
||||
|
display: flex; |
||||
|
justify-content: space-around; |
||||
|
align-items: center; |
||||
|
width: 100%; |
||||
|
height: 100rpx; |
||||
|
background-color: #ffffff; |
||||
|
position: fixed; |
||||
|
bottom: 0; |
||||
|
left: 0; |
||||
|
border-top: 1rpx solid #e5e5e5; |
||||
|
} |
||||
|
|
||||
|
.nav-item { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
padding: 10rpx; |
||||
|
} |
||||
|
|
||||
|
.nav-item.active .nav-icon { |
||||
|
transform: scale(1.2); |
||||
|
} |
||||
|
|
||||
|
.nav-icon { |
||||
|
width: 40rpx; |
||||
|
height: 40rpx; |
||||
|
margin-bottom: 10rpx; |
||||
|
} |
||||
|
|
||||
|
.nav-text { |
||||
|
font-size: 24rpx; |
||||
|
color: #666666; |
||||
|
} |
||||
|
|
||||
|
.nav-item.active .nav-text { |
||||
|
color: #000000; |
||||
|
} |
||||
|
|
||||
|
.static-footer { |
||||
|
position: fixed; |
||||
|
bottom: 0; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,73 @@ |
|||||
|
<template> |
||||
|
<view class="background"> |
||||
|
<image |
||||
|
class="logo" |
||||
|
src="../../../static/icons/start-logo.png" |
||||
|
mode="scaleToFill" |
||||
|
/> |
||||
|
<view class="logo-text"> DeepChart </view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
import { onShow } from "@dcloudio/uni-app"; |
||||
|
import { useUserStore } from "../../../stores/modules/userInfo"; |
||||
|
import { useDeviceStore } from "../../../stores/modules/deviceInfo"; |
||||
|
|
||||
|
onShow(() => { |
||||
|
const deviceInfo = useDeviceStore(); |
||||
|
// 获取设备ID |
||||
|
uni.getSystemInfo({ |
||||
|
success: (res) => { |
||||
|
deviceInfo.setDeviceInfo(res) |
||||
|
}, |
||||
|
}); |
||||
|
|
||||
|
setTimeout(() => { |
||||
|
const userStore = useUserStore(); |
||||
|
if (!userStore.userInfo) |
||||
|
uni.redirectTo({ |
||||
|
url: "/pages/start/select/select", |
||||
|
animationType: "slide-in-right", |
||||
|
animationDuration: 1000, |
||||
|
}); |
||||
|
else { |
||||
|
uni.redirectTo({ |
||||
|
url: "/pages/home/home", |
||||
|
animationType: "slide-in-right", |
||||
|
animationDuration: 1000, |
||||
|
}); |
||||
|
} |
||||
|
}, 1500); |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
.background { |
||||
|
background: linear-gradient(180deg, #fb6967, #fb6967); |
||||
|
width: 100vw; |
||||
|
height: 100vh; |
||||
|
} |
||||
|
|
||||
|
.logo-text { |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
color: white; |
||||
|
font-weight: bold; |
||||
|
font-size: 24px; |
||||
|
position: absolute; |
||||
|
bottom: 5%; |
||||
|
left: 50%; |
||||
|
transform: translateX(-50%); |
||||
|
} |
||||
|
|
||||
|
.logo { |
||||
|
width: 320rpx; |
||||
|
height: 200rpx; |
||||
|
position: absolute; |
||||
|
top: 30%; |
||||
|
left: 50%; |
||||
|
transform: translate(-50%, -50%); |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,138 @@ |
|||||
|
{ |
||||
|
"loginSuccessByEmail": { |
||||
|
"code": 200, |
||||
|
"message": "c3e9ed50ad72073b94dfb04860562b58", |
||||
|
"data": { |
||||
|
"loginType": null, |
||||
|
"device": "unknown", |
||||
|
"dccode": "90047686", |
||||
|
"account": null, |
||||
|
"password": null, |
||||
|
"verifyCode": null, |
||||
|
"useCode": false, |
||||
|
"idToken": null, |
||||
|
"token": "c3e9ed50ad72073b94dfb04860562b58", |
||||
|
"market": "新加坡", |
||||
|
"phone": "17861484516", |
||||
|
"email": "q614588746@163.com", |
||||
|
"language": "中文", |
||||
|
"avatar": "123" |
||||
|
} |
||||
|
}, |
||||
|
"loginFailureEmailNotFound": { |
||||
|
"code": 404, |
||||
|
"message": "账号不存在", |
||||
|
"interface": "login" |
||||
|
}, |
||||
|
"loginFailureWrongCode": { |
||||
|
"code": 400, |
||||
|
"message": "验证码错误", |
||||
|
"interface": "login" |
||||
|
}, |
||||
|
"loginSuccessByPhone": { |
||||
|
"code": 200, |
||||
|
"message": "登录成功", |
||||
|
"interface": "login", |
||||
|
"data": { |
||||
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", |
||||
|
"userInfo": { |
||||
|
"id": "987654321", |
||||
|
"username": "13800138000", |
||||
|
"phone": "13800138000" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"loginSuccessByPassword": { |
||||
|
"code": 200, |
||||
|
"message": "登录成功", |
||||
|
"interface": "login", |
||||
|
"data": { |
||||
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", |
||||
|
"userInfo": { |
||||
|
"id": "556677889", |
||||
|
"username": "testuser" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"sendCodeSuccess": { |
||||
|
"code": 200, |
||||
|
"message": "验证码发送成功", |
||||
|
"interface": "sendCode", |
||||
|
"data": { |
||||
|
"expireTime": 180 |
||||
|
} |
||||
|
}, |
||||
|
"sendCodeFailureInvalidFormat": { |
||||
|
"code": 400, |
||||
|
"message": "手机号格式错误", |
||||
|
"interface": "sendCode" |
||||
|
}, |
||||
|
"sendCodeFailureTooFrequent": { |
||||
|
"code": 429, |
||||
|
"message": "发送频率过高,请稍后再试", |
||||
|
"interface": "sendCode" |
||||
|
}, |
||||
|
"registerSuccess": { |
||||
|
"code": 200, |
||||
|
"message": "注册成功", |
||||
|
"interface": "register", |
||||
|
"data": { |
||||
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", |
||||
|
"userInfo": { |
||||
|
"id": "112233445", |
||||
|
"username": "newuser", |
||||
|
"email": "newuser@example.com" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"registerFailureEmailExist": { |
||||
|
"code": 400, |
||||
|
"message": "邮箱已被注册", |
||||
|
"interface": "register" |
||||
|
}, |
||||
|
"registerFailurePhoneExist": { |
||||
|
"code": 400, |
||||
|
"message": "手机号已被注册", |
||||
|
"interface": "register" |
||||
|
}, |
||||
|
"registerFailureWrongCode": { |
||||
|
"code": 400, |
||||
|
"message": "验证码错误", |
||||
|
"interface": "register" |
||||
|
}, |
||||
|
"updatePasswordSuccess": { |
||||
|
"code": 200, |
||||
|
"message": "密码修改成功", |
||||
|
"interface": "updatePassword" |
||||
|
}, |
||||
|
"updatePasswordFailureWrongOldPassword": { |
||||
|
"code": 400, |
||||
|
"message": "旧密码错误", |
||||
|
"interface": "updatePassword" |
||||
|
}, |
||||
|
"updatePasswordFailureWrongCode": { |
||||
|
"code": 400, |
||||
|
"message": "验证码错误", |
||||
|
"interface": "updatePassword" |
||||
|
}, |
||||
|
"forgotPasswordSuccessByEmail": { |
||||
|
"code": 200, |
||||
|
"message": "密码重置成功,新密码已发送至邮箱", |
||||
|
"interface": "forgotPassword" |
||||
|
}, |
||||
|
"forgotPasswordSuccessByPhone": { |
||||
|
"code": 200, |
||||
|
"message": "密码重置成功,新密码已发送至手机", |
||||
|
"interface": "forgotPassword" |
||||
|
}, |
||||
|
"forgotPasswordFailureAccountNotFound": { |
||||
|
"code": 404, |
||||
|
"message": "账号不存在", |
||||
|
"interface": "forgotPassword" |
||||
|
}, |
||||
|
"forgotPasswordFailureWrongCode": { |
||||
|
"code": 400, |
||||
|
"message": "验证码错误", |
||||
|
"interface": "forgotPassword" |
||||
|
} |
||||
|
} |
||||
|
After Width: 100 | Height: 70 | Size: 2.1 KiB |
|
After Width: 100 | Height: 50 | Size: 170 B |
|
After Width: 100 | Height: 67 | Size: 2.6 KiB |
|
After Width: 100 | Height: 67 | Size: 2.0 KiB |
|
After Width: 100 | Height: 50 | Size: 1.3 KiB |
|
After Width: 100 | Height: 71 | Size: 1.7 KiB |
|
After Width: 100 | Height: 50 | Size: 122 B |
|
After Width: 100 | Height: 67 | Size: 610 B |
|
After Width: 100 | Height: 67 | Size: 1.4 KiB |
|
After Width: 100 | Height: 100 | Size: 6.0 KiB |
|
After Width: 100 | Height: 63 | Size: 991 B |
|
After Width: 100 | Height: 50 | Size: 2.0 KiB |
|
After Width: 100 | Height: 67 | Size: 133 B |
|
After Width: 100 | Height: 50 | Size: 1.1 KiB |
|
After Width: 100 | Height: 67 | Size: 658 B |
|
After Width: 100 | Height: 65 | Size: 279 B |
|
After Width: 100 | Height: 50 | Size: 451 B |
|
After Width: 100 | Height: 50 | Size: 741 B |
|
After Width: 100 | Height: 67 | Size: 791 B |
|
After Width: 100 | Height: 60 | Size: 367 B |
|
After Width: 100 | Height: 87 | Size: 168 B |
|
After Width: 100 | Height: 67 | Size: 560 B |
|
After Width: 100 | Height: 60 | Size: 106 B |
|
After Width: 100 | Height: 60 | Size: 303 B |
|
After Width: 100 | Height: 60 | Size: 1.3 KiB |
|
After Width: 100 | Height: 67 | Size: 169 B |
|
After Width: 100 | Height: 67 | Size: 6.2 KiB |
|
After Width: 100 | Height: 50 | Size: 2.0 KiB |
|
After Width: 100 | Height: 50 | Size: 2.3 KiB |
|
After Width: 100 | Height: 68 | Size: 1.4 KiB |
|
After Width: 100 | Height: 67 | Size: 159 B |
|
After Width: 100 | Height: 70 | Size: 2.0 KiB |
|
After Width: 100 | Height: 50 | Size: 553 B |
|
After Width: 100 | Height: 67 | Size: 4.0 KiB |
|
After Width: 100 | Height: 73 | Size: 260 B |
|
After Width: 100 | Height: 67 | Size: 172 B |
|
After Width: 100 | Height: 50 | Size: 1.4 KiB |
|
After Width: 100 | Height: 67 | Size: 5.6 KiB |
|
After Width: 100 | Height: 50 | Size: 765 B |
|
After Width: 100 | Height: 50 | Size: 1.3 KiB |
|
After Width: 100 | Height: 75 | Size: 796 B |
|
After Width: 100 | Height: 67 | Size: 554 B |
|
After Width: 100 | Height: 67 | Size: 354 B |
|
After Width: 100 | Height: 100 | Size: 172 B |
|
After Width: 100 | Height: 67 | Size: 165 B |
|
After Width: 100 | Height: 50 | Size: 1.9 KiB |
|
After Width: 100 | Height: 67 | Size: 517 B |
|
After Width: 100 | Height: 67 | Size: 482 B |
|
After Width: 100 | Height: 67 | Size: 763 B |
|
After Width: 100 | Height: 67 | Size: 158 B |
|
After Width: 100 | Height: 60 | Size: 109 B |
|
After Width: 100 | Height: 50 | Size: 793 B |
|
After Width: 100 | Height: 59 | Size: 1.0 KiB |
|
After Width: 100 | Height: 67 | Size: 633 B |
|
After Width: 100 | Height: 50 | Size: 1.5 KiB |
|
After Width: 100 | Height: 67 | Size: 1.6 KiB |
|
After Width: 100 | Height: 67 | Size: 394 B |
|
After Width: 100 | Height: 60 | Size: 106 B |
|
After Width: 100 | Height: 67 | Size: 1.1 KiB |
|
After Width: 100 | Height: 76 | Size: 200 B |
|
After Width: 100 | Height: 50 | Size: 1.2 KiB |
|
After Width: 100 | Height: 67 | Size: 700 B |
|
After Width: 100 | Height: 67 | Size: 891 B |
|
After Width: 100 | Height: 67 | Size: 2.5 KiB |
|
After Width: 100 | Height: 64 | Size: 158 B |
|
After Width: 100 | Height: 67 | Size: 1.1 KiB |
|
After Width: 100 | Height: 50 | Size: 656 B |
|
After Width: 100 | Height: 50 | Size: 1.4 KiB |
|
After Width: 100 | Height: 67 | Size: 1.7 KiB |
|
After Width: 100 | Height: 50 | Size: 1.3 KiB |
|
After Width: 100 | Height: 67 | Size: 1.4 KiB |