第一次上传

This commit is contained in:
Ls
2026-03-09 16:39:03 +08:00
commit 3d9efaf15c
924 changed files with 326227 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

View File

@@ -0,0 +1,395 @@
<template>
<view class="point-records-page">
<!-- 沉浸式状态栏 -->
<view class="status-bar"></view>
<!-- 顶部导航 -->
<view class="nav-bar">
<image class="back-icon" src="/static/icons/back.svg" @click="Service.GoPageBack()" mode="aspectFit" />
<text class="nav-title">积分明细</text>
<view class="nav-placeholder"></view>
</view>
<!-- 主要内容区域 -->
<view class="content">
<!-- 积分统计卡片 -->
<view class="stats-section">
<view class="stats-card">
<view class="stat-item">
<text class="ri-coins-line stat-icon"></text>
<view class="stat-info">
<text class="stat-value">{{ accInfo.integral }}</text>
<text class="stat-label">当前积分</text>
</view>
</view>
<view class="stat-divider"></view>
<view class="stat-item">
<text class="ri-add-circle-line stat-icon earn"></text>
<view class="stat-info">
<text class="stat-value">{{ getAmount }}</text>
<text class="stat-label">本月获得</text>
</view>
</view>
<view class="stat-divider"></view>
<view class="stat-item">
<text class="ri-subtract-line stat-icon spend"></text>
<view class="stat-info">
<text class="stat-value">{{ deductAmount }}</text>
<text class="stat-label">本月消耗</text>
</view>
</view>
</view>
</view>
<!-- 筛选标签 -->
<view class="filter-tabs">
<view
v-for="(tab, index) in filterTabs"
:key="index"
class="filter-tab"
:class="{ active: currentFilter === tab }"
@click="currentFilter = tab;getUseraccInfo()"
>
{{ tab }}
</view>
</view>
<!-- 积分记录列表 -->
<view class="records-list">
<view
v-for="(record, index) in pointsList"
:key="index"
class="record-item"
>
<view class="record-info">
<view class="record-header">
<text class="record-title">{{ record.name }}</text>
<text class="record-amount" :class="record.code=='收入'?'earn':'spend'">{{record.code=='收入'?'+':'-'}}{{ record.amount }}</text>
</view>
<text class="record-desc">{{ record.remark }}</text>
<text class="record-time">{{ record.addTime }}</text>
</view>
</view>
<!-- 空状态 -->
<view v-if="pointsList.length === 0" class="empty-state">
<text class="ri-leaf-line empty-icon"></text>
<text class="empty-text">暂无积分记录</text>
</view>
<up-loadmore v-else :status="status" />
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { Service } from "@/Service/Service"
import { vpUserService } from '@/Service/vp/vpUserService'
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
// 积分明细数据类型
interface PointsItem {
amount:number
code:string
name:string
addTime:string
}
interface accInfo{
account:number
integral:number
userId:string
}
const filterTabs = [ '全部','支出','收入']
const currentFilter = ref('全部')
let deductAmount = ref<number>(0)
let getAmount = ref<number>(0)
let accInfo=ref<accInfo>({integral:0})
let status=ref('loadmore')
let page=ref(1)
// 积分明细数据
const pointsList = ref<PointsItem[]>([
]);
onLoad(() => {
getUseraccInfo()
})
onReachBottom(()=>{
getList()
})
const getUseraccInfo = () => {
status.value = 'loadmore'
page.value = 1
pointsList.value=[]
getList()
}
const getList=()=>{
if (status.value !== 'loadmore') {
return
}
status.value = 'loading'
vpUserService.GetUserAccInfo(page.value,currentFilter.value =='全部'?'':currentFilter.value).then(res => {
accInfo.value = res.data.accInfo
getAmount.value = res.data.getAmount
deductAmount.value = res.data.deductAmount
pointsList.value=[...pointsList.value,...res.data.logList]
status.value = res.data.logList.length == 10 ? 'loadmore' : 'nomore'
page.value++
})
}
</script>
<style lang="scss">
.point-records-page {
min-height: 100vh;
background: #F5F5F5;
display: flex;
flex-direction: column;
}
/* 状态栏 */
.status-bar {
background: linear-gradient(135deg, #FF6B00, #FF9500);
height: var(--status-bar-height);
width: 100%;
}
/* 导航栏 */
.nav-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding:60rpx 24rpx 20rpx 24rpx;
background: linear-gradient(135deg, #FF6B00, #FF9500);
}
.back-icon {
width: 48rpx;
height: 48rpx;
padding: 8rpx;
}
.nav-title {
font-size: 36rpx;
font-weight: 600;
color: #FFFFFF;
}
.nav-placeholder {
width: 48rpx;
}
/* 内容区域 */
.content {
flex: 1;
padding: 24rpx;
}
/* 积分统计区域 */
.stats-section {
margin-bottom: 24rpx;
}
.stats-card {
background: #FFFFFF;
border-radius: 24rpx;
padding: 32rpx 24rpx;
display: flex;
align-items: center;
justify-content: space-around;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
}
.stat-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 12rpx;
}
.stat-icon {
font-size: 48rpx;
color: #FF6B00;
}
.stat-icon.earn {
color: #10B981;
}
.stat-icon.spend {
color: #F44336;
}
.stat-info {
display: flex;
flex-direction: column;
align-items: center;
gap: 4rpx;
}
.stat-value {
font-size: 40rpx;
font-weight: 700;
color: #222222;
line-height: 1;
}
.stat-label {
font-size: 22rpx;
color: #999999;
}
.stat-divider {
width: 1rpx;
background: rgba(0, 0, 0, 0.08);
height: 60rpx;
}
/* 筛选标签 */
.filter-tabs {
background: #FFFFFF;
border-radius: 16rpx;
padding: 8rpx;
margin-bottom: 24rpx;
display: flex;
gap: 8rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.filter-tab {
flex: 1;
text-align: center;
padding: 16rpx 0;
font-size: 26rpx;
color: #666666;
border-radius: 12rpx;
transition: all 0.3s ease;
}
.filter-tab.active {
background: linear-gradient(135deg, #FF6B00, #FF9500);
color: #FFFFFF;
font-weight: 500;
}
/* 记录列表 */
.records-list {
display: flex;
flex-direction: column;
gap: 16rpx;
}
.record-item {
background: #FFFFFF;
border-radius: 16rpx;
padding: 24rpx;
display: flex;
align-items: center;
gap: 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.record-icon-box {
width: 72rpx;
height: 72rpx;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.record-icon-box.earn {
background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
}
.record-icon-box.earn text {
font-size: 36rpx;
color: #10B981;
}
.record-icon-box.spend {
background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
}
.record-icon-box.spend text {
font-size: 36rpx;
color: #F44336;
}
.record-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
}
.record-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.record-title {
font-size: 28rpx;
font-weight: 500;
color: #222222;
}
.record-amount {
font-size: 32rpx;
font-weight: 600;
color: #10B981;
}
.record-amount.spend {
color: #F44336;
}
.record-desc {
font-size: 24rpx;
color: #666666;
line-height: 1.4;
}
.record-time {
font-size: 22rpx;
color: #999999;
}
/* 空状态 */
.empty-state {
background: #FFFFFF;
border-radius: 16rpx;
padding: 80rpx 0;
display: flex;
flex-direction: column;
align-items: center;
gap: 16rpx;
}
.empty-icon {
font-size: 80rpx;
color: #CCCCCC;
}
.empty-text {
font-size: 26rpx;
color: #999999;
}
</style>

View File

@@ -0,0 +1,39 @@
# 图标文件说明
本项目需要以下底部导航栏图标文件:
## 首页图标
- `home.png` (未选中状态)
- `home-active.png` (选中状态)
## 我的图标
- `profile.png` (未选中状态)
- `profile-active.png` (选中状态)
## 推荐尺寸
- 81x81 px (微信小程序标准)
- 格式PNG透明背景
## 临时解决方案
如果暂时没有图标,可以:
1. **使用 iconfont 图标库**
- 访问 https://www.iconfont.cn/
- 搜索"首页"、"我的"相关图标
- 下载并放置在本目录下
2. **使用纯色占位图**
- 可以使用任意图片作为临时占位
- 后续替换为正式图标
3. **使用在线图标生成工具**
- https://www.flaticon.com/
- https://icon-icons.com/
## 图标设计建议
- 风格:线条图标或填充图标
- 颜色:灰色 (#666666) 用于未选中,橙色 (#FF6B35) 用于选中
- 线条粗细2-3px
- 圆角:适度圆角,符合现代设计风格

View File

@@ -0,0 +1,234 @@
<template>
<view>
<view :style="{'height':topHeight+'rpx'}"
style=" position: fixed; top: 0; z-index: 2; width: 100%; background-color: #fff; ">
<view class="" :style="{'margin-top':top+'rpx','height':height+'rpx','line-height':height+'rpx'}"
style=" margin-left: 40rpx; display: flex; align-items: center;">
<img :src="Service.GetIconImg('/static/index/index/location.png')" style="width: 40rpx; height: 40rpx;"
alt="" />
<text style="margin-left: 15rpx; font-size: 26rpx; font-weight: 600; ">许昌市魏都区</text>
</view>
<!-- 内容 -->
<view class="" style="margin: 40rpx 20rpx">
<up-swiper imgMode='heightFix' :list="swiperList" height='140' @change="e => current = e.current" :autoplay="false">
<template #indicator>
<view class="indicator">
<view class="indicator__dot" v-for="(item, index) in swiperList" :key="index"
:class="[index === current && 'indicator__dot--active']">
</view>
</view>
</template>
</up-swiper>
</view>
<view class="" style=" display: flex; align-items: center; justify-content: space-around; margin: 20rpx 0; background-color: #fff; padding: 20rpx">
<view v-for="(item, index) in tabList" @click="chooseTab(index)" style="display: flex; flex-direction: column; align-items: center; justify-content: center;" :key="index">
<view class="" :class="{tabimgActive:index==tabCurrent,tabimg: index!=tabCurrent }" style=" border-radius: 50%; display: flex; align-items: center; justify-content: center; height: 80rpx; width: 80rpx; " >
<img :src="Service.GetIconImg( index==tabCurrent? item.imged:item.img)" style="width: 45rpx; height: 45rpx; " ></img>
</view>
<view :class="{tabActivefont:index==tabCurrent,tabfont:index!=tabCurrent}" style="font-size: 26rpx; margin-top: 15rpx;" class="">
{{item.name}}
</view>
</view>
</view>
<view class="" style="margin-top: 40rpx; background-color: #fff; padding: 20rpx; " >
<view class="" style=" margin: 10rpx 0; display: flex; align-items: center; justify-content: space-between;" >
<view class="" style="font-weight: 600; font-size: 32rpx;" >
热门商家
</view>
<view class="" style="display: flex;align-items: center;" >
<text style="color: #666666;margin-right: 10rpx; font-size: 28rpx; " >查看更多</text>
<up-icon name="arrow-right" size="14" color='#666666' :bold='true' ></up-icon>
</view>
</view>
<view class="" style="display: flex; padding: 20rpx; margin-top: 20rpx; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2; " >
<img :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')" style=" border-radius: 20rpx; width: 140rpx; height: 140rpx;" alt="" />
<view class="" style=" flex: 1; margin-left: 20rpx; display: flex; flex-direction: column; justify-content: space-between; " >
<view class="" style="display: flex; align-items: center;" >
<view class="" style="font-weight: 700; font-size: 32rpx;" >
老北京炸酱面
</view>
<view class="tag" style="color: #fff; border-radius: 12rpx; background-color: #FF6B35; padding: 4rpx 20rpx; " >
新店
</view>
<view class="tag" style="color: #fff; border-radius: 12rpx; background-color: #FF4D4F; padding: 4rpx 20rpx; " >
人气榜
</view>
</view>
<view class="" style="display: flex;align-items: center;" >
<up-rate count="1" activeColor='#FF6B35' size='16' :readonly='true' ></up-rate>
<text style="color: #666666; font-size: 26rpx;" >3.8</text>
<text style="margin-left: 10rpx;color: #666666; font-size: 26rpx; " >月售892单</text>
</view>
<view class="" style="display: flex; align-items: center; justify-content: space-between; " >
<view class="" style="display: flex;align-items: center;" >
<up-icon name="map" color="#666666" size="18"></up-icon>
<text style="color: #666666; margin-left: 12rpx; font-size: 26rpx;" >0.8km</text>
</view>
<view class="" style="margin-right: 20rpx;" >
<text style="font-size: 28rpx;font-weight: 600; color: #FF6B35; " > ¥58/人 </text>
</view>
</view>
</view>
</view>
</view>
<view class="" style="margin-top: 40rpx; background-color: #fff; padding: 20rpx; " >
<view class="" style=" margin: 10rpx 0; display: flex; align-items: center; justify-content: space-between;" >
<view class="" style="font-weight: 600; width: 70%; font-size: 32rpx;" >
<up-notice-bar bgColor='#fff' color='#FF6B35' :text="notice"></up-notice-bar>
</view>
<view class="" style="display: flex;align-items: center;" >
<text style="color: #666666;margin-right: 10rpx; font-size: 28rpx; " >查看更多</text>
<up-icon name="arrow-right" size="14" color='#666666' :bold='true' ></up-icon>
</view>
</view>
<view class="" style="display: flex; margin-top: 20rpx; border-radius: 20rpx; " >
<image :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')" mode="aspectFill" style=" border-radius: 20rpx; width: 190rpx; height: 150rpx;" alt="" />
<view class="" style=" flex: 1; margin-left: 20rpx; display: flex; flex-direction: column; justify-content: space-between; " >
<view class="" style=" " >
<view class="" style="font-weight: 700; font-size: 32rpx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" >
老北京炸酱面
</view>
</view>
<view class="" style="color: #666666; font-size: 26rpx; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; " >
老北京炸酱面是北京市传统小吃,属北京菜系,在京津冀地区广为流传。该菜品以面条为主料,搭配炸酱与时令菜码拌制而成,核心酱料选用肥瘦相间的五花肉丁,配以干黄酱和甜面酱混合炒制,经慢火熬煮形成深褐色酱料
</view>
<view class="" style=" " >
<text style="color: #666666; font-size: 26rpx;" >2026-10-15</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { onShow, onLoad } from '@dcloudio/uni-app';
import { Service } from "@/Service/Service"
// 导航栏
let topHeight = ref()
let height = ref()
let top = ref()
let current = ref(0)
let swiperList = ref(
[
'/static/dele/dele1.jpg',
'/static/dele/dele2.jpg'
]
)
let tabCurrent=ref(0)
let tabList = ref(
[
{
name: '美食',
img: '/static/index/index/food.png',
imged: '/static/index/index/fooded.png'
},
{
name: '饮品',
img: '/static/index/index/cofe.png',
imged: '/static/index/index/cofed.png'
},
{
name: '超市',
img: '/static/index/index/shop.png',
imged: '/static/index/index/shoped.png'
},
{
name: '美妆',
img: '/static/index/index/good.png',
imged: '/static/index/index/gooded.png'
},
{
name: '医疗',
img: '/static/index/index/medical.png',
imged: '/static/index/index/medicaled.png'
}
]
)
let notice=ref('uview-plus UI众多组件覆盖开发过程的各个需求组件功能丰富多端兼容。让您快速集成开箱即用')
onShow(() => {
})
onLoad(() => {
let res = wx.getMenuButtonBoundingClientRect()
topHeight.value = (res.top + res.height + 5) * 2
height.value = res.height * 2
top.value = res.top * 2
})
const chooseTab=(e)=>{
tabCurrent.value=e
}
</script>
<style lang="scss">
page {
background-color: #F5F5F5;
}
.indicator {
@include flex(row);
justify-content: center;
&__dot {
height: 6px;
width: 6px;
border-radius: 100px;
background-color: rgba(255, 255, 255, 0.35);
margin: 0 5px;
transition: background-color 0.3s;
&--active {
background-color: #ffffff;
}
}
}
.tabimgActive{
background-color: var(--nav-mian);
}
.tabimg{
background-color: #F5F5F5;
}
.tabActivefont{
color: var(--nav-mian);
}
.tabfont{
color:#333333
}
.tag{
display: flex;
align-items: center;
justify-content: center;
width: fit-content;
font-size: 24rpx;
margin-left: 10rpx;
}
</style>