暖心人
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.
 
 
 

220 lines
5.3 KiB

<template>
<view class="user-background" :style="{
backgroundImage:'url('+staticImage.bodyBackground+')'
}">
</view>
<u-cell-group :custom-style="{marginBottom:'100rpx'}">
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="我的兑换订单"
>
</u-cell>
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="我的活动报名"
>
</u-cell>
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="我的留言"
>
</u-cell>
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="我的留言"
>
</u-cell>
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="我的线索"
>
</u-cell>
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="地址管理"
>
</u-cell>
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="我的关注"
>
</u-cell>
</u-cell-group>
<u-cell-group>
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="党员报到码"
>
</u-cell>
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="意见箱/意见栏"
>
</u-cell>
<u-cell
:rightIconStyle="{fontSize:'28rpx',padding:'25rpx 0'}"
:isLink="true"
title="街道联系方式"
>
</u-cell>
</u-cell-group>
</template>
<script>
import {
imghost
} from '@/config/host.js'
import HeaderNav from '@/components/HeaderNav/Index.vue';
import FooterNav from '@/components/FooterNav/Index.vue';
import RightNav from '@/components/RightNav/Index.vue';
import api from '@/utils/functions.js';
export default {
components: {
HeaderNav,
FooterNav,
RightNav
},
data() {
return {
title: 'Hello',
loading: true,
staticImage: {
hiImage: imghost + '/static/image/index-user-title-hi.png',
couponsImage: imghost + '/static/image/user-coupons.png',
bodyBackground: imghost + '/static/image/user-background.png',
bodyShadow: imghost + '/static/image/user-detail-background.png',
informationTitle: imghost + '/static/image/user-information-title.png',
babyTitle: imghost + '/static/image/user-baby-title.png',
bigTitle: imghost + '/static/image/user-big-title.png',
moreTitle: imghost + '/static/image/user-more-title.png',
gun1: imghost + '/static/image/user-gun-1.png',
gun2: imghost + '/static/image/user-gun-2.png',
information: {
pet: imghost + '/static/image/user-information-pet.png',
info: imghost + '/static/image/user-information-info.png',
feed: imghost + '/static/image/user-information-feed.png',
},
baby: {
wait: imghost + '/static/image/user-baby-wait.png',
end: imghost + '/static/image/user-baby-end.png',
shopCar: imghost + '/static/image/user-shop-car.png',
},
big: {
wait: imghost + '/static/image/user-big-wait.png',
end: imghost + '/static/image/user-big-end.png',
},
more: {
online: imghost + '/static/image/user-more-online.png',
privacy: imghost + '/static/image/user-more-privacy.png',
feedback: imghost + '/static/image/user-more-feedback.png',
about: imghost + '/static/image/user-more-about.png',
}
},
user: {
avatar: imghost + '/static/image/banner.png',
nickname: '清晨的风',
coupons: 221,
id: 88685
},
isTop: false,
pagePadding: 100,
userInfo: {},
userExtends: {},
}
},
onLoad() {
},
methods: {
navTo(url) {
wx.navigateTo({
url: url
})
},
userDetail() {
wx.navigateTo({
url: '/pages/UserDetail/index'
})
},
orderPage() {
this.$store.commit('footCheck', 'order');
this.$store.commit('title', '订单');
},
userCouponsPage() {
wx.navigateTo({
url: '/pages/UserCoupons/index'
})
},
updateUserInfo() {
if (this.userInfo) {
this.user.id = this.userInfo.id
this.user.nickname = this.userInfo.name
this.user.avatar = this.userInfo.avatar
}
if (this.userExtends) {
this.user.coupons = this.userExtends.coupon_count
}
}
},
onPageScroll(res) {
if (res.scrollTop <= 20) {
uni.$emit('isTop', true);
} else {
uni.$emit('isTop', false);
}
},
created() {
this.pagePadding = (api.navHeight().navPaddingTop +
api.navHeight().navHeight + (api.navHeight().headerPadding * 2))
},
watch: {
"$store.state.userInfo": {
handler(newVal, oldVal) {
this.userInfo = newVal;
this.updateUserInfo();
}
},
"$store.state.userExtends": {
handler(newVal, oldVal) {
this.userExtends = newVal;
this.updateUserInfo();
}
}
}
}
</script>
<style lang="scss">
@import './components/index.scss';
</style>