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
+78 -23
View File
@@ -1,5 +1,11 @@
<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="top-area">
<view class="tab-header">
@@ -35,25 +41,34 @@
</view>
</view>
<view class="notice-card" v-if="mesArr.length && index === 0">
<maoScroll
:data="mesArr"
:lineHeight="60"
:animation="1000"
:animationScroll="800"
:showNum="3"
:mt="12"
>
<template #default="{ line }">
<view class="notice-item flex-center h100">
<view class="flex-center">
<view class="notice-marquee-viewport">
<view class="notice-marquee-track" :class="{ 'is-scroll': mesArr.length > 1 }">
<view class="notice-marquee-content">
<view
v-for="(line, i) in mesArr"
:key="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>
</template>
</maoScroll>
<view class="notice-marquee-content" v-if="mesArr.length > 1" aria-hidden="true">
<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 class="m-t-16 m-b-8" v-if="timeRound.length && index === 0">
@@ -71,7 +86,7 @@
</view>
</scroll-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 class="shop-summary-card">
<view class="shop-summary-top flex-row">
@@ -105,8 +120,7 @@
</view>
</view>
</view>
<!-- :style="{ marginTop: index === 1 ? '150rpx' : '0' }" -->
<view class="list-wrap flex1" >
<view class="list-wrap flex1" :style="{ marginTop: index === 1 ? '150rpx' : '0' }">
<card_pages
ref="pageCommodity"
:navList="nav"
@@ -155,7 +169,6 @@
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';
import maoScroll from '@/components/mao-scroll/mao-scroll';
import aistore_tab1 from './components/aistore_tab1.vue';
import aistore_tab2 from './components/aistore_tab2.vue';
@@ -194,7 +207,7 @@
const getCartList = async () => {
const res = await api.getShopCartList({});
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 addCar = (data) => {
payShow.value = true;
payShow.value = index.value === 0;
addShow.value = true;
setTimeout(() => {
paymentRef.value?.addCar(data);
@@ -326,7 +339,11 @@
index.value = i;
dataList.value = [];
pageCommodity.value?.downCallback();
payShow.value = !index.value;
if (index.value === 0) {
getCartList();
} else {
payShow.value = false;
}
};
const updatePrice = (val) => {
@@ -426,7 +443,7 @@
.notice-item {
height: 50rpx;
padding: 0 24rpx;
padding: 0 20rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.95);
}
@@ -443,7 +460,45 @@
flex: 1;
font-size: 22rpx;
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 {