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.
jiansheng/pages/user/index.vue

243 lines
4.4 KiB

5 months ago
<template>
<view>
<image src="@/static/bg.png" mode="" style="width: 100%;height: 928rpx;"></image>
<view class="top">
<view class="xuzou">
<!-- <uni-icons type="left" size="18"></uni-icons> -->
<text class="title">我的</text>
</view>
</view>
<view class="mendian">
4 months ago
<image class="img" :src="userxixin.avatar?userxixin.avatar:avatar" mode="" @click="gengx"></image>
5 months ago
<view class="xinxi">
4 months ago
<view class="">{{userxixin.nickname?userxixin.nickname:'微信用户'}}</view>
<view class="">{{userxixin.mobile?userxixin.mobile:'暂无手机号'}}</view>
5 months ago
</view>
4 months ago
<view class="renlbtn" @click="face(userxixin.face_id)">{{userxixin.face_id!=0?'已认证':'人脸录入'}}</view>
5 months ago
</view>
<view class="huiy">
4 months ago
<view class="" v-for="(item,index) in viplist" :key="index" style="height: 223rpx;">
<image class="huiyimg" src="@/static/hbg.png" mode=""></image>
<view class="huiybox">
<image class="huiyboximg" src="@/static/huangguan.png" mode=""></image>
<view class="huiywz">会员套餐</view>
</view>
<view class="huiyxx">
<view class="">{{item.card_name}}
<text v-if="item.card_type!==2">{{item.validity_day}}</text>
<text v-if='item.validity_date'>
到期时间{{item.validity_date}}
</text>
</view>
<view class="" v-if="item.card_type==2">{{item.validity_num}}</view>
<view class="" v-else>
<text v-if='item.validity_date'>
到期时间{{item.validity_date}}
</text>
</view>
</view>
5 months ago
</view>
4 months ago
5 months ago
</view>
4 months ago
<!-- <button open-type="chooseAvatar" @chooseavatar='chooseAvatar'>获取头像</button> -->
4 months ago
5 months ago
</view>
</template>
<script>
export default {
data() {
return {
4 months ago
userxixin: {},
avatar: require("@/static/huangguan.png"),
viplist: []
5 months ago
}
},
4 months ago
onShow() {
this.memberInfo()
this.memberCardList()
},
5 months ago
methods: {
4 months ago
chooseAvatar(e) {
console.log(123, e);
},
4 months ago
4 months ago
gengx() {
uni.navigateTo({
url: "/pages/user/portrait/portrait"
})
},
memberInfo() {
this.$api.memberInfo().then(res => {
this.userxixin = res.data
})
},
memberCardList(page) {
this.$api.memberCardList(page).then(res => {
this.viplist = res.data.list
})
},
5 months ago
previous() {
uni.navigateBack()
},
4 months ago
face(face_id) {
if (face_id != 0) {
uni.showToast({
icon: "none",
title: '人脸已认证',
duration: 3000
});
} else {
uni.navigateTo({
url: "/pages/face/face"
})
}
5 months ago
}
}
}
</script>
<style scoped>
4 months ago
.huiybox {
5 months ago
display: flex;
margin-left: 50rpx;
4 months ago
position: relative;
top: -200rpx;
5 months ago
font-family: PingFang SC;
font-weight: bold;
font-size: 34rpx;
color: #E7CAAD;
}
4 months ago
.huiywz {
5 months ago
margin-left: 22rpx;
margin-top: 20rpx;
}
4 months ago
.huiyxx {
5 months ago
display: flex;
justify-content: space-between;
margin-left: 50rpx;
margin-right: 50rpx;
margin-top: 41rpx;
4 months ago
position: relative;
top: -200rpx;
5 months ago
font-family: PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #E7CAAD;
4 months ago
5 months ago
}
4 months ago
.huiyboximg {
5 months ago
width: 70rpx;
height: 55rpx;
}
4 months ago
.huiy {
5 months ago
margin: 0 auto;
width: 722rpx;
height: 230rpx;
position: absolute;
top: 344rpx;
left: 24rpx;
}
4 months ago
.huiyimg {
5 months ago
width: 722rpx;
height: 230rpx;
4 months ago
5 months ago
}
4 months ago
5 months ago
.img {
width: 110rpx;
height: 110rpx;
4 months ago
border-radius: 50%;
5 months ago
}
.xinxi {
margin-left: 26rpx;
width: 365rpx;
}
.renlbtn {
width: 200rpx;
height: 80rpx;
background: #F8A617;
4 months ago
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(19, 14, 4, 0.14);
5 months ago
border-radius: 40rpx;
text-align: center;
line-height: 80rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
}
.top {
display: flex;
position: absolute;
top: 96rpx;
left: 20rpx;
}
.title {
padding-left: 14rpx;
}
.mddz1img2 {
width: 44rpx;
height: 44rpx;
float: right;
}
.mddz2 {
margin-top: 32rpx;
}
.dz {
margin-left: 17rpx;
}
.mddz1img1 {
width: 22rpx;
height: 27rpx;
}
.mddz1 {
display: flex;
}
.mddz1img {
width: 60rpx;
height: 60rpx;
}
.mddz1wz {
font-family: PingFang SC;
font-weight: bold;
font-size: 30rpx;
color: #222222;
margin-left: 21rpx;
margin-top: 12rpx;
}
.mddz {
width: 680rpx;
height: 152rpx;
background: #FFFFFF;
box-shadow: 0rpx 3rpx 9rpx 0rpx rgba(19, 14, 4, 0.08);
border-radius: 20rpx;
margin-top: 24rpx;
padding: 20rpx 17rpx;
}
.mendian {
position: absolute;
top: 206rpx;
left: 24rpx;
display: flex;
justify-content: space-between;
}
</style>