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

14
pages/list/theatre/index.js

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

24
pages/list/theatre/index.wxml

@ -1,20 +1,30 @@
<!--pages/list/theatre/index.wxml--> <!--pages/list/theatre/index.wxml-->
<wxs src="../../../utils/filter.wxs" module="tool" /> <wxs src="../../../utils/filter.wxs" module="tool" />
<search bind:onload="search"></search> <view class="my-header-search">
<view class="sale-types"> <search bind:onload="search" transparent="1"></search>
<view class="sale-type{{type==1?' active':''}}" bindtap="changeType" data-type="1">综合排序</view> <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==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==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==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>
<view style="height:87rpx"></view>
<view style="height:580rpx"></view>
<view bindtap="gotoDetail" data-item="{{item}}" class="item" wx:for="{{list}}"> <view bindtap="gotoDetail" data-item="{{item}}" class="item" wx:for="{{list}}">
<image src="{{item.headimg}}" mode="aspectFill"></image> <image src="{{item.headimg}}" mode="aspectFill"></image>
<view class="info textOver"> <view class="info">
<view class="textOver title">{{item.title}}</view> <view class="textOver2 title">{{item.title}}</view>
<view class="textOver subtitle">{{item.subtitle?item.subtitle:""}}</view> <view class="textOver subtitle">{{item.subtitle?item.subtitle:""}}</view>
<view class="textOver subtitle">{{item.supplier_address}}</view>
<view class="tags textOver"> <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 class="price"><text>¥</text><text>{{item.price?item.price/100:0}}</text><text>起</text></view>
</view> </view>
</view> </view>

96
pages/list/theatre/index.wxss

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

2
utils/util.js

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

Loading…
Cancel
Save