Browse Source

往期回顾

master
nige 3 years ago
parent
commit
e53d3bf4aa
  1. 2
      app.js
  2. 16
      pages/pbService/activity/index.js
  3. 9
      pages/pbService/activity/index.wxml
  4. 22
      pages/pbService/activity/index.wxss

2
app.js

@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest63? true : false;
data.isTest = data.isTest64? true : false;
this.globalData.configJson = data
}).then(() => {
// 获取ui配置文件

16
pages/pbService/activity/index.js

@ -10,8 +10,10 @@ Page({
list:[],
page:1,
total:1,
// navList: [{title: '精彩2022', year: 2022}, {title: '回顾2021', year: 2021}],
navIndex: 0
navList: [{title: '精彩2023', year: 2023}, {title: '往期回顾', year: 2022}],
navIndex: 0,
sNavIndex:0,
sNavList:[{title: '回顾2022', year: 2022}, {title: '回顾2021', year: 2021}]
},
/**
@ -28,12 +30,20 @@ Page({
})
this.getList()
},
changeSNav(e){
this.setData({
page:0,
list:[],
sNavIndex:e.currentTarget.dataset.index
})
this.getList()
},
getList:function(){
if(this.data.list.length>=this.data.total) return;
https._post("review/getList",{
limit:10,
page:this.data.page,
year:''
year:this.data.sNavIndex===0?this.data.navList[this.data.navIndex].year:this.data.sNavList[this.data.sNavIndex].year
}).then(res=>{
this.setData({
total:res.data.total,

9
pages/pbService/activity/index.wxml

@ -1,9 +1,14 @@
<!--pages/pbService/activity/index.wxml-->
<title title="精彩回顾"></title>
<image mode="widthFix" class="topimg" src="https://static.ticket.sz-trip.com/activity/WonderfulReview/topBacNew.png"></image>
<!-- <view class="nav-box com-flex-tao">
<view class="nav-box com-flex-tao">
<view class="nav-item com-bac {{index == navIndex ? 'active' : ''}}" bindtap="onReload" wx:for="{{navList}}" data-index="{{index}}">{{ item.title }}</view>
</view> -->
</view>
<view class="s_menu" wx:if="{{navIndex==1}}">
<view class="s_item {{index == sNavIndex ? 's_active' : ''}}" wx:for="{{sNavList}}" bindtap="changeSNav" data-index="{{index}}">
{{ item.title }}
</view>
</view>
<view class="list">
<view bindtap="gotoDetail" data-item="{{item}}" url="{{item.mini_url}}" class="item" wx:for="{{list}}">
<image mode="aspectFill" class="bgimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/pbservice/hgbg.png"></image>

22
pages/pbService/activity/index.wxss

@ -4,7 +4,7 @@
width: 100%;
}
.list{
margin-top: 10rpx;
margin-top: 90rpx;
}
.item {
margin: 40rpx 27rpx;
@ -69,3 +69,23 @@ page {
margin-bottom: -20rpx;
background-image: url("https://static.ticket.sz-trip.com/activity/WonderfulReview/select.png");
}
.s_menu{
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 122rpx;
margin-top: 45rpx;
}
.s_item{
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #695A56;
padding: 4rpx 20rpx;
}
.s_item.s_active{
background: #6A5B58;
border: 1rpx solid #6A5B58;
border-radius: 7rpx;
color: #FFFFFF;
}

Loading…
Cancel
Save