feat: 添加收支明细页面、修改我的店铺展示、ai店铺-列表记录添加分页

This commit is contained in:
2026-06-24 16:40:38 +08:00
parent ab8e8371cf
commit c8eb96b64c
11 changed files with 388 additions and 71 deletions
+4 -4
View File
@@ -15,15 +15,15 @@ SHOPRO_VERSION=v2.4.1
#SHOPRO_DEV_BASE_URL=http://192.168.101.58:48090
# 服务器
# SHOPRO_DEV_BASE_URL=http://www.qflyqzy.net:48090
SHOPRO_DEV_BASE_URL=http://www.qflyqzy.net:48090
#SHOPRO_DEV_BASE_URL=https://www.qflyqzy.net/yg-api
# SHOPRO_DEV_BASE_URL=https://www.qflyqzy.net/yg-api
# 伟伟
# SHOPRO_DEV_BASE_URL=http://192.168.3.1:48090
# SHOPRO_DEV_BASE_URL=http://192.168.10.38:48090
# 测试环境
SHOPRO_DEV_BASE_URL=https://yougoutest.api.riananyoumu.com
# SHOPRO_DEV_BASE_URL=https://yougoutest.api.riananyoumu.com
# 本地
# SHOPRO_DEV_BASE_URL=http://8.136.55.200:48090
+6 -1
View File
@@ -31,4 +31,9 @@
## [1.4.9] - 2026-06-22
### 新增
- 添加跳转江文数商链接
- 提现未实名跳转实名认证
- 提现未实名跳转实名认证
## [1.5.0] - 2026-06-24
### 新增
- 添加收支明细页面
- 我的店铺文案展示当前用户名称
+6
View File
@@ -855,6 +855,12 @@
"navigationBarTitleText": "待释放明细"
}
},
{
"path": "noReleaseAmount",
"style": {
"navigationBarTitleText": "收支明细"
}
},
{
"path" : "wallet",
"style" :
+18 -1
View File
@@ -9,9 +9,10 @@
<view class="title">今日收益(元)</view>
<view class="num">{{ $fen2yuan(trendObj?.earnings || 0) }}</view>
<view class="line" />
<view class="flex align-center">
<view class="release-entry flex align-center" @click="goNoRelease">
<view class="title">未行权金额(元)</view>
<view class="num2">{{ $fen2yuan(norelease || 0) }}</view>
<text class="arrow">></text>
</view>
</view>
</view>
@@ -424,6 +425,12 @@
currentMonth2.value = year + '-' + month;
}
function goNoRelease() {
uni.navigateTo({
url: '/pages/home/noReleaseAmount',
});
}
onMounted(() => {
select_value.value = range.value[0].text
select_cur.value = range.value[0].value
@@ -478,6 +485,16 @@
margin-left: 40rpx;
}
.release-entry {
display: inline-flex;
}
.arrow {
font-size: 24rpx;
margin-left: 12rpx;
opacity: 0.8;
}
.line {
width: 418rpx;
height: 4rpx;
+273
View File
@@ -0,0 +1,273 @@
<template>
<s-pages title="收支明细" :blue_bg="true" navPreset="float">
<view class="page" @click="filterOpen = false">
<view class="hero-card">
<view class="hero-left">
<view class="hero-title">未行权金额</view>
<view class="hero-amount">{{ $fen2yuan(totalAmount) }}</view>
</view>
<image class="hero-illustration" src="/static/icon/mingxi.svg" mode="aspectFit" />
</view>
<view class="detail-card">
<view class="detail-header">
<view class="detail-title">收支明细</view>
<view class="detail-filter" @click.stop="filterOpen = !filterOpen">
{{ filterOptions[filterIndex]?.text || '全部' }}
<text class="detail-arrow">▼</text>
</view>
<view class="detail-filter-menu" v-if="filterOpen" @click.stop>
<view
class="detail-filter-item"
v-for="(opt, i) in filterOptions"
:key="opt.value"
@click.stop="onFilterChange(i)"
>
{{ opt.text }}
</view>
</view>
</view>
<card_mescroll ref="cardPages" @upCallback="getList" :height="listHeight">
<view class="detail-item" v-for="(item, index) in detailList" :key="index">
<view class="detail-main">
<view class="detail-name">{{ getItemTitle(item) }}</view>
<view class="detail-time">{{ formatDate(item.createTime) }}</view>
</view>
<view class="detail-amount">
{{ getItemAmount(item) > 0 ? '+' : '' }}{{ $fen2yuan(getItemAmount(item)) }}
</view>
</view>
</card_mescroll>
</view>
</view>
</s-pages>
</template>
<script setup>
import { ref } from 'vue';
import { onShow } from '@dcloudio/uni-app';
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
import * as api from '@/sheep/api/home/pay';
import { formatDate, sourceTypeObj } from '@/sheep/helper/utils';
const totalAmount = ref(0);
const detailList = ref([]);
const cardPages = ref(null);
const filterOpen = ref(false);
const filterIndex = ref(0);
const filterOptions = [
// {
// value: 0,
// text: '全部',
// },
{
value: 1,
text: '佣金',
},
{
value: 2,
text: '收益',
},
{
value: 3,
text: '分红',
},
{
value: 4,
text: '其他',
},
];
const sysInfo = uni.getSystemInfoSync();
const listHeight =
sysInfo.windowHeight -
sysInfo.statusBarHeight -
uni.upx2px(88) -
uni.upx2px(280) -
uni.upx2px(32) -
uni.upx2px(40) +
'px';
const getHeaderData = async () => {
const res = await api.agentEarningsTrendNew({}).catch(() => ({ code: -1 }));
if (res.code === 0) {
totalAmount.value = res.data?.remainingEarningAll || 0;
}
};
const getList = async (mescroll) => {
const opt = filterOptions[filterIndex.value] || filterOptions[0];
const res = await api
.agentEarningsIncomeDetailsPage({
pageNo: mescroll.num,
pageSize: mescroll.size,
...(opt.value ? { transactionType: opt.value } : {}),
})
.catch(() => ({ code: -1 }));
if (res.code === 0) {
const list = res.data?.list || [];
if (mescroll.num === 1) detailList.value = [];
detailList.value = detailList.value.concat(list);
cardPages.value?.getState(true, list.length);
return;
}
cardPages.value?.getState(false);
};
const getItemTitle = (item) => {
return item?.remark || item?.title || sourceTypeObj[Number(item?.sourceType) || 1] || '未行权金额';
};
const getItemAmount = (item) => {
const raw = item?.totalEarnings ?? item?.amount ?? item?.price ?? item?.remainingEarning ?? 0;
const n = Number(raw);
return Number.isFinite(n) ? n : 0;
};
const onFilterChange = (i) => {
filterIndex.value = i;
filterOpen.value = false;
cardPages.value?.mescrollTrigger();
};
onShow(() => {
getHeaderData();
cardPages.value?.mescrollTrigger();
});
</script>
<style lang="scss" scoped>
.page {
padding: 32rpx 40rpx 0;
}
.hero-card {
height: 220rpx;
border-radius: 16rpx;
padding: 36rpx 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
// background: url("https://sycbuck.oss-cn-hangzhou.aliyuncs.com/app/home/agency2.png")
// center / 100% 100% no-repeat;
background: linear-gradient(135deg, #ffc6e6 0%, #fb7f33 100%);
margin-bottom: 32rpx;
}
.hero-left {
color: #ffffff;
}
.hero-title {
font-size: 36rpx;
line-height: 50rpx;
font-weight: 500;
// opacity: 0.75;
}
.hero-amount {
margin-top: 18rpx;
font-size: 68rpx;
line-height: 82rpx;
font-weight: 700;
}
.hero-illustration {
width: 220rpx;
height: 136rpx;
flex-shrink: 0;
filter: brightness(0) invert(1);
}
.detail-card {
background: rgba(255, 255, 255, 0.98);
border-radius: 24rpx 24rpx 0 0;
padding: 0 24rpx;
}
.detail-title {
font-size: 32rpx;
line-height: 110rpx;
color: #111111;
font-weight: 500;
}
.detail-header {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
height: 110rpx;
}
.detail-filter {
height: 52rpx;
line-height: 52rpx;
padding: 0 18rpx;
background: #f2f4f7;
border-radius: 16rpx;
font-size: 24rpx;
color: #111111;
display: flex;
align-items: center;
}
.detail-arrow {
margin-left: 10rpx;
font-size: 22rpx;
}
.detail-filter-menu {
position: absolute;
right: 0;
top: 110rpx;
width: 160rpx;
background: #f2f4f7;
border-radius: 16rpx;
z-index: 10;
overflow: hidden;
}
.detail-filter-item {
text-align: center;
line-height: 72rpx;
font-size: 26rpx;
color: #111111;
}
.detail-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 32rpx 0;
border-bottom: 2rpx solid #f1f2f5;
}
.detail-main {
flex: 1;
padding-right: 24rpx;
}
.detail-name {
font-size: 28rpx;
line-height: 40rpx;
color: #111111;
}
.detail-time {
margin-top: 10rpx;
font-size: 24rpx;
line-height: 34rpx;
color: #999999;
}
.detail-amount {
flex-shrink: 0;
font-size: 32rpx;
line-height: 46rpx;
color: #ee0a24;
font-weight: 500;
}
</style>
+4
View File
@@ -51,6 +51,10 @@
<span class="c_FF2D2D">*</span>
{{ `提现时间为${config.brokerageWithdrawTime}` }}
</view>
<view>
<span class="c_FF2D2D">*</span>
一天(24小时)内只可提现1次
</view>
</view>
</view>
<view class="submit-btn" @click="onSubmit">提现</view>
+7 -2
View File
@@ -19,7 +19,9 @@
<view class="flex-center">
<view class="fang"></view>
<view class="size28"
><span class="m-r-4">当日价格</span>{{ dataObj.todayPrice || 0 }}</view
><span class="m-r-4">当日价格</span>
{{ dataObj.todayPrice || 0 }}
</view
>
</view>
</view>
@@ -51,7 +53,10 @@
<view class="seed-card seed-card--summary m-b-50">
<view class="seed-summary__top">
<view class="seed-summary__label">当前价格</view>
<view class="seed-summary__price">{{ formatSeedPrice(dataObj.todayPrice) }}</view>
<view class="seed-summary__price">
<!-- {{ formatSeedPrice(dataObj.todayPrice) }} -->
**.****
</view>
</view>
<view class="seed-summary__divider"></view>
<view class="seed-summary__bottom">
+9 -1
View File
@@ -97,7 +97,7 @@
<image class="shop-summary-icon" src="/static/index/shop1.png" mode="aspectFit" />
</view>
<view class="shop-summary-info flex1">
<view class="shop-summary-title">{{ shopSummary.title }}</view>
<view class="shop-summary-title">{{ shopTitle }}</view>
<view class="shop-summary-id">ID:{{ shopSummary.shopId }}</view>
<!-- <view class="shop-summary-id">商品总数:{{ shopSummary.total }}</view> -->
</view>
@@ -170,6 +170,7 @@
<script setup>
import { ref, watch, computed } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import sheep from '@/sheep';
import * as api from '@/sheep/api/ai/index';
import card_pages from '@/components/card_pages/card_pages';
import card_payment from '@/components/card_payment/card_payment';
@@ -358,6 +359,13 @@
{ name: '我的店铺', id: 2 },
]);
const userStore = sheep.$store('user');
const shopTitle = computed(() => {
const name = String(userStore?.userInfo?.nickname || userStore?.userInfo?.mobile || '').trim();
if (!name) return '我的店铺';
return `${name}的店铺`;
});
const pageCommodity = ref(null);
const dataList = ref([]);
+52 -62
View File
@@ -4,71 +4,63 @@
<view class="share-btn" @tap="onShare">一键分享</view>
</template>
<view class="list-record-page">
<view class="hero">
<image class="hero-img" :src="cover || '/static/home/bc.png'" mode="aspectFill" />
</view>
<card_mescroll ref="cardPages" @upCallback="getList" :height="scrollHeight" :pageSize="pageSize">
<view class="hero">
<image class="hero-img" :src="cover || '/static/home/bc.png'" mode="aspectFill" />
</view>
<view class="record-list">
<view class="record-card" v-for="(item, i) in recordList" :key="item.id || i">
<view class="record-head flex-between">
<view class="record-title lineOne">{{ item.title }}</view>
<view class="record-status" :class="`status-${item.status}`">{{ item.statusText }}</view>
</view>
<view class="record-progress">
<view class="progress-bar">
<view class="progress" :style="{ width: `${item.progress}%` }"></view>
<view class="progress-percent">{{ formatPercent(item.progress) }}%</view>
<view class="record-list">
<view class="record-card" v-for="(item, i) in recordList" :key="item.id || i">
<view class="record-head flex-between">
<view class="record-title lineOne">{{ item.title }}</view>
<view class="record-status" :class="`status-${item.status}`">{{ item.statusText }}</view>
</view>
</view>
<view class="record-meta">
<view class="meta-row flex-row-end">
<view class="record-total-inline">
<!-- <view class="total-price">¥{{ formatMoney(item.total) }}</view> -->
<view class="record-progress">
<view class="progress-bar">
<view class="progress" :style="{ width: `${item.progress}%` }"></view>
<view class="progress-percent">{{ formatPercent(item.progress) }}%</view>
</view>
</view>
<view class="meta-row flex-between">
<view class="record-time">下单时间:{{ item.time }}</view>
<view class="record-qty">数量 {{ item.qty }}</view>
<view class="record-meta">
<view class="meta-row flex-row-end">
<view class="record-total-inline">
<!-- <view class="total-price">¥{{ formatMoney(item.total) }}</view> -->
</view>
</view>
<view class="meta-row flex-between">
<view class="record-time">下单时间:{{ item.time }}</view>
<view class="record-qty">数量 {{ item.qty }}</view>
</view>
</view>
</view>
</view>
</view>
</card_mescroll>
</view>
</s-pages>
</template>
<script setup>
import { reactive, ref } from 'vue';
import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import sheep from '@/sheep';
import { getAiShopPage } from '@/sheep/api/ai';
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
const skuId = ref('');
const cover = ref('');
const recordList = ref([]);
const state = reactive({
pageNo: 1,
pageSize: 10,
loading: false,
finished: false,
});
const cardPages = ref(null);
const pageSize = 10;
const scrollHeight = ref('100%');
onLoad((query) => {
skuId.value = query?.skuId ?? query?.shopId ?? '';
fetchList(true);
});
onPullDownRefresh(() => {
fetchList(true).finally(() => {
uni.stopPullDownRefresh();
});
});
onReachBottom(() => {
fetchList(false);
const sysInfo = uni.getSystemInfoSync();
scrollHeight.value =
sysInfo.windowHeight - sysInfo.statusBarHeight - uni.upx2px(88) + 'px';
});
const formatPercent = (value) => {
@@ -118,41 +110,35 @@
};
};
const fetchList = async (reset = false) => {
if (state.loading) return;
const getList = async (mescroll) => {
if (!skuId.value) {
uni.showToast({ title: '缺少 skuId', icon: 'none' });
if (mescroll?.num === 1) recordList.value = [];
cardPages.value?.getState(true, 0);
return;
}
if (!reset && state.finished) return;
state.loading = true;
try {
if (reset) {
state.pageNo = 1;
state.finished = false;
}
const res = await getAiShopPage({
skuId: String(skuId.value),
pageNo: String(state.pageNo),
pageSize: String(state.pageSize),
pageNo: String(mescroll?.num || 1),
pageSize: String(mescroll?.size || pageSize),
}).catch(() => ({ code: -1 }));
if (res?.code !== 0) return;
if (res?.code !== 0) {
cardPages.value?.getState(false);
return;
}
const list = Array.isArray(res?.data?.list) ? res.data.list : [];
if (!cover.value && list.length) {
if (mescroll?.num === 1 && list.length) {
const firstItem = Array.isArray(list?.[0]?.items) ? list[0].items[0] : null;
const picUrl = firstItem?.picUrl || '';
if (picUrl) cover.value = sheep.$url.cdn(picUrl);
}
const mapped = list.map(mapOrderToRecord);
if (reset) recordList.value = [];
if (mescroll?.num === 1) recordList.value = [];
recordList.value = recordList.value.concat(mapped);
if (list.length < state.pageSize) {
state.finished = true;
} else {
state.pageNo += 1;
}
cardPages.value?.getState(true, list.length);
} catch (e) {
cardPages.value?.getState(false);
} finally {
state.loading = false;
}
};
@@ -162,6 +148,10 @@
</script>
<style lang="scss" scoped>
:deep(.scon) {
overflow-y: hidden !important;
}
.list-record-page {
padding: 0 32rpx 32rpx;
min-height: 100%;
+8
View File
@@ -30,6 +30,14 @@ export const agentEarningsDetailPage = (params) => {
params: params,
});
};
// 收支明细 /member/app/agent-earnings/income-details/page
export const agentEarningsIncomeDetailsPage = (params) => {
return request({
url: '/member/app/agent-earnings/income-details/page',
method: 'GET',
params,
});
};
// 分红明细 member/app/dividend/detail/page
export const dividendDetailPage = (params) => {
return request({
+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1782266882731" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20202" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M959.35999999 944.24897417H79.03999998c-13.43999999 0-24.00000003-10.56000001-23.99999998-24.00000003V73.04897418c0-13.43999999 10.56000001-24.00000003 24.00000001-24.00000005h880.31999998c13.43999999 0 24.00000003 10.56000001 24.00000002 24.00000005v847.19999996c0 13.43999999-10.56000001 24.00000003-24.00000002 24.00000003z m-856.31999999-48.00000002h832.31999999V97.04897414H103.04v799.20000001z" fill="#dbdbdb" p-id="20203"></path><path d="M957.92 284.24897415H77.59999998c-13.43999999 0-24.00000003-10.56000001-23.99999999-24.00000001V73.04897418c0-13.43999999 10.56000001-24.00000003 23.99999999-24.00000005h880.32000002c13.43999999 0 24.00000003 10.56000001 24.00000001 24.00000005v187.2c0 13.43999999-10.56000001 24.00000003-24.00000001 23.99999997zM101.60000001 236.24897415h832.31999998V97.04897414H101.60000001v139.20000001z m201.59999999 372.48c-5.76 0-11.04-1.92-15.84-5.75999998-10.08-8.64000003-11.04-24.00000003-2.40000001-34.08000003l132.48-150.71999997c4.32-4.80000001 10.08-7.68 16.32000001-8.16000003 6.24-0.48 12.48000001 1.92 17.28 6.24000004l106.07999999 94.07999999 134.4-142.56000003c9.12-9.6 24.48-10.08 34.08000004-0.95999999 9.6 9.12 10.08 24.48 0.95999996 34.08l-150.24000001 159.36000002c-9.12 9.6-23.52 10.08-33.59999998 1.43999998L437.6 468.08897414l-116.63999999 132.48000001c-4.32 5.28000001-11.04 8.16-17.76000001 8.16000002z m-68.64000001 208.8c-12.96 0-24.00000003-10.56000001-23.99999999-24s10.56000001-24.00000003 23.99999999-24.00000001L804.80000001 764.24897418c12.96 0 24.00000003 10.56000001 23.99999999 23.99999997s-10.56000001 24.00000003-24.00000001 24.00000002l-570.23999998 5.27999998z m566.39999999-126.24000001H496.64000001c-13.43999999 0-24.00000003-10.56000001-24.00000002-23.99999997s10.56000001-24.00000003 24.00000002-24.00000002h304.31999997c13.43999999 0 24.00000003 10.56000001 24.00000002 24.00000003s-10.56000001 24.00000003-23.99999998 23.99999996z" fill="#dbdbdb" p-id="20204"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB