建材商城系统20241014
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

376 lines
8.1 KiB

<template>
<view class="page">
<!-- <navbar title="个人中心" /> -->
<view class="head">
<view class="headImage">
<image :src="userInfo.headImage || '/static/image/center/headImage.png'" mode=""></image>
</view>
<view class="info">
<view v-if="isLogin">
<view style="display: flex;gap: 20rpx;">
<view class="name">
{{userInfo.nickName || '未登录'}}
</view>
<view class="headBtn" @click="$utils.navigateTo('/pages_order/auth/wxUserInfo')">
修改资料
<uv-icon name="edit-pen-fill" size="26rpx" color="#fff"></uv-icon>
</view>
</view>
<view class="tips">
手机号:<text>{{userInfo.phone || '未绑定'}}</text>
</view>
</view>
<view v-else>
<view class="login-btn" @tap.stop="$utils.toLogin()">
<text>立即登录</text>
</view>
</view>
</view>
</view>
<!-- 酒店 -->
<view class="user">
<view class="line">
<view class="item" style="">
<view class="image">
<image src="/static/image/center/1.png" mode=""></image>
</view>
<view class="">
我的佣金
<p style="color:#DC2828; font-weight: 700;">¥{{commission}}</p>
</view>
</view>
<view class="item">
<view class="image">
<image src="/static/image/center/4.png" mode=""></image>
</view>
<view class="">
我的金额
<p style="color:#DC2828;font-weight: 700">¥{{balance}}</p>
</view>
</view>
</view>
<view class="line">
<view class="image-home">
<uv-swiper
class="uv-swaip"
height="240rpx"
:list="bannerList"
circular
keyName="image"
indicator="true"
bgColor="#ffffff">
</uv-swiper>
</view>
</view>
<view class="line grid">
<view class="title">
我的服务
</view>
<uv-grid :col="4" :border="false">
<uv-grid-item @click="$utils.navigateTo('/index/order')">
<image class="image" src="/static/image/center/12.png" mode=""></image>
<text class="grid-text">我的订单</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/address')">
<image class="image" src="/static/image/center/12.png" mode=""></image>
<text class="grid-text">我的地址</text>
</uv-grid-item>
<uv-grid-item @click="$utils.redirectTo('/pages_order/mine/individualTeam')">
<image class="image" src="/static/image/center/8.png" mode=""></image>
<text class="grid-text">我的团队</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/order/firmOrder')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">快捷订单</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/promotion')">
<image class="image" src="/static/image/center/9.png" mode=""></image>
<text class="grid-text">邀请好友</text>
</uv-grid-item>
<!-- <uv-grid-item @click="$utils.navigateTo('/pages_order/center/systemSet')">
<image class="image" src="/static/image/center/6.png" mode=""></image>
<text class="grid-text">系统设置</text>
</uv-grid-item> -->
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/help')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">帮助与反馈</text>
</uv-grid-item>
<uv-grid-item
@click="$utils.navigateTo('/pages_order/auth/')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">关于本程序</text>
</uv-grid-item>
<uv-grid-item>
<button open-type="contact" class="share">
<image class="image" src="/static/image/center/5.png" mode=""></image>
<text class="grid-text">联系客服</text>
</button>
</uv-grid-item>
</uv-grid>
</view>
</view>
<tabber select="center" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
export default {
components: {
tabber,
},
computed: {
},
data() {
return {
list: [],
commission: 0, // 佣金
balance: 0, // 余额
isLogin: false, // 登录状态
bannerList : [],
}
},
onShow() {
if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo')
this.isLogin = true;
}
this.getBanner()
},
methods: {
// 获取轮播图
getBanner() {
this.$api('getBanner', res => {
if (res.code == 200) {
this.bannerList = res.result
}
})
},
}
}
</script>
<style scoped lang="scss">
.page {
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 600rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.title {
padding: 10rpx 0 0 15rpx;
background-color: #fd5100;
color: #FFF;
text-align: left;
width: 100%;
height: 18%;
font-size: 36rpx;
}
.center {
height: 40%;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
}
.bottom {
display: flex;
justify-content: center;
gap: 50rpx;
}
}
}
image {
width: 100%;
height: 100%;
}
.head {
display: flex;
background-color: #DC2828;
padding: 0rpx 20rpx;
align-items: center;
position: relative;
height: 300rpx;
padding-top: 60rpx;
.headImage {
width: 120rpx;
height: 120rpx;
background-image: url(/static/image/center/3.png);
background-size: 100% 100%;
overflow: hidden;
border-radius: 50%;
margin-right: 40rpx;
}
.info {
font-size: 28rpx;
.vip {
background-color: #FCCC92;
color: #FA6239;
width: 100rpx;
display: flex;
justify-content: center;
align-items: center;
height: 40rpx;
border-radius: 20rpx;
margin-top: 20rpx;
}
.name {
font-size: 36rpx;
color: #fff;
margin-right: 20rpx;
width: 240rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tips {
font-size: 26rpx;
color: #fff;
margin-top: 10rpx;
}
.login-btn {
margin-top: 20rpx;
background-color: #fff;
color: #DC2828;
padding: 10rpx 30rpx;
border-radius: 30rpx;
font-size: 28rpx;
display: inline-block;
width: 160rpx;
text-align: center;
}
}
.headBtn {
color: #FFF;
font-size: 26rpx;
display: flex;
align-items: center;
}
}
.user {
position: relative;
z-index: 9;
margin: 0 30rpx;
margin-top: -60rpx;
.line {
display: flex;
background-color: #fff;
padding: 20rpx 0;
align-content: center;
margin-top: 20rpx;
border-radius: 15rpx;
.item {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
padding: 20rpx 0;
&:nth-child(1) {
border-right: 1px dotted #00000013;
}
.image {
width: 150rpx;
height: 135rpx;
margin-right: 20rpx;
}
}
.image-home{
z-index: 1;
width: 100%;
}
}
.grid {
flex-direction: column;
font-size: 26rpx;
padding: 20rpx;
.title {
margin-bottom: 30rpx;
font-size: 28rpx;
font-weight: 600;
}
.image {
width: 50rpx;
height: 50rpx;
margin: 20rpx 0;
}
text {
text-align: center;
width: 120rpx;
font-size: 24rpx;
}
.share {
background: none;
padding: 0;
margin: 0;
line-height: normal;
border: none;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
&::after {
border: none;
}
.image {
width: 50rpx;
height: 50rpx;
margin: 20rpx 0;
}
.grid-text {
text-align: center;
width: 120rpx;
font-size: 24rpx;
}
}
}
}
</style>