api
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
<view class="edit-info">
|
||||
<view class="user-info">
|
||||
<view class="info-avatar">
|
||||
<image :src="avatar"></image>
|
||||
<u-avatar :src="avatar" :size="120"></u-avatar>
|
||||
<view class="avatar-text">更换头像</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="title">昵称</view>
|
||||
@@ -74,7 +75,6 @@ export default {
|
||||
userInfo.member_nickname,
|
||||
userInfo.member_mobile,
|
||||
userInfo.member_birthday,
|
||||
// common.timestampToDate({timestamp: userInfo.member_birthday}),
|
||||
userInfo.member_sex,
|
||||
userInfo.member_avatar,
|
||||
];
|
||||
@@ -116,15 +116,16 @@ export default {
|
||||
padding-top: 1rpx;
|
||||
.user-info {
|
||||
.info-avatar {
|
||||
text-align: center;
|
||||
height: 160rpx;
|
||||
height: 202rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(255,255,255,1);
|
||||
> image {
|
||||
flex-shrink: 0;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
margin-top: 20rpx;
|
||||
.avatar-text {
|
||||
margin-top: 12rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgba(255,120,15,1);
|
||||
}
|
||||
}
|
||||
.info-item {
|
||||
|
||||
@@ -3,37 +3,50 @@
|
||||
<view class="integral-top">
|
||||
<view>
|
||||
<view class="title">总积分</view>
|
||||
<view class="value">999</view>
|
||||
<view class="value">{{ memberInfo.member_points }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">经验值</view>
|
||||
<view class="value">999</view>
|
||||
<view class="value">{{ memberInfo.member_exppoints }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">预计进度</view>
|
||||
<view class="value">999</view>
|
||||
<view class="value">{{ memberInfo.next_grade_exppoints_diff }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="integral-botom">
|
||||
<scroll-view scroll-y class="integral-botom" :style="{ height: integralHeight }">
|
||||
<rich-text :nodes="nodes"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import common from '@/static/js/common.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
nodes: '<h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1>',
|
||||
integralHeight: 0
|
||||
memberInfo: {},
|
||||
integralHeight: 0,
|
||||
nodes: '',
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.setIntegralHeight();
|
||||
this.getMemberPointsStat();
|
||||
},
|
||||
methods: {
|
||||
setIntegralHeight() {
|
||||
// this.integralHeight =
|
||||
}
|
||||
const res = uni.getSystemInfoSync();
|
||||
// console.log(res.windowHeight);
|
||||
this.integralHeight = res.windowHeight - 251 / 2 + 'px';
|
||||
},
|
||||
getMemberPointsStat() {
|
||||
this.$u.api.getMemberPointsStat().then((res)=>{
|
||||
if (res.errCode == 0) {
|
||||
this.memberInfo = res.data;
|
||||
this.nodes = common.unescapeHTML(this.memberInfo.points_rule);
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -65,9 +78,11 @@ export default {
|
||||
}
|
||||
}
|
||||
.integral-botom {
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
position: absolute;
|
||||
width: 750rpx;
|
||||
height: calc(100vh - 251rpx);
|
||||
width: 100%;
|
||||
// height: calc(100vh - 251rpx);
|
||||
background: rgba(255,255,255,1);
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
top: 251rpx;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<view>
|
||||
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
|
||||
</view>
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y class="integral">
|
||||
<view class="integral">
|
||||
<view class="integral-top">
|
||||
<view>
|
||||
<view class="title">总积分</view>
|
||||
@@ -17,17 +17,17 @@
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">预计进度</view>
|
||||
<view class="value">999</view>
|
||||
<view class="value">{{ memberInfo.next_grade_exppoints_diff }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="integral-botom">
|
||||
<scroll-view scroll-y class="integral-botom" :style="{ height: richHeight }">
|
||||
<rich-text :nodes="nodes"></rich-text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y class="coupon">
|
||||
<view v-for="(item, index) in 13" :key="index" class="coupon-item">
|
||||
<view v-for="(item, index) in couponList" :key="index" class="coupon-item">
|
||||
<img src="../static/mine/23.png" />
|
||||
<view class="coupon-main">
|
||||
<view class="coupon-title">萌店十元优惠券</view>
|
||||
@@ -39,6 +39,7 @@
|
||||
</view>
|
||||
<view class="coupon-btn">兑换</view>
|
||||
</view>
|
||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
@@ -52,12 +53,14 @@
|
||||
{{ item.pl_addtime > 0 ? item.pl_addtime : '+' + 10.00 }}
|
||||
</view>
|
||||
</view>
|
||||
<u-empty text="暂无明细" mode="data" color="#000" v-if="!pointslogList.length"></u-empty>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import common from '@/static/js/common.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -68,16 +71,20 @@ export default {
|
||||
}, {
|
||||
name: '积分明细'
|
||||
}],
|
||||
richHeight: '',
|
||||
swiperHeight: '',
|
||||
current: 0,
|
||||
swiperCurrent: 0,
|
||||
nodes: '<h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1>',
|
||||
pointslogList: [],
|
||||
memberInfo: {}
|
||||
pointslogList: [],
|
||||
couponList: [],
|
||||
memberInfo: {},
|
||||
nodes: '',
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getMemberPointsStat();
|
||||
this.getPointslogList();
|
||||
this.setViewHeight();
|
||||
},
|
||||
methods: {
|
||||
tabsChange(index) {
|
||||
@@ -92,6 +99,7 @@ export default {
|
||||
this.$u.api.getMemberPointsStat().then((res)=>{
|
||||
if (res.errCode == 0) {
|
||||
this.memberInfo = res.data;
|
||||
this.nodes = common.unescapeHTML(this.memberInfo.points_rule);
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -101,7 +109,14 @@ export default {
|
||||
this.pointslogList = res.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
// console.log(res.windowHeight);
|
||||
this.richHeight = res.windowHeight - (88 + 250) / 2 + 'px';
|
||||
// console.log(this.richHeight);
|
||||
this.swiperHeight = res.windowHeight - 88 / 2 + 'px';
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -111,18 +126,20 @@ export default {
|
||||
background-color: #ECECEC;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
> uni-swiper {
|
||||
flex: 1;
|
||||
}
|
||||
// > uni-swiper {
|
||||
// flex: 1;
|
||||
// height: calc()
|
||||
// }
|
||||
.swiper-item {
|
||||
padding-top: 10rpx;
|
||||
.integral {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.integral-top {
|
||||
padding: 79rpx 88rpx;
|
||||
width: 750rpx;
|
||||
height: 271rpx;
|
||||
height: 270rpx;
|
||||
background: linear-gradient(0deg,rgba(246,211,119,1) 1%,rgba(240,154,105,1) 100%);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -142,12 +159,13 @@ export default {
|
||||
}
|
||||
}
|
||||
.integral-botom {
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
position: absolute;
|
||||
width: 750rpx;
|
||||
// height: 856rpx;
|
||||
width: 100%;
|
||||
background: rgba(255,255,255,1);
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
top: 251rpx;
|
||||
top: 250rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="information">
|
||||
<view class="info-avatar">
|
||||
<image :src="userInfo.member_avatar"></image>
|
||||
<u-avatar :src="userInfo.member_avatar" :size="120"></u-avatar>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="title">昵称</view>
|
||||
@@ -47,11 +47,6 @@ export default {
|
||||
onNavigationBarButtonTap() {
|
||||
this.toEditPage();
|
||||
},
|
||||
filters: {
|
||||
dateFormat(value) {
|
||||
return common.timestampToDate({ timestamp: value });
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
this.$u.api.getMemberInfo().then(res => {
|
||||
@@ -74,16 +69,11 @@ export default {
|
||||
background-color: #ECECEC;
|
||||
padding-top: 1rpx;
|
||||
.info-avatar {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 160rpx;
|
||||
background: rgba(255,255,255,1);
|
||||
> image {
|
||||
flex-shrink: 0;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
.info-item {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user