feat:ai店铺添加滚动列表
This commit is contained in:
+71
-2
@@ -34,6 +34,27 @@
|
||||
<uni-icons type="search" color="#FFFFFF" size="18" />
|
||||
</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">
|
||||
<scroll-view scroll-x class="time-scroll">
|
||||
@@ -62,8 +83,21 @@
|
||||
:oneShow="true"
|
||||
>
|
||||
<template #content>
|
||||
<aistore_tab1 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" />
|
||||
<aistore_tab1
|
||||
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>
|
||||
</card_pages>
|
||||
</view>
|
||||
@@ -87,6 +121,7 @@
|
||||
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';
|
||||
|
||||
@@ -104,6 +139,7 @@
|
||||
const timeRound = ref([]);
|
||||
const selectedTimeId = ref(null);
|
||||
const navName = ref('');
|
||||
const mesArr = ref([]);
|
||||
|
||||
function changeTimeRound(e) {
|
||||
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(() => {
|
||||
getSpuTimeList();
|
||||
getCartList();
|
||||
getMessageList();
|
||||
});
|
||||
|
||||
const update = () => {
|
||||
@@ -323,6 +365,33 @@
|
||||
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 {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
|
||||
Reference in New Issue
Block a user