Browse Source

修改精彩回顾

修改精彩回顾
master
jintaotao 4 years ago
parent
commit
a93fef286b
  1. 2
      app.js
  2. 6
      app.wxss
  3. 15
      pages/pbService/activity/index.js
  4. 5
      pages/pbService/activity/index.wxml
  5. 30
      pages/pbService/activity/index.wxss
  6. 4
      project.private.config.json

2
app.js

@ -22,7 +22,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest25?true:false;
data.isTest = data.isTest26?true:false;
this.globalData.configJson = data
})

6
app.wxss

@ -131,4 +131,10 @@ page{
.com-flex {
display: flex;
align-items: center;
}
.com-bac {
background-size: 100% 100%;
background-repeat: no-repeat;
margin: 0 auto;
}

15
pages/pbService/activity/index.js

@ -9,7 +9,9 @@ Page({
data: {
list:[],
page:1,
total:1
total:1,
navList: [{title: '精彩2022', year: 2022}, {title: '回顾2021', year: 2021}],
navIndex: 0
},
/**
@ -18,11 +20,20 @@ Page({
onLoad: function (options) {
this.getList()
},
onReload(e){
this.setData({
page:0,
list:[],
navIndex: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
page:this.data.page,
year: this.data.navList[this.data.navIndex].year
}).then(res=>{
this.setData({
total:res.data.total,

5
pages/pbService/activity/index.wxml

@ -1,6 +1,9 @@
<!--pages/pbService/activity/index.wxml-->
<title title="精彩回顾"></title>
<image mode="widthFix" class="topimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/pbservice/hgtop.png"></image>
<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-item com-bac {{index == navIndex ? 'active' : ''}}" bindtap="onReload" wx:for="{{navList}}" 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>

30
pages/pbService/activity/index.wxss

@ -3,6 +3,9 @@
display: block;
width: 100%;
}
.list{
margin-top: 90rpx;
}
.item {
margin: 40rpx 27rpx;
position: relative;
@ -40,4 +43,29 @@ page {
margin-bottom: 6rpx;
font-size: 33rpx;
font-weight: 600;
}
}
.nav-box {
background-color: #7D726B;
margin: -90rpx 26rpx 0;
height: 84rpx;
border-radius: 10rpx;
display: flex;
align-items: center;
}
.nav-box .nav-item {
color: #FFFFFF;
font-size: 50rpx;
width: 341rpx;
text-align: center;
font-size: 34rpx;
}
.nav-box .nav-item.active {
height: 100rpx;
line-height: 76rpx;
margin-bottom: -20rpx;
background-image: url("https://static.ticket.sz-trip.com/activity/WonderfulReview/select.png");
}

4
project.private.config.json

@ -13,8 +13,8 @@
"miniprogram": {
"list": [
{
"name": "特产4407",
"pathName": "pages/info/postProductInfo/index",
"name": "精彩回顾",
"pathName": "pages/pbService/activity/index",
"query": "id=4407",
"scene": null
},

Loading…
Cancel
Save