收藏页面基本完成,但是需要在平台页面完成后,测试一下加载多条是否正常

积分商城的静态页面完成
足迹页面完成,但是加载多条逻辑未完善
This commit is contained in:
wangzimeng 2025-07-24 17:54:16 +08:00
parent e597673831
commit 56d82c1b8b
7 changed files with 997 additions and 485 deletions

View File

@ -367,7 +367,7 @@
"meta": { "meta": {
"auth": true, "auth": true,
"sync": true, "sync": true,
"title": "商品收藏", "title": "我的收藏",
"group": "用户中心" "group": "用户中心"
} }
}, },
@ -379,7 +379,7 @@
"meta": { "meta": {
"auth": true, "auth": true,
"sync": true, "sync": true,
"title": "浏览记录", "title": "我的足迹",
"group": "用户中心" "group": "用户中心"
} }
}, },
@ -459,7 +459,7 @@
"meta": { "meta": {
"auth": true, "auth": true,
"sync": true, "sync": true,
"title": "用户积分", "title": "我的积分",
"group": "用户中心" "group": "用户中心"
} }
} }

View File

@ -1,77 +1,219 @@
<!-- 页面 --> <!-- 页面 -->
<template> <template>
<s-layout title="积分商城"> <s-layout title="积分商城">
<view class="ss-p-20"> <view class="container">
<view v-for="item in state.pagination.data" :key="item.id" class="ss-m-b-20"> <!-- 顶部信息 -->
<s-score-card <view class="conTop">
size="sl" <view class="textLine">
:data="item" <view class="fs30 bold c3" style="line-height: 26rpx;">当前积分</view>
priceColor="#FF3000" <view class="fs60 bold c3" style="margin-top: 30rpx;line-height: 60rpx;">6963</view>
@tap="sheep.$router.go('/pages/goods/score', { id: item.id })" <view class="scoreDetail" @click="toPage('/pages/user/wallet/score')">
></s-score-card> <view class="fs28 c9">积分明细</view>
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
src="https://jiangxiaoxian.0rui.cn/rightMore.png"></image>
</view> </view>
</view> </view>
<s-empty </view>
v-if="state.pagination.total === 0" <!-- tabs页签 -->
icon="/static/goods-empty.png" <view class="tabs-box">
text="暂无积分商品" <su-tabs
></s-empty> :list="tabMaps"
<uni-load-more @change="onChange"
v-if="state.pagination.total > 0" :scrollable="false"
:status="state.loadStatus" :current="currentTab"
:content-text="{ ></su-tabs>
contentdown: '上拉加载更多', </view>
}"
@tap="loadmore" <!-- 可兑换券列表 -->
/> <view class="exChangeBox">
<view class="couponsList">
<view class="list-item">
<image style="width: 330rpx;height: 200rpx;" src="https://jiangxiaoxian.0rui.cn/fullCoupon.png"></image>
<view class="item-text">
<view class="fs30 c3" style="margin: 0 auto;">优惠券满100减50</view>
<view class="exchangeBtn">
100积分兑换
</view>
</view>
</view>
<view class="list-item">
<image style="width: 330rpx;height: 200rpx;" src="https://jiangxiaoxian.0rui.cn/fullCoupon.png"></image>
<view class="item-text">
<view class="fs30 c3" style="margin: 0 auto;">优惠券满100减50</view>
<view class="exchangeBtn">
100积分兑换
</view>
</view>
</view>
<view class="list-item">
<image style="width: 330rpx;height: 200rpx;" src="https://jiangxiaoxian.0rui.cn/fullCoupon.png"></image>
<view class="item-text">
<view class="fs30 c3" style="margin: 0 auto;">优惠券满100减50</view>
<view class="exchangeBtn">
100积分兑换
</view>
</view>
</view>
</view>
</view>
<!-- 无数据展示
<view class="flex flex-column flex-start align-items"
v-if="feetHisList.length == 0" style="margin-top: 300rpx;">
<image src="https://jiangxiaoxian.0rui.cn/noneList.png" mode="" style="width: 180rpx;height: 180rpx;">
</image>
<view style="margin-top: 30rpx;font-size: 28rpx;color: #323232;">暂无数据信息</view>
</view>-->
</view>
</s-layout> </s-layout>
</template> </template>
<script setup> <script setup>
import sheep from '@/sheep'; import sheep from '@/sheep';
import { onLoad, onReachBottom } from '@dcloudio/uni-app'; import {
import { reactive } from 'vue'; onLoad,
onShow,
onReachBottom
} from '@dcloudio/uni-app';
import {
ref,
reactive
} from 'vue';
import _ from 'lodash'; import _ from 'lodash';
const state = reactive({ const tabMaps = [
pagination: { {
data: [], name: '优惠券',
current_page: 1, value: '0',
total: 1,
last_page: 1,
}, },
loadStatus: '', {
}); name: '次数券',
async function getData(page = 1, list_rows = 5) { value: '1',
state.loadStatus = 'loading'; },
let res = await sheep.$api.app.scoreShop.list({ ];
list_rows, const currentTab = ref(0)
page, //tabs
}); function onChange(e) {
if (res.code === 1) { console.log('onChange',e);
let couponlist = _.concat(state.pagination.data, res.data.data); currentTab.value = e.index
state.pagination = { console.log('切换tabs',currentTab.value);
...res.data, // getLogList();
data: couponlist,
};
if (state.pagination.current_page < state.pagination.last_page) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
}
}
//
function loadmore() {
if (state.loadStatus !== 'noMore') {
getData(state.pagination.current_page + 1);
} }
//
const toPage = (e) => {
uni.navigateTo({
url: e
})
} }
// //
onReachBottom(() => { onReachBottom(() => {
loadmore(); // loadmore();
}); });
onLoad(() => { onLoad(() => {
getData(); // getData();
}); });
</script> </script>
<style lang="scss" scoped>
.fs30 {
font-size: 30rpx;
}
.fs60 {
font-size: 60rpx;
}
.fs28 {
font-size: 28rpx;
}
.bold {
font-weight: bold;
}
.c3 {
color: #333333;
}
.c9 {
color: #999999;
}
.container {
background-color: #ffffff;
.conTop {
width: 100%;
height: 300rpx;
background-image: url('https://jiangxiaoxian.0rui.cn/scoreTopBack.png');
background-size: 100%;
.textLine {
position: relative;
top: 68rpx;
left: 60rpx;
display: block;
.scoreDetail {
margin-top: 20rpx;
display: flex;
justify-content: flex-start;
align-items: center;
}
}
}
.exChangeBox {
background-color: #ffffff;
width: 690rpx;
.couponsList {
width: 100%;
padding: 0 30rpx;
display: grid;
grid-template-columns: repeat(2, 1fr);;
grid-gap: 20px;
// display: flex;
// justify-content: center;
// align-items: center;
.list-item {
width: 330rpx;
border-radius: 18rpx;
box-shadow: 4rpx 4rpx 4rpx 4rpx rgba(153, 153, 153, 0.1);
.item-text {
padding: 30rpx;
.exchangeBtn {
background-color: #fcc74e;
height: 70rpx;
width: 270rpx;
border-radius: 223rpx;
align-items: center;
justify-content: center;
display: flex;
font-size: 28rpx;
line-height: 30rpx;
font-weight: 400;
}
}
}
}
}
}
</style>

View File

@ -1,240 +1,421 @@
<template> <template>
<s-layout title="商品收藏"> <s-layout title="我的收藏">
<view class="cart-box ss-flex ss-flex-col ss-row-between"> <view class="container">
<!-- 头部 --> <!-- tabs页签 -->
<view class="cart-header ss-flex ss-col-center ss-row-between ss-p-x-30"> <view class="tabs-box">
<view class="header-left ss-flex ss-col-center ss-font-26"> <su-tabs :list="tabMaps" @change="onChange" :scrollable="false" :current="currentTab"></su-tabs>
<text class="goods-number ui-TC-Main ss-flex">{{ state.pagination.total }}</text>
件商品
</view> </view>
<view class="header-right">
<button
v-if="state.editMode && state.pagination.total" <scroll-view @scrolltolower="onScrolltolower" :refresher-enabled="true" :refresher-triggered="homrS"
class="ss-reset-button" @refresherrefresh="onS" scroll-y="true" class="flex align-items"
@tap="state.editMode = false" style="height: 1250rpx;box-sizing: border-box;">
>
取消 <!-- 食堂招租 -->
</button> <view class="recommend-box" v-if="currentTab == 0">
<button <view class="rrecommList" v-for="(item,index) in collectRentList" :key="index">
v-if="!state.editMode && state.pagination.total" <view class="reListItem">
class="ss-reset-button ui-TC-Main" <!-- 左侧图片 -->
@tap="state.editMode = true" <view class="listItem-images">
>编辑</button <image v-if="item.recommend == 1"
> style="width: 77rpx;height: 36rpx;z-index: 100;position: relative;top: 34rpx;left: 0rpx;"
src="https://jiangxiaoxian.0rui.cn/hot.png"></image>
<image class="iamges-mainImg" :src="item.images[0]"></image>
</view>
<!-- 右侧内容 -->
<view class="listItem-contents">
<view class="title2" style="margin-bottom: 20rpx;">{{item.platform_title}}</view>
<scroll-view class="score-box">
<view class="fs11 flex cate">
<view class="cate-e" v-for="(e,i) in item.cate" :key="i">
<view v-show="e" class="status-tag " style="margin-right: 20rpx;">{{e}}
</view> </view>
</view> </view>
<!-- 内容 -->
<view class="cart-content"> <!-- <text v-show="item.cate[1]"
<view class="status-tag" style="margin-right: 20rpx;">{{item.cate[1]}}</text>
class="goods-box ss-r-10 ss-m-b-14" <text v-show="item.cate[2]"
v-for="item in state.pagination.data" class="status-tag">{{item.cate[2]}}</text> -->
:key="item.id" </view>
> </scroll-view>
<view class="ss-flex ss-col-center"> <view class="cons-third">
<label <view style="display: flex;">
class="check-box ss-flex ss-col-center ss-p-l-10" <image style="width: 24rpx;height: 24rpx;"
v-if="state.editMode" src="https://jiangxiaoxian.0rui.cn/locationList.png"></image>
@tap="onSelect(item.goods_id)" <view class="title3" style="margin-left: 10rpx;">{{item.address_city_text}}
>
<radio
:checked="state.selectedCollectList.includes(item.goods_id)"
color="var(--ui-BG-Main)"
style="transform: scale(0.8)"
@tap.stop="onSelect(item.goods_id)"
/>
</label>
<s-goods-item
:title="item.goods.title"
:img="item.goods.image"
:price="item.goods.price[0]"
:skuText="item.goods.subtitle"
priceColor="#FF3000"
:titleWidth="400"
@tap="
sheep.$router.go('/pages/goods/index', {
id: item.goods_id,
})
"
>
</s-goods-item>
</view> </view>
</view> </view>
</view> </view>
<!-- 底部 -->
<su-fixed bottom :val="0" placeholder v-show="state.editMode">
<view class="cart-footer ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom">
<view class="footer-left ss-flex ss-col-center">
<label class="check-box ss-flex ss-col-center ss-p-r-30" @tap="onSelectAll">
<radio
:checked="state.selectAll"
color="var(--ui-BG-Main)"
style="transform: scale(0.7)"
@tap.stop="onSelectAll"
/>
<view> 全选 </view>
</label>
</view> </view>
<view class="footer-right"> <!-- 右侧收藏 -->
<button <view>
class="ss-reset-button ui-BG-Main-Gradient pay-btn ss-font-28 ui-Shadow-Main" <image style="width: 44rpx;height: 44rpx;"
@tap="onCancel" src="https://jiangxiaoxian.0rui.cn/collected.png"></image>
>取消收藏</button <!-- <image style="width: 44rpx;height: 44rpx;" src="https://jiangxiaoxian.0rui.cn/unCollect.png"></image> -->
> <view class="fs24 Regular c3">取消收藏</view>
<!-- <view class="fs24 Regular c9">收藏</view> -->
</view> </view>
</view> </view>
</su-fixed>
</view> </view>
<uni-load-more </view>
v-if="state.pagination.total > 0"
:status="state.loadStatus"
:content-text="{ <!-- 平台课程 -->
contentdown: '上拉加载更多', <view class="exChangeBox" v-if="currentTab == 1">
}" <view class="couponsList" v-for="(item,index) in collectSchoolList" :key="index">
@tap="loadmore" <view class="list-item">
/> <image style="width: 330rpx;height: 200rpx;" :src="item.image">
<s-empty v-if="state.pagination.total === 0" text="暂无收藏" icon="/static/collect-empty.png" /> </image>
<view class="item-text">
<view class="fs30 c3" style="margin: 0 auto;">{{item.title}}</view>
<view class="exchangeBtn">
取消收藏
</view>
</view>
</view>
<!-- <view class="list-item">
<image style="width: 330rpx;height: 200rpx;" src="https://jiangxiaoxian.0rui.cn/fullCoupon.png">
</image>
<view class="item-text">
<view class="fs30 c3" style="margin: 0 auto;">优惠券满100减50</view>
<view class="exchangeBtn">
取消收藏
</view>
</view>
</view> -->
</view>
</view>
<!-- 无数据展示 -->
<view class="flex flex-column flex-start align-items" style="margin-top: 400rpx;"
v-if="( currentTab == 0 && collectRentList.length == 0) || (currentTab == 1 && collectSchoolList.length == 0)">
<image src="https://jiangxiaoxian.0rui.cn/noneList.png" mode=""
style="width: 520rpx;height: 259rpx;">
</image>
<view style="margin-top: 30rpx;font-size: 28rpx;color: #323232;">暂无数据信息</view>
</view>
</scroll-view>
</view>
</s-layout> </s-layout>
</template> </template>
<script setup> <script setup>
import sheep from '@/sheep'; import sheep from '@/sheep';
import { reactive } from 'vue'; import {
import { onLoad, onReachBottom } from '@dcloudio/uni-app'; reactive,
ref
} from 'vue';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import _ from 'lodash'; import _ from 'lodash';
const sys_navBar = sheep.$platform.navbar; const sys_navBar = sheep.$platform.navbar;
const pagination = {
data: [], const listQuery = ref({
current_page: 1, keywords: null,
total: 1, add_type: null,
last_page: 1, type: null,
}; my: null,
const state = reactive({ page: 1,
pagination: { rentPage: 1,
data: [], schoolPage: 1,
current_page: 1, limit: 10,
total: 1, cate_ids: '',
last_page: 1, province: null,
city: null,
district: null,
status: null,
recommend: null,
collect: null,
order: null,
nearby: null,
latitude: null,
longitude: '',
area: null,
})
// const
const tabMaps = [{
name: '食堂招租',
value: '0',
}, },
loadStatus: '', {
editMode: false, name: '平台学院',
selectedCollectList: [], value: '1',
selectAll: false, },
}); ];
const currentTab = ref(0)
async function getData(page = 1, list_rows = 10) { const collectRentList = ref([])
state.loadStatus = 'loading'; const rentCount = ref(0)
let res = await sheep.$api.user.goodsLog.list({ const collectSchoolList = ref([])
type: 'favorite', const schoolCount = ref(0)
list_rows, const homrS = ref(false)
page, //tabs
}); function onChange(e) {
if (res.code === 1) { console.log('onChange', e);
let orderList = _.concat(state.pagination.data, res.data.data); currentTab.value = e.index
state.pagination = { console.log('切换tabs', currentTab.value);
...res.data, if (currentTab.value == 0) {
data: orderList, getRentList();
};
if (state.pagination.current_page < state.pagination.last_page) {
state.loadStatus = 'more';
} else { } else {
state.loadStatus = 'noMore'; getSchoolList();
} }
} }
}
//
function formatPrice(e) {
return e.length === 1 ? e[0] : e.join('~');
}
// //
const onSelect = (id) => { async function getRentList() {
if (!state.selectedCollectList.includes(id)) { const res = await sheep.$api.rent.rentlist({
state.selectedCollectList.push(id); keywords: listQuery.value.keywords,
} else { page: listQuery.value.rentPage,
state.selectedCollectList.splice(state.selectedCollectList.indexOf(id), 1); limit: listQuery.value.limit,
} order: 'normal',
state.selectAll = state.selectedCollectList.length === state.pagination.data.length; status: 1,
}; recommend: 1,
// collect: 1,
const onSelectAll = () => {
state.selectAll = !state.selectAll;
if (!state.selectAll) {
state.selectedCollectList = [];
} else {
state.pagination.data.forEach((item) => {
if (state.selectedCollectList.includes(item.goods_id)) {
state.selectedCollectList.splice(state.selectedCollectList.indexOf(item.goods_id), 1);
}
state.selectedCollectList.push(item.goods_id);
}); });
console.log('招租收藏列表', res);
if (res.code == 1) {
collectRentList.value =[...collectRentList.value,...res.data.list];
rentCount.value = res.data.count
} else {
// Handle case where data is not in expected format
collectRentList.value = [];
uni.showToast({
title: res.msg,
icon: 'none'
})
} }
}; console.log('getList', collectRentList.value);
async function onCancel() {
if (state.selectedCollectList) {
state.selectedCollectList = state.selectedCollectList.toString();
const { code } = await sheep.$api.user.favorite.cancel(state.selectedCollectList);
if (code === 1) {
state.editMode = false;
state.selectedCollectList = [];
state.selectAll = false;
state.pagination = pagination;
getData();
} }
//
async function getSchoolList() {
const res = await sheep.$api.school.schoolList({
keywords: listQuery.value.keywords,
page: listQuery.value.schoolPage,
limit: listQuery.value.limit,
order: 'normal',
recommend: 1,
collect: 1,
});
console.log('平台课程收藏列表', res);
if (res.code == 1) {
collectSchoolList.value =[...collectSchoolList.value,...res.data.list];
schoolCount.value = res.data.count
} else {
// Handle case where data is not in expected format
collectSchoolList.value = [];
uni.showToast({
title: res.msg,
icon: 'none'
})
} }
console.log('平台课程收藏列表-222', collectSchoolList.value);
} }
// //
function loadmore() { function onScrolltolower() {
if (state.loadStatus !== 'noMore') { if (currentTab.value == 0) {
getData(state.pagination.current_page + 1); if (collectRentList.value.length < rentCount.value) {
listQuery.value.rentPage+=1;
getRentList();
}
} else {
if (collectSchoolList.value.length < schoolCount.value) {
listQuery.value.schoolPage+=1;
getSchoolList();
} }
} }
onReachBottom(() => {
loadmore(); }
});
function onS() {
homrS.value = true
}
onReachBottom(() => {});
onLoad(() => { onLoad(() => {
getData(); getRentList();
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.cart-box { .flex {
.cart-header { display: flex;
}
.flex-start {
align-items: flex-start;
}
.justify-center {
justify-content: center;
}
.align-items {
align-items: center;
}
.flex-column {
flex-flow: column;
}
.fs24 {
font-size: 24rpx;
}
.Regular {
font-weight: 400;
}
.c3 {
color: #333333;
}
.c9 {
color: #999999;
}
.container {
// background-color: #ffffff;
.recommend-box {
margin-top: 30rpx;
padding: 20rpx 30rpx;
.rrecommList {
margin-top: 30rpx;
// padding: 30rpx;
.reListItem {
background-color: #ffffff;
width: 640rpx;
height: 190rpx;
padding: 30rpx;
display: flex;
justify-content: flex-start;
align-items: center;
border-radius: 18rpx;
.listItem-images {
display: grid;
justify-content: flex-start;
.iamges-mainImg {
width: 190rpx;
height: 190rpx;
position: relative;
right: 0rpx;
bottom: 18rpx;
z-index: 1;
}
}
.listItem-contents {
margin-left: 20rpx;
.score-box {
display: flex;
.cate {
display: flex;
justify-content: flex-start;
align-items: center;
.cate-e {
.status-tag {
padding: 5rpx 15rpx;
border-radius: 5rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 22rpx;
background-color: rgba(247, 97, 0, 0.2);
// opacity: 0.2;
color: #F76100;
//flex-shrink: 0
}
}
}
}
.cons-third {
margin-top: 20rpx;
display: flex;
justify-content: space-around;
align-items: center;
}
}
}
}
}
.exChangeBox {
background-color: #ffffff;
width: 690rpx;
.couponsList {
width: 100%;
padding: 0 30rpx;
display: grid;
grid-template-columns: repeat(2, 1fr);
;
grid-gap: 20px;
// display: flex;
// justify-content: center;
// align-items: center;
.list-item {
width: 330rpx;
border-radius: 18rpx;
box-shadow: 4rpx 4rpx 4rpx 4rpx rgba(153, 153, 153, 0.1);
.item-text {
padding: 30rpx;
.exchangeBtn {
margin-top: 30rpx;
background-color: #ffffff;
border: 2rpx solid #999999;
height: 70rpx; height: 70rpx;
background-color: #f6f6f6; width: 270rpx;
width: 100%; border-radius: 223rpx;
position: fixed; align-items: center;
left: 0; justify-content: center;
top: v-bind('sys_navBar') rpx; display: flex;
z-index: 1000; color: #999999;
box-sizing: border-box; font-size: 28rpx;
line-height: 30rpx;
font-weight: 400;
} }
.cart-footer {
height: 100rpx;
background-color: #fff;
.pay-btn {
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
padding: 0 40rpx;
min-width: 200rpx;
} }
} }
.cart-content {
width: 100%;
margin-top: 70rpx;
padding: 0 20rpx;
box-sizing: border-box;
.goods-box {
background-color: #fff;
&:last-child {
margin-bottom: 40rpx;
}
} }
} }
} }
</style> </style>

View File

@ -29,64 +29,123 @@
</view>--> </view>-->
<!-- 内容 --> <!-- 内容 -->
<view class="cart-content"> <view class="cart-content">
<view <view class="goods-box ss-r-10 ss-m-b-14" v-for="(item, index) in feetHisList" :key="index">
class="goods-box ss-r-10 ss-m-b-14" <view class="dataBox">{{item.date_text}}</view>
v-for="item in state.pagination.data" <view class="rrecommList" v-for="(e,i) in item.log" :key="i">
:key="item.id" <view class="reListItem">
> <!-- 左侧图片 -->
<view class="ss-flex ss-col-center"> <view class="listItem-images">
<label <image v-if="e.information.recommend == 1"
class="check-box ss-flex ss-col-center ss-p-l-10" style="width: 77rpx;height: 36rpx;z-index: 100;position: relative;top: 34rpx;left: 0rpx;"
v-if="state.editMode" src="https://jiangxiaoxian.0rui.cn/hot.png"></image>
@tap="onSelect(item.goods_id)" <image class="iamges-mainImg" :src="e.information.images[0]"></image>
> </view>
<radio <!-- 右侧内容 -->
:checked="state.selectedCollectList.includes(item.goods_id)" <view class="listItem-contents">
color="var(--ui-BG-Main)" <view class="title2" style="margin-bottom: 20rpx;">{{e.information.platform_title}}</view>
style="transform: scale(0.8)" <scroll-view class="score-box">
@tap.stop="onSelect(item.goods_id)" <view class="fs11 flex cate">
/> <view class="cate-e" v-for="(w,q) in e.information.cate" :key="q">
</label> <view v-show="w" class="status-tag " style="margin-right: 20rpx;">{{w}}
<s-goods-item </view>
:title="item.goods.title" </view>
:img="item.goods.image" </view>
:price="item.goods.price[0]" </scroll-view>
:skuText="item.goods.subtitle" <view class="cons-third">
priceColor="#FF3000" <view style="display: flex;">
:titleWidth="400" <image style="width: 24rpx;height: 24rpx;"
@tap=" src="https://jiangxiaoxian.0rui.cn/locationList.png"></image>
sheep.$router.go('/pages/goods/index', { <view class="title3" style="margin-left: 10rpx;">{{e.information.address_city_text}}
id: item.goods_id, </view>
}) </view>
" <view class="title3">{{e.information.release_time_text}}</view>
> <view style="display: flex;">
</s-goods-item> <image style="width: 26rpx;height: 20rpx;"
src="https://jiangxiaoxian.0rui.cn/eye.png"></image>
<view class="title3" style="margin-left: 10rpx;">{{e.information.views}}</view>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<uni-load-more </view>
v-if="state.pagination.total > 0"
:status="state.loadStatus" <view class="flex flex-column flex-start align-items"
:content-text="{ v-if="feetHisList.length == 0" style="margin-top: 300rpx;">
<image src="https://jiangxiaoxian.0rui.cn/noneList.png" mode="" style="width: 180rpx;height: 180rpx;">
</image>
<view style="margin-top: 30rpx;font-size: 28rpx;color: #323232;">暂无数据信息</view>
</view>
</view>
<!-- <uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
contentdown: '上拉加载更多', contentdown: '上拉加载更多',
}" }" @tap="loadmore" />
@tap="loadmore" <s-empty v-if="state.pagination.total === 0" text="暂无浏览记录" icon="/static/collect-empty.png" /> -->
/>
<s-empty
v-if="state.pagination.total === 0"
text="暂无浏览记录"
icon="/static/collect-empty.png"
/>
</s-layout> </s-layout>
</template> </template>
<script setup> <script setup>
import sheep from '@/sheep'; import sheep from '@/sheep';
import { reactive } from 'vue'; import {
import { onLoad, onReachBottom } from '@dcloudio/uni-app'; ref,
reactive
} from 'vue';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import _ from 'lodash'; import _ from 'lodash';
import dayjs from 'dayjs';
const date = new Date();
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); //
const day = String(date.getDate()).padStart(2, '0'); //
const today = `${year}-${month}-${day}`;
// const today = ref('')
const feetHisList = ref([])
//
const listQuery = ref({
page: 1,
limit: 10,
addrLatitude: null,
addrLongitude: null,
address: null,
address1: null,
categoryId: null,
tags: '',
cate_ids: '',
area: null,
city: null,
province: null,
district: null,
keywords: null,
// district: '',
})
onLoad(() => {
// getData();
getFeetList();
});
async function getFeetList() {
const res = await sheep.$api.user.goodsLog.list({
keywords: listQuery.value.keywords,
page: listQuery.value.page,
limit: listQuery.value.limit,
});
console.log('足迹返值', res);
if (res.code == 1) {
feetHisList.value = res.data.list
console.log('足迹列表', feetHisList.value);
}
}
const sys_navBar = sheep.$platform.navbar; const sys_navBar = sheep.$platform.navbar;
const pagination = { const pagination = {
@ -139,12 +198,36 @@
onReachBottom(() => { onReachBottom(() => {
loadmore(); loadmore();
}); });
onLoad(() => {
getData();
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.title {
color: #3d3d3d;
font-size: 34rpx;
font-weight: 800;
line-height: 34rpx;
}
.intro {
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.title2 {
color: #3d3d3d;
font-size: 30rpx;
font-weight: 800;
line-height: 42rpx;
}
.title3 {
font-size: 20rpx;
font-weight: 400;
color: #999999;
line-height: 22rpx;
}
.cart-box { .cart-box {
.cart-header { .cart-header {
height: 70rpx; height: 70rpx;
@ -174,9 +257,89 @@
width: 100%; width: 100%;
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; box-sizing: border-box;
margin-top: 70rpx; margin-top: 30rpx;
.goods-box { .goods-box {
background-color: #fff; // background-color: #fff;
.dataBox {
margin: 30rpx;
}
.rrecommList {
margin-top: 30rpx;
// padding: 30rpx;
.reListItem {
background-color: #ffffff;
width: 640rpx;
height: 190rpx;
padding: 30rpx;
display: flex;
justify-content: flex-start;
align-items: center;
border-radius: 18rpx;
.listItem-images {
display: grid;
justify-content: flex-start;
.iamges-mainImg {
width: 190rpx;
height: 190rpx;
position: relative;
right: 0rpx;
bottom: 18rpx;
z-index: 1;
}
}
.listItem-contents {
margin-left: 20rpx;
.score-box {
display: flex;
.cate {
display: flex;
justify-content: flex-start;
align-items: center;
.cate-e {
.status-tag {
padding: 5rpx 15rpx;
border-radius: 5rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 22rpx;
background-color: rgba(247, 97, 0, 0.2);
// opacity: 0.2;
color: #F76100;
//flex-shrink: 0
}
}
}
}
.cons-third {
margin-top: 20rpx;
display: flex;
justify-content: space-around;
align-items: center;
}
}
}
}
&:last-child { &:last-child {
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }

View File

@ -13,6 +13,7 @@ import third from "./third"
import trade from "./trade" import trade from "./trade"
import user from "./user" import user from "./user"
import rent from "./rent" import rent from "./rent"
import school from "./school"
export default { export default {
activity, activity,
@ -30,5 +31,6 @@ export default {
trade, trade,
user, user,
rent, rent,
school,
} }

24
sheep/api/school.js Normal file
View File

@ -0,0 +1,24 @@
import request from '@/sheep/request';
export default {
// 招租列表
schoolList: (params) =>
request({
url: 'meal.classes/classes_list',
method: 'GET',
params,
custom: {
showLoading: false,
},
}),
// detail: (id, user_coupon_id) =>
// request({
// url: 'coupon/detail',
// method: 'GET',
// params: {
// id: id,
// user_coupon_id,
// },
// }),
};

View File

@ -40,7 +40,7 @@
{ {
width: addUnit(lineWidth), width: addUnit(lineWidth),
height: addUnit(lineHeight), height: addUnit(lineHeight),
background: lineColor ? lineColor : 'var(--ui-BG-Main)', background: lineColor ? lineColor : '#fcc74e',
backgroundSize: lineBgSize, backgroundSize: lineBgSize,
}, },
]" ]"
@ -56,7 +56,7 @@
transform: `translate(${lineOffsetLeft}px)`, transform: `translate(${lineOffsetLeft}px)`,
transitionDuration: `${firstTime ? 0 : duration}ms`, transitionDuration: `${firstTime ? 0 : duration}ms`,
height: addUnit(lineHeight), height: addUnit(lineHeight),
background: lineColor ? lineColor : 'var(--ui-BG-Main)', background: lineColor ? lineColor : '#fcc74e',
backgroundSize: lineBgSize, backgroundSize: lineBgSize,
}, },
]" ]"
@ -409,7 +409,7 @@
&__text { &__text {
font-size: 14px; font-size: 14px;
color: #606266; color: #999999;
white-space: nowrap !important; white-space: nowrap !important;
&--disabled { &--disabled {