Browse Source

更新下

master
yvette 5 years ago
parent
commit
8163e3ec07
  1. 4
      app.js
  2. 3
      app.json
  3. 126
      pages/activity/springten/index.js
  4. 5
      pages/activity/springten/index.json
  5. 30
      pages/activity/springten/index.wxml
  6. 123
      pages/activity/springten/index.wxss
  7. 14
      pages/index/index.js
  8. 2
      pages/index/index.wxml
  9. 2
      pages/info/hotelProductInfo/index.wxml
  10. 40
      pages/list/activitynew/index.js
  11. 5
      pages/list/activitynew/index.wxml
  12. 33
      pages/list/activitynew/index.wxss
  13. 2
      pages/list/hotel/index.js
  14. 4
      pages/list/hotel/index.wxml
  15. 1
      pages/list/six/index.wxss
  16. 2
      pages/map/index.js
  17. 20
      pages/pbService/index.js
  18. 8
      pages/pbService/index.wxml
  19. 1
      pages/pbService/web/index.js
  20. 10
      project.private.config.json

4
app.js

@ -87,7 +87,9 @@ App({
// "EXPIRED":"已过期/已失效",
"REFUNDING":"退款中" ,
'REFUND_REFUSE':'退款拒绝',
'REFUND_ERROR':'退款异常'
'REFUND_ERROR':'退款异常',
'OFFLINE_REFUND':'线下退款完成',
'OFFLINE_WAIT':'线下退款处理中'
},
codeState:['未使用','已使用','已失效','已取消'],
weburl:"",

3
app.json

@ -112,7 +112,8 @@
"pages/ask/my/index",
"pages/activity/year2020/index",
"pages/activity/suyear/index",
"pages/activity/spring2021/index"
"pages/activity/spring2021/index",
"pages/activity/springten/index"
],
"permission": {
"scope.userLocation": {

126
pages/activity/springten/index.js

@ -0,0 +1,126 @@
// pages/activity/springten/index.js
import commonApi from "../../../utils/https/common"
import util from "../../../utils/util"
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
types:['必赏','必吃','必游','必玩','必购','必住','夜戏','夜饮','夜宴','夜市'],
type:0,
list:[],
total:1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getList()
},
changeType:function(e){
this.setData({
type:e.currentTarget.dataset.type,
list:[],
total:1
})
this.getList();
},
getList:function(){
if(this.data.total<=this.data.list.length) return;
commonApi._post("scene/get_scene_by_tag",{
offset:this.data.list.length,
limit:10,
tag_id:17+Number(this.data.type)
}).then(res=>{
res.data.list.map(item=>{
if(item.scene_tags && item.scene_tags.indexOf('运河十景')!=-1){
item.isYunHe = true;
}
else {
item.isYunHe = false;
}
item.display_tags = item.display_tags?item.display_tags.split(","):[];
item.display_tags = item.display_tags.splice(0,2);
})
this.setData({
list:this.data.list.concat(res.data.list),
total:res.data.count
})
})
},
gotoWeb:function(e){
let item = e.currentTarget.dataset.item;
app.globalData.weburl = item.ext_link;
wx.navigateTo({
url: '/pages/pbService/web/index',
})
},
gotoDetail:function(e){
let item = e.currentTarget.dataset.item;
util.gotoDetail(item)
},
gotoLocation:function(e){
let item = e.currentTarget.dataset.item;
wx.openLocation({
latitude: item.lat,
longitude: item.lon
})
},
gotoFoodInfo:function(e){
let item = e.currentTarget.dataset.item;
wx.navigateTo({
url: '/pages/info/foodInfo/index?id='+item.id,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.getList()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/activity/springten/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

30
pages/activity/springten/index.wxml

@ -0,0 +1,30 @@
<!--pages/activity/springten/index.wxml-->
<title title="苏州十大必需体验榜单"></title>
<image src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/springten/top.png" mode="widthFix" class="top-img"></image>
<view class="type-icons">
<view wx:for="{{types}}" bindtap="changeType" data-type="{{index}}" class="type-icon {{type==index?'type-icon-active':''}}">
<image mode="widthFix" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/springten/icon{{type==index?'2':'1'}}.png"></image>
<view class="icon-text">{{item}}</view>
</view>
</view>
<view class="list">
<view style="height:13rpx"></view>
<view class="item" wx:for="{{list}}">
<view class="item-in">
<image src="{{item.headimg}}" mode="aspectFill"></image>
<view class="item-info">
<view class="item-title textOver">{{item.title}}</view>
<view class="item-tags">
<view class="tag textOver" wx:for="{{item.display_tags}}">{{item}}</view>
</view>
<view class="item-address textOver">地址:{{item.address}}</view>
</view>
</view>
<view class="item-result">上榜理由:{{item.brief_intro}}</view>
<view class="item-btn" bindtap="gotoWeb" data-item="{{item}}" wx:if="{{item.ext_link}}">前往购买</view>
<view class="item-btn" bindtap="gotoLocation" data-item="{{item}}" wx:elif="{{item.is_nav}}">打开导航</view>
<view class="item-btn" bindtap="gotoFoodInfo" data-item="{{item}}" wx:elif="{{item.isYunHe}}">查看详情</view>
<view bindtap="gotoDetail" data-item="{{item}}" class="item-btn" wx:else>立即预订</view>
</view>
<view class="nomore" wx:if="{{list.length>=total || list.length==0}}">—— 没有更多了 ——</view>
</view>

123
pages/activity/springten/index.wxss

@ -0,0 +1,123 @@
/* pages/activity/springten/index.wxss */
.top-img {
display: block;
width: 100%;
position: absolute;
left: 0;
z-index: 0;
}
.type-icons {
position: relative;
z-index: 1;
margin: 0 20rpx;
margin-top: 357rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.type-icon {
width: 124rpx;
height: 123rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 29rpx;
color: #fff;
font-weight: bold;
position: relative;
margin-top: 20rpx;
}
.icon-text {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
line-height: 123rpx;
z-index: 1;
}
.type-icon image {
width: 115rpx;
}
.type-icon-active image {
width: 124rpx;
}
.list {
background:url(https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/springten/bg2.png) repeat-y;
background-size: 100%;
}
.item {
margin: 0 25rpx;
margin-top: 43rpx;
background:url(https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/springten/bg1.png);
background-size: 100% 100%;
width: 700rpx;
height: 325rpx;
position: relative;
}
.nomore {
margin-top: 50rpx;
line-height: 50rpx;
font-size: 23rpx;
text-align: center;
}
.item-in {
display: flex;
padding: 30rpx;
padding-bottom: 20rpx;
justify-content: space-between;
}
.item-in image {
width: 253rpx;
height: 213rpx;
display: block;
flex-shrink: 0;
}
.item-info {
flex: 1;
width: 351rpx;
margin-left: 30rpx;
}
.item-title {
font-size: 35rpx;
font-weight: bold;
}
.item-tags {
display: flex;
margin-top: 30rpx;
margin-bottom: 18rpx;
font-size: 24rpx;
}
.item-tags .tag {
line-height: 36rpx;
background: linear-gradient(0deg, #BE8CDF, #724796);
border-radius: 7rpx;
color: #fff;
padding: 0 13rpx;
margin-right: 12rpx;
}
.item-tags .tag:last-child {
margin-right: 0;
}
.item-address {
font-size: 23rpx;
color: #666666;
}
.item-result {
font-size: 25rpx;
color: #333;
margin: 0 30rpx;
}
.item-btn {
position: absolute;
right: 37rpx;
bottom: 50rpx;
width: 160rpx;
line-height: 53rpx;
background: #8356A6;
text-align: center;
color: #fff;
font-size: 29rpx;
border-radius: 27rpx;
}

14
pages/index/index.js

@ -240,9 +240,17 @@ Page({
bannerClick:function(e){
let item = e.currentTarget.dataset.item;
if(item.action=='href'){
wx.navigateTo({
url: item.href,
})
if(item.href.indexOf('map/index')!=-1){
console.log(item.href)
wx.reLaunch({
url: item.href
})
}
else {
wx.navigateTo({
url: item.href,
})
}
}
else if(item.action=="web"){
app.globalData.weburl = item.href;

2
pages/index/index.wxml

@ -34,7 +34,7 @@
</view>
<view bindtap="gotoPath" data-path="/pages/list/night/index" class="top-icon-item">
<image src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/index/icon5.png" mode="widthFix"></image>
<view class="top-icon-text">夜游苏州</view>
<view class="top-icon-text">姑苏八点半</view>
</view>
<view bindtap="gotoPath" data-path="/pages/list/card/index" class="top-icon-item">
<image src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/index/icon2.png" mode="widthFix"></image>

2
pages/info/hotelProductInfo/index.wxml

@ -53,7 +53,7 @@
<view class="product-info textOver">
<view class="title textOver"><view class="textOver">{{item.room_name}}</view></view>
<view class="subtitle textOver2">{{item.useable_area?(item.useable_area+'m²'):''}} <text wx:for="{{item.bed_info}}">{{item.bedDesc}}{{item.bedType}}x{{item.bedCount}}</text> {{item.window?item.window:''}}</view>
<view class="mt-price">{{item.low_price/100}}</view>
<view class="mt-price">{{item.low_price>0?item.low_price/100:'0'}}</view>
</view>
<view class="product-right">
<image class="product-arrow-img" bindtap="getSkuList" data-id="{{item.real_room_id}}" data-index="{{index}}" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/info/arrow{{activeSkuIndex==index?'1':''}}.png" mode="widthFix"></image>

40
pages/list/activitynew/index.js

@ -8,6 +8,7 @@ Page({
* 页面的初始数据
*/
data: {
isYL:false,
selectDay:new Date().getTime(),
days: ['日','一','二','三','四','五','六'],
types:[null,'show','exhibition','scene','movie','lecture','other'],
@ -92,16 +93,44 @@ Page({
weeks: reslist
})
},
yulan:function(e){
let flag = e.currentTarget.dataset.flag;
if(flag==0 && this.data.isYL || flag==1 && this.data.isYL==false) return;
this.setData({
isYL:flag==0,
list:[],
pageNo:1,
total:1,
moreFlag:true,
})
this.getList()
},
getYL:function(){
let list = this.data.list;
commonApi._post("pbservice/Actcalendar/getActPrevList",{
page_no:this.data.pageNo,
category:this.data.types[this.data.type],
keywords:this.data.realKeywords,
area_key:this.data.areas[this.data.area].area_code,
page_num:10
}).then(res=>{
this.setData({
total:res.data.total,
list:list.concat(res.data.rows),
pageNo:this.data.pageNo+1
})
})
},
// picker修改日期
bindDateChange:function(e){
console.log(e)
this.setData({
selectDay: new Date(e.detail.value).getTime(),
list:[],
pageNo:1,
total:1,
date:e.detail.value,
moreFlag:true
moreFlag:true,
isYL:false
})
this.getWeekDay();
this.getList();
@ -118,12 +147,17 @@ Page({
list:[],
pageNo:1,
total:1,
moreFlag:true
moreFlag:true,
isYL:false
})
this.getList();
},
getList:function(){
let list = this.data.list;
if(this.data.isYL){
this.getYL();
return;
}
if(this.data.type==4){
this.getMovie();
return;

5
pages/list/activitynew/index.wxml

@ -42,13 +42,14 @@
<view style="width:1rpx;flex-shrink:0;height:1rpx"></view>
</view>
<view class="date-box" hidden="{{type==4}}">
<view class="yulan{{isYL?' active':''}}" data-flag="0" bindtap="yulan">预览</view>
<view class="date-item {{item.times==selectDay?'active':''}}" wx:for="{{weeks}}" bindtap="changeDate" data-times="{{item.times}}">
<view>{{item.date}}</view>
<view>周{{item.day}}</view>
</view>
<picker mode="date" value="{{date}}" start="1970-01-01" end="2027-09-01" bindchange="bindDateChange">
<view class="picker calendar-img">
<image class="calendar-img" width="56rpx" height="60rpx" mode="aspectFill" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/activity/calendar.png"></image>
<view class="picker calendar-img{{isYL?'':' active'}}">
<image width="56rpx" height="60rpx" mode="aspectFill" src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/activity/calendar{{isYL?'':'1'}}.png"></image>
</view>
</picker>
</view>

33
pages/list/activitynew/index.wxss

@ -31,10 +31,25 @@ page {
height: 140rpx;
background: rgba(255, 255, 255, 1);
display: flex;
padding: 0 30rpx;
justify-content: space-between;
align-items: center;
}
.yulan {
flex-shrink: 0;
width: 60rpx;
padding-right: 20rpx;
line-height: 80rpx;
text-align: right;
background: #fff;
border-radius: 0px 30rpx 30rpx 0px;
color: #0B898E;
white-space: nowrap;
font-size: 26rpx;
}
.yulan.active {
background:#0B898E;
color:#fff;
}
.date-item {
font-size: 26rpx;
color: #999;
@ -46,13 +61,25 @@ page {
.date-item.active {
font-weight:500;
color: #0B898E;
font-size: 30rpx;
}
.calendar-img {
width: 70rpx;
padding-left: 10rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: flex-start;
background: #fff;
border-radius: 30rpx 0px 0px 30rpx;
}
.calendar-img image {
width: 56rpx;
height: 60rpx;
display: block;
}
.calendar-img.active {
background-color: #0B898E;
}
.top-fixed-activity {
background: #f7f7f7;
z-index: 1;
@ -61,7 +88,7 @@ page {
background: #FFF;
}
.activity-list {
margin: 0 24rpx;
padding: 0 24rpx;
background: #0B898E;
}
.acitivity-search-box {

2
pages/list/hotel/index.js

@ -19,7 +19,7 @@ Page({
onLoad: function (options) {
this.getList()
},
search:function(){
search:function(e){
this.setData(e.detail);
this.setData({
list:[],

4
pages/list/hotel/index.wxml

@ -2,8 +2,8 @@
<search bind:onload="search"></search>
<image src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/listtop/hotel_top.png" mode="widthFix" class="topimg"></image>
<view class="hotel-types">
<view class="hotel-type{{type==5?' active':''}}" bindtap="changeType" data-type="5">星级酒店</view>
<view class="hotel-type{{type==6?' active':''}}" bindtap="changeType" data-type="6">精品酒店</view>
<view class="hotel-type{{type==5?' active':''}}" bindtap="changeType" data-type="5">精品酒店</view>
<view class="hotel-type{{type==6?' active':''}}" bindtap="changeType" data-type="6">舒适酒店</view>
<view class="hotel-type{{type==7?' active':''}}" bindtap="changeType" data-type="7">经济连锁</view>
<view class="hotel-type{{type==8?' active':''}}" bindtap="changeType" data-type="8">特色民宿</view>
</view>

1
pages/list/six/index.wxss

@ -48,6 +48,7 @@
box-shadow: 0px 0rpx 16rpx 0px rgba(6, 0, 1, 0.1);
border-radius: 10rpx;
padding: 12rpx;
margin-bottom: 30rpx;
}
.main-img {
width: 312rpx;

2
pages/map/index.js

@ -132,6 +132,8 @@ Page({
let list = [];
res.data.map((item,index)=>{
let mapItem = {};
item.lat = item.tx_lat;
item.lon = item.tx_lon;
mapItem.latitude = Number(item.lat);
mapItem.longitude = Number(item.lon);
mapItem.id = index;

20
pages/pbService/index.js

@ -7,20 +7,36 @@ Page({
* 页面的初始数据
*/
data: {
jsj:null
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
commonApi._post("pbservice/Other/getClientConfig",{
unique_key: "wechatxcx"
}).then(res=>{
let data = JSON.parse(res.data);
console.log(data)
this.setData({
jsj:data.jiesongji
})
console.log(data)
})
},
gotoPath:function(e){
wx.navigateTo({
url: e.currentTarget.dataset.path,
})
},
jiesongji:function(){
if(!this.data.jsj) return;
wx.navigateToMiniProgram({
appId: this.data.jsj,
page:"page/home/webview/webview?hideShare=0&src=https%3A%2F%2Fopen.weixin.qq.com%2Fconnect%2Foauth2%2Fauthorize%3Fappid%3Dwx3827070276e49e30%26redirect_uri%3Dhttps%3A%2F%2Fwx.17u.cn%2Fflight%2Fgetopenid.html%3Furl%3Dhttps%25253A%25252F%25252Fwx.17u.cn%25252Finternalcarrebornwechat%25252Fview%25252Fmain.html%252523%25252FspecialCarIndex%25252FinstantCar%25253Frefid%25253D1563845199%26showwxpaytitle%3D1%26response_type%3Dcode%26scope%3Dsnsapi_base%26state%3D123%26connect_redirect%3D1%23wechat_redirect"
})
},
gotoUrl:function(e){
let url = e.currentTarget.dataset.url;
app.globalData.weburl = url;

8
pages/pbService/index.wxml

@ -36,10 +36,10 @@
<image src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/pbservice/pb7.png" mode="widthFix"></image>
<view>公共自行车</view>
</view>
<!-- <view class="pb-item">
<image src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/pbservice/pb8.png" mode="widthFix"></image>
<view>P+R停车场</view>
</view> -->
<view class="pb-item" bindtap="jiesongji">
<image src="https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/pbservice/pb18.png" mode="widthFix"></image>
<view>接送机</view>
</view>
</view>
</view>
<view class="pb-box">

1
pages/pbService/web/index.js

@ -13,7 +13,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(app.globalData.weburl)
this.setData({
webUrl:app.globalData.weburl
})

10
project.private.config.json

@ -20,9 +20,8 @@
"scene": null
},
{
"id": 1,
"name": "好行",
"pathName": "pages/list/haoxing/index",
"name": "春天十大必游",
"pathName": "pages/activity/springten/index",
"query": "",
"scene": null
},
@ -52,8 +51,9 @@
"scene": null
},
{
"name": "踏春",
"pathName": "pages/activity/spring2021/index",
"name": "pages/map/index",
"pathName": "pages/map/index",
"query": "type=2",
"scene": null
}
]

Loading…
Cancel
Save