feat: 添加ai店铺-列表记录、金种子图表样式调整

This commit is contained in:
2026-06-02 11:31:12 +08:00
parent 910212dcac
commit 1fe0a6351c
11 changed files with 406 additions and 61 deletions
+1 -1
View File
@@ -313,7 +313,7 @@
.card { .card {
background: #fff;//#ffefe5; background: #fff;//#ffefe5;
border-radius: 12rpx; border-radius: 12rpx;
// padding: 24rpx 20rpx; padding: 24rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
} }
+4 -1
View File
@@ -48,6 +48,9 @@
</view> </view>
</view> </view>
</view> </view>
<view class="flex-row ju-flex-end" v-if="props.index != 5">
<view class="size24 c32">已优惠¥{{ fen2yuan(props.data.randomDiscountPrice) }}</view>
</view>
<view class="flex-row ju-flex-end" v-if="props.index != 5"> <view class="flex-row ju-flex-end" v-if="props.index != 5">
<view class="flex-center size24">{{ `共${props.data.productCount}件商品 合计: ` <view class="flex-center size24">{{ `共${props.data.productCount}件商品 合计: `
}} }}
@@ -208,4 +211,4 @@
.btnItem1 { .btnItem1 {
background: #F2F2F2; background: #F2F2F2;
} }
</style> </style>
+11
View File
@@ -43,6 +43,17 @@
"group": "商城" "group": "商城"
} }
}, },
{
"path": "pages/index/listRecord",
"style": {
"navigationBarTitleText": "列表记录"
},
"meta": {
"sync": true,
"title": "列表记录",
"group": "商城"
}
},
{ {
"path": "pages/index/user", "path": "pages/index/user",
"style": { "style": {
+7 -7
View File
@@ -71,9 +71,9 @@
}).then((res) => { }).then((res) => {
settlementInfo.value = res.data || {}; settlementInfo.value = res.data || {};
if (proxy.$fen2yuan(settlementInfo?.price?.payPrice || 0) >= 5000) { // if (proxy.$fen2yuan(settlementInfo?.price?.payPrice || 0) >= 5000) {
proxy.utils.toast('订单金额不能超过5000元'); // proxy.utils.toast('订单金额不能超过5000元');
} // }
if (settlementInfo.value?.items?.length) { if (settlementInfo.value?.items?.length) {
settlementInfo.value.items.forEach((e) => { settlementInfo.value.items.forEach((e) => {
e.skuArr = e.items; e.skuArr = e.items;
@@ -88,10 +88,10 @@
}); });
}; };
const sub = async () => { const sub = async () => {
if (proxy.$fen2yuan(settlementInfo?.price?.payPrice || 0) >= 5000) { // if (proxy.$fen2yuan(settlementInfo?.price?.payPrice || 0) >= 5000) {
proxy.utils.toast('订单金额不能超过5000元, 请重新选择商品'); // proxy.utils.toast('订单金额不能超过5000元, 请重新选择商品');
return; // return;
} // }
if (!addressId.value) return proxy.utils.toast('请选择地址'); if (!addressId.value) return proxy.utils.toast('请选择地址');
let res: any = await SpuApi.createOrder({ id: addressId.value }); let res: any = await SpuApi.createOrder({ id: addressId.value });
if (res.code === 0) { if (res.code === 0) {
+4 -4
View File
@@ -187,10 +187,10 @@
sheep.$helper.toast('请先选择商品'); sheep.$helper.toast('请先选择商品');
return; return;
} }
if (fen2yuan(state.totalPriceSelected) >= 5000) { // if (fen2yuan(state.totalPriceSelected) >= 5000) {
sheep.$helper.toast('订单金额不能超过5000元, 请重新选择商品'); // sheep.$helper.toast('订单金额不能超过5000元, 请重新选择商品');
return; // return;
} // }
await validateDeliveryType(state.selectedList.map((item) => item.spu).map((spu) => spu.id)); await validateDeliveryType(state.selectedList.map((item) => item.spu).map((spu) => spu.id));
sheep.$router.go('/pages/order/confirm', { sheep.$router.go('/pages/order/confirm', {
data: JSON.stringify({ data: JSON.stringify({
+33 -16
View File
@@ -183,7 +183,7 @@
</view> </view>
</view> </view>
<view class="seed-card seed-card--valuation m-b-20"> <view class="seed-card--valuation m-b-20">
<view class="seed-card__header"> <view class="seed-card__header">
<view class="seed-card__left"> <view class="seed-card__left">
<uni-icons type="info" size="18" color="#e54035" /> <uni-icons type="info" size="18" color="#e54035" />
@@ -425,7 +425,7 @@
itemHeight: 5, itemHeight: 5,
data: ['分红池', '底价存池'], data: ['分红池', '底价存池'],
}, },
color: ['rgba(238, 10, 36, 0.55)', 'rgba(247, 119, 46, 0.55)'], color: ['#FF4E00', '#4260FA'],
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
@@ -449,8 +449,15 @@
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
data: [], data: [],
itemStyle: { color: '#4260FA' },
lineStyle: { color: 'transparent', width: 2 }, lineStyle: { color: 'transparent', width: 2 },
areaStyle: { color: 'rgba(247, 119, 46, 0.25)' }, areaStyle: {
opacity: 1,
color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
{ offset: 0, color: '#2E8DFA' },
{ offset: 1, color: '#4260FA' },
]),
},
}, },
{ {
name: '分红池', name: '分红池',
@@ -459,8 +466,15 @@
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
data: [], data: [],
itemStyle: { color: '#FF4E00' },
lineStyle: { color: 'transparent', width: 2 }, lineStyle: { color: 'transparent', width: 2 },
areaStyle: { color: 'rgba(238, 10, 36, 0.18)' }, areaStyle: {
opacity: 1,
color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
{ offset: 0, color: '#FD9D72' },
{ offset: 1, color: '#FF4E00' },
]),
},
}, },
], ],
touchMoveThreshold: 10, touchMoveThreshold: 10,
@@ -795,8 +809,8 @@
} }
.seed-card__title { .seed-card__title {
font-size: 30rpx; font-size: 25rpx;
font-weight: 700; font-weight: bold;
color: #585654; color: #585654;
line-height: 1.2; line-height: 1.2;
} }
@@ -929,38 +943,41 @@
} }
.valuation-formula { .valuation-formula {
margin-top: 18rpx; width: 70%;
padding: 18rpx 20rpx; margin: 18rpx auto;
background: #fff6f5; padding: 8rpx 0rpx;
border-radius: 8rpx; background: linear-gradient(to bottom right, #2c8cfa 0%, #3d5efb 100%);
border-radius: 12rpx;
font-size: 30rpx; font-size: 30rpx;
color: #585654; color: #ffffff;
display: flex; display: flex;
align-items: baseline; align-items: baseline;
justify-content: center;
flex-wrap: wrap; flex-wrap: wrap;
gap: 6rpx; gap: 6rpx;
} }
.valuation-formula__v { .valuation-formula__v {
font-weight: 800; font-weight: 800;
color: #e54035; color: #ffffff;
} }
.valuation-formula__sub { .valuation-formula__sub {
font-size: 22rpx; font-size: 22rpx;
color: #bbbbbb; color: rgba(255, 255, 255, 0.85);
margin-right: 6rpx; margin-right: 6rpx;
} }
.valuation-formula__eq { .valuation-formula__eq {
font-weight: 700; font-weight: 700;
color: #585654; color: rgba(255, 255, 255, 0.95);
} }
.valuation-desc { .valuation-desc {
margin-top: 14rpx; margin-top: 14rpx;
font-size: 24rpx; padding-left: 40rpx;
color: #bbbbbb; font-size: 20rpx;
color: #5d5b5b;
line-height: 1.5; line-height: 1.5;
} }
</style> </style>
+78 -23
View File
@@ -1,5 +1,11 @@
<template> <template>
<s-pages title="AI店铺" :pink_bg="false" navPreset="blue" tabbar="/pages/index/aiStore" :showLeftButton="false"> <s-pages
title="AI店铺"
:pink_bg="false"
navPreset="blue"
tabbar="/pages/index/aiStore"
:showLeftButton="false"
>
<view class="ai-store-page h100 flex-column"> <view class="ai-store-page h100 flex-column">
<view class="top-area"> <view class="top-area">
<view class="tab-header"> <view class="tab-header">
@@ -35,25 +41,34 @@
</view> </view>
</view> </view>
<view class="notice-card" v-if="mesArr.length && index === 0"> <view class="notice-card" v-if="mesArr.length && index === 0">
<maoScroll <view class="notice-marquee-viewport">
:data="mesArr" <view class="notice-marquee-track" :class="{ 'is-scroll': mesArr.length > 1 }">
:lineHeight="60" <view class="notice-marquee-content">
:animation="1000" <view
:animationScroll="800" v-for="(line, i) in mesArr"
:showNum="3" :key="line.id || i"
:mt="12" class="notice-item notice-marquee-item flex-center h100"
> >
<template #default="{ line }">
<view class="notice-item flex-center h100">
<view class="flex-center">
<view class="notice-icon flex-center shrink"> <view class="notice-icon flex-center shrink">
<uni-icons type="person-filled" color="#2556EC" size="16" /> <uni-icons type="person-filled" color="#2556EC" size="16" />
</view> </view>
<view class="notice-text lineOne" v-html="line.messageContent"></view> <view class="notice-text lineOne" v-html="line.messageContent"></view>
</view> </view>
</view> </view>
</template> <view class="notice-marquee-content" v-if="mesArr.length > 1" aria-hidden="true">
</maoScroll> <view
v-for="(line, i) in mesArr"
:key="`dup-${line.id || i}`"
class="notice-item notice-marquee-item flex-center h100"
>
<view class="notice-icon flex-center shrink">
<uni-icons type="person-filled" color="#2556EC" size="16" />
</view>
<view class="notice-text lineOne" v-html="line.messageContent"></view>
</view>
</view>
</view>
</view>
</view> </view>
<view class="m-t-16 m-b-8" v-if="timeRound.length && index === 0"> <view class="m-t-16 m-b-8" v-if="timeRound.length && index === 0">
@@ -71,7 +86,7 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view style="padding: 120rpx 0" v-if="index === 1&&false"> <view style="padding: 120rpx 0" v-if="index === 1">
<view style="position: relative"> <view style="position: relative">
<view class="shop-summary-card"> <view class="shop-summary-card">
<view class="shop-summary-top flex-row"> <view class="shop-summary-top flex-row">
@@ -105,8 +120,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- :style="{ marginTop: index === 1 ? '150rpx' : '0' }" --> <view class="list-wrap flex1" :style="{ marginTop: index === 1 ? '150rpx' : '0' }">
<view class="list-wrap flex1" >
<card_pages <card_pages
ref="pageCommodity" ref="pageCommodity"
:navList="nav" :navList="nav"
@@ -155,7 +169,6 @@
import * as api from '@/sheep/api/ai/index'; import * as api from '@/sheep/api/ai/index';
import card_pages from '@/components/card_pages/card_pages'; import card_pages from '@/components/card_pages/card_pages';
import card_payment from '@/components/card_payment/card_payment'; import card_payment from '@/components/card_payment/card_payment';
import maoScroll from '@/components/mao-scroll/mao-scroll';
import aistore_tab1 from './components/aistore_tab1.vue'; import aistore_tab1 from './components/aistore_tab1.vue';
import aistore_tab2 from './components/aistore_tab2.vue'; import aistore_tab2 from './components/aistore_tab2.vue';
@@ -194,7 +207,7 @@
const getCartList = async () => { const getCartList = async () => {
const res = await api.getShopCartList({}); const res = await api.getShopCartList({});
if (res.code === 0) { if (res.code === 0) {
payShow.value = Boolean(res.data.length || addShow.value); payShow.value = index.value === 0 && Boolean(res.data.length || addShow.value);
} }
}; };
@@ -315,7 +328,7 @@
const paymentRef = ref(null); const paymentRef = ref(null);
const addCar = (data) => { const addCar = (data) => {
payShow.value = true; payShow.value = index.value === 0;
addShow.value = true; addShow.value = true;
setTimeout(() => { setTimeout(() => {
paymentRef.value?.addCar(data); paymentRef.value?.addCar(data);
@@ -326,7 +339,11 @@
index.value = i; index.value = i;
dataList.value = []; dataList.value = [];
pageCommodity.value?.downCallback(); pageCommodity.value?.downCallback();
payShow.value = !index.value; if (index.value === 0) {
getCartList();
} else {
payShow.value = false;
}
}; };
const updatePrice = (val) => { const updatePrice = (val) => {
@@ -426,7 +443,7 @@
.notice-item { .notice-item {
height: 50rpx; height: 50rpx;
padding: 0 24rpx; padding: 0 20rpx;
border-radius: 999rpx; border-radius: 999rpx;
background: rgba(255, 255, 255, 0.95); background: rgba(255, 255, 255, 0.95);
} }
@@ -443,7 +460,45 @@
flex: 1; flex: 1;
font-size: 22rpx; font-size: 22rpx;
color: #111111; color: #111111;
line-height: 60rpx; line-height: 50rpx;
}
.notice-marquee-viewport {
overflow: hidden;
height: 50rpx;
display: flex;
align-items: center;
border-radius: 30rpx;
}
.notice-marquee-track {
display: inline-flex;
align-items: center;
transform: translateX(0);
will-change: transform;
&.is-scroll {
animation: notice-marquee-move 16s linear infinite;
}
}
.notice-marquee-content {
display: inline-flex;
align-items: center;
flex-shrink: 0;
}
.notice-marquee-item {
flex-shrink: 0;
margin-right: 20rpx;
}
@keyframes notice-marquee-move {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-50%);
}
} }
.time-scroll { .time-scroll {
+19 -2
View File
@@ -1,6 +1,11 @@
<template> <template>
<view class="tab2-wrap p-x-32 p-t-16 p-b-24"> <view class="tab2-wrap p-x-32 p-b-24">
<view class="shop-card m-b-24" v-for="(v, i) in list" :key="v.id || i"> <view
class="shop-card m-b-24"
v-for="(v, i) in mockList"
:key="v.id || i"
@tap="toListRecord(v)"
>
<view class="shop-card-inner"> <view class="shop-card-inner">
<view class="shop-card-top"> <view class="shop-card-top">
<view class="shop-name lineOne">{{ v.name }}</view> <view class="shop-name lineOne">{{ v.name }}</view>
@@ -93,6 +98,18 @@
if (!Number.isFinite(num)) return '0.00'; if (!Number.isFinite(num)) return '0.00';
return num.toFixed(2); return num.toFixed(2);
}; };
const toListRecord = (item) => {
const shopId = item?.id ?? '';
const name = item?.name ?? '';
const cover = item?.cover ?? '';
const url =
'/pages/index/listRecord' +
`?shopId=${encodeURIComponent(String(shopId))}` +
`&name=${encodeURIComponent(String(name))}` +
`&cover=${encodeURIComponent(String(cover))}`;
uni.navigateTo({ url });
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
+234
View File
@@ -0,0 +1,234 @@
<template>
<s-pages title="列表记录" :pink_bg="false" navPreset="light">
<view class="list-record-page">
<view class="share-btn" :style="{ top: shareTop }" @tap="onShare">
一键分享
</view>
<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">{{ item.statusText }}</view>
</view>
<view class="record-progress">
<view class="progress-bar">
<view class="progress" :style="{ width: `${item.progress}%` }"></view>
</view>
</view>
<view class="record-meta">
<view class="meta-row flex-row-end">
<view class="record-qty">数量 {{ item.qty }}</view>
</view>
<view class="meta-row flex-between">
<view class="record-time">下单时间:{{ item.time }}</view>
<view class="record-total-inline">
<view class="total-label">总计</view>
<view class="total-price">¥{{ formatMoney(item.total) }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</s-pages>
</template>
<script setup>
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
const statusBarHeight = uni.getSystemInfoSync()?.statusBarHeight || 0;
const shareTop = `${statusBarHeight + 8}px`;
const shopId = ref('');
const name = ref('');
const cover = ref('');
const recordList = ref([
{
id: 1,
title: '卓玛阳光防断洗发水',
statusText: '已完成',
progress: 72,
qty: 137,
time: '2026-05-27 12:37',
total: 3000,
},
{
id: 2,
title: '卓玛阳光防断洗发水',
statusText: '已完成',
progress: 72,
qty: 137,
time: '2026-05-27 12:37',
total: 3000,
},
{
id: 3,
title: '卓玛阳光防断洗发水',
statusText: '已完成',
progress: 72,
qty: 137,
time: '2026-05-27 12:37',
total: 3000,
},
]);
onLoad((query) => {
shopId.value = query?.shopId ?? '';
name.value = query?.name ?? '';
// cover.value = query?.cover ?? '';
if (name.value) {
recordList.value = recordList.value.map((r) => ({ ...r, title: name.value }));
}
});
const formatMoney = (value) => {
const num = Number(value);
if (!Number.isFinite(num)) return '0.00';
return num.toFixed(2);
};
const onShare = () => {
uni.showToast({ title: '分享功能开发中', icon: 'none' });
};
</script>
<style lang="scss" scoped>
.list-record-page {
padding: 0 32rpx 32rpx;
min-height: 100%;
box-sizing: border-box;
}
.share-btn {
position: fixed;
right: 24rpx;
z-index: 99;
height: 56rpx;
padding: 0 18rpx;
border-radius: 18rpx;
background: rgba(255, 106, 74, 0.18);
color: #ff6a4a;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: center;
}
.hero {
margin-top: 18rpx;
border-radius: 26rpx;
overflow: hidden;
background: #ffffff;
}
.hero-img {
width: 100%;
height: 340rpx;
display: block;
}
.record-list {
margin-top: 18rpx;
}
.record-card {
background: #ffffff;
border-radius: 24rpx;
padding: 24rpx;
margin-bottom: 18rpx;
box-shadow: 0 16rpx 40rpx rgba(0, 0, 0, 0.06);
}
.record-head {
align-items: center;
gap: 16rpx;
}
.record-title {
flex: 1;
font-size: 34rpx;
font-weight: 700;
color: #111111;
}
.record-status {
flex-shrink: 0;
font-size: 24rpx;
color: #8a8a8a;
}
.record-progress {
margin-top: 18rpx;
}
.progress-bar {
width: 60%;
height: 20rpx;
border-radius: 999rpx;
background: linear-gradient(90deg, #2c63ff 0%, #ff3b30 100%);
overflow: hidden;
}
.progress {
height: 13rpx;
margin: 3rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.92);
}
.record-meta {
margin-top: 18rpx;
display: flex;
flex-direction: column;
gap: 12rpx;
}
.meta-row {
align-items: baseline;
}
.record-total-inline {
display: flex;
align-items: baseline;
gap: 10rpx;
flex-shrink: 0;
}
.record-time {
font-size: 24rpx;
color: #111111;
flex: 1;
min-width: 0;
}
.record-qty {
font-size: 24rpx;
color: #333333;
}
.record-total {
margin-top: 18rpx;
align-items: baseline;
gap: 10rpx;
}
.total-label {
font-size: 24rpx;
color: #111111;
}
.total-price {
font-size: 34rpx;
font-weight: 800;
color: #ff3b30;
}
</style>
+7 -7
View File
@@ -188,10 +188,10 @@
// 提交订单 // 提交订单
function onConfirm() { function onConfirm() {
if (fen2yuan(state.orderInfo.price.payPrice) >= 5000) { // if (fen2yuan(state.orderInfo.price.payPrice) >= 5000) {
sheep.$helper.toast('订单金额不能超过5000元, 请重新选择商品'); // sheep.$helper.toast('订单金额不能超过5000元, 请重新选择商品');
return; // return;
} // }
if (addressState.value.deliveryType === 1 && !addressState.value.addressInfo.id) { if (addressState.value.deliveryType === 1 && !addressState.value.addressInfo.id) {
sheep.$helper.toast('请选择收货地址'); sheep.$helper.toast('请选择收货地址');
return; return;
@@ -282,9 +282,9 @@
if (state.orderInfo.address) { if (state.orderInfo.address) {
addressState.value.addressInfo = state.orderInfo.address; addressState.value.addressInfo = state.orderInfo.address;
} }
if (fen2yuan(state.orderInfo.price.payPrice) >= 5000) { // if (fen2yuan(state.orderInfo.price.payPrice) >= 5000) {
sheep.$helper.toast('订单金额不能超过5000元'); // sheep.$helper.toast('订单金额不能超过5000元');
} // }
return code; return code;
} }
+8
View File
@@ -93,6 +93,14 @@ export const getBankList = (params) => {
params, params,
}); });
}; };
// 添加银行卡 /member/user/bank/update
export const addBank = (data) => {
return request({
url: '/member/user/bank/create',
method: 'POST',
data,
})
}
//获取待释放列表 //获取待释放列表
export const getReleaseList = (params) => { export const getReleaseList = (params) => {
return request({ return request({