This commit is contained in:
Vinjor 2025-04-09 17:09:38 +08:00
parent 003d76190c
commit 0d9abf5b1a
4 changed files with 152 additions and 12 deletions

View File

@ -173,6 +173,15 @@
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "history/history",
"style": {
"navigationBarTitleText": "",
"componentPlaceholder": {
"notice-item": "view"
}
}
}
]
}],

View File

@ -15,12 +15,9 @@
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<my-notice-item v-if="dataList.length>0" :dataList="dataList"></my-notice-item>
<my-notice-item v-if="dataList.length>0" :dataList="dataList"></my-notice-item>
<my-notice-item v-if="dataList.length>0" :dataList="dataList"></my-notice-item>
<my-notice-item v-if="dataList.length>0" :dataList="dataList"></my-notice-item>
<!-- <view style="text-align: center" v-if="dataList.length==0">
<view style="text-align: center" v-if="dataList.length==0">
<image class="" src="@/static/images/nothing.png"></image>
</view> -->
</view>
</scroll-view>
</view>
</view>

View File

@ -0,0 +1,127 @@
<template>
<view class="container-box">
<navigation-bar-vue title="足迹" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue>
<view class="content">
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view class="item-field" style="align-items: center;">
<view class="my-suggest-dom">
<text>最近{{maxHisNum}}条通告浏览记录</text>
</view>
</view>
<notice-item v-if="dataList.length>0" :dataList="dataList" @goDetail="goDetail()"></notice-item>
<view style="text-align: center" v-if="dataList.length==0">
<image class="" src="@/static/images/nothing.png"></image>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import noticeItem from '@/pages/components/notice-item.vue'
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {
toast,
hasRights
} from '@/utils/common.js'
export default {
components: {
navigationBarVue,
noticeItem
},
data() {
return {
dataList: ['', '', '', '', '', '', ''],
queryParams: {
pageNum: 1,
pageSize: 10
},
total: 0,
//
isTriggered: false,
//
maxHisNum: 20,
}
},
methods: {
/**
* 上滑加载数据
*/
onReachBottomCus() {
// *
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {
toast("没有更多数据了")
return
}
//+1,
this.queryParams.pageNum++
},
/**
* 下拉刷新数据
*/
onRefresherrefresh() {
this.isTriggered = true
this.queryParams.pageNum = 1
this.total = 0
},
/**
* 查看通告详情
* @param {Object} item
*/
goDetail(item) {
this.$tab.navigateTo(`/pages/notice/detail?id=${item.id}`)
}
}
}
</script>
<style lang="scss">
.container-box {
padding-top: calc(90rpx + var(--status-bar-height));
border-top: 1rpx solid #F4F4F4;
background-color: white;
width: 100%;
color: #363636;
font-size: 30rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: center;
position: relative;
.content {
border-top: 1rpx solid #F4F4F4;
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx);
overflow-y: scroll;
width: 100%;
padding: 10rpx 30rpx;
background-color: #F2F2F2;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.item-field {
color: #929292;
width: 100%;
display: flex;
align-items: self-start;
justify-content: center;
.my-suggest-dom {
margin: 0 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
margin-top: 20rpx;
}
}
}
}
</style>

View File

@ -104,7 +104,7 @@
<view class="text-dom">通告券</view>
<uni-icons type="right" color="#623109" size="12"></uni-icons>
</view>
<view class="menu-item">
<view class="menu-item" @click="goHistory()">
<!-- <image src="@/static/mine/zuji.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/zuji.png" mode="aspectFit"></image>
<view class="text-dom">足迹</view>
@ -182,7 +182,7 @@
getStrData
} from '@/utils/auth.js'
import {
queryDetail
queryDetail
} from '@/api/business/member.js'
export default {
props: {
@ -239,12 +239,15 @@
// open uni-popup type
this.$refs.popup.open(type)
},
getDetail() {
queryDetail({userId:this.userInfo.userId,userType:this.localUserType}).then(res => {
getDetail() {
queryDetail({
userId: this.userInfo.userId,
userType: this.localUserType
}).then(res => {
this.userInfo.tfansNum = res.data.tfansNum.toString()
this.userInfo.pointsBalance = res.data.pointsBalance.toString()
this.userInfo.report = res.data.report.toString()
this.userInfo.avatar = this.imageUrl+res.data.avatar
this.userInfo.avatar = this.imageUrl + res.data.avatar
})
},
/**
@ -254,7 +257,7 @@
changeUserType(type)
this.localUserType = type
this.$emit('update:nowUserType', this.localUserType)
this.getDetail()
this.getDetail()
this.$forceUpdate()
},
handleToInfo() {
@ -284,6 +287,9 @@
goCoupon() {
this.$tab.navigateTo('/pages/mine/coupon/coupon-list')
},
goHistory() {
this.$tab.navigateTo('/pages/mine/history/history')
},
goMemberCard() {
this.$tab.navigateTo('/pages/mine/member/member-card?userType=' + this.localUserType)
},
@ -291,7 +297,8 @@
* 跳转编辑页
*/
goEdit() {
this.$tab.navigateTo('/pages/mine/set/my-info?userType='+this.localUserType+'&userId='+this.userInfo.userId)
this.$tab.navigateTo('/pages/mine/set/my-info?userType=' + this.localUserType + '&userId=' + this.userInfo
.userId)
},
viewNewPeople() {
this.$tab.navigateTo(