feat:ai店铺添加滚动列表

This commit is contained in:
2026-06-01 17:35:42 +08:00
parent 6e6d41a25c
commit 4c09e97178
2 changed files with 73 additions and 4 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
<view class="container"> <view class="container">
<view class="card balance-card"> <view class="card balance-card">
<view class="balance-label">当前可提现金额</view> <view class="balance-label">当前钱包余额</view>
<view class="balance-value">{{ $fen2yuan(walletBalanceCents || 0) }}</view> <view class="balance-value">{{ $fen2yuan(walletBalanceCents || 0) }}</view>
</view> </view>
@@ -107,7 +107,7 @@
const refreshWallet = async () => { const refreshWallet = async () => {
const res = await payApi.getWallet().catch(() => ({ code: -1 })); const res = await payApi.getWallet().catch(() => ({ code: -1 }));
if (res?.code === 0) walletBalanceCents.value = res?.data?.withdrawAmount ?? 0; if (res?.code === 0) walletBalanceCents.value = res?.data?.balance ?? 0;
}; };
const onAmountBlur = () => { const onAmountBlur = () => {
+71 -2
View File
@@ -34,6 +34,27 @@
<uni-icons type="search" color="#FFFFFF" size="18" /> <uni-icons type="search" color="#FFFFFF" size="18" />
</view> </view>
</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-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>
<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">
<scroll-view scroll-x class="time-scroll"> <scroll-view scroll-x class="time-scroll">
@@ -62,8 +83,21 @@
:oneShow="true" :oneShow="true"
> >
<template #content> <template #content>
<aistore_tab1 v-if="index === 0" :list="dataList" @addCar="addCar" @update="update" @shipment="shipment" /> <aistore_tab1
<aistore_tab2 v-if="index === 1" :list="dataList" :source="index" @addCar="addCar" @update="update" @shipment="shipment" /> v-if="index === 0"
:list="dataList"
@addCar="addCar"
@update="update"
@shipment="shipment"
/>
<aistore_tab2
v-if="index === 1"
:list="dataList"
:source="index"
@addCar="addCar"
@update="update"
@shipment="shipment"
/>
</template> </template>
</card_pages> </card_pages>
</view> </view>
@@ -87,6 +121,7 @@
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';
@@ -104,6 +139,7 @@
const timeRound = ref([]); const timeRound = ref([]);
const selectedTimeId = ref(null); const selectedTimeId = ref(null);
const navName = ref(''); const navName = ref('');
const mesArr = ref([]);
function changeTimeRound(e) { function changeTimeRound(e) {
navName.value = e.name; navName.value = e.name;
@@ -128,9 +164,15 @@
} }
}; };
const getMessageList = async () => {
const res = await api.getMessageList({ pageNo: 1, pageSize: 10 }).catch(() => ({ code: -1 }));
mesArr.value = res?.code === 0 ? res?.data || [] : [];
};
onShow(() => { onShow(() => {
getSpuTimeList(); getSpuTimeList();
getCartList(); getCartList();
getMessageList();
}); });
const update = () => { const update = () => {
@@ -323,6 +365,33 @@
background: linear-gradient(to bottom right, #2c8cfa 0%, #3d5efb 100%); background: linear-gradient(to bottom right, #2c8cfa 0%, #3d5efb 100%);
} }
.notice-card {
margin-top: 18rpx;
padding: 0 40rpx;
}
.notice-item {
height: 50rpx;
padding: 0 24rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.95);
}
.notice-icon {
width: 34rpx;
height: 34rpx;
border-radius: 50%;
background: rgba(37, 86, 236, 0.12);
margin-right: 16rpx;
}
.notice-text {
flex: 1;
font-size: 22rpx;
color: #111111;
line-height: 60rpx;
}
.time-scroll { .time-scroll {
width: 100%; width: 100%;
white-space: nowrap; white-space: nowrap;