feat: 点底部 tab 的“AI店铺”时没开通就不跳转并提示
This commit is contained in:
+14
-4
@@ -41,7 +41,11 @@
|
||||
</view>
|
||||
<view class="notice-card" v-if="mesArr.length && index === 0">
|
||||
<view class="notice-marquee-viewport">
|
||||
<view class="notice-marquee-track" :class="{ 'is-scroll': mesArr.length > 1 }">
|
||||
<view
|
||||
class="notice-marquee-track"
|
||||
:class="{ 'is-scroll': mesArr.length > 1 }"
|
||||
:style="mesArr.length > 1 ? { '--marquee-duration': marqueeDuration } : {}"
|
||||
>
|
||||
<view class="notice-marquee-content">
|
||||
<view
|
||||
v-for="(line, i) in mesArr"
|
||||
@@ -164,7 +168,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { ref, watch, computed } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import * as api from '@/sheep/api/ai/index';
|
||||
import card_pages from '@/components/card_pages/card_pages';
|
||||
@@ -187,6 +191,11 @@
|
||||
const selectedTimeId = ref(null);
|
||||
const navName = ref('');
|
||||
const mesArr = ref([]);
|
||||
const marqueeDuration = computed(() => {
|
||||
const n = Array.isArray(mesArr.value) ? mesArr.value.length : 0;
|
||||
const seconds = Math.max(14, n * 2);
|
||||
return `${seconds}s`;
|
||||
});
|
||||
|
||||
function changeTimeRound(e) {
|
||||
navName.value = e.name;
|
||||
@@ -462,7 +471,8 @@
|
||||
}
|
||||
|
||||
.notice-text {
|
||||
flex: 1;
|
||||
// flex: 1;
|
||||
width: 300rpx;
|
||||
font-size: 22rpx;
|
||||
color: #111111;
|
||||
line-height: 50rpx;
|
||||
@@ -482,7 +492,7 @@
|
||||
transform: translateX(0);
|
||||
will-change: transform;
|
||||
&.is-scroll {
|
||||
animation: notice-marquee-move 16s linear infinite;
|
||||
animation: notice-marquee-move var(--marquee-duration, 16s) linear infinite;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user