From c912c8768e5acc871ad9e956585d2ca8151d52bc Mon Sep 17 00:00:00 2001 From: Myth Date: Fri, 13 Aug 2021 17:31:27 +0800 Subject: [PATCH] 1 --- app.json | 3 + pages/activity/tenscenic/index.js | 169 ++++++++++++++++++ pages/activity/tenscenic/index.json | 5 + pages/activity/tenscenic/index.wxml | 59 +++++++ pages/activity/tenscenic/index.wxss | 219 ++++++++++++++++++++++++ pages/culture/index.js | 15 +- pages/culture/index.wxml | 19 +- pages/culture/info/index.js | 30 ++-- pages/culture/info/index.wxml | 8 +- pages/culture/info/index.wxss | 9 +- pages/index/index.js | 105 +++++++++++- pages/index/index.wxml | 27 ++- pages/index/index.wxss | 2 +- pages/info/guideInfo/index.js | 134 +++++++++++++++ pages/info/guideInfo/index.json | 5 + pages/info/guideInfo/index.wxml | 15 ++ pages/info/guideInfo/index.wxss | 48 ++++++ pages/list/strategy/index.js | 2 +- pages/list/strategy/index.wxml | 26 +-- pages/list/strategy/index.wxss | 19 +- pages/list/techan/index.wxml | 2 +- pages/login/index.js | 33 +++- pages/login/index.wxml | 3 +- pages/order/components/contact/index.js | 6 +- pages/order/pay/index.js | 11 +- pages/order/scene/index.js | 30 ++++ pages/order/scene/index.wxml | 21 +-- pages/pbService/activity/index.js | 82 +++++++++ pages/pbService/activity/index.json | 5 + pages/pbService/activity/index.wxml | 13 ++ pages/pbService/activity/index.wxss | 43 +++++ pages/pbService/index.wxml | 7 +- project.private.config.json | 16 +- utils/https.js | 6 + utils/util.js | 4 +- 35 files changed, 1088 insertions(+), 113 deletions(-) create mode 100644 pages/activity/tenscenic/index.js create mode 100644 pages/activity/tenscenic/index.json create mode 100644 pages/activity/tenscenic/index.wxml create mode 100644 pages/activity/tenscenic/index.wxss create mode 100644 pages/info/guideInfo/index.js create mode 100644 pages/info/guideInfo/index.json create mode 100644 pages/info/guideInfo/index.wxml create mode 100644 pages/info/guideInfo/index.wxss create mode 100644 pages/pbService/activity/index.js create mode 100644 pages/pbService/activity/index.json create mode 100644 pages/pbService/activity/index.wxml create mode 100644 pages/pbService/activity/index.wxss diff --git a/app.json b/app.json index d0534fd..db3718c 100644 --- a/app.json +++ b/app.json @@ -34,6 +34,7 @@ "pages/info/activityInfo/index", "pages/info/showInfo/index", "pages/info/strategyInfo/index", + "pages/info/guideInfo/index", "pages/user/user", "pages/user/retail/index", "pages/user/retail/apply/index", @@ -94,6 +95,7 @@ "pages/list/daysu/index", "pages/list/daysu/detail/index", "pages/pbService/index", + "pages/pbService/activity/index", "pages/pbService/museum/index", "pages/pbService/museum/info/index", "pages/pbService/PRpark/index", @@ -132,6 +134,7 @@ "pages/activity/artfestival/index", "pages/activity/redlist/index", "pages/activity/subway/index", + "pages/activity/tenscenic/index", "pages/kj/index", "pages/kj/his/index", "pages/kj/info/index", diff --git a/pages/activity/tenscenic/index.js b/pages/activity/tenscenic/index.js new file mode 100644 index 0000000..48679d0 --- /dev/null +++ b/pages/activity/tenscenic/index.js @@ -0,0 +1,169 @@ +// pages/activity/tenscenic/index.js +import commonApi from "../../../utils/https/common" +import util from "../../../utils/util" +Page({ + + /** + * 页面的初始数据 + */ + data: { + areas:[], + tag1:0, + tag2:0, + areaIndex:0, + list:[], + total:1, + playFlag:false, + scrollTop:0, + realScrollTop:0, + navList: [ + {name: '全部', tag_id: [81,89,97,105,113,121,129,137,145,153]}, + {name: '必吃', tag_id: [82,90,98,106,114,122,130,138,146,154]}, + {name: '必住', tag_id: [83,91,99,107,115,123,131,139,147,155]}, + {name: '必游', tag_id: [84,92,100,108,116,124,132,140,148,156]}, + {name: '必购', tag_id: [85,93,101,109,117,125,133,141,149,157]}, + {name: '必娱', tag_id: [86,94,102,110,118,126,134,142,150,158]}, + {name: '必行', tag_id: [87,95,103,111,119,127,135,143,151,159]}, + {name: '必玩', tag_id: [88,96,104,112,120,128,136,144,152,160]}, + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + commonApi._post("act/get_suzhou_areas",{}).then(res=>{ + res.data.unshift({ + area_title:"全部", + area_id:"" + }) + this.setData({ + areas:res.data + }) + this.getList() + }) + }, + changeArea:function(e){ + this.setData({ + areaIndex:e.detail.value, + list:[], + total:1 + }) + this.getList() + }, + changeTag2:function(e){ + let tag = e.currentTarget.dataset.tag; + this.setData({ + tag2:tag, + list:[], + total:1, + realScrollTop:this.data.scrollTop + }) + this.getList(1) + }, + changeTag:function(e){ + let tag = e.currentTarget.dataset.tag; + this.setData({ + tag1:tag, + list:[], + total:1, + realScrollTop:this.data.scrollTop + }) + this.getList(1) + }, + getList:function(type){ + if(this.data.list.length>=this.data.total) return; + commonApi._post("scene/get_scene_by_tag",{ + area_id:this.data.areas[this.data.areaIndex].area_id, + tag_id:this.data.navList[this.data.tag2].tag_id[this.data.tag1], + offset:this.data.list.length, + limit:10, + del_html:true + }).then(res=>{ + this.setData({ + total:res.data.count, + list:this.data.list.concat(res.data.list) + }) + if(type==1){ + wx.pageScrollTo({ + duration: 0, + scrollTop:this.data.realScrollTop + }) + } + }) + }, + goTop:function(){ + wx.pageScrollTo({ + duration: 200, + scrollTop:0 + }) + }, + play:function(){ + this.setData({ + playFlag:true + }) + }, + playEnd:function(){ + this.setData({ + playFlag:false + }) + }, + gotoDetail:function(e){ + let item = e.currentTarget.dataset.item + util.gotoDetail(item) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + onPageScroll:function(e){ + console.log() + this.setData({ + scrollTop:e.scrollTop + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.getList() + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/activity/tenscenic/index.json b/pages/activity/tenscenic/index.json new file mode 100644 index 0000000..35cf02f --- /dev/null +++ b/pages/activity/tenscenic/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "title":"/pages/component/TitleHeader" + } +} \ No newline at end of file diff --git a/pages/activity/tenscenic/index.wxml b/pages/activity/tenscenic/index.wxml new file mode 100644 index 0000000..4bcb493 --- /dev/null +++ b/pages/activity/tenscenic/index.wxml @@ -0,0 +1,59 @@ + + + + + {{areas[areaIndex].area_title}} + + + + + + + + + + + + + 吴门望亭 + 虎丘塔 + 平江古巷 + 横塘驿站 + 宝带桥 + + + + 浒墅关 + 枫桥夜泊 + 水陆盘门 + 石湖五堤 + + 平望 + ·四河汇集 + + + + + {{item.name}} + + + + + + {{item.title}} + 上榜理由:{{item.brief_intro}} + 查看详情 + + +没有更多了 + + + + 顶部 + \ No newline at end of file diff --git a/pages/activity/tenscenic/index.wxss b/pages/activity/tenscenic/index.wxss new file mode 100644 index 0000000..149a48c --- /dev/null +++ b/pages/activity/tenscenic/index.wxss @@ -0,0 +1,219 @@ +/* pages/activity/tenscenic/index.wxss */ +page { + background: #61C6D1; +} +.picker { + position: absolute; + right: 30rpx; + margin-top: 30rpx; + padding: 0 20rpx; + line-height: 50rpx; + text-align: center; + height: 50rpx; + border: 1rpx solid #333333; + border-radius: 26rpx; + display: flex; + justify-content: center; + align-items: center; + font-size: 27rpx; +} +.picker .iconfont { + font-size: 22rpx; + margin-left: 5rpx; +} +.topimg { + display: block; + width: 100%; +} +.video-box { + display: flex; + align-items: center; + justify-content: center; + width: 677rpx; + height: 375rpx; + margin: 0 auto; + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/tenscenic/video.png); + background-size: 100% 100%; + margin-top: -235rpx; + position: relative; + z-index: 1; +} +.video-box1 { + display: flex; + align-items: center; + justify-content: center; + width: 677rpx; + height: 375rpx; + margin: 0 auto; + margin-top: -235rpx; + position: relative; + z-index: 1; +} +.video-box1 video { + display: block; + width: 677rpx; + height: 382rpx; + border-radius: 20rpx; +} +.video-box image { + width: 93rpx; + height: 93rpx; + display: block; +} +.bridge-box { + position: relative; + padding-top: 87rpx; +} +.bridge-box image { + display: block; + width: 100%; +} +.tags { + display: flex; + justify-content: center; + position: absolute; + left: 24rpx; + right: 24rpx; + top: 35rpx; +} +.tag { + min-width: 130rpx; + max-width: 147rpx; + border: 1rpx solid; + margin-right: 9rpx; + height: 45rpx; + text-align: center; + position: relative; + color: #fff; + line-height: 45rpx; + font-size: 30rpx; +} +.tag::after { + content: "1"; + font-size: 0; + width: 4rpx; + height: 36rpx; + background: white; + position: absolute; + left: 63rpx; + display: block; + top: 0; + margin-top: -50rpx; +} +.absoluetTags .tag::after { + top: auto; + margin-top: 10rpx; +} +.tags .tag:last-child { + margin-right: 0; +} +.absoluetTags .tag:nth-child(1),.absoluetTags .tag:nth-child(5){ + margin-top: 25rpx; +} +.absoluetTags .tag:nth-child(2),.absoluetTags .tag:nth-child(4){ + margin-top: 8rpx; +} +.tags .tag.active { + background: white; + color: #27899E; + border-color: #ffffff; +} +.new-tags { + display: flex; + flex-wrap: wrap; + margin: 0 23rpx; + margin-top: 35rpx; + justify-content: space-between; + padding-top: 9rpx; + padding-bottom: 4rpx; + border-top: 1px solid #27899E; + border-bottom: 1px solid #27899E; +} +.new-tag { + width: 158rpx; + height: 67rpx; + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/tenscenic/noselect.png); + background-size: 100% 100%; + color: #27899E; + font-size: 28rpx; + text-align: center; + line-height: 67rpx; + margin-bottom: 11rpx; +} +.new-tag.active { + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/tenscenic/select.png); + background-size: 100% 100%; +} +.item { + margin: 24rpx; + display: flex; + justify-content: space-between; + padding: 21rpx; + border-radius: 20rpx; + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/tenscenic/bg.png); + background-size: 100% 100%; + height: 135rpx; +} +.item image { + display: block; + flex-shrink: 0; + width: 200rpx; + height: 135rpx; + border-radius: 10rpx; +} +.info { + flex: 1; + margin-left: 25rpx; + width: 400rpx; +} +.info .title { + font-size: 31rpx; + color: #333333; + font-weight: bold; +} +.info .subtitle { + color: #DD952B; + font-size: 24rpx; + margin: 5rpx 0; +} +.info .btn { + width: 153rpx; + line-height: 44rpx; + background: #27899E; + border-radius: 22rpx; + text-align: center; + font-size: 24rpx; + color: #fff; + float: right; +} +.fixed-top { + position: fixed; + width: 83rpx; + height: 83rpx; + background-color: rgba(221, 149, 43, .5); + color: #fff; + border-radius: 50%; + text-align: center; + right: 30rpx; + bottom: 30rpx; + z-index: 2; + font-size: 25rpx; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} +.fixed-top image { + display: block; + width: 25rpx; + height: 26rpx; + margin: 0 auto; +} +.fixed-top view { +} +.nomore { + text-align: center; + font-size: 26rpx; + color: #fff; + opacity: 0.5; +} \ No newline at end of file diff --git a/pages/culture/index.js b/pages/culture/index.js index e665346..9e6a6c6 100644 --- a/pages/culture/index.js +++ b/pages/culture/index.js @@ -15,7 +15,8 @@ Page({ tagKey:"", page_no:1, total:1, - list:[] + list:[], + is_can_booking:0 }, /** @@ -103,13 +104,23 @@ Page({ }) this.getList() }, + changeType:function(e){ + this.setData({ + is_can_booking:e.currentTarget.dataset.type, + page_no:1, + list:[], + total:1 + }) + this.getList() + }, getList:function(){ if(this.data.total<=this.data.list.length) return; commonApi._post("pbservice/Culture/getCultureList",{ page_no:this.data.page_no, page_num:20, date:this.data.date, - cate_id:this.data.tagKey + cate_id:this.data.tagKey, + is_can_booking:this.data.is_can_booking }).then(res=>{ this.setData({ total:res.data.total, diff --git a/pages/culture/index.wxml b/pages/culture/index.wxml index ff28094..7ac3c03 100644 --- a/pages/culture/index.wxml +++ b/pages/culture/index.wxml @@ -1,9 +1,9 @@ - + {{item.value}} @@ -31,13 +31,12 @@ {{item.name}} {{item.begin_date}}-{{item.end_date}} ~ - + - - - 无需预约 - + 已结束 + 立即预约 + 无需预约 + --> \ No newline at end of file diff --git a/pages/culture/info/index.js b/pages/culture/info/index.js index 37f3a63..d243c9c 100644 --- a/pages/culture/info/index.js +++ b/pages/culture/info/index.js @@ -47,26 +47,18 @@ Page({ },500) }, order:function(){ - let skuid = this.data.info.sku_id; - if(!skuid) return; - commonApi._post("product/get_sku_detail_by_id",{ - sku_id:skuid - }).then(res=>{ - if(!res.data){ - wx.showToast({ - title: '本活动不支持预约', - icon:'none' - }) - return; + app.globalData.couponInfo = null; + app.globalData.product = { + sku:{ + sku_name:"" + }, + product:{ + title:this.data.info.name, + id:this.data.info.id } - app.globalData.couponInfo = null; - app.globalData.product = { - sku:res.data, - product:res.data.product - } - wx.navigateTo({ - url: '/pages/order/scene/index?type=museum', - }) + } + wx.navigateTo({ + url: '/pages/order/scene/index?type=activity', }) }, diff --git a/pages/culture/info/index.wxml b/pages/culture/info/index.wxml index 42595d9..02ce4bb 100644 --- a/pages/culture/info/index.wxml +++ b/pages/culture/info/index.wxml @@ -14,13 +14,13 @@ 活动地点:{{info.detail_address}} - 本活动无需在线预约,可直接前往。更多详情请咨询活动主办方工作人员。 + 活动详情 - \ No newline at end of file + \ No newline at end of file diff --git a/pages/culture/info/index.wxss b/pages/culture/info/index.wxss index a362b80..e39e809 100644 --- a/pages/culture/info/index.wxss +++ b/pages/culture/info/index.wxss @@ -70,7 +70,7 @@ .bottom-fixed { position: fixed; width: 750rpx; - height: 104rpx; + height: 100rpx; background: #FFFFFF; left: 0; bottom: 0; @@ -81,10 +81,9 @@ justify-content: center; } .bottom-btn { - width: 391rpx; - line-height: 74rpx; - background: #D62828; - border-radius: 37rpx; + width: 750rpx; + line-height: 100rpx; + background: rgba(15, 144, 149, 1); font-size: 31rpx; font-weight: 500; color: #fff; diff --git a/pages/index/index.js b/pages/index/index.js index c1274db..da9e62d 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -24,7 +24,8 @@ Page({ listMore:true, isTest:false, lat:"", - lon:"" + lon:"", + urltopage:{} }, onLoad: function (options) { if(options.from){ @@ -61,6 +62,14 @@ Page({ }) this.getFourProduct() }) + commonApi._post("pbservice/Other/getClientConfig",{ + unique_key:"urltopage" + }).then(res=>{ + let data = JSON.parse(res.data) + this.setData({ + urltopage:data + }) + }) this.getTwoProduct() this.getBanner() this.getWeather() @@ -97,18 +106,36 @@ Page({ this.getFourProduct() }, getBanner:function(){ - commonApi._post("adv/getAdvByKey",{ - key:"xcxBanner" + // commonApi._post("adv/getAdvByKey",{ + // key:"xcxBanner" + // }).then(res=>{ + // console.log(res) + // this.setData({ + // banner:res.data.content || [] + // }) + // }) + // commonApi._post("adv/getAdvByKey",{ + // key:"xiaobanner" + // }).then(res=>{ + // this.setData({ + // xiaobanner:res.data.content || [] + // }) + // }) + // return; + commonApi._post("adv/getAdv",{ + position:0, + type_id:3 }).then(res=>{ this.setData({ - banner:res.data.content || [] + banner:res.data || [] }) }) - commonApi._post("adv/getAdvByKey",{ - key:"xiaobanner" + commonApi._post("adv/getAdv",{ + position:1, + type_id:3 }).then(res=>{ this.setData({ - xiaobanner:res.data.content || [] + xiaobanner:res.data || [] }) }) }, @@ -284,10 +311,70 @@ Page({ }, // 轮播图点击 bannerClick:function(e){ + let item = e.currentTarget.dataset.item; + console.log(item) + switch(item.jump_type){ + case 0: + break; + case 1: + util.gotoDetail(item.product_model) + break; + case 2: + if(item.front_model && item.front_model.mini){ + wx.navigateTo({ + url: "/"+item.front_model.mini + }) + } + break; + case 3: + if((item.tdata.indexOf('http://')!=-1 || item.tdata.indexOf('https://')!=-1) && item.tdata.indexOf('m.cloud.sz-trip.com')==-1){ + // 外部h5 + app.globalData.weburl = item.tdata; + wx.navigateTo({ + url:"/pages/pbService/web/index" + }) + } + else { + let page = item.tdata.split("/"); + page = page[page.length-1].split("?") + let url = this.data.urltopage[page[0]]; + console.log(url) + if(url && url.indexOf('map')!=-1){ + let types = ['','scenic','venue','post','restaurant','relic','tenscenic','cinema','academes'],type = page[1]?page[1].split("="):[]; + wx.reLaunch({ + url: url+"?type="+(type[1]?types.findIndex(t=>t==type[1]):null) + }) + } + else { + wx.navigateTo({ + url: url, + }) + } + } + break; + case 4: + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path:item.tdata.page + }) + break; + default: + break; + } + return; + + }, + bannerClick2:function(e){ let item = e.currentTarget.dataset.item; if(item.action=='href'){ - if(item.href.indexOf('map/index')!=-1){ - console.log(item.href) + if(item.href.indexOf(",")!=-1){ + let info = item.href.split(","); + wx.navigateToMiniProgram({ + appId: info[0], + path:info[1] + }) + } + else if(item.href.indexOf('map/index')!=-1){ wx.reLaunch({ url: item.href }) diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 70e6234..7581b01 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -15,10 +15,18 @@ autoplay="{{true}}" interval="{{5000}}" duration="{{300}}"> - + + @@ -106,10 +114,18 @@ autoplay="{{true}}" interval="{{5000}}" duration="{{300}}"> - + + @@ -146,15 +162,14 @@ 景区舒适度 --> - - - 公共自行车 + + + 精彩回顾 书香借阅 - 非遗传承 diff --git a/pages/index/index.wxss b/pages/index/index.wxss index bc639fb..06dd536 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -289,7 +289,7 @@ font-size: 22rpx; } .pbservice { - width: calc(175rpx * 6); + width: calc(175rpx * 5); display: flex; margin-top: 20rpx; flex-wrap: wrap; diff --git a/pages/info/guideInfo/index.js b/pages/info/guideInfo/index.js new file mode 100644 index 0000000..a8ef458 --- /dev/null +++ b/pages/info/guideInfo/index.js @@ -0,0 +1,134 @@ +// pages/info/guideInfo/index.js +import commonApi from "../../../utils/https/common" +Page({ + + /** + * 页面的初始数据 + */ + data: { + info:null, + images:[], + page:0 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + commonApi._post("travels/getDetail",{ + id:options.id + }).then(res=>{ + console.log(res) + let images = []; + //匹配图片(g表示匹配所有结果i表示区分大小写) + var imgReg = /|\/>)/gi; + //匹配src属性 + var srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i; + var arr = res.data.detail.match(imgReg); + for (var i = 0; i < arr.length; i++) { + var src = arr[i].match(srcReg); + //获取图片地址 + if (src[1]) { + images.push(src[1]) + } + } + this.setData({ + images:images + }) + }) + commonApi._post("travels/addView",{ + id:options.id + }).then(res=>{ + }) + }, + prevPage:function(){ + if(this.data.page==0) return; + this.setData({ + page:this.data.page-1 + }) + }, + nextPage:function(){ + if(this.data.page==this.data.images.length-1) return; + this.setData({ + page:this.data.page+1 + }) + }, + changePage:function(e){ + this.setData({ + page:e.detail.current + }) + }, + showImg:function(e){ + // wx.showLoading({ + // title: '加载中' + // }) + wx.previewImage({ + urls: this.data.images, + current:e.currentTarget.dataset.img + }) + return; + wx.downloadFile({ + url: e.currentTarget.dataset.img, + success:function(res){ + if (res.statusCode === 200) { + wx.previewImage({ + urls: [res.tempFilePath], + current:res.tempFilePath + }) + } + }, + complete:function(){ + wx.hideLoading({ + }) + } + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/info/guideInfo/index.json b/pages/info/guideInfo/index.json new file mode 100644 index 0000000..35cf02f --- /dev/null +++ b/pages/info/guideInfo/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "title":"/pages/component/TitleHeader" + } +} \ No newline at end of file diff --git a/pages/info/guideInfo/index.wxml b/pages/info/guideInfo/index.wxml new file mode 100644 index 0000000..98d7728 --- /dev/null +++ b/pages/info/guideInfo/index.wxml @@ -0,0 +1,15 @@ + + + + + + + + + + + 上一页 + {{page+1}} / {{images.length}} + 下一页 + + \ No newline at end of file diff --git a/pages/info/guideInfo/index.wxss b/pages/info/guideInfo/index.wxss new file mode 100644 index 0000000..33ae5b2 --- /dev/null +++ b/pages/info/guideInfo/index.wxss @@ -0,0 +1,48 @@ +/* pages/info/guideInfo/index.wxss */ +.swiper,.info image { + display: block; + width: 100%; + height: 100%; +} +.info { + display: flex; + align-items: center; + justify-content: center; + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; +} +.pages { + display: flex; + align-items: center; + justify-content: center; + position: absolute; + left: 0; + right: 0; + bottom: 100rpx; +} +.pages .btn { + font-size: 28rpx; + background: white; + line-height: 50rpx; + width: 140rpx; + text-align: center; + color: #815D3A; + border: 1rpx solid #815D3A; + border-radius: 20rpx; +} +.pagenum { + margin: 0 30rpx; + color: #815D3A; + font-size: 28rpx; +} +swiper { + width: 100%; + height: 100%; +} +.img-box { + display: flex; + align-items: center; +} \ No newline at end of file diff --git a/pages/list/strategy/index.js b/pages/list/strategy/index.js index c7fecba..61a1338 100644 --- a/pages/list/strategy/index.js +++ b/pages/list/strategy/index.js @@ -10,7 +10,7 @@ Page({ page_no:1, total:1, keywords:"", - type:0, + type:1, showKeyword:"" }, diff --git a/pages/list/strategy/index.wxml b/pages/list/strategy/index.wxml index 1876c22..2ec0276 100644 --- a/pages/list/strategy/index.wxml +++ b/pages/list/strategy/index.wxml @@ -5,17 +5,19 @@ 搜索 - + - - - - 游记攻略 - - - - 旅游指南 + + + + 官方手册 + + + + + + 达人攻略 @@ -36,9 +38,10 @@ - + {{item.title}} + @@ -47,8 +50,9 @@ 查看详情 > - + + 暂无内容 \ No newline at end of file diff --git a/pages/list/strategy/index.wxss b/pages/list/strategy/index.wxss index 56cfab8..2dd2d8c 100644 --- a/pages/list/strategy/index.wxss +++ b/pages/list/strategy/index.wxss @@ -3,7 +3,7 @@ width: 100%; } page { - background: #C1E678; + background: #EADFD4; } .search-box { position: absolute; @@ -11,7 +11,6 @@ page { right: 30rpx; height: 60rpx; background: #FFFFFF; - border: 2rpx solid #548027; border-radius: 30rpx; box-sizing: border-box; display: flex; @@ -34,14 +33,14 @@ page { line-height: 50rpx; text-align: center; color: #fff; - background: #548027; + background: #815D3A; border-radius: 25rpx; } .types { display: flex; - margin: 0 50rpx; + margin: 0 30rpx; justify-content: space-between; - height: 100rpx; + height: 80rpx; margin-top: 30rpx; } .type { @@ -49,17 +48,15 @@ page { align-items: center; justify-content: center; height: 80rpx; - border-radius: 40rpx; - width: 300rpx; - background:white; + width: 330rpx; position: relative; } .type .bgimg { position: absolute; display: block; left: 0; - width: 300rpx; - height: 100rpx; + width: 330rpx; + height: 80rpx; top: 0; z-index: -1; } @@ -132,6 +129,6 @@ page { margin-right: 8rpx; } .btn { - color: #548027; + color: #815D3A; font-size: 22rpx; } \ No newline at end of file diff --git a/pages/list/techan/index.wxml b/pages/list/techan/index.wxml index 91a60ba..6c45695 100644 --- a/pages/list/techan/index.wxml +++ b/pages/list/techan/index.wxml @@ -22,7 +22,7 @@ {{item.start_price/100}} - + {{item.title}} {{item.price/100}}{{item.market_price/100}} diff --git a/pages/login/index.js b/pages/login/index.js index eb02fb5..e80e20e 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -8,22 +8,36 @@ Page({ * 页面的初始数据 */ data: { - err:null + err:null, + canIUseGetUserProfile:false }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { + if (wx.getUserProfile) { + this.setData({ + canIUseGetUserProfile: true + }) + } }, cancel:function(){ wx.reLaunch({ url: '/pages/index/index', }) }, - getUserInfo:function(e){ + getUserProfile:function(e){ + wx.getUserProfile({ + desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 + success: (res) => { + this.getUserInfo(res,1) + } + }) + }, + getUserInfo:function(e,type){ let that = this; - if (!e.detail.userInfo){ + if (e.detail && !e.detail.userInfo || !e.userInfo){ wx.reLaunch({ url: '/pages/index/index', }) @@ -31,7 +45,18 @@ Page({ } wx.login({ success: function (r) { - user._post("user/wxLogin", { code: r.code, encryptedData: e.detail.encryptedData, iv: e.detail.iv, loginType: 3 }).then(r => { + let api; + if(type==1){ + api = user._post("user/wxLogin_v2", { code: r.code, loginType: 3, arrayInfo: { + nickName:e.userInfo.nickName, + avatarUrl:e.userInfo.avatarUrl, + gender:e.userInfo.gender + }}) + } + else { + api = user._post("user/wxLogin", { code: r.code, encryptedData: e.detail.encryptedData, iv: e.detail.iv, loginType: 3 }) + } + api.then(r => { console.log(r) // return; // r.data.isBind是false的时候去绑定手机号 该用户没有注册过 diff --git a/pages/login/index.wxml b/pages/login/index.wxml index 49c99ab..281becb 100644 --- a/pages/login/index.wxml +++ b/pages/login/index.wxml @@ -9,5 +9,6 @@ - + + \ No newline at end of file diff --git a/pages/order/components/contact/index.js b/pages/order/components/contact/index.js index 57937bf..cd9ecda 100644 --- a/pages/order/components/contact/index.js +++ b/pages/order/components/contact/index.js @@ -14,6 +14,10 @@ Component({ maxNum:{ type:String, value:"-1" + }, + type:{ + type:String, + value:"" } }, @@ -215,7 +219,7 @@ Component({ }) console.log(traveller_limit_num,num,item) // 如果是要新增选中 并且当前选中数量已经超过或者等于了最大出行人限制 - if((app.globalData.kjId) && num==1 && item.selected!=1){ + if((app.globalData.kjId || this.properties.type=='activity') && num==1 && item.selected!=1){ wx.showToast({ title: '最多只能选择一个出行人', icon:'none' diff --git a/pages/order/pay/index.js b/pages/order/pay/index.js index 5d5b385..f3e6188 100644 --- a/pages/order/pay/index.js +++ b/pages/order/pay/index.js @@ -51,18 +51,17 @@ Page({ * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { - payList:[] }, /** * 生命周期函数--监听页面显示 */ onShow: function () { - commonApi.user_post("subwallet.ermb/wallet",{}).then(res=>{ - this.setData({ - payList:res.data - }) - }) + // commonApi.user_post("subwallet.ermb/wallet",{}).then(res=>{ + // this.setData({ + // payList:res.data + // }) + // }) commonApi.user_post("order/query",{ order_id:this.data.id }).then(res=>{ diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js index e0b99b6..c50a779 100644 --- a/pages/order/scene/index.js +++ b/pages/order/scene/index.js @@ -203,6 +203,36 @@ Page({ } }) }, + // 活动预约 + activityOrder:function(){ + if(this.data.linkmanList && this.data.linkmanList.length>0){ + commonApi.user_post("pbservice/Culture/booking",{ + id:this.data.product.product.id, + name:this.data.linkmanList[0].name, + card_number:this.data.linkmanList[0].id_number, + tel:this.data.linkmanList[0].tel + }).then(res=>{ + if(res.code==1){ + wx.showToast({ + title: '预约成功', + icon:'success' + }) + setTimeout(()=>{ + wx.navigateBack() + },1000) + return; + } + }) + } + else { + wx.showToast({ + title: '请选择出行人', + icon:'none' + }) + return; + } + + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/order/scene/index.wxml b/pages/order/scene/index.wxml index 455e630..7c31c32 100644 --- a/pages/order/scene/index.wxml +++ b/pages/order/scene/index.wxml @@ -2,31 +2,32 @@ {{product.product.title + product.sku.sku_name}} - 免费 + 免费 - + 购票数量 - + {{productNum}} - + - - - + + + 订单备注 - - + + 合计:¥0 合计:¥{{((singlePrice * productNum - (coupon?coupon.activity.money:0))>0?(singlePrice * productNum - (coupon?coupon.activity.money:0)):0)/ 100}} 提交订单 - 立即预约 + 立即预约 + 立即预约 \ No newline at end of file diff --git a/pages/pbService/activity/index.js b/pages/pbService/activity/index.js new file mode 100644 index 0000000..05a594e --- /dev/null +++ b/pages/pbService/activity/index.js @@ -0,0 +1,82 @@ +// pages/pbService/activity/index.js +import https from "../../../utils/https/common" +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:[], + page:1, + total:1 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getList() + }, + getList:function(){ + if(this.data.list.length>=this.data.total) return; + https._post("review/getList",{ + limit:10, + page:this.data.page + }).then(res=>{ + this.setData({ + total:res.data.total, + list:this.data.list.concat(res.data.data), + page:this.data.page+1 + }) + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + 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/pbService/activity/index.json b/pages/pbService/activity/index.json new file mode 100644 index 0000000..35cf02f --- /dev/null +++ b/pages/pbService/activity/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "title":"/pages/component/TitleHeader" + } +} \ No newline at end of file diff --git a/pages/pbService/activity/index.wxml b/pages/pbService/activity/index.wxml new file mode 100644 index 0000000..a12beda --- /dev/null +++ b/pages/pbService/activity/index.wxml @@ -0,0 +1,13 @@ + + + + + + + + + {{item.title}} + {{item.desc}} + + + diff --git a/pages/pbService/activity/index.wxss b/pages/pbService/activity/index.wxss new file mode 100644 index 0000000..6835de1 --- /dev/null +++ b/pages/pbService/activity/index.wxss @@ -0,0 +1,43 @@ +/* pages/pbService/activity/index.wxss */ +.topimg { + display: block; + width: 100%; +} +.item { + margin: 40rpx 27rpx; + position: relative; +} +.item .bgimg { + display: block; + width: 100%; + height: 427rpx; +} +.list .item:nth-child(1){ + margin-top: -40rpx; + z-index: 1; +} +page { + background: #D1C0A5; +} +.main-img { + width: 539rpx; + height: 293rpx; + background: #D1C0A5; + border-radius: 33rpx; + position: absolute; + left: 20rpx; + top: 25rpx; +} +.info { + position: absolute; + bottom: 15rpx; + color: #fff; + left: 35rpx; + font-size: 23rpx; + right: 135rpx; +} +.info .title { + margin-bottom: 6rpx; + font-size: 33rpx; + font-weight: 600; +} \ No newline at end of file diff --git a/pages/pbService/index.wxml b/pages/pbService/index.wxml index 63fc1b7..86d22e1 100644 --- a/pages/pbService/index.wxml +++ b/pages/pbService/index.wxml @@ -47,7 +47,7 @@ - 文体查询 + 文旅查询 @@ -89,5 +89,10 @@ 博物馆查询 + + + 精彩回顾 + + \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 0cad5de..a74e354 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -13,15 +13,15 @@ "miniprogram": { "list": [ { - "name": "pages/list/six/index", - "pathName": "pages/list/six/index", + "name": "pages/activity/tenscenic/index", + "pathName": "pages/activity/tenscenic/index", "query": "id=5442&retailId=17020017459&skuid=1209&gid=3841", "scene": null }, { "name": "pages/info/sceneProductInfo/index", "pathName": "pages/info/sceneProductInfo/index", - "query": "id=5442&retailId=17020017459", + "query": "id=4400", "scene": null }, { @@ -49,14 +49,14 @@ "scene": null }, { - "name": "PRPark", - "pathName": "pages/pbService/PRpark/index", - "query": "category_id=27", + "name": "pages/pbService/web/index", + "pathName": "pages/pbService/web/index", + "query": "", "scene": null }, { - "name": "pages/activity/subway/index", - "pathName": "pages/activity/subway/index", + "name": "pages/culture/index", + "pathName": "pages/culture/index", "query": "id=10973", "scene": null } diff --git a/utils/https.js b/utils/https.js index bec3577..b5c6f07 100644 --- a/utils/https.js +++ b/utils/https.js @@ -211,6 +211,12 @@ const set_logininfo = r => { const checkLogin = () => { // 判断是否已经授权过 let page = getCurrentPages(); + if(page[page.length-1].route!='pages/login/index') { + wx.navigateTo({ + url: '/pages/login/index', + }) + } + return; wx.getSetting({ success: res => { if (res.authSetting['scope.userInfo']) { diff --git a/utils/util.js b/utils/util.js index 429c941..74b37bd 100644 --- a/utils/util.js +++ b/utils/util.js @@ -203,13 +203,13 @@ const gotoDetail = (item) =>{ case "activity": // 活动 wx.navigateTo({ - url: '/pages/info/activityInfo/index?id='+item.act_calendar_id + url: '/pages/info/activityInfo/index?id='+(item.act_calendar_id || item.id) }) break; case "movie": // 产品 电影票 wx.navigateTo({ - url: '/pages/list/movieticket/list/info/index?id='+item.third_id+'&title='+item.title + url: '/pages/list/movieticket/list/info/index?id='+(item.third_id || item.id)+'&title='+item.title }) break; case "cinema":