jiazhipeng 1 year ago
parent
commit
0c61222316
  1. 14
      pages/list/theatre/index.js
  2. 30
      pages/list/theatre/index.wxml
  3. 102
      pages/list/theatre/index.wxss
  4. 2
      utils/util.js

14
pages/list/theatre/index.js

@ -9,6 +9,7 @@ Page({
*/
data: {
list:[],
tagList: [], // 父标签6
total:1,
type:1,
sort:["","weight","distance","weight","price"],
@ -27,6 +28,7 @@ Page({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
// this.getTags()
this.getList();
},
search:function(e){
@ -101,6 +103,18 @@ Page({
this.getList();
},
// 获取子标签
getTags () {
commonApi._post("",{
tag_id:"6",
}).then(res=>{
let resData = res.data.list || []
this.setData({
tagList:resData
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

30
pages/list/theatre/index.wxml

@ -1,20 +1,30 @@
<!--pages/list/theatre/index.wxml-->
<wxs src="../../../utils/filter.wxs" module="tool" />
<search bind:onload="search"></search>
<view class="sale-types">
<view class="sale-type{{type==1?' active':''}}" bindtap="changeType" data-type="1">综合排序</view>
<view class="sale-type{{type==2?' active':''}}" bindtap="changeType" data-type="2">距离最近</view>
<view class="sale-type{{type==3?' active':''}}" bindtap="changeType" data-type="3">销量最高</view>
<view class="sale-type{{type==4?' active':''}}" bindtap="changeType" data-type="4">价格最低</view>
<view class="my-header-search">
<search bind:onload="search" transparent="1"></search>
<image class="heaimg" src="https://static.ticket.sz-trip.com/uploads/20241118/5540525af7880d15a3899f56f9000237.png" mode="widthFix"></image>
<view class="sale-types no-scrollbar">
<view class="sale-type{{type==1?' active':''}}" bindtap="changeType" data-type="1">全部</view>
<view class="sale-type{{type==2?' active':''}}" bindtap="changeType" data-type="2">距离最近</view>
<view class="sale-type{{type==3?' active':''}}" bindtap="changeType" data-type="3">销量最高</view>
<view class="sale-type{{type==4?' active':''}}" bindtap="changeType" data-type="4">价格最低</view>
<view class="sale-type{{type==3?' active':''}}" bindtap="changeType" data-type="3">销量最高</view>
<view class="sale-type{{type==4?' active':''}}" bindtap="changeType" data-type="4">价格最低</view>
</view>
</view>
<view style="height:87rpx"></view>
<view style="height:580rpx"></view>
<view bindtap="gotoDetail" data-item="{{item}}" class="item" wx:for="{{list}}">
<image src="{{item.headimg}}" mode="aspectFill"></image>
<view class="info textOver">
<view class="textOver title">{{item.title}}</view>
<view class="info">
<view class="textOver2 title">{{item.title}}</view>
<view class="textOver subtitle">{{item.subtitle?item.subtitle:""}}</view>
<view class="textOver subtitle">{{item.supplier_address}}</view>
<view class="tags textOver">
<view class="tag" wx:for="{{item.display_tags}}">{{item}}</view>
<!-- <view class="tag" wx:for="{{item.display_tags}}">{{item}}</view> -->
<view class="price"><text>¥</text><text>{{item.price?item.price/100:0}}</text><text>起</text></view>
</view>
</view>

102
pages/list/theatre/index.wxss

@ -1,56 +1,63 @@
/* pages/list/theatre/index.wxss */
page{
background: white;
}
.my-header-search{
background: white;
position: fixed;
top: 0;
left: 0;
right: 0;
}
.my-header-search .bg-box .title-header{
color: #999;
}
.my-header-search .title-header .icon-fanhui1{
color: #333 !important;
}
.my-header-search .heaimg{
width: 100%;
display: block;
}
.sale-types {
display: flex;
justify-content: space-around;
align-items: center;
height: 86rpx;
position: fixed;
left: 0;
right: 0;
border-bottom: 1rpx solid #ccc;
font-size: 29rpx;
color: #333;
background: white;
overflow-x: auto;
overflow-y: hidden;
padding:36rpx 27rpx 44rpx;
}
.sale-type {
position: relative;
width: 25%;
text-align: center;
height: 86rpx;
line-height: 86rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 29rpx;
color: #111111;
padding: 9rpx 18rpx;
flex-shrink: 0;
margin-right: 7rpx;
}
.sale-type.active {
color: #000;
font-size: 33rpx;
font-weight: 500;
}
.sale-type.active::after {
content: "1";
font-size: 0;
display: block;
position: absolute;
width: 46rpx;
height: 5rpx;
background: #0B898E;
border-radius: 3rpx;
left: 50%;
margin-left: -23rpx;
bottom: 0;
border-radius: 30rpx;
border: 1px solid #0B898E;
color: #0B898E;
font-weight: bold;
}
.item {
margin: 30rpx 25rpx;
margin: 0rpx 27rpx 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 15rpx 13rpx;
box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1);
border-radius: 10rpx;
}
.item image {
width: 247rpx;
height: 200rpx;
margin-right: 30rpx;
flex-shrink: 0;
width: 187rpx;
height: 240rpx;
background: #D1D7CB;
border-radius: 13rpx;
margin-right: 30rpx;
flex-shrink: 0;
}
.tags {
display: flex;
@ -70,9 +77,10 @@
text-overflow: ellipsis;
}
.price {
font-size: 20rpx;
color: #D62828;
text-align: right;
font-weight: bold;
font-size: 21rpx;
color: #E52910;
text-align: left;
flex: 1;
}
.price text:nth-child(1){
@ -85,18 +93,24 @@
.price text:nth-child(3){
color: #8D8D8D;
margin-left: 4rpx;
font-weight: 500;
}
.info {
flex: 1;
width: 1rpx;
}
.info .title {
font-weight: 500;
font-size: 31rpx;
color: #000;
margin-bottom: 52rpx;
margin-bottom: 32rpx;
}
.info .subtitle {
font-size: 24rpx;
color: #999999;
margin-bottom: 30rpx;
}
margin-bottom: 19rpx;
}

2
utils/util.js

@ -187,6 +187,8 @@ const gotoDetail = (item,isPagePoint) =>{
return
}
console.log(item)
switch(item.type){
case "tenscenic":

Loading…
Cancel
Save