Browse Source

修改个人中心样式,新增修改个人信息页面(待完善)

master
chenkun 10 months ago
parent
commit
ba6b0cc6b9
4 changed files with 339 additions and 202 deletions
  1. +1
    -0
      centerSvgIcon/updateUserInfo.svg
  2. +16
    -14
      pages/index/center.vue
  3. +188
    -188
      pages_mine/mine/promotionRecord.vue
  4. +134
    -0
      pages_mine/mine/updateUserInfo.vue

+ 1
- 0
centerSvgIcon/updateUserInfo.svg View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1725893170214" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4266" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M752 939.2c-3.2 0-6.4 0-11.2-1.6-16-6.4-24-24-17.6-40l232-598.4c0-3.2 0-6.4 1.6-9.6 4.8-19.2-8-41.6-30.4-51.2-22.4-8-48-1.6-57.6 17.6-1.6 3.2-3.2 6.4-6.4 8L632 862.4c-6.4 16-24 24-40 17.6-16-6.4-24-24-17.6-40L808 240c3.2-6.4 6.4-12.8 11.2-17.6 25.6-41.6 80-59.2 129.6-40 49.6 19.2 78.4 68.8 68.8 116.8 0 6.4-1.6 12.8-3.2 19.2L782.4 920c-4.8 12.8-17.6 19.2-30.4 19.2z" fill="#151b2f" p-id="4267"></path><path d="M966.4 368c-3.2 0-8-1.6-11.2-1.6l-128-52.8c-16-6.4-22.4-24-16-40 6.4-16 24-22.4 40-16l128 52.8c16 6.4 22.4 24 16 40-4.8 11.2-17.6 19.2-28.8 17.6zM656 984c-4.8 0-11.2-1.6-16-3.2-11.2-4.8-20.8-12.8-25.6-25.6l-40-89.6c-6.4-16 0-33.6 16-40 16-6.4 33.6 0 40 16l33.6 76.8 76.8-33.6c16-6.4 33.6 0 40 16 6.4 16 0 33.6-16 40l-89.6 40c-6.4 1.6-12.8 3.2-19.2 3.2zM460.8 571.2c-73.6 0-144-28.8-196.8-81.6-52.8-52.8-81.6-123.2-81.6-196.8s28.8-144 81.6-196.8c52.8-51.2 121.6-80 196.8-80s144 28.8 196.8 81.6c52.8 52.8 81.6 123.2 81.6 196.8s-28.8 144-81.6 196.8c-52.8 51.2-123.2 80-196.8 80z m0-492.8c-118.4 0-216 96-216 216s96 216 216 216c118.4 0 216-96 216-216S579.2 78.4 460.8 78.4z" fill="#151b2f" p-id="4268"></path><path d="M665.6 640c-59.2-36.8-129.6-57.6-204.8-57.6-217.6 0-395.2 177.6-395.2 395.2 0 17.6-14.4 32-32 32s-32-14.4-32-32c0-62.4 12.8-121.6 35.2-177.6 22.4-54.4 56-104 97.6-145.6 41.6-41.6 91.2-75.2 145.6-97.6 56-24 116.8-35.2 177.6-35.2s121.6 12.8 177.6 35.2c19.2 8 36.8 16 52.8 27.2m136 115.2c24 30.4 43.2 64 57.6 99.2 24 56 35.2 116.8 35.2 177.6 0 17.6-14.4 32-32 32s-32-14.4-32-32c0-80-24-155.2-65.6-217.6" fill="#151b2f" p-id="4269"></path></svg>

+ 16
- 14
pages/index/center.vue View File

@ -9,10 +9,10 @@
<!--中部 用户信息-->
<view
style="border-radius: 20rpx;position: absolute;top: 20%;left: 10%; width:80%;height: 12%;z-index: 1;background: white;">
style="box-shadow: 0 0 10px rgba(47, 125, 125, 0.5);border-radius: 20rpx;position: absolute;top: 20%;left: 10%; width:80%;height: 12%;z-index: 1;background: white;">
<!--头像-->
<view
style="position: absolute;z-index:2;width:30%;height:90%;border-radius: 50%;overflow: hidden;top: -32%;left: 2%;">
<view style="box-shadow: 0 0 10px rgba(47, 125, 125, 0.5);position: absolute;z-index:2;width:30%;height:90%;border-radius: 50%;
overflow: hidden;top: -32%;left: 5%;">
<image :src="userInfo.headImage || '微信用户'" style="width: 100%;height: 100%;"></image>
</view>
<!--福利中心-->
@ -20,19 +20,18 @@
<image src="/static/image/center/flzx.png" style="width: 100%;height: 100%;"></image>
</view> -->
<!-- 未认证-->
<view style="position: absolute;z-index:2;width:15%;height:20%;top: 45%;left: 28%;">
<image src="/static/image/center/wrz.png" style="width: 100%;height: 100%;"></image>
<view style="position: absolute;z-index:2;width:20%;height:25%;top: 38%;left: 31%;">
<image src="/static/image/center/wrz.svg" style="width: 100%;height: 100%;"></image>
</view>
<!-- 去认证 -->
<view style="position: absolute;z-index:2;width:55%;height:20%;top: 43%;left: 46%;">
<span style="font-size: 26rpx;" class="textColor"
@click="toAuthPage">去认证</span>
<view style="position: absolute;z-index:2;height:20%;top: 39%;left: 52%;">
<span style="font-size: 26rpx;font-weight: 700;" class="textColor" @click="toAuthPage">去认证</span>
</view>
<!-- 用户信息 -->
<view style="position: absolute;z-index:2;width:55%;height:20%;top: 60%;left: 7%;">
<view style="position: absolute;z-index:2;width:55%;height:20%;top: 65%;left: 7%;">
<view>
<span style="font-size: 35rpx;margin-right: 5rpx">{{ userInfo.nickName || '微信用户' }}</span>
<span style="font-size: 18rpx">{{ userInfo.phone }}</span>
<span style="font-size: 18rpx">{{ userInfo.phone||'暂无联系方式' }}</span>
</view>
</view>
<!-- 点赞量 -->
@ -83,9 +82,6 @@
<confirmationPopup ref="confirmationPopup" title="提示" :cancel="true" @confirm="handleConfirm"
@cancel="handleCancel" confirmText="确认">
<view class="confirmationPopup">
<!-- <image src="/static/image/publish/upload.png"
style="width: 150rpx;height: 150rpx;"
mode=""></image> -->
<view style="text-align:center">
确认退出登录吗
</view>
@ -149,6 +145,12 @@
imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/cd007424-1336-402c-8390-26c4f21deb80.svg',
title: '帮助反馈'
},
{
name: 'lock',
imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/ef58bc0b-ead6-4053-83b4-339aa02805d2.svg',
title: '修改个人信息',
gotoPageUrl: '/mine/updateUserInfo'
},
{
name: 'outLogin',
imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/4ae3829e-7b07-4d6d-843b-2b7fd21ba346.svg',
@ -162,7 +164,7 @@
this.$store.commit('getUserInfo')
},
methods: {
toAuthPage(){
toAuthPage() {
uni.navigateTo({
url: '/pages_mine/mine/authOption'
})


+ 188
- 188
pages_mine/mine/promotionRecord.vue View File

@ -1,196 +1,196 @@
<template>
<view class="promotionRecord">
<!--顶部导航栏-->
<navbar leftClick @leftClick="$utils.navigateBack" title="我的推广"/>
<!--主页面-->
<view class="frame">
<!--标题-->
<view class="title">
<span>推广记录</span>
</view>
<!--搜索条件-->
<view class="search">
<!--搜索框-->
<view style="width:30%;height:100%">
<uv-input v-model="queryParams.keyWord" placeholder="请输入内容" border="surround" clearable
@change="keyWordChange"></uv-input>
</view>
<!--开始时间-->
<view class="dateTimeCls">
<view class="date" @click="startDateOpen">
{{ queryParams.startDate }}
<uv-datetime-picker ref="startDateRef" v-model="queryParams.startDate" mode="date"
@confirm="startDateChange"></uv-datetime-picker>
</view>
<view class="image">
<image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
</view>
</view>
<!--结束时间-->
<view class="dateTimeCls">
<view class="date" @click="endDateOpen">
{{ queryParams.endDate }}
<uv-datetime-picker ref="endDateRef" v-model="queryParams.endDate" mode="date"
@confirm="endDateChange">
</uv-datetime-picker>
</view>
<view class="image">
<image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
</view>
</view>
</view>
<!--发布列表-->
<view style="" class="publishListClass">
<PromotionRecordList :list="promotionRecordList"/>
</view>
</view>
</view>
<view class="promotionRecord">
<!--顶部导航栏-->
<navbar leftClick @leftClick="$utils.navigateBack" title="我的推广" />
<!--主页面-->
<view class="frame">
<!--标题-->
<view class="title">
<span>推广记录</span>
</view>
<!--搜索条件-->
<view class="search">
<!--搜索框-->
<view style="width:30%;height:100%">
<uv-input v-model="queryParams.keyWord" placeholder="请输入内容" border="surround" clearable
@change="keyWordChange"></uv-input>
</view>
<!--开始时间-->
<view class="dateTimeCls">
<view class="date" @click="startDateOpen">
{{ queryParams.startDate }}
<uv-datetime-picker ref="startDateRef" v-model="queryParams.startDate" mode="date"
@confirm="startDateChange"></uv-datetime-picker>
</view>
<view class="image">
<image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
</view>
</view>
<!--结束时间-->
<view class="dateTimeCls">
<view class="date" @click="endDateOpen">
{{ queryParams.endDate }}
<uv-datetime-picker ref="endDateRef" v-model="queryParams.endDate" mode="date"
@confirm="endDateChange">
</uv-datetime-picker>
</view>
<view class="image">
<image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
</view>
</view>
</view>
<!--发布列表-->
<view style="" class="publishListClass">
<PromotionRecordList :list="promotionRecordList" />
</view>
</view>
</view>
</template>
<script>
import PromotionRecordList from "./sonPage/promotion/promotionRecordList.vue";
import dayjs from "dayjs";
export default {
components: {
PromotionRecordList
},
data() {
return {
promotionRecordList: [],
queryParams: {
pageNo: 1,
pageSize: 10,
startDate: dayjs(new Date()).format('YYYY-MM-DD'),
endDate: dayjs(new Date()).format('YYYY-MM-DD'),
keyWord: '',
},
}
},
onReachBottom() {
console.log("=====")
let allTotal = this.queryParams.pageNo * this.queryParams.pageSize
if (allTotal < this.total) {
//
this.queryParams.pageSize += 10
this.getData() //
}
},
mounted() {
console.log("====")
this.getData()
},
methods: {
getData() {
this.$api('infoGetPromotionPage', {
pageNo: this.queryParams.pageNo,
pageSize: this.queryParams.pageSize,
startDate: this.queryParams.startDate,
endDate: this.queryParams.endDate,
keyWord: this.queryParams.keyWord
}, res => {
if (res.code == 200) {
this.promotionRecordList = res.result.records
this.total = res.result.total
}
})
},
keyWordChange(val) {
this.queryParams.keyWord = val
this.getData()
},
startDateChange(val) {
this.$nextTick(() => {
this.queryParams.startDate = dayjs(val.value).format("YYYY-MM-DD")
this.getData()
});
},
startDateOpen() {
this.$refs.startDateRef.open();
},
endDateChange(val) {
this.$nextTick(() => {
this.queryParams.endDate = dayjs(val.value).format("YYYY-MM-DD")
this.getData()
});
},
endDateOpen() {
this.$refs.endDateRef.open();
},
}
}
import PromotionRecordList from "./sonPage/promotion/promotionRecordList.vue";
import dayjs from "dayjs";
export default {
components: {
PromotionRecordList
},
data() {
return {
promotionRecordList: [],
queryParams: {
pageNo: 1,
pageSize: 10,
startDate: dayjs(new Date()).format('YYYY-MM-DD'),
endDate: dayjs(new Date()).format('YYYY-MM-DD'),
keyWord: '',
},
}
},
onReachBottom() {
console.log("=====")
let allTotal = this.queryParams.pageNo * this.queryParams.pageSize
if (allTotal < this.total) {
//
this.queryParams.pageSize += 10
this.getData() //
}
},
mounted() {
console.log("====")
this.getData()
},
methods: {
getData() {
this.$api('infoGetPromotionPage', {
pageNo: this.queryParams.pageNo,
pageSize: this.queryParams.pageSize,
startDate: this.queryParams.startDate,
endDate: this.queryParams.endDate,
keyWord: this.queryParams.keyWord
}, res => {
if (res.code == 200) {
this.promotionRecordList = res.result.records
this.total = res.result.total
}
})
},
keyWordChange(val) {
this.queryParams.keyWord = val
this.getData()
},
startDateChange(val) {
this.$nextTick(() => {
this.queryParams.startDate = dayjs(val.value).format("YYYY-MM-DD")
this.getData()
});
},
startDateOpen() {
this.$refs.startDateRef.open();
},
endDateChange(val) {
this.$nextTick(() => {
this.queryParams.endDate = dayjs(val.value).format("YYYY-MM-DD")
this.getData()
});
},
endDateOpen() {
this.$refs.endDateRef.open();
},
}
}
</script>
<style lang="scss" scoped>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.promotionRecord {
width: 100vw;
height: 100vh;
.frame {
width: 100%;
//height: calc(100vh - 220rpx);
padding: 28rpx 28rpx 0 28rpx;
.title {
font-size: 34rpx;
color: #333;
font-weight: 700
}
.search {
display: flex;
align-items: center;
gap: 10rpx;
width: 100%;
height: 80rpx;
margin-top: 20rpx;
.dateTimeCls {
display: flex;
align-items: center;
justify-content: space-between;
width: 30%;
height: 80%;
border: 1px solid #b0b2b3;
padding: 5rpx;
border-radius: 20rpx;
.date {
font-size: 25rpx;
display: flex;
align-items: center;
width: 80%;
height: 100%;
color: #b0b2b3;
}
.image {
width: 20%;
height: 100%;
}
}
}
.publishListClass {
margin-top: 10rpx;
height: 78vh;
overflow: auto;
width: 100%;
}
}
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.promotionRecord {
width: 100vw;
height: 100vh;
.frame {
width: 100%;
//height: calc(100vh - 220rpx);
padding: 28rpx 28rpx 0 28rpx;
.title {
font-size: 34rpx;
color: #333;
font-weight: 700
}
.search {
display: flex;
align-items: center;
gap: 10rpx;
width: 100%;
height: 80rpx;
margin-top: 20rpx;
.dateTimeCls {
display: flex;
align-items: center;
justify-content: space-between;
width: 30%;
height: 80%;
border: 1px solid #b0b2b3;
padding: 5rpx;
border-radius: 20rpx;
.date {
font-size: 25rpx;
display: flex;
align-items: center;
width: 80%;
height: 100%;
color: #b0b2b3;
}
.image {
width: 20%;
height: 100%;
}
}
}
.publishListClass {
margin-top: 10rpx;
height: 78vh;
overflow: auto;
width: 100%;
}
}
}
</style>

+ 134
- 0
pages_mine/mine/updateUserInfo.vue View File

@ -0,0 +1,134 @@
<template>
<view class='updateUserInfo'>
<!--顶部导航栏-->
<navbar leftClick @leftClick="$utils.navigateBack" title="修改个人信息" />
<!--主页面-->
<view class="frame">
<view class="item">
<view>头像</view>
<view>11</view>
</view>
<view class="item">
<view class="label">昵称</view>
<view class="value">
<uv-input v-model="form.nickName" placeholder="昵称" border="bottom" clearable
@change="keyWordChange"></uv-input>
</view>
</view>
<view class="item" @click="sexChange">
<view class="label">性别</view>
<view>{{form.sex}}<span style="color: #8b8f97;">&nbsp;&nbsp;&nbsp;></span></view>
</view>
<view class="item">
<view class="label">联系方式</view>
<view class="value">
<uv-input v-model="form.phone" placeholder="联系方式" border="bottom" clearable
@change="keyWordChange"></uv-input>
</view>
</view>
</view>
<!-- ActionSheet 操作菜单 -->
<uv-action-sheet ref="actionSheet" :actions="sexList" title="性别" @select="select" @close="close">
</uv-action-sheet>
<!--确认修改个人信息按钮-->
<button @click="confirmEditUserInfo" class="bottomBtn">
确认修改
</button>
</view>
</template>
<script>
import '../../common.css'; // CSS
export default {
data() {
return {
form: {
sex: '男',
nickName: '库里yyds',
phone: '15346993500',
},
sexList: [{
name: '男',
value: 1
},
{
name: '女',
value: 0
},
]
}
},
methods: {
confirmEditUserInfo() {
this.$api('infoUpdateInfo', {}, res => {
if (res.code == 200) {
// VueX
uni.showToast({
title: '修改成功',
icon: 'success'
})
setTimeout(() => {
uni.navigateTo({
url: '/pages/index/index'
})
}, 300)
}
})
},
sexChange() {
this.$refs.actionSheet.open() //ActionSheet
},
// ActionSheet
select(e) {
console.log('选中该项:', e);
this.form.sex = e.name
this.$refs.actionSheet.close() //
},
// ActionSheet
close() {
this.$refs.actionSheet.close() //
},
}
}
</script>
<style lang="scss" scoped>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.updateUserInfo {
.frame {
padding: 28rpx 28rpx 0 28rpx;
.item {
display: flex;
justify-content: space-between;
// border-bottom: 1px solid #c9c9c9;
margin-top: 20rpx;
padding: 20rpx;
.label {
width: 60%;
}
.value {
width: 40%;
text-align: right;
}
}
}
}
</style>

Loading…
Cancel
Save