123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <template>
- <view class="content">
- <custom-layout ref="layout" :showBottom="true" :back="{show:false,logoShow:true}" v-model="dataList"
- @layoutquery="onQueryList" @scroll="onScroll">
- <template #navBarLeft>
- <view class="search-bar_top ml10">
- <up-search placeholder="卡皮巴拉" :showAction="false" borderColor="rgba(0, 224, 176, 1)"
- v-model="searchValue"></up-search>
- </view>
- </template>
- <template #content>
- <!-- 导航标签 -->
- <up-sticky offset-top="0" customNav-height="0" :bg-color="scrollTop > 40 ? bgColor:''">
- <up-tabs :list="tabs" :line-height="0" :active-style="{'fontSize':'30rpx','fontWeight':'600'}"></up-tabs>
- </up-sticky>
- <view class="demo-uni-row">
- <view class="demo-uni-col" v-for="(item,index) in 10" :key="index">
- <view class="list_left">
- <up-image :show-loading="true" :src="ceshiimage" radius="20rpx" width="161.95rpx"
- height="155.87rpx"></up-image>
- </view>
- <view class="list_center">
- <view class="list_c_t">语气贴贴</view>
- <view class="list_c_b">
- <view v-for="(items,indexs) in 3" :key="indexs" class="list_c_b_item">
- <up-image :show-loading="true" :src="ceshiicon" radius="20rpx" width="114rpx"
- height="106rpx"></up-image>
- </view>
- </view>
- </view>
- <view class="list_right">
- <view class="mini_btn">下载</view>
- </view>
- </view>
- </view>
- </template>
- </custom-layout>
- </view>
- </template>
- <script setup>
- import {
- ref,
- onMounted,
- computed
- } from 'vue';
- import {
- onShow,
- onPageScroll
- } from "@dcloudio/uni-app";
- import {
- storeToRefs
- } from 'pinia'
- import {
- useSystemStore
- } from "@/store/index.js"
- const store = useSystemStore()
- // 引入组件
- // 引入状态管理参数
- const {
- bgColor
- } = storeToRefs(store)
- // 定义变量内容
- const ceshiimage = 'https://img.js.design/assets/img/66f77cb0c6ebda7a2a394736.png#846fab95fed56db08fcbc92025765a68'
- const ceshiicon = 'https://img.js.design/assets/img/66f7f501b50663ba27c0adc7.png#5e31df675fe6a23fe7219d6fe07b48b4'
- const searchValue = ref('卡皮巴拉')
- const tabs = ref([{
- state: -1,
- name: '热门',
- },
- {
- state: 1,
- name: '爱情'
- },
- {
- state: 2,
- name: '生日'
- },
- {
- state: 3,
- name: '友谊'
- },
- {
- state: 4,
- name: '手帐'
- },
- {
- state: 5,
- name: '宝宝'
- }, {
- state: 6,
- name: '婚礼'
- }, {
- state: 7,
- name: '校园'
- }
- ])
- const activeIndex = ref(-1)
- const tabClick = (index, name) => {
- console.log(index, name);
- }
- // 业务列表
- const dataList = ref([{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, ])
- const num = ref(1)
- const layout = ref()
- const onQueryList = (event) => {
- const {
- pageNo,
- pageSize
- } = event
- if (pageNo > 1) {
- if (num.value < 2) {
- num.value++
- layout.value.complete(dataList.value);
- } else {
- layout.value.complete([]);
- }
- } else {
- num.value = 2
- layout.value.complete(dataList.value);
- }
- }
- // 检测页面滚动
- const scrollTop = ref(0)
- const onScroll = (event) => {
- scrollTop.value = event
- }
- // 生命中期
- onMounted(() => {
- })
- </script>
- <style lang="scss" scoped>
- .search-bar_top {
- width: 46vw;
- }
- // ======导航标签right标签=======
- .tabs_list_box {
- padding: 0 26rpx;
- width: 100vw;
- box-sizing: border-box;
- background: var(--bgColor);
- .tabs-rigth-fixed {
- background: rgba(149, 250, 213, 1);
- border-radius: 50rpx;
- height: 40rpx;
- line-height: 40rpx;
- display: flex;
- align-items: center;
- padding: 0 6rpx;
- box-sizing: border-box;
- font-size: 20rpx;
- font-family: SmileySans-Oblique-2;
- text {
- font-weight: 600;
- }
- }
- }
- // ======liet样式=======
- .demo-uni-row {
- width: 100%;
- padding: 0 26rpx;
- margin-top: 20rpx;
- box-sizing: border-box;
- display: flex;
- flex-wrap: wrap;
- .demo-uni-col {
- width: 100%;
- border-radius: 13px;
- margin-bottom: 10rpx;
- background-color: #fff;
- padding: 13rpx 20rpx 13rpx 10rpx;
- box-sizing: border-box;
- display: flex;
- .list_left {
- width: 161.95rpx;
- height: 155.87rpx;
- }
- .list_center {
- width: calc(100% - 161.95rpx - 80rpx);
- height: 155.87rpx;
- padding: 0 10rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .list_c_t {
- font-size: 28rpx;
- font-weight: 600;
- letter-spacing: 0rpx;
- line-height: 38.42rpx;
- color: rgba(0, 0, 0, 1);
- text-align: left;
- vertical-align: top;
- margin-top: 10rpx;
- }
- .list_c_b {
- display: flex;
- .list_c_b_item {
- width: 114rpx;
- height: 106rpx;
- background-image: url(var(--iconImage));
- background-size: 100% 100%;
- }
- }
- }
- .list_right {
- width: 80rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- .mini_btn {
- width: 100%;
- border-radius: 50rpx;
- padding: 4rpx 0;
- background-color: #000;
- color: #fff;
- text-align: center;
- font-size: 24rpx;
- }
- }
- }
- }
- </style>
|