1、首页:发布档口信息的按钮功能实现,并调整搜索框的样式大小
2、首页:定位下移至餐厅推荐旁,并把展示文字由全国更换为地区筛选(包括省市的组件中的文字修改。) 3、首页:平台推荐改为餐厅推荐 4、餐厅推荐的加载更多 5、首页金刚区的三个入口的底图更换,文字更换,展示位置调整将买酱料放到左侧
This commit is contained in:
parent
6f158c739d
commit
be19313044
22
pages.json
22
pages.json
@ -42,17 +42,6 @@
|
|||||||
"group": "商城"
|
"group": "商城"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/index/fabu",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "发布信息"
|
|
||||||
},
|
|
||||||
"meta": {
|
|
||||||
"sync": true,
|
|
||||||
"title": "发布信息",
|
|
||||||
"group": "商城"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/index/cart",
|
"path": "pages/index/cart",
|
||||||
"style": {
|
"style": {
|
||||||
@ -128,6 +117,17 @@
|
|||||||
"group": "商品"
|
"group": "商品"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "fabu",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "发布信息"
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"sync": true,
|
||||||
|
"title": "发布信息",
|
||||||
|
"group": "商城"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "rentEdit",
|
"path": "rentEdit",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -709,6 +709,7 @@
|
|||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
agreeAdd.value = false;
|
agreeAdd.value = false;
|
||||||
|
agreeShow.value = false;
|
||||||
selectTagslist.value = []
|
selectTagslist.value = []
|
||||||
tagSelectedNum.value = 0;
|
tagSelectedNum.value = 0;
|
||||||
form.value = {
|
form.value = {
|
@ -43,8 +43,9 @@
|
|||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
'error: ',
|
console.log('error: ', error);
|
||||||
error;
|
// 'error: ',
|
||||||
|
// error;
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,39 +7,32 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<!-- 顶部-地址&搜索 -->
|
<!-- 顶部-地址&搜索 -->
|
||||||
<view class="locTop">
|
<view class="locTop">
|
||||||
<view class="locTop-left" @click="state.showRegion = true">
|
<view class="locTop-left" @click="toPage('/packageA/search/index')">
|
||||||
<image style="width: 34rpx;height: 34rpx;"
|
<uni-section style="border-radius: 192rpx;padding: 0;width: 430rpx;height: 70rpx;"
|
||||||
src="https://jiangxiaoxian.0rui.cn/locationTop.png" mode=""></image>
|
type="line">
|
||||||
<view
|
|
||||||
style="margin-left: 10rpx;font-size: 30rpx;font-weight: 800;line-height: 45rpx;
|
|
||||||
white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 230rpx;">
|
|
||||||
{{state.model.city_name ? proCity:'全国' }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="locTop-right" @click="toPage('/packageA/search/index')">
|
|
||||||
<uni-section style="border-radius: 192rpx;padding: 0;" type="line">
|
|
||||||
<uni-search-bar style="border-radius: 192rpx;" radius="23" placeholder="搜索您需要的信息"
|
<uni-search-bar style="border-radius: 192rpx;" radius="23" placeholder="搜索您需要的信息"
|
||||||
bgColor="#ffffff" clearButton="none" cancelButton="none"
|
bgColor="#ffffff" clearButton="none" cancelButton="none" :readonly="true" />
|
||||||
:readonly="true" />
|
|
||||||
</uni-section>
|
</uni-section>
|
||||||
<!-- @confirm="search"-->
|
</view>
|
||||||
|
<view class="locTop-right" @click="toPage('/pages/canteenRent/fabu')">
|
||||||
|
发布档口信息
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 顶部-三个内容跳转 -->
|
<!-- 顶部-三个内容跳转 -->
|
||||||
<view class="navTop">
|
<view class="navTop">
|
||||||
<view class="navTop-left" @click="toPage('/pages/canteenRent/rentList')">
|
<view class="navTop-left" @click="toTabb('/pages/index/category')">
|
||||||
<view class="title" style="">食堂招租</view>
|
<!-- <view class="title" style="">食堂招租</view>
|
||||||
<view class="intro" style="color: #f42b2b;margin-top: 20rpx;">味揽商机 食载未来</view>
|
<view class="intro" style="color: #f42b2b;margin-top: 20rpx;">味揽商机 食载未来</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="navTop-right">
|
<view class="navTop-right">
|
||||||
<view class="navRight1" @click="toPage('/pages/school/schoolIndex')">
|
<view class="navRight1" @click="toPage('/pages/canteenRent/rentList')">
|
||||||
<view class="title" style="">平台学院</view>
|
<!-- <view class="title" style="">平台学院</view>
|
||||||
<view class="intro" style="color: #05b0b0;margin-top: 20rpx;">学知赋能成长</view>
|
<view class="intro" style="color: #05b0b0;margin-top: 20rpx;">学知赋能成长</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="navRight2" @click="toTabb('/pages/index/category')">
|
<view class="navRight2" @click="toPage('/pages/school/schoolIndex')">
|
||||||
<view class="title" style="">原料商城</view>
|
<!-- <view class="title" style="">原料商城</view>
|
||||||
<view class="intro" style="color: #f58f3d;margin-top: 20rpx;">优材好料直供</view>
|
<view class="intro" style="color: #f58f3d;margin-top: 20rpx;">优材好料直供</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -52,7 +45,8 @@
|
|||||||
indicator-color="#ffffff" :indicator-dots="false" :current="swiperCurrent"
|
indicator-color="#ffffff" :indicator-dots="false" :current="swiperCurrent"
|
||||||
@animationfinish="swiperChange">
|
@animationfinish="swiperChange">
|
||||||
<!-- v-for="(item, index) in swiperList" :key="index" @click="openSwiper(item)"-->
|
<!-- v-for="(item, index) in swiperList" :key="index" @click="openSwiper(item)"-->
|
||||||
<swiper-item style="margin: 0 auto;" v-for="(item, index) in bannerList" :key="index" @click="swiperJump(item)">
|
<swiper-item style="margin: 0 auto;" v-for="(item, index) in bannerList" :key="index"
|
||||||
|
@click="swiperJump(item)">
|
||||||
<view style="position: relative;width: 100%;height: 100%;">
|
<view style="position: relative;width: 100%;height: 100%;">
|
||||||
<!--<view class="fnon_tit"></view>
|
<!--<view class="fnon_tit"></view>
|
||||||
<view class="text">{{ item.title ? item.title : '' }}</view>
|
<view class="text">{{ item.title ? item.title : '' }}</view>
|
||||||
@ -75,7 +69,19 @@
|
|||||||
<view class="recommend-box">
|
<view class="recommend-box">
|
||||||
<!-- 推荐标题 -->
|
<!-- 推荐标题 -->
|
||||||
<view class="recom-titleBox">
|
<view class="recom-titleBox">
|
||||||
<view style="font-size: 38rpx;line-height: 38rpx;font-weight: 800;color: #333333;">平台推荐</view>
|
<view style="width: 60%;display: flex;justify-content: flex-start;align-items: center;">
|
||||||
|
<view style="font-size: 38rpx;line-height: 38rpx;font-weight: 800;color: #333333;">餐厅推荐
|
||||||
|
</view>
|
||||||
|
<view class="cityBox" @click="state.showRegion = true">
|
||||||
|
<view style="margin-right: 10rpx;font-size: 30rpx;font-weight: 800;line-height: 45rpx;
|
||||||
|
white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||||
|
{{ state.model.city_name ? state.model.city_name : '地区筛选'}}
|
||||||
|
</view>
|
||||||
|
<image style="width: 25rpx;height: 13rpx;"
|
||||||
|
src="https://jiangxiaoxian.0rui.cn/rentTriangle.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="title-more" @click="toPage('/pages/canteenRent/rentList')">
|
<view class="title-more" @click="toPage('/pages/canteenRent/rentList')">
|
||||||
<view style="font-size: 26rpx;line-height: 26rpx;font-weight: 400;color: #999999;">查看更多
|
<view style="font-size: 26rpx;line-height: 26rpx;font-weight: 400;color: #999999;">查看更多
|
||||||
</view>
|
</view>
|
||||||
@ -83,7 +89,12 @@
|
|||||||
src="https://jiangxiaoxian.0rui.cn/nextMore.png" mode=""></image>
|
src="https://jiangxiaoxian.0rui.cn/nextMore.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rrecommList" v-for="(item,index) in rentList" :key="index" @click="toPage(`/pages/canteenRent/rentDetail?id=` + item.id)">
|
<!-- 列表 -->
|
||||||
|
<scroll-view @scrolltolower="onScrolltolower" :refresher-enabled="true" :refresher-triggered="homrS"
|
||||||
|
@refresherrefresh="onS" scroll-y="true" class="flex align-items"
|
||||||
|
style="height: 800rpx;box-sizing: border-box;margin-top: 20rpx;">
|
||||||
|
<view class="rrecommList" v-for="(item,index) in rentList" :key="index"
|
||||||
|
@click="toPage(`/pages/canteenRent/rentDetail?id=` + item.id)">
|
||||||
<view class="reListItem">
|
<view class="reListItem">
|
||||||
<!-- 左侧图片 -->
|
<!-- 左侧图片 -->
|
||||||
<view class="listItem-images">
|
<view class="listItem-images">
|
||||||
@ -125,8 +136,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
@ -234,9 +248,9 @@
|
|||||||
...e,
|
...e,
|
||||||
};
|
};
|
||||||
|
|
||||||
if(state.model.province_name == state.model.city_name) {
|
if (state.model.province_name == state.model.city_name) {
|
||||||
proCity.value = state.model.province_name
|
proCity.value = state.model.province_name
|
||||||
}else {
|
} else {
|
||||||
// proCity.value = state.model.province_name + " " + state.model.city_name
|
// proCity.value = state.model.province_name + " " + state.model.city_name
|
||||||
proCity.value = state.model.province_name + state.model.city_name
|
proCity.value = state.model.province_name + state.model.city_name
|
||||||
}
|
}
|
||||||
@ -245,7 +259,8 @@
|
|||||||
|
|
||||||
console.log('onRegionConfirm33', state.model, proCity.value);
|
console.log('onRegionConfirm33', state.model, proCity.value);
|
||||||
listQuery.value.province = state.model.province_id
|
listQuery.value.province = state.model.province_id
|
||||||
listQuery.value.city = state.model.city_id
|
listQuery.value.city = state.model.city_id;
|
||||||
|
rentList.value = [];
|
||||||
getList()
|
getList()
|
||||||
state.showRegion = false;
|
state.showRegion = false;
|
||||||
};
|
};
|
||||||
@ -301,21 +316,21 @@
|
|||||||
|
|
||||||
//轮播图跳转
|
//轮播图跳转
|
||||||
function swiperJump(item) {
|
function swiperJump(item) {
|
||||||
console.log('轮播图跳转事件:',item.url);
|
console.log('轮播图跳转事件:', item.url);
|
||||||
const tabBarPages = [
|
const tabBarPages = [
|
||||||
'/pages/index/index',
|
'/pages/index/index',
|
||||||
'/pages/index/fabu',
|
'/pages/index/fabu',
|
||||||
'/pages/index/user'
|
'/pages/index/user'
|
||||||
];
|
];
|
||||||
console.log('tabbarsList:',tabBarPages);
|
console.log('tabbarsList:', tabBarPages);
|
||||||
if(item.type == "in") {
|
if (item.type == "in") {
|
||||||
console.log('跳进内页');
|
console.log('跳进内页');
|
||||||
if(tabBarPages.includes(item.url)) {
|
if (tabBarPages.includes(item.url)) {
|
||||||
console.log('导航页');
|
console.log('导航页');
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: item.url,
|
url: item.url,
|
||||||
})
|
})
|
||||||
}else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: item.url,
|
url: item.url,
|
||||||
})
|
})
|
||||||
@ -329,6 +344,11 @@
|
|||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
}, 800);
|
}, 800);
|
||||||
|
rentList.value = [];
|
||||||
|
state.model.city_name = '';
|
||||||
|
state.model.province_name = '';
|
||||||
|
state.currentCityIndex = [0, 0];
|
||||||
|
getList();
|
||||||
});
|
});
|
||||||
|
|
||||||
onPageScroll(() => {});
|
onPageScroll(() => {});
|
||||||
@ -336,10 +356,10 @@
|
|||||||
const bannerList = ref([])
|
const bannerList = ref([])
|
||||||
async function getBanner() {
|
async function getBanner() {
|
||||||
const res = await sheep.$api.home.homeBanner({});
|
const res = await sheep.$api.home.homeBanner({});
|
||||||
console.log('banner',res);
|
console.log('banner', res);
|
||||||
if(res.code == 1) {
|
if (res.code == 1) {
|
||||||
bannerList.value = res.data.list
|
bannerList.value = res.data.list
|
||||||
console.log('bannerList',bannerList.value);
|
console.log('bannerList', bannerList.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -373,13 +393,15 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const rentList = ref([])
|
const rentList = ref([]);
|
||||||
|
const rentCount = ref(0);
|
||||||
|
const homrS = ref(false)
|
||||||
//招租列表
|
//招租列表
|
||||||
async function getList() {
|
async function getList() {
|
||||||
const res = await sheep.$api.rent.rentlist({
|
const res = await sheep.$api.rent.rentlist({
|
||||||
keywords: listQuery.value.keywords,
|
keywords: listQuery.value.keywords,
|
||||||
page: listQuery.value.page,
|
page: listQuery.value.page,
|
||||||
limit: 25,
|
limit: 10,
|
||||||
cate_ids: listQuery.value.cate_ids,
|
cate_ids: listQuery.value.cate_ids,
|
||||||
order: 'normal',
|
order: 'normal',
|
||||||
status: 1,
|
status: 1,
|
||||||
@ -391,7 +413,10 @@
|
|||||||
console.log('getList', res);
|
console.log('getList', res);
|
||||||
|
|
||||||
if (res.data && res.data.list) {
|
if (res.data && res.data.list) {
|
||||||
rentList.value = res.data.list;
|
// rentList.value = res.data.list;
|
||||||
|
// rentCount.value = res.data.count
|
||||||
|
rentList.value = [...rentList.value, ...res.data.list];
|
||||||
|
rentCount.value = res.data.count;
|
||||||
|
|
||||||
// Safely process each item
|
// Safely process each item
|
||||||
rentList.value = rentList.value.map(item => {
|
rentList.value = rentList.value.map(item => {
|
||||||
@ -419,6 +444,42 @@
|
|||||||
console.log('getList', rentList.value);
|
console.log('getList', rentList.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//加载更多
|
||||||
|
function onScrolltolower() {
|
||||||
|
if (rentList.value.length < rentCount.value) {
|
||||||
|
listQuery.value.page += 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//下拉刷新
|
||||||
|
function onS() {
|
||||||
|
homrS.value = true
|
||||||
|
listQuery.value.keywords = '';
|
||||||
|
listQuery.value.cate_ids = '';
|
||||||
|
listQuery.value.province = '';
|
||||||
|
state.model.city_name = '';
|
||||||
|
listQuery.value.city = '';
|
||||||
|
state.currentCityIndex = [0, 0];
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...'
|
||||||
|
});
|
||||||
|
resetLists();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
homrS.value = false;
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
// 重置列表
|
||||||
|
function resetLists() {
|
||||||
|
// listQuery.value.keywords = ''
|
||||||
|
console.log('listQuery.value.keywords', listQuery.value.keywords);
|
||||||
|
listQuery.value.page = 1;
|
||||||
|
rentList.value = [];
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
// 隐藏原生tabBar
|
// 隐藏原生tabBar
|
||||||
uni.hideTabBar({
|
uni.hideTabBar({
|
||||||
fail: () => {},
|
fail: () => {},
|
||||||
@ -499,7 +560,8 @@
|
|||||||
// align-items: center;
|
// align-items: center;
|
||||||
|
|
||||||
.locTop-left {
|
.locTop-left {
|
||||||
width: 250rpx;
|
width: 430rpx;
|
||||||
|
height: 70rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
@ -507,9 +569,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.locTop-right {
|
.locTop-right {
|
||||||
width: 410rpx;
|
width: 203rpx;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
|
background-color: #ff5900;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 42rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 104rpx;
|
||||||
|
padding: 0rpx 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -522,7 +593,7 @@
|
|||||||
.navTop-left {
|
.navTop-left {
|
||||||
width: 270rpx;
|
width: 270rpx;
|
||||||
height: 350rpx;
|
height: 350rpx;
|
||||||
background-image: url('https://jiangxiaoxian.0rui.cn/rent.png');
|
background-image: url('https://jiangxiaoxian.0rui.cn/shoppingMall.png');
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
padding: 40rpx 30rpx 0rpx 30rpx;
|
padding: 40rpx 30rpx 0rpx 30rpx;
|
||||||
@ -538,7 +609,7 @@
|
|||||||
.navRight1 {
|
.navRight1 {
|
||||||
width: 270rpx;
|
width: 270rpx;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
background-image: url('https://jiangxiaoxian.0rui.cn/school.png');
|
background-image: url('https://jiangxiaoxian.0rui.cn/rent.png');
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
padding: 40rpx 30rpx 0rpx 30rpx;
|
padding: 40rpx 30rpx 0rpx 30rpx;
|
||||||
@ -548,7 +619,7 @@
|
|||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
width: 270rpx;
|
width: 270rpx;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
background-image: url('https://jiangxiaoxian.0rui.cn/shoppingMall.png');
|
background-image: url('https://jiangxiaoxian.0rui.cn/school.png');
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
padding: 40rpx 30rpx 0rpx 30rpx;
|
padding: 40rpx 30rpx 0rpx 30rpx;
|
||||||
@ -586,6 +657,7 @@
|
|||||||
.recommend-box {
|
.recommend-box {
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
|
height: 900rpx;
|
||||||
|
|
||||||
.recom-titleBox {
|
.recom-titleBox {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -593,6 +665,18 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
|
|
||||||
|
.cityBox {
|
||||||
|
width: 222rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
border-radius: 132rpx 132rpx 132rpx 132rpx;
|
||||||
|
border: 1rpx solid #999999;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.title-more {
|
.title-more {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -89,12 +89,12 @@
|
|||||||
child: [{
|
child: [{
|
||||||
id: '',
|
id: '',
|
||||||
level: "city",
|
level: "city",
|
||||||
name: "全国",
|
name: "全部地区",
|
||||||
pid: 0
|
pid: 0
|
||||||
}], // 确保有默认的子项
|
}], // 确保有默认的子项
|
||||||
id: '',
|
id: '',
|
||||||
level: "province",
|
level: "province",
|
||||||
name: "全国",
|
name: "全部地区",
|
||||||
pid: 0
|
pid: 0
|
||||||
}]
|
}]
|
||||||
const areaData = proFirst.concat(uni.getStorageSync('areaCity'))
|
const areaData = proFirst.concat(uni.getStorageSync('areaCity'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user