27 changed files with 851 additions and 1556 deletions
@ -1,114 +0,0 @@ |
|||
// pages/activity/graduate/index.js
|
|||
import commonApi from "../../../utils/https/common" |
|||
import util from "../../../utils/util" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
list:[[],[],[],[]] |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
let ajaxes = [],list = []; |
|||
wx.showLoading({ |
|||
title: '加载中', |
|||
}); |
|||
['62','63','64'].map(item=>{ |
|||
ajaxes.push(commonApi._post("product/get_product_by_tag",{ |
|||
tag_id: item, |
|||
offset: 0, |
|||
limit: 100 |
|||
})) |
|||
}); |
|||
ajaxes.push(commonApi._post("scene/get_scene_by_tag",{ |
|||
tag_id: 30, |
|||
offset: 0, |
|||
limit: 100 |
|||
})) |
|||
Promise.all(ajaxes).then(res=>{ |
|||
res.map(item=>{ |
|||
item.data.list.map(i=>{ |
|||
i.display_tags = i.display_tags?i.display_tags.split(","):[]; |
|||
i.display_tags = i.display_tags.slice(0,2); |
|||
}) |
|||
list.push(item.data.list); |
|||
}) |
|||
this.setData({ |
|||
list:list |
|||
}) |
|||
wx.hideLoading({}) |
|||
}) |
|||
}, |
|||
gotoDetail:function(e){ |
|||
let item = e.currentTarget.dataset.item; |
|||
util.gotoDetail(item) |
|||
}, |
|||
scrollToBox:function(e){ |
|||
let index = e.currentTarget.dataset.index; |
|||
const query=wx.createSelectorQuery(); //创建节点查询器
|
|||
query.select("#box"+index).boundingClientRect() //选择toViewid获取位置信息
|
|||
query.selectViewport().scrollOffset() //获取页面查询位置的
|
|||
query.exec(function(res) { |
|||
console.log(res) |
|||
let scrollTop = res[0].top + res[1].scrollTop ; |
|||
wx.pageScrollTo({ |
|||
scrollTop: scrollTop - 60, |
|||
duration: 200 |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -1,3 +0,0 @@ |
|||
{ |
|||
"usingComponents": {} |
|||
} |
|||
@ -1,30 +0,0 @@ |
|||
<!--pages/activity/graduate/index.wxml--> |
|||
<view style="position:relative;min-height:100vh"> |
|||
<image lazy-load style="position:absolute;top:0;left:0" class="mainimg" src="https://static.ticket.sz-trip.com/xcxImages/activity/graduate/top.png" mode="widthFix"></image> |
|||
<view class="top-menus"> |
|||
<view class="top-menu" bindtap="scrollToBox" data-index="1">好玩景点</view> |
|||
<view class="top-menu" bindtap="scrollToBox" data-index="2">一日游</view> |
|||
<view class="top-menu" bindtap="scrollToBox" data-index="3">文创特产</view> |
|||
<view class="top-menu" bindtap="scrollToBox" data-index="4">精选酒店</view> |
|||
</view> |
|||
<view style="height:650rpx"></view> |
|||
<view class="list" wx:for="{{list}}" id="box{{index+1}}"> |
|||
<image lazy-load class="titleimg" mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/activity/graduate/title{{index+1}}.png"></image> |
|||
<view class="list-box"> |
|||
<view class="item" wx:for="{{item}}" bindtap="gotoDetail" data-item="{{item}}"> |
|||
<image lazy-load class="mainimg" src="{{item.headimg}}" mode="aspectFill"></image> |
|||
<view class="title textOver">{{item.title}}</view> |
|||
<view class="product-tags"> |
|||
<view class="product-tag textOver" wx:for="{{item.display_tags}}">{{item}}</view> |
|||
</view> |
|||
<view class="product-bottom"> |
|||
<view class="price">¥<text>{{item.price/100}}</text></view> |
|||
<image lazy-load mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/activity/graduate/btn.png"></image> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view style="height:80rpx"></view> |
|||
<image lazy-load class="bottomtext" mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/activity/graduate/bottom.png"></image> |
|||
<image lazy-load class="bottombg" src="https://static.ticket.sz-trip.com/xcxImages/activity/graduate/bottombg.png" mode="widthFix"></image> |
|||
</view> |
|||
@ -1,132 +0,0 @@ |
|||
/* pages/activity/graduate/index.wxss */ |
|||
.mainimg { |
|||
display: block; |
|||
width: 100%; |
|||
} |
|||
page { |
|||
background: url(https://static.ticket.sz-trip.com/xcxImages/activity/graduate/bg.png); |
|||
background-size: 100%; |
|||
background-repeat: repeat-y; |
|||
} |
|||
.top-menus { |
|||
display: flex; |
|||
align-items: center; |
|||
position: absolute; |
|||
justify-content: space-between; |
|||
left: 34rpx; |
|||
right: 34rpx; |
|||
top: 546rpx; |
|||
z-index: 1; |
|||
color: #fff; |
|||
line-height: 51rpx; |
|||
} |
|||
.top-menu { |
|||
width: 149rpx; |
|||
border-radius: 19rpx; |
|||
font-size: 26rpx; |
|||
flex-shrink: 0; |
|||
letter-spacing: 3rpx; |
|||
background: #308506; |
|||
text-align: center; |
|||
font-weight: lighter; |
|||
} |
|||
.list { |
|||
position: relative; |
|||
margin: 10rpx 27rpx; |
|||
border: solid 1rpx #7c9112; |
|||
padding: 8rpx; |
|||
border-radius: 16rpx; |
|||
z-index: 1; |
|||
margin-bottom: 40rpx; |
|||
} |
|||
.list-box { |
|||
border-radius: 16rpx; |
|||
background-color: #f6f0e4; |
|||
border: solid 3rpx #7c9112; |
|||
padding: 56rpx 30rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
flex-wrap: wrap; |
|||
} |
|||
.item .mainimg { |
|||
width: 286rpx; |
|||
height: 253rpx; |
|||
border-radius: 16rpx; |
|||
} |
|||
.item { |
|||
border-radius: 16rpx; |
|||
padding: 7rpx; |
|||
width: 286rpx; |
|||
border: 1rpx dashed; |
|||
color: #7c9112; |
|||
margin-top: 27rpx; |
|||
} |
|||
.titleimg { |
|||
position: absolute; |
|||
display: block; |
|||
width: 326rpx; |
|||
height: 67rpx; |
|||
left: 50%; |
|||
margin-left: -163rpx; |
|||
top: -28rpx; |
|||
} |
|||
.item .title { |
|||
font-size: 25rpx; |
|||
line-height: 38rpx; |
|||
letter-spacing: -2rpx; |
|||
color: #469115; |
|||
margin: 5rpx 10rpx; |
|||
} |
|||
.product-tags { |
|||
margin: 0 10rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-bottom: 10rpx; |
|||
height: 20rpx; |
|||
} |
|||
.product-tag { |
|||
line-height: 20rpx; |
|||
background-color: #b1c346; |
|||
padding: 0 15rpx; |
|||
font-size: 12rpx; |
|||
color: #495800; |
|||
margin-right: 8rpx; |
|||
} |
|||
.product-tags:last-child { |
|||
margin-right: 0; |
|||
} |
|||
.product-bottom { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
margin: 0 10rpx; |
|||
padding-bottom: 6rpx; |
|||
color: #6ea21b; |
|||
font-size: 14rpx; |
|||
align-items: flex-end; |
|||
} |
|||
.product-bottom image { |
|||
width: 120rpx; |
|||
display: block; |
|||
flex-shrink: 0; |
|||
} |
|||
.product-bottom text { |
|||
font-size: 31rpx; |
|||
font-weight: 500; |
|||
line-height: 31rpx; |
|||
margin-left: 10rpx; |
|||
} |
|||
.bottombg { |
|||
position: absolute; |
|||
bottom: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
display: block; |
|||
z-index: 0; |
|||
} |
|||
.bottomtext { |
|||
position: absolute; |
|||
right: 0; |
|||
width: 439rpx; |
|||
bottom: 0; |
|||
z-index: 2; |
|||
} |
|||
@ -1,112 +0,0 @@ |
|||
// pages/activity/spring2021/index.js
|
|||
import commonApi from "../../../utils/https/common" |
|||
import util from "../../../utils/util" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
list1:[], |
|||
list2:[], |
|||
list3:[] |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
// 获取数据
|
|||
commonApi._post("product/get_product_by_tag",{ |
|||
offset:0, |
|||
limit:100, |
|||
tag_id:28 |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
list1:this.getTwoProduct(res.data.list) |
|||
}) |
|||
}) |
|||
commonApi._post("product/get_product_by_tag",{ |
|||
offset:0, |
|||
limit:100, |
|||
tag_id:29 |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
list2:res.data.list |
|||
}) |
|||
}) |
|||
commonApi._post("product/get_product_by_tag",{ |
|||
offset:0, |
|||
limit:100, |
|||
tag_id:30 |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
list3:this.getTwoProduct(res.data.list) |
|||
}) |
|||
}) |
|||
}, |
|||
getTwoProduct:function(list){ |
|||
let res = []; |
|||
for(let i=0;i<list.length;i=i+2){ |
|||
if(list[i+1]){ |
|||
res.push([list[i],list[i+1]]) |
|||
} |
|||
else { |
|||
res.push([list[i]]) |
|||
} |
|||
} |
|||
return res; |
|||
}, |
|||
gotoDetail:function(e){ |
|||
util.gotoDetail(e.currentTarget.dataset.item) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -1,3 +0,0 @@ |
|||
{ |
|||
"usingComponents": {} |
|||
} |
|||
@ -1,43 +0,0 @@ |
|||
<!--pages/activity/spring2021/index.wxml--> |
|||
<image lazy-load mode="widthFix" class="main-img topimg" src="https://static.ticket.sz-trip.com/xcxImages/spring2021/top.png"></image> |
|||
<view style="height:613rpx"></view> |
|||
<view class="list" wx:if="{{list1.length>0}}"> |
|||
<view class="list-in" wx:for="{{list1}}"> |
|||
<view class="item1" wx:for="{{item}}" bindtap="gotoDetail" data-item="{{item}}"> |
|||
<image lazy-load src="{{item.headimg}}"></image> |
|||
<view class="textOver item1-title">{{item.title}}</view> |
|||
<view class="item1-bottom"> |
|||
<view class="item1-price">{{item.price/100}}</view> |
|||
<view class="item1-btn">点击预定</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view wx:else style="height:100rpx"></view> |
|||
<image lazy-load style="margin:30rpx 0" src="https://static.ticket.sz-trip.com/xcxImages/spring2021/title1.jpg" class="main-img" mode="widthFix"></image> |
|||
<view class="list list2" wx:if="{{list2.length>0}}"> |
|||
<view class="list-in list-in2"> |
|||
<view class="item1 item2" wx:for="{{list2}}" bindtap="gotoDetail" data-item="{{item}}"> |
|||
<image lazy-load src="{{item.headimg}}" mode="aspectFill"></image> |
|||
<view class="textOver item1-title item2-title">{{item.title}}</view> |
|||
<view class="item1-bottom"> |
|||
<view class="item1-price item2-price">{{item.price/100}}</view> |
|||
<view class="item1-btn">点击预定</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<image lazy-load style="margin:30rpx 0" src="https://static.ticket.sz-trip.com/xcxImages/spring2021/title2.jpg" class="main-img" mode="widthFix"></image> |
|||
<view class="list" wx:if="{{list3.length>0}}" style="margin-top:-160rpx"> |
|||
<view class="list-in" wx:for="{{list3}}"> |
|||
<view class="item1" wx:for="{{item}}" bindtap="gotoDetail" data-item="{{item}}"> |
|||
<image lazy-load src="{{item.headimg}}" mode="aspectFill"></image> |
|||
<view class="textOver item1-title">{{item.title}}</view> |
|||
<view class="item1-bottom"> |
|||
<view class="item1-price">{{item.price/100}}</view> |
|||
<view class="item1-btn">点击预定</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<image lazy-load class="main-img" mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/spring2021/bottom.jpg"></image> |
|||
@ -1,119 +0,0 @@ |
|||
/* pages/activity/spring2021/index.wxss */ |
|||
.main-img { |
|||
display: block; |
|||
width: 100%; |
|||
} |
|||
.topimg { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
} |
|||
page { |
|||
background: #b8dd95; |
|||
} |
|||
.list { |
|||
margin: 0 8rpx; |
|||
border-radius: 7rpx; |
|||
background-color: #edf0a1; |
|||
padding: 14rpx 12rpx; |
|||
position: relative; |
|||
z-index: 2; |
|||
} |
|||
.list-in { |
|||
border-radius: 7rpx; |
|||
background-color: #68b83d; |
|||
padding: 23rpx 15rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
margin-bottom: 12rpx; |
|||
} |
|||
.list .list-in:last-child { |
|||
margin-bottom: 0; |
|||
} |
|||
.item1 { |
|||
width: 334rpx; |
|||
color: #fffbe7; |
|||
font-size: 23rpx; |
|||
line-height: 30rp; |
|||
text-align: center; |
|||
} |
|||
.item1 image { |
|||
height: 264rpx; |
|||
width: 334rpx; |
|||
display: block; |
|||
} |
|||
.item1-title { |
|||
margin: 8rpx; |
|||
} |
|||
.item1-bottom { |
|||
margin: 0 8rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
.item1-price::before { |
|||
content: "¥"; |
|||
font-size: 10rpx; |
|||
} |
|||
.item1-price::after { |
|||
content: "元"; |
|||
font-size: 13rpx; |
|||
} |
|||
.item1-price { |
|||
font-size: 35rpx; |
|||
} |
|||
.item1-btn { |
|||
width: 88rpx; |
|||
line-height: 26rpx; |
|||
text-align: center; |
|||
background-color: #ff7c7a; |
|||
border-radius: 13rpx; |
|||
color: #fff; |
|||
font-size: 17rpx; |
|||
margin-left: 12rpx; |
|||
} |
|||
.list2 { |
|||
background-color: #93bd71; |
|||
border-radius: 29rpx; |
|||
padding: 24rpx 22rpx; |
|||
} |
|||
.list-in2 { |
|||
background: white; |
|||
box-shadow: 0rpx 10rpx 16rpx 0rpx |
|||
rgba(120, 134, 103, 0.69); |
|||
border-radius: 29rpx; |
|||
border: solid 2rpx #598723; |
|||
flex-wrap: wrap; |
|||
margin-bottom: 0; |
|||
padding: 29rpx 24rpx; |
|||
} |
|||
.item2 { |
|||
width: 314rpx; |
|||
color: #333; |
|||
margin-top: 40rpx; |
|||
} |
|||
.list-in2 .item2:nth-child(-n+2){ |
|||
margin-top: 0; |
|||
} |
|||
.item2 image { |
|||
width: 314rpx; |
|||
height: 219rpx; |
|||
} |
|||
.item2-price { |
|||
color: #f75e48; |
|||
} |
|||
.item2-title { |
|||
line-height: 41rpx; |
|||
border-top: 1rpx dotted #999; |
|||
border-bottom: 1rpx dotted #999; |
|||
display: inline-block; |
|||
font-size: 26rpx; |
|||
color: #282822; |
|||
max-width: 300rpx; |
|||
} |
|||
.item2-price::before { |
|||
font-size: 18rpx; |
|||
} |
|||
.item2-price::after { |
|||
content: ""; |
|||
} |
|||
@ -1,134 +0,0 @@ |
|||
// pages/activity/suyear/index.js
|
|||
import commonApi from "../../../utils/https/common" |
|||
import util from "../../../utils/util" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
tabs:[{ |
|||
areaid:"", |
|||
imgname:'all' |
|||
},{ |
|||
areaid:"320508", |
|||
imgname:'gs' |
|||
},{ |
|||
areaid:"320506", |
|||
imgname:'wz' |
|||
},{ |
|||
areaid:"320507", |
|||
imgname:'xc' |
|||
},{ |
|||
areaid:"320509", |
|||
imgname:'wj' |
|||
},{ |
|||
areaid:"320510", |
|||
imgname:'yq' |
|||
},{ |
|||
areaid:"320582", |
|||
imgname:'zjg' |
|||
},{ |
|||
areaid:"320585", |
|||
imgname:'tc' |
|||
},{ |
|||
areaid:"320583", |
|||
imgname:'ks' |
|||
},{ |
|||
areaid:"320581", |
|||
imgname:'cs' |
|||
}], |
|||
list:[], |
|||
total:1, |
|||
areas_id:"" |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.getList() |
|||
}, |
|||
changeArea:function(e){ |
|||
let areas_id = e.currentTarget.dataset.area; |
|||
this.setData({ |
|||
total:1, |
|||
list:[], |
|||
areas_id:areas_id |
|||
}) |
|||
this.getList() |
|||
}, |
|||
getList:function(){ |
|||
if(this.data.total<=this.data.list.length) return; |
|||
commonApi._post('product/get_product_by_tag',{ |
|||
tag_id:23, |
|||
offset:this.data.list.length, |
|||
areas_id:this.data.areas_id, |
|||
limit:10 |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
list:this.data.list.concat(res.data.list), |
|||
total:res.data.total |
|||
}) |
|||
}) |
|||
}, |
|||
gotoDetail:function(e){ |
|||
let item = e.currentTarget.dataset.item; |
|||
if(item.title=='沙家浜景区'){ |
|||
wx.navigateToMiniProgram({ |
|||
appId: 'wx98a352b4689e46d8', |
|||
path:'pages/sightspots/booking?id=32&type=default' |
|||
}) |
|||
return; |
|||
} |
|||
util.gotoDetail(item) |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.getList() |
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -1,5 +0,0 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -1,18 +0,0 @@ |
|||
<!--pages/activity/suyear/index.wxml--> |
|||
<title title="留苏过大年"></title> |
|||
<view style="position:relative"> |
|||
<image lazy-load src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/suyear/top.png" mode="widthFix" class="main-img"></image> |
|||
<view class="area-list"> |
|||
<image lazy-load bindtap="changeArea" data-area="{{item.areaid}}" wx:for="{{tabs}}" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/suyear/{{item.imgname}}.png" mode="widthFix" class="area-img"></image> |
|||
</view> |
|||
</view> |
|||
<view class="list"> |
|||
<view class="item" bindtap="gotoDetail" data-item="{{item}}" wx:for="{{list}}"> |
|||
<image lazy-load class="border" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/suyear/border.png" mode="widthFix"></image> |
|||
<image lazy-load src="{{item.headimg}}" class="product-img" mode="aspectFill"></image> |
|||
<image lazy-load wx:if="{{item.area_id}}" mode="widthFix" class="addressimg" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/suyear/{{item.area_id}}.png"></image> |
|||
<image lazy-load class="bgimg" mode="widthFix" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/suyear/bg.png"></image> |
|||
<view class="title textOver2">{{item.title}}</view> |
|||
<image lazy-load class="btn" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/suyear/btn.png" mode="widthFix"></image> |
|||
</view> |
|||
</view> |
|||
@ -1,93 +0,0 @@ |
|||
/* pages/activity/suyear/index.wxss */ |
|||
page { |
|||
background: #FCDDB3; |
|||
} |
|||
.main-img { |
|||
display: block; |
|||
width: 100%; |
|||
} |
|||
.area-list { |
|||
display: flex; |
|||
align-items: center; |
|||
left: 30rpx; |
|||
right: 0; |
|||
overflow-x: auto; |
|||
position: absolute; |
|||
top: 700rpx; |
|||
} |
|||
.area-list image { |
|||
display: block; |
|||
flex-shrink: 0; |
|||
width: 110rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
.list { |
|||
display: flex; |
|||
align-items: center; |
|||
flex-wrap: wrap; |
|||
margin: 0 25rpx; |
|||
justify-content: space-between; |
|||
padding-top: 34rpx; |
|||
} |
|||
.item { |
|||
width: 345rpx; |
|||
height: 435rpx; |
|||
position: relative; |
|||
margin-bottom: 30rpx; |
|||
} |
|||
.item .bgimg { |
|||
position: absolute; |
|||
width: 100%; |
|||
} |
|||
.item image { |
|||
display: block; |
|||
} |
|||
.item .bgimgin { |
|||
position: absolute; |
|||
width: 307rpx; |
|||
left: 18rpx; |
|||
top: 18rpx; |
|||
} |
|||
.item .border { |
|||
position: absolute; |
|||
width: 79rpx; |
|||
margin-left: -19rpx; |
|||
bottom: 10rpx; |
|||
} |
|||
.item:nth-child(2n) .border { |
|||
margin-left: 280rpx; |
|||
} |
|||
.item .product-img { |
|||
position: absolute; |
|||
width: 308rpx; |
|||
height: 254rpx; |
|||
left: 50%; |
|||
margin-left: -154rpx; |
|||
top: 20rpx; |
|||
} |
|||
.item .title { |
|||
font-size: 32rpx; |
|||
font-family: Source Han Sans SC; |
|||
font-weight: bold; |
|||
color: #FFFFFF; |
|||
line-height: 45rpx; |
|||
background: linear-gradient(-50deg, #FCDDB2 0%, #F7B765 44.7021484375%, #FCDEB4 100%); |
|||
-webkit-background-clip: text; |
|||
-webkit-text-fill-color: transparent; |
|||
position: absolute; |
|||
top: 280rpx; |
|||
left: 30rpx; |
|||
right: 30rpx; |
|||
} |
|||
.item .btn { |
|||
position: absolute; |
|||
width: 260rpx; |
|||
left: 42rpx; |
|||
top: 357rpx; |
|||
} |
|||
.item .addressimg { |
|||
width: 110rpx; |
|||
left: 40rpx; |
|||
top: 15rpx; |
|||
position: absolute; |
|||
} |
|||
@ -1,167 +0,0 @@ |
|||
// pages/activity/year2020/index.js
|
|||
import commonApi from "../../../utils/https/common" |
|||
import util from "../../../utils/util" |
|||
let device = wx.getSystemInfoSync(); |
|||
const ratio = device.windowWidth / 750; |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
zhouzhuang:[], |
|||
haofengguang:[], |
|||
dongshan:[], |
|||
huqiu:[], |
|||
jiangnan:[], |
|||
list:[], |
|||
total:1, |
|||
top:0 |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
let rect = wx.getMenuButtonBoundingClientRect(); |
|||
let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight; |
|||
this.setData({ |
|||
top:height |
|||
}) |
|||
// 周庄年货专区
|
|||
commonApi._post("adv/getAdvByKey",{ |
|||
key:"zhouzhuangnianhuo" |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
zhouzhuang:res.data.content || [] |
|||
}) |
|||
}) |
|||
// 苏州好风光
|
|||
commonApi._post("adv/getAdvByKey",{ |
|||
key:"haofengguangnianhuo" |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
haofengguang:res.data.content || [] |
|||
}) |
|||
}) |
|||
// 东山爆款好物
|
|||
commonApi._post("adv/getAdvByKey",{ |
|||
key:"dongshannianhuo" |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
dongshan:res.data.content || [] |
|||
}) |
|||
}) |
|||
// 虎丘茶礼
|
|||
commonApi._post("adv/getAdvByKey",{ |
|||
key:"huqiunianhuo" |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
huqiu:res.data.content || [] |
|||
}) |
|||
}) |
|||
// 江南米造局
|
|||
commonApi._post("adv/getAdvByKey",{ |
|||
key:"jiangniannianhuo" |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
jiangnan:res.data.content || [] |
|||
}) |
|||
}) |
|||
this.getList() |
|||
}, |
|||
getList:function(){ |
|||
let list = this.data.list; |
|||
if(list.length>=this.data.total) return; |
|||
commonApi._post('product/get_product_by_tag',{ |
|||
tag_id:22, |
|||
offset:list.length, |
|||
limit:10 |
|||
}).then(res=>{ |
|||
list = list.concat(res.data.list); |
|||
this.setData({ |
|||
list:list, |
|||
total:res.data.total |
|||
}) |
|||
}) |
|||
}, |
|||
gotoDetail:function(e){ |
|||
let item = e.currentTarget.dataset.item; |
|||
let [type,id] = item.href.split(","); |
|||
util.gotoDetail({ |
|||
type:type, |
|||
id:id |
|||
}) |
|||
}, |
|||
gotoDetail2:function(e){ |
|||
let item = e.currentTarget.dataset.item; |
|||
util.gotoDetail(item) |
|||
}, |
|||
home:function(){ |
|||
wx.switchTab({ |
|||
url: '/pages/index/index', |
|||
}) |
|||
}, |
|||
gotoScroll:function(e){ |
|||
let that = this,index = e.currentTarget.dataset.index; |
|||
const query=wx.createSelectorQuery(); //创建节点查询器
|
|||
query.select("#box"+index).boundingClientRect() //选择toViewid获取位置信息
|
|||
query.selectViewport().scrollOffset() //获取页面查询位置的
|
|||
query.exec(function(res) { |
|||
let scrollTop = res[0].top + res[1].scrollTop - that.data.top; |
|||
wx.pageScrollTo({ |
|||
scrollTop: scrollTop + 4, |
|||
duration: 500 |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.getList() |
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -1,5 +0,0 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -1,49 +0,0 @@ |
|||
<!--pages/activity/year2020/index.wxml--> |
|||
<title title="年货节"></title> |
|||
<view style="position:relative"> |
|||
<image lazy-load src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/nianhuojie/top.jpg" mode="widthFix" class="yearimg" style="margin-top:0"></image> |
|||
<view bindtap="gotoScroll" data-index="1" class="block1"></view> |
|||
<view bindtap="gotoScroll" data-index="2" class="block2"></view> |
|||
</view> |
|||
<view class="product-list"> |
|||
<image lazy-load bindtap="gotoDetail" data-item="{{item}}" style="{{zhouzhuang.length%2==1 && index==zhouzhuang.length-1?'width:730rpx;height:290rpx;':''}}" src="{{item.img}}" mode="aspectFill" wx:for="{{zhouzhuang}}"></image> |
|||
</view> |
|||
<image lazy-load src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/nianhuojie/haofengguang.jpg" mode="widthFix" class="yearimg" id="box1"></image> |
|||
<view class="product-list"> |
|||
<image lazy-load bindtap="gotoDetail" data-item="{{item}}" style="{{haofengguang.length%2==1 && index==haofengguang.length-1?'width:730rpx;height:290rpx;':''}}" src="{{item.img}}" mode="aspectFill" wx:for="{{haofengguang}}"></image> |
|||
</view> |
|||
<image lazy-load src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/nianhuojie/dongshan.jpg" mode="widthFix" class="yearimg" id="box2"></image> |
|||
<view class="product-list"> |
|||
<image lazy-load bindtap="gotoDetail" data-item="{{item}}" style="{{dongshan.length%2==1 && index==dongshan.length-1?'width:730rpx;height:290rpx':''}}" src="{{item.img}}" mode="aspectFill" wx:for="{{dongshan}}"></image> |
|||
</view> |
|||
<image lazy-load src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/nianhuojie/huqiu.jpg" mode="widthFix" class="yearimg"></image> |
|||
<view class="product-list"> |
|||
<image lazy-load bindtap="gotoDetail" data-item="{{item}}" style="{{huqiu.length%2==1 && index==huqiu.length-1?'width:730rpx;height:290rpx':''}}" src="{{item.img}}" mode="aspectFill" wx:for="{{huqiu}}"></image> |
|||
</view> |
|||
<image lazy-load src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/nianhuojie/jiangnan.jpg" mode="widthFix" class="yearimg"></image> |
|||
<view class="product-list"> |
|||
<image lazy-load bindtap="gotoDetail" data-item="{{item}}" style="{{jiangnan.length%2==1 && index==jiangnan.length-1?'width:730rpx;height:290rpx':''}}" src="{{item.img}}" mode="aspectFill" wx:for="{{jiangnan}}"></image> |
|||
</view> |
|||
<image lazy-load src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/nianhuojie/bixuan.jpg" mode="widthFix" class="yearimg"></image> |
|||
<view class="product-list"> |
|||
<view bindtap="gotoDetail2" data-item="{{item}}" class="product-item" wx:for="{{list}}"> |
|||
<image lazy-load class="main-img" src="{{item.headimg}}" mode="aspectFill"></image> |
|||
<image lazy-load class="bg-img" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/nianhuojie/bg.png" mode="aspectFill"></image> |
|||
<view class="info-box"> |
|||
<view class="title textOver">{{item.title}}</view> |
|||
<view class="subtitle textOver">{{item.subtitle}}</view> |
|||
<view class="btn textOver"> |
|||
<view class="btn-text"> |
|||
<view>年货价</view> |
|||
<view>¥</view> |
|||
</view> |
|||
<view class="price">{{item.price/100}}</view> |
|||
<image lazy-load src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/nianhuojie/btn.png" mode="widthFix"></image> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view bindtap="home" class="backhome-box"> |
|||
<view>返回首页</view> |
|||
<view class="iconfont icon-bofang1"></view> |
|||
</view> |
|||
@ -1,122 +0,0 @@ |
|||
/* pages/activity/year2020/index.wxss */ |
|||
page { |
|||
background: #c8070a; |
|||
} |
|||
.yearimg { |
|||
display: block; |
|||
width: 100%; |
|||
margin: 0; |
|||
padding: 0; |
|||
margin-top: -15rpx; |
|||
} |
|||
.product-list { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
margin: 0 10rpx; |
|||
flex-wrap: wrap; |
|||
position: relative; |
|||
z-index: 1; |
|||
} |
|||
.product-list image { |
|||
width: 357rpx; |
|||
height: 409rpx; |
|||
margin-bottom: 15rpx; |
|||
} |
|||
.product-item { |
|||
width: 357rpx; |
|||
height: 409rpx; |
|||
overflow: hidden; |
|||
margin-bottom: 15rpx; |
|||
position: relative; |
|||
} |
|||
.product-list .main-img { |
|||
width: 357rpx; |
|||
height: 263rpx; |
|||
display: block; |
|||
margin-top: 7rpx; |
|||
} |
|||
.product-list .bg-img { |
|||
position: absolute; |
|||
left: 0; |
|||
top: 0; |
|||
width: 357rpx; |
|||
height: 409rpx; |
|||
z-index: 2; |
|||
} |
|||
.info-box { |
|||
position: absolute; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
height: 140rpx; |
|||
text-align: center; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
justify-content: center; |
|||
z-index: 2; |
|||
color: #282828; |
|||
} |
|||
.title { |
|||
font-size: 32rpx; |
|||
width: 357rpx; |
|||
line-height: 37rpx; |
|||
font-weight: lighter; |
|||
} |
|||
.subtitle { |
|||
font-size: 18rpx; |
|||
line-height: 30rpx; |
|||
} |
|||
.btn { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
background: url(https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/nianhuojie/btnbg.png); |
|||
background-size: 245rpx 51rpx; |
|||
width: 245rpx; |
|||
height: 51rpx; |
|||
color: #ffc8a8; |
|||
} |
|||
.btn-text { |
|||
font-size: 14rpx; |
|||
text-align: right; |
|||
margin: 0 15rpx; |
|||
margin-right: 7rpx; |
|||
} |
|||
.price { |
|||
font-size: 38rpx; |
|||
flex-shrink: 0; |
|||
text-align: center; |
|||
} |
|||
.btn image { |
|||
width: 90rpx; |
|||
margin: 0; |
|||
margin-right: 15rpx; |
|||
margin-left: 7rpx; |
|||
display: block; |
|||
} |
|||
.backhome-box { |
|||
text-align: center; |
|||
color: #fff; |
|||
font-size: 32rpx; |
|||
overflow: hidden; |
|||
margin: 60rpx 0; |
|||
line-height: 50rpx; |
|||
} |
|||
.backhome-box .iconfont { |
|||
transform: rotate(-90deg); |
|||
color: #ebca16; |
|||
} |
|||
.block1,.block2 { |
|||
position: absolute; |
|||
width: 359rpx; |
|||
height: 170rpx; |
|||
z-index: 1; |
|||
top: 645rpx; |
|||
left: 12rpx; |
|||
} |
|||
.block2 { |
|||
right: 11rpx; |
|||
left: auto; |
|||
} |
|||
Loading…
Reference in new issue