From 1bd999268a59f037b3a6861c0e255766e1920b4d Mon Sep 17 00:00:00 2001
From: shaojing <2901156235@qq.com>
Date: Mon, 27 May 2024 10:35:29 +0800
Subject: [PATCH] =?UTF-8?q?=E6=99=AF=E7=82=B9=E6=96=B0=E5=A2=9E=E5=88=86?=
=?UTF-8?q?=E7=B1=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/component/SearchHeader.wxml | 4 ++
pages/list/scene/index.js | 39 +++++++++++--
pages/list/scene/index.wxml | 23 ++++++--
pages/list/scene/index.wxss | 91 ++++++++++++++++++++++++++++---
4 files changed, 139 insertions(+), 18 deletions(-)
diff --git a/pages/component/SearchHeader.wxml b/pages/component/SearchHeader.wxml
index e763ada..3ffcdf9 100644
--- a/pages/component/SearchHeader.wxml
+++ b/pages/component/SearchHeader.wxml
@@ -4,6 +4,10 @@
+
+ |
+ 搜索
+
diff --git a/pages/list/scene/index.js b/pages/list/scene/index.js
index 6c7b01e..a0c865f 100644
--- a/pages/list/scene/index.js
+++ b/pages/list/scene/index.js
@@ -3,7 +3,6 @@ import commonApi from "../../../utils/https/common"
import util from "../../../utils/util"
let app = getApp()
Page({
-
/**
* 页面的初始数据
*/
@@ -13,7 +12,9 @@ Page({
latitude:"",
longitude:"",
keywords:'',
- area_id:''
+ area_id:'',
+ navList:[],
+ navIndex:0,
},
/**
@@ -37,12 +38,39 @@ Page({
latitude:res.latitude,
longitude:res.longitude
})
- that.getList()
+ // that.getList()
},
fail:function(){
- that.getList()
+ // that.getList()
}
})
+ // 获取头部景点分类
+ commonApi._post("scene/get_scene_tags",{
+ pid:4
+ }).then(res=>{
+ this.setData({
+ navList:res.data
+ })
+ console.log(this.data.navList);
+ this.getList()
+ })
+ },
+ search:function(){
+ this.setData({
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ changeType:function (e) {
+ console.log(e);
+ this.setData({
+ navIndex:e.currentTarget.dataset.index,
+ list:[],
+ total:1
+ })
+ console.log(this.data.navIndex);
+ this.getList()
},
search:function(e){
this.setData(e.detail);
@@ -60,7 +88,8 @@ Page({
let list = this.data.list;
if(list.length>=this.data.total) return;
commonApi._post("scene/get_scene_by_tag",{
- tag_id:"4",
+ // tag_id:"4",
+ tag_id:this.data.navList[this.data.navIndex].id,
limit:10,
lon:this.data.longitude,
lat:this.data.latitude,
diff --git a/pages/list/scene/index.wxml b/pages/list/scene/index.wxml
index cbb3e41..18b337e 100644
--- a/pages/list/scene/index.wxml
+++ b/pages/list/scene/index.wxml
@@ -5,25 +5,38 @@
产品产品产
-->
+
+
+
+
+
+ {{item.name}}
+
+
+
- {{item.garden_flag_text}}
+
{{item.title}}
{{item}}
- {{item.address}}
+
- 距您直线距离{{item.distance}}
-
+
+ {{item.distance}}
+
+
+ {{item.address}}
+
¥{{item.price?item.price/100:0}}起
-
+
暂无内容
\ No newline at end of file
diff --git a/pages/list/scene/index.wxss b/pages/list/scene/index.wxss
index c6f453d..41ba0b2 100644
--- a/pages/list/scene/index.wxss
+++ b/pages/list/scene/index.wxss
@@ -31,18 +31,18 @@
align-items: center;
margin: 40rpx 25rpx;
margin-top: 0;
- justify-content: space-between;
+ /* justify-content: space-between; */
position: relative;
}
.item .info {
flex: 1;
}
.item image {
- width: 233rpx;
- height: 233rpx;
+ width: 186rpx;
+ height: 186rpx;
border-radius: 11rpx;
display: block;
- margin-right: 24rpx;
+ margin-right: 26rpx;
flex-shrink: 0;
}
.item .no-text {
@@ -79,13 +79,16 @@
}
.tag {
color: #0B898E;
- font-size: 20rpx;
- margin-right: 30rpx;
+ font-size: 23rpx;
+ margin-right: 20rpx;
position: relative;
- line-height: 20rpx;
+ line-height: 32rpx;
white-space: nowrap;
overflow-x: hidden;
text-overflow: ellipsis;
+ padding: 5rpx 9rpx;
+ background: #E6F3F3;
+ border-radius: 7rpx;
}
.tags .tag::after {
content: "1";
@@ -124,4 +127,76 @@
.price-box .price text:nth-child(3){
font-size: 20rpx;
color: #8D8D8D;
-}
\ No newline at end of file
+}
+
+.topImg {
+ width: 750rpx;
+ height: 266.67rpx;
+}
+
+.navBox {
+ display: flex;
+ padding: 14.67rpx 0 9.33rpx 26rpx;
+ border-bottom: 1px solid #E0E0E0;
+ overflow-x: scroll;
+ flex-wrap: nowrap;
+}
+
+.nav {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 30.67rpx;
+ padding: 12rpx 13.5rpx 16.67rpx;
+ flex-shrink: 0;
+}
+
+.seld-nav {
+ border-radius: 13rpx;
+ border: 1px solid #0B898E;
+}
+
+.nav image {
+ width: 80.67rpx;
+ height: 80.67rpx;
+}
+
+.nav-text {
+ font-weight: 500;
+ font-size: 27rpx;
+ color: #7C8594;
+ margin-top: 20.67rpx;
+}
+
+.seld-nav-text {
+ margin-top: 20.67rpx;
+ font-weight: bold;
+ font-size: 27rpx;
+ color: #0B898E;
+}
+
+.right-info {
+ padding: 10.67rpx 0 7.33rpx;
+}
+
+.title-box,.title-header{
+ background: #ffff;
+}
+
+.bg-box,.bg-box .title-header {
+ background: transparent;
+ color: #ccc;
+}
+
+.title-header {
+ position: fixed;
+ left: 0;
+ right: 0;
+ display: flex;
+ top: 0;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 32rpx;
+ line-height: 90rpx;
+ z-index: 2;
+}