suta/pages/wode/index.vue

299 lines
6.2 KiB
Vue
Raw Normal View History

2024-05-11 10:06:09 +08:00
<template>
<!-- 我的页面1 -->
<view class="page">
<view class="flex-1 section">
<view class="group">
<view class="group-zi">
<view class="image-r">
<image
class="self-center image_5"
:src="userImage"
/>
</view>
</view>
<view class="self-stretch group_2 mt-73">
<view @click="gerenziliao" class="button-box flex-row justify-between items-center group_3">
<text class="font text_3">个人资料</text>
<image
class="image_6"
src="../../static/wode-youjianto.png"
/>
</view>
<!-- <view class="button-box flex-row justify-between items-center group_4">
<text class="font text_4">我的二维码</text>
<image
class="image_6"
src="../../static/wode-youjianto.png"
/>
</view> -->
<view @click="zhengce" class="button-box flex-row justify-between items-center group_6">
<text class="font">隐私政策</text>
<image
class="image_6"
src="../../static/wode-youjianto.png"
/>
</view>
<view @click="xieyi" class="button-box flex-row justify-between items-center group_6">
<text class="font text_5">用户协议</text>
<image
class="image_6"
src="../../static/wode-youjianto.png"
/>
</view>
<view @click="shouhuo" class="button-box flex-row justify-between items-center group_7">
<text class="font">收货地址</text>
<image
class="image_6"
src="../../static/wode-youjianto.png"
/>
</view>
<view @click="shezhi" class="button-box flex-row justify-between items-center group_8">
<text class="font text_6">设置</text>
<image
class="image_6"
src="../../static/wode-youjianto.png"
/>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import request from '../../utils/request'
export default {
components: {},
props: {},
data() {
return {
userImage:'',
tokenflag:false
};
},
onShow(){
this.setuser()
},
methods: {
async setuser() {
const res = await request.get('/api/user/info')
console.log(res)
if(res.code == 401){
this.tokenflag = false
}else{
this.tokenflag = true
this.userImage = res.data.data.avatar
}
},
zhengce(){
wx.navigateTo({
url: '/pagesWode/wode-zhengce/index'
})
// if (this.tokenflag == true) {
// }else{
// uni.navigateTo({
// url:'/pages/login/index'
// })
// }
},
xieyi(){
if (this.tokenflag == true) {
wx.navigateTo({
url: '/pagesWode/wode-xieyi/index'
})
}else{
uni.navigateTo({
url:'/pages/login/index'
})
}
},
// 跳转个人信息
gerenziliao(){
if (this.tokenflag == true) {
wx.navigateTo({
url: '/pagesWode/wode-personal/idnex'
})
}else{
uni.navigateTo({
url:'/pages/login/index'
})
}
},
// 跳转设置
shezhi(){
if (this.tokenflag == true) {
wx.navigateTo({
url: '/pages/shezhi/index'
})
}else{
uni.navigateTo({
url:'/pages/login/index'
})
}
},
// 跳转收货地址
shouhuo(){
if (this.tokenflag == true) {
wx.navigateTo({
url: '/pagesWode/wode-shouhuo/index'
})
}else{
uni.navigateTo({
url:'/pages/login/index'
})
}
},
},
};
</script>
<style scoped lang="css">
.button-box{
display: flex;
justify-content: space-between;
align-items: center;
}
.mt-73 {
margin-top: 146rpx;
}
.mt-113 {
margin-top: 226rpx;
}
.ml-3 {
margin-left: 6rpx;
}
.mt-5 {
margin-top: 10rpx;
}
.page {
background-color: #ffffff;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
}
.section {
padding-top: 112rpx;
background-color: #ffffff;
overflow-y: auto;
}
.group {
padding-left: 72rpx;
padding-right: 46rpx;
}
.group-zi{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
/* border: 1px solid black; */
}
.image-r{
width: 204rpx;
height: 204rpx;
border-radius: 50%;
overflow: hidden;
/* border: 1px solid red; */
}
.image_5 {
width: 100%;
height: 100%;
}
.group_2 {
border-bottom: solid 2rpx #8185861a;
}
.group_3 {
padding: 0 18rpx 40rpx 28rpx;
border-bottom: solid 2rpx #4444441a;
}
.font {
font-size: 30rpx;
font-family: 微软雅黑;
line-height: 27.78rpx;
color: #444444;
}
.text_3 {
line-height: 27.7rpx;
}
.image_6 {
width: 30rpx;
height: 32rpx;
}
.group_4 {
padding: 40rpx 20rpx 40rpx 24rpx;
border-bottom: solid 2rpx #4444441a;
}
.text_4 {
line-height: 27.8rpx;
}
.group_5 {
padding: 2rpx 0;
}
.group_6 {
padding: 40rpx 20rpx 40rpx 28rpx;
border-bottom: solid 2rpx #4444441a;
}
.text_5 {
line-height: 27.96rpx;
}
.group_7 {
padding: 40rpx 20rpx 40rpx 28rpx;
border-bottom: solid 2rpx #8185861a;
}
.group_8 {
padding: 40rpx 20rpx 40rpx 28rpx;
}
.text_6 {
line-height: 27.14rpx;
}
.equal-division {
background-color: #ffffff;
border-radius: 0 60rpx 0 0;
border-left: solid 2rpx #f7f7f7;
border-right: solid 2rpx #f7f7f7;
border-top: solid 2rpx #f7f7f7;
border-bottom: solid 2rpx #f7f7f7;
}
.group_9 {
flex: 1 1 146rpx;
}
.equal-division-item {
padding: 12rpx 0;
}
.image_7 {
width: 48rpx;
height: 48rpx;
}
.font_2 {
font-size: 22rpx;
font-family: Poppins;
line-height: 20.4rpx;
color: #999999;
}
.text_7 {
line-height: 20.24rpx;
}
.text_8 {
line-height: 20.32rpx;
}
.text_9 {
color: #888888;
line-height: 20.24rpx;
}
.image_8 {
filter: drop-shadow(0rpx 4rpx 4rpx #00000040);
width: 48rpx;
height: 48rpx;
}
.text_10 {
color: #23693f;
}
</style>