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

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

View File

@ -1,8 +1,8 @@
<template> <template>
<s-layout title="我的足迹" :bgStyle="{ color: '#f2f2f2' }"> <s-layout title="我的足迹" :bgStyle="{ color: '#f2f2f2' }">
<view class="cart-box ss-flex ss-flex-col ss-row-between"> <view class="cart-box ss-flex ss-flex-col ss-row-between">
<!-- 头部 --> <!-- 头部 -->
<!-- <view class="cart-header ss-flex ss-col-center ss-row-between ss-p-x-30"> <!-- <view class="cart-header ss-flex ss-col-center ss-row-between ss-p-x-30">
<view class="header-left ss-flex ss-col-center ss-font-26"> <view class="header-left ss-flex ss-col-center ss-font-26">
<text class="goods-number ui-TC-Main ss-flex"> <text class="goods-number ui-TC-Main ss-flex">
@ -27,200 +27,363 @@
</button> </button>
</view> </view>
</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;"
</view> src="https://jiangxiaoxian.0rui.cn/eye.png"></image>
</view> <view class="title3" style="margin-left: 10rpx;">{{e.information.views}}</view>
</view> </view>
</view>
</view> </view>
<uni-load-more </view>
v-if="state.pagination.total > 0" </view>
:status="state.loadStatus"
:content-text="{ </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>
<!-- <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-layout>
<s-empty
v-if="state.pagination.total === 0"
text="暂无浏览记录"
icon="/static/collect-empty.png"
/>
</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,
import _ from 'lodash'; reactive
} from 'vue';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import _ from 'lodash';
import dayjs from 'dayjs';
const sys_navBar = sheep.$platform.navbar; const date = new Date();
const pagination = { const year = date.getFullYear();
data: [], const month = String(date.getMonth() + 1).padStart(2, '0'); //
current_page: 1, const day = String(date.getDate()).padStart(2, '0'); //
total: 1,
last_page: 1,
};
const state = reactive({
pagination: {
data: [],
current_page: 1,
total: 1,
last_page: 1,
},
loadStatus: '',
editMode: false,
selectedCollectList: [],
selectAll: false,
});
async function getData(page = 1, list_rows = 10) { const today = `${year}-${month}-${day}`;
state.loadStatus = 'loading'; // const today = ref('')
let res = await sheep.$api.user.goodsLog.list({
type: 'views',
list_rows,
page,
});
if (res.code === 1) {
let orderList = _.concat(state.pagination.data, res.data.data);
state.pagination = {
...res.data,
data: orderList,
};
if (state.pagination.current_page < state.pagination.last_page) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
}
}
//
// const feetHisList = ref([])
function loadmore() { //
if (state.loadStatus !== 'noMore') { const listQuery = ref({
getData(state.pagination.current_page + 1); page: 1,
} limit: 10,
} addrLatitude: null,
onReachBottom(() => { addrLongitude: null,
loadmore(); address: null,
}); address1: null,
onLoad(() => { categoryId: null,
getData(); 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 pagination = {
data: [],
current_page: 1,
total: 1,
last_page: 1,
};
const state = reactive({
pagination: {
data: [],
current_page: 1,
total: 1,
last_page: 1,
},
loadStatus: '',
editMode: false,
selectedCollectList: [],
selectAll: false,
});
async function getData(page = 1, list_rows = 10) {
state.loadStatus = 'loading';
let res = await sheep.$api.user.goodsLog.list({
type: 'views',
list_rows,
page,
});
if (res.code === 1) {
let orderList = _.concat(state.pagination.data, res.data.data);
state.pagination = {
...res.data,
data: orderList,
};
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);
}
}
onReachBottom(() => {
loadmore();
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.cart-box { .title {
.cart-header { color: #3d3d3d;
height: 70rpx; font-size: 34rpx;
background-color: #f6f6f6; font-weight: 800;
width: 100%; line-height: 34rpx;
position: fixed; }
left: 0;
top: v-bind('sys_navBar') rpx; .intro {
z-index: 1000; font-size: 24rpx;
box-sizing: border-box; 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-header {
height: 70rpx;
background-color: #f6f6f6;
width: 100%;
position: fixed;
left: 0;
top: v-bind('sys_navBar') rpx;
z-index: 1000;
box-sizing: border-box;
}
.cart-footer { .cart-footer {
height: 100rpx; height: 100rpx;
background-color: #fff; background-color: #fff;
.pay-btn { .pay-btn {
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
border-radius: 40rpx; border-radius: 40rpx;
padding: 0 40rpx; padding: 0 40rpx;
min-width: 200rpx; min-width: 200rpx;
} }
} }
.cart-content { .cart-content {
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 {
background-color: #fff;
&:last-child {
margin-bottom: 40rpx;
}
}
}
}
.title-card { .goods-box {
padding: 36rpx 0 46rpx 20rpx; // 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;
}
}
}
}
.img-box { &:last-child {
width: 164rpx; margin-bottom: 40rpx;
height: 164rpx; }
}
}
}
.order-img { .title-card {
width: 164rpx; padding: 36rpx 0 46rpx 20rpx;
height: 164rpx;
}
}
.check-box { .img-box {
height: 100%; width: 164rpx;
} height: 164rpx;
.title-text { .order-img {
font-size: 28rpx; width: 164rpx;
font-weight: 500; height: 164rpx;
color: #333333; }
} }
.params-box { .check-box {
.params-title { height: 100%;
height: 38rpx; }
background: #f4f4f4;
border-radius: 2rpx;
font-size: 24rpx;
font-weight: 400;
color: #666666;
}
}
.price-text { .title-text {
color: $red; font-size: 28rpx;
font-family: OPPOSANS; font-weight: 500;
} color: #333333;
} }
</style>
.params-box {
.params-title {
height: 38rpx;
background: #f4f4f4;
border-radius: 2rpx;
font-size: 24rpx;
font-weight: 400;
color: #666666;
}
}
.price-text {
color: $red;
font-family: OPPOSANS;
}
}
</style>

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 {