feat: 黄精粉前端功能集成 + 个人中心/资产/公排页面优化 + 去除admin copyright

主要改动:
- 个人中心: 去除HjfMemberBadge徽章, 会员等级改显示vip_name,
  "我的资产"/"公排查询"导航项改为与member-points一致风格
- 我的资产页面: 去除HjfMemberBadge, 美化卡片圆角和阴影
- 公排查询页面: 美化顶部渐变和订单卡片样式
- Admin登录页和后台布局: 彻底删除footer copyright信息
- 新增黄精粉业务页面/组件/API/Mock数据(Phase 1)
- 新增PHP环境配置文档和启动脚本

Made-with: Cursor
This commit is contained in:
apple
2026-03-13 00:49:22 +08:00
parent 21f9cc2c0a
commit f6227c0253
70 changed files with 23359 additions and 1176 deletions

View File

@@ -1,30 +1,68 @@
<template>
<view :style="colorStyle">
<view class='bill-details'>
<!-- 类型筛选导航 -->
<view class='nav acea-row'>
<view class='item' :class='type==0 ? "on":""' @click='changeType(0)'>全部</view>
<view class='item' :class='type==1 ? "on":""' @click='changeType(1)'>消费</view>
<view class='item' :class='type==2 ? "on":""' @click='changeType(2)'>储值</view>
<view
class='item'
:class='type == 0 ? "on" : ""'
@click='changeType(0)'
>全部</view>
<view
class='item'
:class='type == 1 ? "on" : ""'
@click='changeType(1)'
>消费</view>
<view
class='item'
:class='type == 2 ? "on" : ""'
@click='changeType(2)'
>储值</view>
<view
class='item'
:class='type == "queue_refund" ? "on" : ""'
@click='changeType("queue_refund")'
>公排退款</view>
</view>
<!-- 账单列表 -->
<view class='sign-record'>
<view class='list' v-for="(item,index) in userBillList" :key="index">
<view class='list' v-for="(item, index) in userBillList" :key="index">
<view class='item'>
<view class='data'>{{item.time}}</view>
<view class='data'>{{ item.time }}</view>
<view class='listn'>
<view class='itemn acea-row row-between-wrapper' v-for="(vo,indexn) in item.child" :key="indexn">
<view
class='itemn acea-row row-between-wrapper'
v-for="(vo, indexn) in item.child"
:key="indexn"
>
<view>
<view class='name line1'>{{vo.title}}</view>
<view>{{vo.add_time}}</view>
<view class='name line1'>
{{ vo.title }}
<!-- 公排退款标记 -->
<text
v-if="vo.type === 'queue_refund'"
class='queue-refund-tag'
>公排退款</text>
</view>
<view class='time-text'>{{ vo.add_time }}</view>
</view>
<view class='num' :class="vo.pm ? 'num-add' : 'num-sub'">
<text v-if="vo.pm">+{{ vo.number }}</text>
<text v-else>-{{ vo.number }}</text>
</view>
<view class='num' v-if="vo.pm">+{{vo.number}}</view>
<view class='num' v-else>-{{vo.number}}</view>
</view>
</view>
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="userBillList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
<!-- 加载更多 -->
<view class='loadingicon acea-row row-center-wrapper' v-if="userBillList.length > 0">
<text class='loading iconfont icon-jiazai' :hidden='loading == false'></text>
{{ loadTitle }}
</view>
<!-- 空状态 -->
<view class="px-20 mt-20" v-if="userBillList.length == 0">
<emptyPage title="暂无记录~" src="/statics/images/noOrder.gif"></emptyPage>
</view>
@@ -35,18 +73,25 @@
</template>
<script>
import {
getCommissionInfo,
moneyList
} from '@/api/user.js';
import {
toLogin
} from '@/libs/login.js';
import {
mapGetters
} from "vuex";
import { moneyList } from '@/api/user.js';
import { toLogin } from '@/libs/login.js';
import { mapGetters } from 'vuex';
import emptyPage from '@/components/emptyPage.vue';
import colors from "@/mixins/color";
import colors from '@/mixins/color';
/**
* 账单明细页
*
* 展示用户的账单流水,支持按类型筛选:
* - 0: 全部
* - 1: 消费
* - 2: 储值
* - "queue_refund": 公排退款type=queue_refund 时显示专属标记)
*
* 列表按日期分组,支持上拉分页加载。
*
* @module pages/users/user_bill/index
*/
export default {
components: {
emptyPage,
@@ -54,125 +99,116 @@
mixins: [colors],
data() {
return {
/** @type {string} 底部加载提示文字 */
loadTitle: '加载更多',
/** @type {boolean} 是否正在加载中(防止重复请求) */
loading: false,
/** @type {boolean} 是否已加载全部数据 */
loadend: false,
/** @type {number} 当前页码 */
page: 1,
/** @type {number} 每页条数 */
limit: 15,
/**
* 当前筛选类型
* 0=全部 1=消费 2=储值 "queue_refund"=公排退款
* @type {number|string}
*/
type: 0,
/** @type {Array<Object>} 按日期分组的账单列表 */
userBillList: [],
times:[],
isAuto: false, //没有授权的不会自动授权
isShowAuth: false //是否隐藏授权
/** @type {Array<string>} 已加载的日期键列表(用于去重分组) */
times: [],
};
},
computed: mapGetters(['isLogin']),
computed: {
...mapGetters(['isLogin']),
},
onShow() {
uni.removeStorageSync('form_type_cart');
if (this.isLogin) {
this.getUserBillList();
} else {
toLogin()
toLogin();
}
},
/**
* 生命周期函数--监听页面加载
* 生命周期函数监听页面加载
* @param {Object} options - 页面跳转参数
* @param {number|string} [options.type=0] - 初始筛选类型
*/
onLoad: function(options) {
onLoad(options) {
this.type = options.type || 0;
},
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底 — 加载下一页
*/
onReachBottom: function() {
onReachBottom() {
this.getUserBillList();
},
onPageScroll(object) {
/**
* 页面滚动事件 — 广播 scroll 事件供子组件使用
*/
onPageScroll() {
uni.$emit('scroll');
},
methods: {
/**
* 授权回调
* 获取账单明细列表(分页追加)
*
* 请求 moneyList 接口,将返回数据按日期分组追加到 userBillList。
* 若 loading 或 loadend 为 true 则直接返回,防止重复/越界请求。
*
* @returns {void}
*/
onLoadFun: function() {
this.getUserBillList();
this.isShowAuth = false;
},
// 授权关闭
authColse: function(e) {
this.isShowAuth = e
},
/**
* 获取账户明细
*/
getUserBillList: function() {
let that = this;
let page = that.page;
let limit = that.limit;
if (that.loading) return;
if (that.loadend) return;
that.loading = true;
that.loadTitle = '';
moneyList({
page: page,
limit: limit
},that.type).then(res => {
for (let i = 0; i < res.data.time.length; i++) {
if (!this.times.includes(res.data.time[i])) {
this.times.push(res.data.time[i])
this.userBillList.push({
time: res.data.time[i],
child: []
})
}
}
for (let x = 0; x < this.times.length; x++) {
for (let j = 0; j < res.data.list.length; j++) {
if (this.times[x] === res.data.list[j].time_key) {
this.userBillList[x].child.push(res.data.list[j])
getUserBillList() {
if (this.loading) return;
if (this.loadend) return;
this.loading = true;
this.loadTitle = '';
moneyList({ page: this.page, limit: this.limit }, this.type)
.then(res => {
const { time: timeKeys, list } = res.data;
// 按日期键建立分组(跨页去重)
timeKeys.forEach(key => {
if (!this.times.includes(key)) {
this.times.push(key);
this.userBillList.push({ time: key, child: [] });
}
}
}
let loadend = res.data.list.length < that.limit;
that.loadend = loadend;
that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
that.page += 1;
that.loading = false;
}).catch(err=>{
that.loading = false;
that.loadTitle = '加载更多';
})
});
// 将明细条目归入对应日期分组
this.times.forEach((key, idx) => {
list.forEach(item => {
if (item.time_key === key) {
this.userBillList[idx].child.push(item);
}
});
});
const loadend = list.length < this.limit;
this.loadend = loadend;
this.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
this.page += 1;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.loadTitle = '加载更多';
});
},
// getUserBillList: function() {
// let that = this;
// if (that.loadend) return;
// if (that.loading) return;
// that.loading = true;
// that.loadTitle = "";
// let data = {
// page: that.page,
// limit: that.limit
// }
// getCommissionInfo(data, that.type).then(function(res) {
// let list = res.data,
// loadend = list.length < that.limit;
// that.userBillList = that.$util.SplitArray(list, that.userBillList);
// that.$set(that, 'userBillList', that.userBillList);
// that.loadend = loadend;
// that.loading = false;
// that.loadTitle = loadend ? "没有更多内容啦~" : "加载更多";
// that.page = that.page + 1;
// }, function(res) {
// that.loading = false;
// that.loadTitle = '加载更多';
// });
// },
/**
* 切换导航
* 切换账单筛选类型并重置列表
*
* @param {number|string} type - 目标类型0全部 1消费 2储值 "queue_refund"公排退款)
* @returns {void}
*/
changeType: function(type) {
changeType(type) {
if (this.type === type) return;
this.type = type;
this.loadend = false;
this.page = 1;
@@ -180,35 +216,71 @@
this.$set(this, 'userBillList', []);
this.getUserBillList();
},
}
}
},
};
</script>
<style scoped lang='scss'>
.sign-record .list .item .data{
.sign-record .list .item .data {
color: #999;
padding: 20rpx 30rpx 10rpx;
font-size: 26rpx;
}
.sign-record .list .item .listn{
.sign-record .list .item .listn {
width: 710rpx;
margin: 0 auto;
border-radius: 24rpx;
}
.sign-record .list .item .listn .itemn{
.sign-record .list .item .listn .itemn {
padding: 0;
margin: 0 30rpx;
height: 150rpx;
}
.sign-record .list .item .listn .itemn:nth-last-child(1){
.sign-record .list .item .listn .itemn:nth-last-child(1) {
border-bottom: 0;
}
.sign-record .list .item .listn .itemn .name{
.sign-record .list .item .listn .itemn .name {
color: #333;
font-size: 28rpx;
}
.sign-record .list .item .listn .itemn .num{
color: #333333;
.sign-record .list .item .listn .itemn .time-text {
color: #999;
font-size: 24rpx;
margin-top: 8rpx;
}
.sign-record .list .item .listn .itemn .num {
font-family: 'Regular';
font-size: 30rpx;
}
.num-add {
color: var(--view-theme);
}
.num-sub {
color: #333333;
}
/* 公排退款标记 */
.queue-refund-tag {
display: inline-block;
margin-left: 10rpx;
padding: 2rpx 12rpx;
border-radius: 20rpx;
font-size: 20rpx;
color: #fff;
background: var(--view-theme);
vertical-align: middle;
line-height: 1.6;
}
/* 顶部类型筛选导航 */
.bill-details .nav {
background-color: #fff;
height: 80rpx;
@@ -225,11 +297,11 @@
.bill-details .nav .item.on {
color: var(--view-theme);
/* border-bottom: 3rpx solid var(--view-theme); */
font-size: 30rpx;
position: relative;
}
.bill-details .nav .item.on::after{
.bill-details .nav .item.on::after {
position: absolute;
width: 64rpx;
height: 6rpx;
@@ -237,7 +309,7 @@
content: ' ';
background: var(--view-theme);
bottom: 0;
left:50%;
left: 50%;
margin-left: -32rpx;
}
</style>