Browse Source

Merge branch 'lihuilin/feature-20251024095243-我的' into milestone-20251031-简版功能开发

maziyang/feature-20251025172218-智能客服中台
lihuilin 4 weeks ago
parent
commit
6ae5dd4bfd
  1. 2
      .hbuilderx/launch.json
  2. 23
      pages/home/member.vue
  3. 2
      pages/setting/about.vue
  4. 70
      pages/setting/email.vue
  5. 7
      pages/setting/introduce.vue
  6. 17
      pages/setting/market.vue
  7. 25
      pages/setting/nextPwd.vue
  8. 12
      pages/setting/phone.vue

2
.hbuilderx/launch.json

@ -4,7 +4,7 @@
{ {
"customPlaygroundType" : "local", "customPlaygroundType" : "local",
"packageName" : "io.dcloud.HBuilder", "packageName" : "io.dcloud.HBuilder",
"playground" : "custom",
"playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

23
pages/home/member.vue

@ -16,10 +16,10 @@
</view> </view>
<view class="userId">ID:{{ dccode }}</view> <view class="userId">ID:{{ dccode }}</view>
</view> </view>
<view class="msg-right">
<!-- <view class="msg-right">
<image class="image-attendance" src="/static/my/Check-in.png"/> <image class="image-attendance" src="/static/my/Check-in.png"/>
<span style="font-size:10px;">签到</span> <span style="font-size:10px;">签到</span>
</view>
</view> -->
</view> </view>
<view class="settings-buttons"> <view class="settings-buttons">
@ -81,6 +81,8 @@ import {
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
import footerBar from '../../components/footerBar.vue' import footerBar from '../../components/footerBar.vue'
import {getUserInfo} from "@/api/member" import {getUserInfo} from "@/api/member"
import { useUserStore } from "../../stores/modules/userInfo"
const userStore = useUserStore()
const type = ref('member') const type = ref('member')
const iSMT = ref(0) const iSMT = ref(0)
@ -90,7 +92,7 @@ const dccode = ref('')
const userInfoRes = ref()// const userInfoRes = ref()//
userInfoRes.value = getUserInfo() userInfoRes.value = getUserInfo()
userInfoRes.value.then(res => { userInfoRes.value.then(res => {
username.value = res.data.username
username.value = res.data.dcname
dccode.value = res.data.dccode dccode.value = res.data.dccode
console.log('用户信息', userInfoRes.value) console.log('用户信息', userInfoRes.value)
}) })
@ -136,6 +138,7 @@ onMounted(() => {
// //
iSMT.value = uni.getSystemInfoSync().statusBarHeight iSMT.value = uni.getSystemInfoSync().statusBarHeight
console.log('??????????????', iSMT.value) console.log('??????????????', iSMT.value)
console.log('通信来的用户身份',userStore.userInfo)
}) })
</script> </script>
@ -146,7 +149,7 @@ onMounted(() => {
} }
.top { .top {
height: 47vh;
height: 50vh;
background-color: white; background-color: white;
} }
@ -159,8 +162,8 @@ onMounted(() => {
} }
.image-bell { .image-bell {
width: 13px;
height: 16px;
width: 26rpx;
height: 32rpx;
} }
.msg { .msg {
@ -171,7 +174,7 @@ onMounted(() => {
} }
.msg-left { .msg-left {
width: 33.6vw;
width: 252rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -185,7 +188,7 @@ onMounted(() => {
} }
.msg-center { .msg-center {
width: 51.7vw;
width: 388rpx;
padding-left: 2.5vh; padding-left: 2.5vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -204,11 +207,10 @@ onMounted(() => {
.image-editName { .image-editName {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-left: 2vw;
margin-left: 15rpx;
} }
.msg-right { .msg-right {
width: 14.7vw;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@ -232,6 +234,7 @@ onMounted(() => {
justify-content: center; justify-content: center;
background-color: rgb(243, 243, 243); background-color: rgb(243, 243, 243);
border-radius: 8%; border-radius: 8%;
margin-bottom: 1vh;
} }
.setting-icon { .setting-icon {

2
pages/setting/about.vue

@ -4,7 +4,7 @@
<view style="height:1.5vh" /> <view style="height:1.5vh" />
<view class="top"> <view class="top">
<img src="/static/my/aboutDC.png"></img>
<image src="/static/my/aboutDC.png"></image>
</view> </view>
<view class="bottom"> <view class="bottom">

70
pages/setting/email.vue

@ -7,14 +7,14 @@
<view class="top"> <view class="top">
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/bindedEmail.png" />
<image class="image" src="/static/my/bindedEmail.png" />
<text class="label">已绑邮箱{{ email }}</text> <text class="label">已绑邮箱{{ email }}</text>
</view> </view>
</view> </view>
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/changeEmail.png" />
<image class="image" src="/static/my/changeEmail.png" />
<input v-model="userEmail" placeholder="请输入您的换绑邮箱" class="input" /> <input v-model="userEmail" placeholder="请输入您的换绑邮箱" class="input" />
</view> </view>
<view class="right"> <view class="right">
@ -27,8 +27,8 @@
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/verification.png" />
<input type="text" placeholder="请输入验证码" class="input" />
<image class="image" src="/static/my/verification.png" />
<input type="text" v-model="verifyCode" placeholder="请输入验证码" class="input" />
</view> </view>
</view> </view>
</view> </view>
@ -51,11 +51,16 @@
sendEmail, sendEmail,
changeBind changeBind
} from "@/api/setting/password" } from "@/api/setting/password"
import {
verifyCodeApi
} from "@/api/start/login"
const iSMT = ref(0) const iSMT = ref(0)
const email = ref('') const email = ref('')
const gettingCode = ref(false) const gettingCode = ref(false)
const time = ref(60) const time = ref(60)
const userEmail = ref('') const userEmail = ref('')
const verifyCode = ref('')
const userInfoPromise = getUserInfo() const userInfoPromise = getUserInfo()
userInfoPromise.then(res => { userInfoPromise.then(res => {
@ -71,20 +76,54 @@
}) })
const changeAccount = () => { const changeAccount = () => {
const res = changeBind({
verificateType: 0,
account: userEmail.value
})
if(res.code === 200){
if (!userEmail) {
uni.showToast({ uni.showToast({
title: '绑定成功',
icon: 'none',
title: '请输入邮箱',
icon: 'none'
})
return
}
if (!verifyCode) {
uni.showToast({
title: '请输入验证码',
icon: 'none'
})
return
}
const res1 = verifyCodeApi({
loginType: 'EMAIL',
account: userEmail.value,
verifyCode: verifyCode.value
})
if (res1.code === 200) {
const res2 = changeBind({
verificateType: 0,
account: userEmail.value
}) })
}else {
if (res2.code === 200) {
uni.showToast({
title: '绑定成功',
icon: 'none',
})
uni.navigateTo({
url: '/pages/home/member'
})
} else {
uni.showToast({
title: '用户绑定失败',
icon: 'none',
})
}
} else {
uni.showToast({ uni.showToast({
title: '用户绑定失败',
title: '验证失败,请检查验证码',
icon: 'none', icon: 'none',
}) })
return
} }
} }
@ -182,4 +221,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.image {
width: 40rpx;
height: 40rpx;
}
</style> </style>

7
pages/setting/introduce.vue

@ -4,7 +4,7 @@
<view style="height:1.5vh" /> <view style="height:1.5vh" />
<view class="top"> <view class="top">
<img src="/static/my/aboutDC.png"></img>
<image class="image" src="/static/my/aboutDC.png"></image>
</view> </view>
<view class="bottom"> <view class="bottom">
@ -73,4 +73,9 @@
text-align: justify; text-align: justify;
text-justify: inter-character;/* 两端对齐哈哈哈哈 */ text-justify: inter-character;/* 两端对齐哈哈哈哈 */
} }
.image{
width:334rpx;
height:310rpx;
}
</style> </style>

17
pages/setting/market.vue

@ -41,7 +41,7 @@
:class="{ 'active': kStyle === 'common' }" :class="{ 'active': kStyle === 'common' }"
@click="handleKStyleChange('common')" @click="handleKStyleChange('common')"
> >
<img src="/static/my/common.png" class="kline-icon" />
<image src="../../static/my/common.png" class="kline-icon" />
<text>普通</text> <text>普通</text>
<view class="active-dot" v-if="kStyle === 'common'"></view> <view class="active-dot" v-if="kStyle === 'common'"></view>
</view> </view>
@ -50,7 +50,7 @@
:class="{ 'active': kStyle === 'Outline' }" :class="{ 'active': kStyle === 'Outline' }"
@click="handleKStyleChange('Outline')" @click="handleKStyleChange('Outline')"
> >
<img src="/static/my/outline.png" class="kline-icon" />
<image src="../../static/my/outline.png" class="kline-icon" />
<text>轮廓图</text> <text>轮廓图</text>
<view class="active-dot" v-if="kStyle === 'Outline'"></view> <view class="active-dot" v-if="kStyle === 'Outline'"></view>
</view> </view>
@ -59,7 +59,7 @@
:class="{ 'active': kStyle === 'polylines' }" :class="{ 'active': kStyle === 'polylines' }"
@click="handleKStyleChange('polylines')" @click="handleKStyleChange('polylines')"
> >
<img src="/static/my/polylines.png" class="kline-icon" />
<image src="../../static/my/polylines.png" class="kline-icon" />
<text>折线图</text> <text>折线图</text>
<view class="active-dot" v-if="kStyle === 'polylines'"></view> <view class="active-dot" v-if="kStyle === 'polylines'"></view>
</view> </view>
@ -101,7 +101,7 @@
@click="handleRfColorChange('green')" @click="handleRfColorChange('green')"
> >
<view class="color-icon"> <view class="color-icon">
<img src="/static/my/greenRise.png" class="kline-icon" />
<image src="../../static/my/greenRise.png" class="kline-icon" />
</view> </view>
<text>绿涨红跌</text> <text>绿涨红跌</text>
<view class="active-dot" v-if="rfColor === 'green'"></view> <view class="active-dot" v-if="rfColor === 'green'"></view>
@ -112,7 +112,7 @@
@click="handleRfColorChange('red')" @click="handleRfColorChange('red')"
> >
<view class="color-icon"> <view class="color-icon">
<img src="/static/my/redRise.png" class="kline-icon" />
<image src="../../static/my/redRise.png" class="kline-icon" />
</view> </view>
<text>红涨绿跌</text> <text>红涨绿跌</text>
<view class="active-dot" v-if="rfColor === 'red'"></view> <view class="active-dot" v-if="rfColor === 'red'"></view>
@ -152,8 +152,8 @@
<view class="indicator-item" v-for="(item, index) in indicatorList" :key="index"> <view class="indicator-item" v-for="(item, index) in indicatorList" :key="index">
<text class="indicator-text">{{ item }}</text> <text class="indicator-text">{{ item }}</text>
<view class="indicator-icons"> <view class="indicator-icons">
<img src="/static/my/setting.png" class="icon" />
<img src="/static/my/menu.png" class="icon" />
<image src="../../static/my/setting.png" class="icon" />
<image src="../../static/my/menu.png" class="icon" />
</view> </view>
</view> </view>
<view style="height:10vh;background-color: white;"></view> <view style="height:10vh;background-color: white;"></view>
@ -268,7 +268,6 @@
} }
.top-options { .top-options {
height: 5.5vh;
display: flex; display: flex;
padding: 0 40rpx; padding: 0 40rpx;
} }
@ -300,6 +299,8 @@
.kline-icon { .kline-icon {
margin-right: 10rpx; margin-right: 10rpx;
font-size: 32rpx; font-size: 32rpx;
width:60rpx;
height:50rpx;
} }
.color-icon { .color-icon {

25
pages/setting/nextPwd.vue

@ -13,19 +13,19 @@
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/unlock.png"/>
<image class="image-lock" src="/static/my/unlock.png"/>
<input type="password" :type="pwdType" placeholder="请输入新密码" class="input" v-model="oldPassword" <input type="password" :type="pwdType" placeholder="请输入新密码" class="input" v-model="oldPassword"
/> />
<img :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'"
<image class="image-eye" :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'"
@click="changeEye(1)"/> @click="changeEye(1)"/>
</view> </view>
</view> </view>
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/unlock.png"/>
<image class="image-lock" src="/static/my/unlock.png"/>
<input type="password" :type="pwdType2" placeholder="再次确认" class="input" v-model="newPassword"/> <input type="password" :type="pwdType2" placeholder="再次确认" class="input" v-model="newPassword"/>
<img :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'"
<image class="image-eye" :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'"
@click="changeEye(2)"/> @click="changeEye(2)"/>
</view> </view>
</view> </view>
@ -157,13 +157,6 @@ onMounted(() => {
justify-content: center; justify-content: center;
} }
.img {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
.tips { .tips {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
@ -172,4 +165,14 @@ onMounted(() => {
align-self: flex-start; align-self: flex-start;
/* 这是左对齐 */ /* 这是左对齐 */
} }
.image-lock{
width:40rpx;
height:40rpx;
}
.image-eye{
width:40rpx;
height:30rpx;
}
</style> </style>

12
pages/setting/phone.vue

@ -7,13 +7,13 @@
<view class="top"> <view class="top">
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/bindedPhone.png" />
<image class="image" src="/static/my/bindedPhone.png" />
<text class="label">已绑手机号{{ phone }}</text> <text class="label">已绑手机号{{ phone }}</text>
</view> </view>
</view> </view>
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/changeBindPhone.png" />
<image class="image" src="/static/my/changeBindPhone.png" />
<text class="label">+86</text> <text class="label">+86</text>
<input type="number" v-model="userPhone" placeholder="请输入您的换绑手机号" class="input" /> <input type="number" v-model="userPhone" placeholder="请输入您的换绑手机号" class="input" />
</view> </view>
@ -27,7 +27,7 @@
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/verification.png" />
<image class="image" src="/static/my/verification.png" />
<input type="text" placeholder="请输入验证码" class="input" /> <input type="text" placeholder="请输入验证码" class="input" />
</view> </view>
</view> </view>
@ -137,6 +137,7 @@
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: left;
} }
.label { .label {
@ -182,4 +183,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.image{
height:40rpx;
width:40rpx;
}
</style> </style>
Loading…
Cancel
Save