From 8163e3ec074b0994b44943b16ac31e654ba90af0 Mon Sep 17 00:00:00 2001 From: yvette Date: Fri, 26 Mar 2021 10:21:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +- app.json | 3 +- pages/activity/springten/index.js | 126 +++++++++++++++++++++++++ pages/activity/springten/index.json | 5 + pages/activity/springten/index.wxml | 30 ++++++ pages/activity/springten/index.wxss | 123 ++++++++++++++++++++++++ pages/index/index.js | 14 ++- pages/index/index.wxml | 2 +- pages/info/hotelProductInfo/index.wxml | 2 +- pages/list/activitynew/index.js | 40 +++++++- pages/list/activitynew/index.wxml | 5 +- pages/list/activitynew/index.wxss | 33 ++++++- pages/list/hotel/index.js | 2 +- pages/list/hotel/index.wxml | 4 +- pages/list/six/index.wxss | 1 + pages/map/index.js | 2 + pages/pbService/index.js | 20 +++- pages/pbService/index.wxml | 8 +- pages/pbService/web/index.js | 1 - project.private.config.json | 10 +- 20 files changed, 405 insertions(+), 30 deletions(-) create mode 100644 pages/activity/springten/index.js create mode 100644 pages/activity/springten/index.json create mode 100644 pages/activity/springten/index.wxml create mode 100644 pages/activity/springten/index.wxss diff --git a/app.js b/app.js index 32f9a82..3bb97aa 100644 --- a/app.js +++ b/app.js @@ -87,7 +87,9 @@ App({ // "EXPIRED":"已过期/已失效", "REFUNDING":"退款中" , 'REFUND_REFUSE':'退款拒绝', - 'REFUND_ERROR':'退款异常' + 'REFUND_ERROR':'退款异常', + 'OFFLINE_REFUND':'线下退款完成', + 'OFFLINE_WAIT':'线下退款处理中' }, codeState:['未使用','已使用','已失效','已取消'], weburl:"", diff --git a/app.json b/app.json index 699c400..6c8267c 100644 --- a/app.json +++ b/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": { diff --git a/pages/activity/springten/index.js b/pages/activity/springten/index.js new file mode 100644 index 0000000..0496b81 --- /dev/null +++ b/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 () { + + } +}) \ No newline at end of file diff --git a/pages/activity/springten/index.json b/pages/activity/springten/index.json new file mode 100644 index 0000000..35cf02f --- /dev/null +++ b/pages/activity/springten/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "title":"/pages/component/TitleHeader" + } +} \ No newline at end of file diff --git a/pages/activity/springten/index.wxml b/pages/activity/springten/index.wxml new file mode 100644 index 0000000..ca61968 --- /dev/null +++ b/pages/activity/springten/index.wxml @@ -0,0 +1,30 @@ + + + + + + + {{item}} + + + + + + + + + {{item.title}} + + {{item}} + + 地址:{{item.address}} + + + 上榜理由:{{item.brief_intro}} + 前往购买 + 打开导航 + 查看详情 + 立即预订 + + —— 没有更多了 —— + \ No newline at end of file diff --git a/pages/activity/springten/index.wxss b/pages/activity/springten/index.wxss new file mode 100644 index 0000000..9e6a391 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index 6648052..d91b9db 100644 --- a/pages/index/index.js +++ b/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; diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 26c50d9..9fa639f 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -34,7 +34,7 @@ - 夜游苏州 + 姑苏八点半 diff --git a/pages/info/hotelProductInfo/index.wxml b/pages/info/hotelProductInfo/index.wxml index 054c406..a51ef33 100644 --- a/pages/info/hotelProductInfo/index.wxml +++ b/pages/info/hotelProductInfo/index.wxml @@ -53,7 +53,7 @@ {{item.room_name}} {{item.useable_area?(item.useable_area+'m²'):''}} {{item.bedDesc}}{{item.bedType}}x{{item.bedCount}} {{item.window?item.window:''}} - {{item.low_price/100}} + {{item.low_price>0?item.low_price/100:'0'}} diff --git a/pages/list/activitynew/index.js b/pages/list/activitynew/index.js index 0eba8f7..002e549 100644 --- a/pages/list/activitynew/index.js +++ b/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; diff --git a/pages/list/activitynew/index.wxml b/pages/list/activitynew/index.wxml index b2ae1fb..95fa45f 100644 --- a/pages/list/activitynew/index.wxml +++ b/pages/list/activitynew/index.wxml @@ -42,13 +42,14 @@ diff --git a/pages/list/activitynew/index.wxss b/pages/list/activitynew/index.wxss index e77f304..290422e 100644 --- a/pages/list/activitynew/index.wxss +++ b/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 { diff --git a/pages/list/hotel/index.js b/pages/list/hotel/index.js index 4714d36..1ba78f1 100644 --- a/pages/list/hotel/index.js +++ b/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:[], diff --git a/pages/list/hotel/index.wxml b/pages/list/hotel/index.wxml index 38aa67a..012c28f 100644 --- a/pages/list/hotel/index.wxml +++ b/pages/list/hotel/index.wxml @@ -2,8 +2,8 @@ - 星级酒店 - 精品酒店 + 精品酒店 + 舒适酒店 经济连锁 特色民宿 diff --git a/pages/list/six/index.wxss b/pages/list/six/index.wxss index db50b93..48f6536 100644 --- a/pages/list/six/index.wxss +++ b/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; diff --git a/pages/map/index.js b/pages/map/index.js index 02f12f8..3a5f88e 100644 --- a/pages/map/index.js +++ b/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; diff --git a/pages/pbService/index.js b/pages/pbService/index.js index 580563e..e1a5424 100644 --- a/pages/pbService/index.js +++ b/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; diff --git a/pages/pbService/index.wxml b/pages/pbService/index.wxml index 10aad2e..fb16c2b 100644 --- a/pages/pbService/index.wxml +++ b/pages/pbService/index.wxml @@ -36,10 +36,10 @@ 公共自行车 - + + + 接送机 + diff --git a/pages/pbService/web/index.js b/pages/pbService/web/index.js index 6690866..0d59da0 100644 --- a/pages/pbService/web/index.js +++ b/pages/pbService/web/index.js @@ -13,7 +13,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - console.log(app.globalData.weburl) this.setData({ webUrl:app.globalData.weburl }) diff --git a/project.private.config.json b/project.private.config.json index fb2130f..67eafcc 100644 --- a/project.private.config.json +++ b/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 } ]