From 59da6d10896fd7da684aac2e49ecffd95a5826ea Mon Sep 17 00:00:00 2001 From: Myth Date: Wed, 20 Oct 2021 11:12:24 +0800 Subject: [PATCH] 1 --- pages/culture/index.js | 8 +- pages/culture/index.wxml | 2 +- pages/index/index.js | 10 ++- pages/index/index.wxml | 33 ++++---- pages/index/index.wxss | 13 ++++ pages/info/culturalUnitInfo/index.js | 19 ++++- pages/info/culturalUnitInfo/index.wxml | 36 ++++++++- pages/info/culturalUnitInfo/index.wxss | 95 ++++++++++++++++------ pages/info/postProductInfo/index.js | 40 ++++++---- pages/list/road/index.js | 2 +- pages/list/road/index.wxml | 9 ++- pages/list/road/index.wxss | 33 +++++++- pages/list/sale/index.js | 29 ++++++- pages/list/sale/index.wxml | 67 ++++++++++------ pages/pbService/feiyi/info/index.js | 19 ++++- pages/pbService/feiyi/info/index.wxml | 35 ++++++--- pages/pbService/feiyi/info/index.wxss | 86 ++++++++++++++++++-- pages/pbService/gym/info/index.js | 18 ++++- pages/pbService/gym/info/index.wxml | 50 ++++++++---- pages/pbService/gym/info/index.wxss | 91 ++++++++++++++++++---- pages/pbService/museum/info/index.js | 20 ++++- pages/pbService/museum/info/index.wxml | 63 +++++++++------ pages/pbService/museum/info/index.wxss | 104 +++++++++++++++++-------- pages/pbService/wwcx/info/index.js | 19 ++++- pages/pbService/wwcx/info/index.wxml | 39 +++++++--- pages/pbService/wwcx/info/index.wxss | 90 +++++++++++++++++---- project.private.config.json | 6 +- 27 files changed, 805 insertions(+), 231 deletions(-) diff --git a/pages/culture/index.js b/pages/culture/index.js index 9e6a6c6..bf10adb 100644 --- a/pages/culture/index.js +++ b/pages/culture/index.js @@ -25,8 +25,8 @@ Page({ onLoad: function (options) { let d = new Date(),that = this; let month = d.getMonth() + 1,day = d.getDate(); - month = month>10?month:("0"+month); - day = day>10?day:("0"+day); + month = month>=10?month:("0"+month); + day = day>=10?day:("0"+day); this.setData({ selectDay:d.getTime(), date:d.getFullYear()+"-"+month+"-"+day @@ -66,8 +66,8 @@ Page({ changeDate:function(e){ let times = e.currentTarget.dataset.times,d = new Date(times); let month = d.getMonth()+1,day = d.getDate(); - month = month>10?month:('0'+month); - day = day>10?day:('0'+day); + month = month>=10?month:('0'+month); + day = day>=10?day:('0'+day); this.setData({ selectDay: times, date:d.getFullYear()+"-"+month+"-"+day, diff --git a/pages/culture/index.wxml b/pages/culture/index.wxml index 7ac3c03..ebe1a87 100644 --- a/pages/culture/index.wxml +++ b/pages/culture/index.wxml @@ -29,7 +29,7 @@ {{item.name}} - {{item.begin_date}}-{{item.end_date}} + {{item.begin_date}}-{{item.end_date}} ~ - + + + + {{info.company_name}} + + + 地址:{{info.address}} + + + + 电话:{{info.mobile}} + + + + + + + + + + + + + {{info.company_name}} + + + + + + + + + diff --git a/pages/info/culturalUnitInfo/index.wxss b/pages/info/culturalUnitInfo/index.wxss index 663f9f5..675868e 100644 --- a/pages/info/culturalUnitInfo/index.wxss +++ b/pages/info/culturalUnitInfo/index.wxss @@ -1,32 +1,83 @@ -.swiper { - width: 100%; - height: 400rpx; +/* pages/pbService/museum/info/index.wxss */ +.bg { + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/infobg.png); + background-size: 100% 100%; + position: absolute; + left: 0; + right: 0; + bottom: 0; +} +.title { + display: flex; + align-items: flex-end; + height: 190rpx; + color: #0B898E; + font-size: 48rpx; + font-weight: bold; + margin-left: 40rpx; + margin-bottom: 20rpx; } -.swiper image { - height: 400rpx; +.infoline1 { display: block; + width: 720rpx; + position: absolute; + left: 0; + top: 190rpx; +} +.page { width: 100%; + height: 100%; } -page { - background: #fff; +.address { + display: flex; + align-items: center; + font-size: 28rpx; + color: #333333; + padding: 18rpx 0; } -.top-box { - padding: 20rpx 39rpx; - background: white; - border-radius: 20rpx 20rpx 0px 0px; - margin-bottom: 25rpx; +.address image { + display: block; + flex-shrink: 0; + margin-left: 38rpx; + width: 30rpx; + height: 30rpx; + margin-right: 16rpx; } -.title { - font-size: 32rpx; - color: #000; - font-weight:500; +.infoline3,.infoline2,.infoarrow { + position: absolute; + width: 250rpx; + bottom: 47rpx; + display: block; } -.info-address { - color: #666; - font-size: 27rpx; +.infoline3 { + right: 0; } -.content { +.infoline2 { + left: 0; +} +.infoarrow { + width: 60rpx; + bottom: 26rpx; + left: 50%; + margin-left: -30rpx; + +} +.infoarrow.ani { + -webkit-animation: bounce-down 1.6s linear infinite;animation: bounce-down 1.6s linear infinite; +} +.detail { + display: block; + margin: 20rpx 30rpx; font-size: 30rpx; - padding: 40rpx; - background: white; +} +@keyframes bounce-down { + 25% {transform: translateY(-10rpx);opacity:0.3;} + 50%{transform: translateY(0);opacity:1;} + 75% {transform: translateY(10rpx);opacity:1;} + 100% {transform: translateY(0);opacity:1;} +} +.title2 { + font-size: 36rpx; + height: 126rpx; + margin-bottom: 0; } \ No newline at end of file diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index 5d89da3..060cf69 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -62,23 +62,9 @@ Page({ this.setData({ info:res.data }) - this.drawImg() + this.BroswerRecord() }) - if(wx.getStorageSync("jstrip_token")){ - commonApi.user_post("product/is_product_collection",{ - product_id:options.id - }).then(res=>{ - this.setData({ - isLike:res.data - }) - }) - commonApi.user_post('cart/get_list',{}).then(res=>{ - this.setData({ - cartCount:res.data.length - }) - }) - } // 获取评价列表 commonApi._post("product/product_comment_list",{ product_id:options.id @@ -549,7 +535,29 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - + if(!wx.getStorageSync('jstrip_token')){ + return; + } + if(this.data.info && this.data.info.id){ + commonApi.user_post("product/is_product_collection",{ + product_id:this.data.info.id + }).then(res=>{ + this.setData({ + isLike:res.data + }) + this.drawImg() + }) + commonApi.user_post('cart/get_list',{}).then(res=>{ + this.setData({ + cartCount:res.data.length + }) + }) + } + else { + setTimeout(()=>{ + this.onShow() + },200) + } }, /** diff --git a/pages/list/road/index.js b/pages/list/road/index.js index 43b6337..e89911f 100644 --- a/pages/list/road/index.js +++ b/pages/list/road/index.js @@ -41,7 +41,7 @@ Page({ }, changeType:function(e){ this.setData({ - type:e.detail.value, + type:e.currentTarget.dataset.type, list:[], total:1 }) diff --git a/pages/list/road/index.wxml b/pages/list/road/index.wxml index 20b5f62..a992dba 100644 --- a/pages/list/road/index.wxml +++ b/pages/list/road/index.wxml @@ -1,13 +1,16 @@ - + + {{item.type_name}} + + - + 综合 价格 diff --git a/pages/list/road/index.wxss b/pages/list/road/index.wxss index 2a6e949..30e817d 100644 --- a/pages/list/road/index.wxss +++ b/pages/list/road/index.wxss @@ -6,12 +6,41 @@ pages { width: 100%; display: block; } +.types { + display: flex; + align-items: center; + justify-content: space-between; +} +.type-item { + width: 50%; + text-align: center; + line-height: 82rpx; + position: relative; + color: #666666; + font-size: 31rpx; +} +.type-item.active { + color: #000; +} +.type-item.active::after { + content:"1"; + font-size: 0; + position: absolute; + display: block; + width: 46rpx; + height: 7rpx; + background: #0B898E; + border-radius: 3rpx; + bottom: 0; + left: 50%; + margin-left: -23rpx; +} .top-box { display: flex; align-items: center; - height: 110rpx; + height: 87rpx; padding: 0 25rpx; - border: 1rpx solid #CCCCCC; + border-top: 1rpx solid #CCCCCC; font-size: 27rpx; color: #999; justify-content: space-between; diff --git a/pages/list/sale/index.js b/pages/list/sale/index.js index 256ad42..67548f1 100644 --- a/pages/list/sale/index.js +++ b/pages/list/sale/index.js @@ -11,7 +11,8 @@ Page({ type:0, service:["act/fast_sale_now","act/fast_next_sale_now","act/fast_next_days_sale_now"], list:[], - moreFlag:true + moreFlag:true, + t:0 }, /** @@ -22,6 +23,19 @@ Page({ }, getList:function(){ if(!this.data.moreFlag) return; + if(this.data.type==1){ + commonApi._post('product/get_product_by_tag',{ + limit:10, + offset:this.data.list.length, + tag_id:91 + }).then(res=>{ + this.setData({ + list:this.data.list.concat(res.data.list), + moreFlag:res.data.list.length>=10 + }) + }) + return + } commonApi._post(this.data.service[this.data.type],{ limit:10, offset:this.data.list.length @@ -37,7 +51,18 @@ Page({ this.setData({ list:this.data.list.concat(res.data) }) - this.daojishi() + if(this.data.list.length==0 && this.data.t==0){ + this.setData({ + type:1, + moreFlag:true, + list:[], + t:1 + }) + this.getList() + } + else { + this.daojishi() + } }) }, daojishi:function(){ diff --git a/pages/list/sale/index.wxml b/pages/list/sale/index.wxml index c2065fa..2b35e0d 100644 --- a/pages/list/sale/index.wxml +++ b/pages/list/sale/index.wxml @@ -1,40 +1,63 @@ - 正在疯抢 - 新品专栏 + 限时特惠 + 新品推荐 - - - {{activity.title}} - 活动已结束 - - 距结束 - {{activity.day}} - - {{activity.hour}} - : - {{activity.minute}} - : - {{activity.second}} + + + + {{activity.title}} + 活动已结束 + + 距结束 + {{activity.day}} + + {{activity.hour}} + : + {{activity.minute}} + : + {{activity.second}} + + + + + + + + + {{item.sku.product.title +item.sku.sku_name}} + 已抢{{item.sales}}件 + + + + {{item.price/100}} + ¥{{item.sku.market_price/100}} + + 马上抢 + 即将开抢 + + - + + + - + - {{item.sku.product.title +item.sku.sku_name}} - 已抢{{item.sales}}件 + {{item.title}} + 已抢{{item.sales_number}}件 {{item.price/100}} - ¥{{item.sku.market_price/100}} + ¥{{item.market_price/100}} - 马上抢 - 即将开抢 + 马上抢 + diff --git a/pages/pbService/feiyi/info/index.js b/pages/pbService/feiyi/info/index.js index d0a3ec6..0d216bd 100644 --- a/pages/pbService/feiyi/info/index.js +++ b/pages/pbService/feiyi/info/index.js @@ -6,7 +6,10 @@ Page({ * 页面的初始数据 */ data: { - info:null + info:null, + currentIndex:0, + top:0, + htmls:[] }, /** @@ -14,11 +17,18 @@ Page({ */ onLoad: function (options) { let id = options.id; + let rect = wx.getMenuButtonBoundingClientRect(),device = wx.getSystemInfoSync(); + let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight; + this.setData({ + top:height + }) commonApi._post("pbservice/Feiyi/getDetail",{ id:id }).then(res=>{ + let htmls = res.data.content?res.data.content.split('
'):[] this.setData({ - info:res.data + info:res.data, + htmls:htmls }) }) }, @@ -29,6 +39,11 @@ Page({ onReady: function () { }, + changeSlide(e){ + this.setData({ + currentIndex:e.detail.current + }) + }, /** * 生命周期函数--监听页面显示 diff --git a/pages/pbService/feiyi/info/index.wxml b/pages/pbService/feiyi/info/index.wxml index cc7a9bb..8339a1b 100644 --- a/pages/pbService/feiyi/info/index.wxml +++ b/pages/pbService/feiyi/info/index.wxml @@ -1,11 +1,26 @@ - - - - - - - {{info.title}} - {{info.protect_office}} - - + + + + + + + {{info.title}} + + + 地址:{{info.protect_office}} + + + + + + + + {{info.title}} + + + + + + + \ No newline at end of file diff --git a/pages/pbService/feiyi/info/index.wxss b/pages/pbService/feiyi/info/index.wxss index 1bc168d..3946716 100644 --- a/pages/pbService/feiyi/info/index.wxss +++ b/pages/pbService/feiyi/info/index.wxss @@ -1,11 +1,83 @@ -/* pages/pbService/feiyi/info/index.wxss */ -.info { - margin: 30rpx; - color: #333; - font-size: 26rpx; +/* pages/pbService/museum/info/index.wxss */ +.bg { + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/infobg.png); + background-size: 100% 100%; + position: absolute; + left: 0; + right: 0; + bottom: 0; } .title { - font-size: 30rpx; - margin-bottom: 22rpx; + display: flex; + align-items: flex-end; + height: 190rpx; + color: #0B898E; + font-size: 48rpx; font-weight: bold; + margin-left: 40rpx; + margin-bottom: 20rpx; +} +.infoline1 { + display: block; + width: 720rpx; + position: absolute; + left: 0; + top: 190rpx; +} +.page { + width: 100%; + height: 100%; +} +.address { + display: flex; + align-items: center; + font-size: 28rpx; + color: #333333; + padding: 18rpx 0; +} +.address image { + display: block; + flex-shrink: 0; + margin-left: 38rpx; + width: 30rpx; + height: 30rpx; + margin-right: 16rpx; +} +.infoline3,.infoline2,.infoarrow { + position: absolute; + width: 250rpx; + bottom: 47rpx; + display: block; +} +.infoline3 { + right: 0; +} +.infoline2 { + left: 0; +} +.infoarrow { + width: 60rpx; + bottom: 26rpx; + left: 50%; + margin-left: -30rpx; + +} +.infoarrow.ani { + -webkit-animation: bounce-down 1.6s linear infinite;animation: bounce-down 1.6s linear infinite; +} +.detail { + display: block; + margin: 20rpx 30rpx; + font-size: 30rpx; +} +@keyframes bounce-down { + 25% {transform: translateY(-10rpx);opacity:0.3;} + 50%{transform: translateY(0);opacity:1;} + 75% {transform: translateY(10rpx);opacity:1;} + 100% {transform: translateY(0);opacity:1;} +} +.title2.title{ + font-size: 36rpx; + height: 126rpx; + margin-bottom: 0; } \ No newline at end of file diff --git a/pages/pbService/gym/info/index.js b/pages/pbService/gym/info/index.js index 7607128..784b259 100644 --- a/pages/pbService/gym/info/index.js +++ b/pages/pbService/gym/info/index.js @@ -12,24 +12,31 @@ Page({ info:null, list:[], moreFlag:true, - html:null + html:null, + top:0, + htmls:[], + currentIndex:0 }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { + let rect = wx.getMenuButtonBoundingClientRect(),device = wx.getSystemInfoSync(); + let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight; this.setData({ + top:height, id:options.id }) commonApi._post("pbservice/Gym/getDetail",{ id:this.data.id }).then(res=>{ + let htmls = res.data.stadiumDetail && res.data.stadiumDetail.introduction?res.data.stadiumDetail.introduction.split('
'):[] this.setData({ picList:res.data.picList, - info:res.data.stadiumDetail + info:res.data.stadiumDetail, + htmls:htmls }) - console.log(res) }) this.getList() }, @@ -53,6 +60,11 @@ Page({ console.log(res) }) }, + changeSlide(e){ + this.setData({ + currentIndex:e.detail.current + }) + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/pbService/gym/info/index.wxml b/pages/pbService/gym/info/index.wxml index b15abb9..5cecb28 100644 --- a/pages/pbService/gym/info/index.wxml +++ b/pages/pbService/gym/info/index.wxml @@ -1,17 +1,41 @@ - + - - - + + + - + {{info.name}} + + + 地址:{{info.address}} + + + + 电话:{{info.telephone}} + + + + + + + + + - - - - {{info.name}} - 开放时间:{{info.open_time}} - 联系方式:{{info.telephone}} - 地址:{{info.address}} + + {{info.name}} + + + + + + + 开放时间 + + + + + + + \ No newline at end of file diff --git a/pages/pbService/gym/info/index.wxss b/pages/pbService/gym/info/index.wxss index 2681782..3946716 100644 --- a/pages/pbService/gym/info/index.wxss +++ b/pages/pbService/gym/info/index.wxss @@ -1,24 +1,83 @@ -/* pages/pbService/gym/info/index.wxss */ -.swiper,.swiper image { +/* pages/pbService/museum/info/index.wxss */ +.bg { + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/infobg.png); + background-size: 100% 100%; + position: absolute; + left: 0; + right: 0; + bottom: 0; +} +.title { + display: flex; + align-items: flex-end; + height: 190rpx; + color: #0B898E; + font-size: 48rpx; + font-weight: bold; + margin-left: 40rpx; + margin-bottom: 20rpx; +} +.infoline1 { + display: block; + width: 720rpx; + position: absolute; + left: 0; + top: 190rpx; +} +.page { width: 100%; - height: 360rpx; + height: 100%; +} +.address { + display: flex; + align-items: center; + font-size: 28rpx; + color: #333333; + padding: 18rpx 0; +} +.address image { display: block; + flex-shrink: 0; + margin-left: 38rpx; + width: 30rpx; + height: 30rpx; + margin-right: 16rpx; } -.info { - font-size: 26rpx; - padding: 20rpx 30rpx; - color: #333; +.infoline3,.infoline2,.infoarrow { + position: absolute; + width: 250rpx; + bottom: 47rpx; + display: block; +} +.infoline3 { + right: 0; +} +.infoline2 { + left: 0; +} +.infoarrow { + width: 60rpx; + bottom: 26rpx; + left: 50%; + margin-left: -30rpx; + } -.info .title { +.infoarrow.ani { + -webkit-animation: bounce-down 1.6s linear infinite;animation: bounce-down 1.6s linear infinite; +} +.detail { + display: block; + margin: 20rpx 30rpx; font-size: 30rpx; } -.info-tip { - display: flex; - color: #888; - margin-top: 20rpx; +@keyframes bounce-down { + 25% {transform: translateY(-10rpx);opacity:0.3;} + 50%{transform: translateY(0);opacity:1;} + 75% {transform: translateY(10rpx);opacity:1;} + 100% {transform: translateY(0);opacity:1;} } -.info-tip text { - width: 130rpx; - color: #333; - flex-shrink: 0; +.title2.title{ + font-size: 36rpx; + height: 126rpx; + margin-bottom: 0; } \ No newline at end of file diff --git a/pages/pbService/museum/info/index.js b/pages/pbService/museum/info/index.js index 092ff59..0908d2f 100644 --- a/pages/pbService/museum/info/index.js +++ b/pages/pbService/museum/info/index.js @@ -6,22 +6,38 @@ Page({ * 页面的初始数据 */ data: { - info:null + info:null, + top:0, + htmls:[], + currentIndex:0 }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { + let rect = wx.getMenuButtonBoundingClientRect(),device = wx.getSystemInfoSync(); + let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight; + this.setData({ + top:height + }) commonApi._post("pbservice/Museum/getDetail",{ id:options.id }).then(res=>{ res.data.listimg = res.data.listimg?res.data.listimg.split(","):[]; + let htmls = res.data.detail?res.data.detail.split('
'):[] this.setData({ - info:res.data + info:res.data, + htmls:htmls }) }) }, + changeSlide(e){ + console.log(e) + this.setData({ + currentIndex:e.detail.current + }) + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/pbService/museum/info/index.wxml b/pages/pbService/museum/info/index.wxml index 8a68453..748f3db 100644 --- a/pages/pbService/museum/info/index.wxml +++ b/pages/pbService/museum/info/index.wxml @@ -1,27 +1,46 @@ - - - - - - - + + + + {{info.name}} + + + 地址:{{info.address}} + + + + 电话:{{info.phone}} + + + + + + + + + + + + + {{info.name}} + + + + + + + + 接待时间 + + + 交通线路 + + + + + - {{info.name}} - - - {{info.phone}} - - - - {{info.address}} - - 场馆详情 - - 接待时间 - - 交通路线 - + \ No newline at end of file diff --git a/pages/pbService/museum/info/index.wxss b/pages/pbService/museum/info/index.wxss index 308ffe2..675868e 100644 --- a/pages/pbService/museum/info/index.wxss +++ b/pages/pbService/museum/info/index.wxss @@ -1,45 +1,83 @@ /* pages/pbService/museum/info/index.wxss */ -.mainimg { +.bg { + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/infobg.png); + background-size: 100% 100%; + position: absolute; + left: 0; + right: 0; + bottom: 0; +} +.title { + display: flex; + align-items: flex-end; + height: 190rpx; + color: #0B898E; + font-size: 48rpx; + font-weight: bold; + margin-left: 40rpx; + margin-bottom: 20rpx; +} +.infoline1 { display: block; - width: 100%; - height: 300rpx; + width: 720rpx; + position: absolute; + left: 0; + top: 190rpx; } -.swiper { +.page { width: 100%; - height: 300rpx; - margin-bottom: 30rpx; + height: 100%; } -.content { - padding: 20rpx; - color: #666666; +.address { + display: flex; + align-items: center; font-size: 28rpx; + color: #333333; + padding: 18rpx 0; } -page { - background: white; +.address image { + display: block; + flex-shrink: 0; + margin-left: 38rpx; + width: 30rpx; + height: 30rpx; + margin-right: 16rpx; } -.title { - font-size: 36rpx; - font-weight: bold; - color: #333; - margin-bottom: 10rpx; +.infoline3,.infoline2,.infoarrow { + position: absolute; + width: 250rpx; + bottom: 47rpx; + display: block; } -.tips { - display: flex; - align-items: center; - height: 50rpx; +.infoline3 { + right: 0; } -.tips .iconfont { - flex-shrink: 0; - margin-right: 10rpx; - color: #999; -} -.subtitle { - padding-left: 20rpx; - border-left: 6rpx solid #0F9095; - line-height: 30rpx; - color: #333; +.infoline2 { + left: 0; +} +.infoarrow { + width: 60rpx; + bottom: 26rpx; + left: 50%; + margin-left: -30rpx; + +} +.infoarrow.ani { + -webkit-animation: bounce-down 1.6s linear infinite;animation: bounce-down 1.6s linear infinite; +} +.detail { + display: block; + margin: 20rpx 30rpx; font-size: 30rpx; - font-weight: bold; - margin-top: 40rpx; - margin-bottom: 20rpx; +} +@keyframes bounce-down { + 25% {transform: translateY(-10rpx);opacity:0.3;} + 50%{transform: translateY(0);opacity:1;} + 75% {transform: translateY(10rpx);opacity:1;} + 100% {transform: translateY(0);opacity:1;} +} +.title2 { + font-size: 36rpx; + height: 126rpx; + margin-bottom: 0; } \ No newline at end of file diff --git a/pages/pbService/wwcx/info/index.js b/pages/pbService/wwcx/info/index.js index 969d029..c21b80b 100644 --- a/pages/pbService/wwcx/info/index.js +++ b/pages/pbService/wwcx/info/index.js @@ -6,22 +6,37 @@ Page({ * 页面的初始数据 */ data: { - info:{} + info:{}, + top:0, + currentIndex:0, + htmls:[] }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { + let rect = wx.getMenuButtonBoundingClientRect(),device = wx.getSystemInfoSync(); + let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight; + this.setData({ + top:height + }) commonApi._post("pbservice/Relic/getDetail",{ id:options.id }).then(res=>{ console.log(res) + let htmls = res.data.introduction?res.data.introduction.split('
'):[] this.setData({ - info:res.data + info:res.data, + htmls:htmls }) }) }, + changeSlide(e){ + this.setData({ + currentIndex:e.detail.current + }) + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/pbService/wwcx/info/index.wxml b/pages/pbService/wwcx/info/index.wxml index 6455027..ee9b686 100644 --- a/pages/pbService/wwcx/info/index.wxml +++ b/pages/pbService/wwcx/info/index.wxml @@ -1,13 +1,30 @@ - + + - - - {{info.name}} - 藏于:{{info.collection_name}} - 等级:{{info.level_name}} - 历史年代:{{info.age}} - - 文物介绍 - {{info.introduction}} - + + + + {{info.name}} + + + 历史年代:{{info.age}} + + + + 地址:{{info.address}} + + + + + + + + {{info.name}} + + + + + + + \ No newline at end of file diff --git a/pages/pbService/wwcx/info/index.wxss b/pages/pbService/wwcx/info/index.wxss index 1bfadda..3946716 100644 --- a/pages/pbService/wwcx/info/index.wxss +++ b/pages/pbService/wwcx/info/index.wxss @@ -1,23 +1,83 @@ -/* pages/pbService/wbdw/info/index.wxss */ -.main-img { - display: block; - width: 100%; - -} -.content { - margin: 30rpx; - color: #333; +/* pages/pbService/museum/info/index.wxss */ +.bg { + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/infobg.png); + background-size: 100% 100%; + position: absolute; + left: 0; + right: 0; + bottom: 0; } .title { - font-size: 30rpx; + display: flex; + align-items: flex-end; + height: 190rpx; + color: #0B898E; + font-size: 48rpx; font-weight: bold; + margin-left: 40rpx; margin-bottom: 20rpx; } -.subtitle { - margin-bottom: 10rpx; - font-size: 26rpx; +.infoline1 { + display: block; + width: 720rpx; + position: absolute; + left: 0; + top: 190rpx; +} +.page { + width: 100%; + height: 100%; +} +.address { + display: flex; + align-items: center; + font-size: 28rpx; + color: #333333; + padding: 18rpx 0; +} +.address image { + display: block; + flex-shrink: 0; + margin-left: 38rpx; + width: 30rpx; + height: 30rpx; + margin-right: 16rpx; +} +.infoline3,.infoline2,.infoarrow { + position: absolute; + width: 250rpx; + bottom: 47rpx; + display: block; +} +.infoline3 { + right: 0; +} +.infoline2 { + left: 0; +} +.infoarrow { + width: 60rpx; + bottom: 26rpx; + left: 50%; + margin-left: -30rpx; + +} +.infoarrow.ani { + -webkit-animation: bounce-down 1.6s linear infinite;animation: bounce-down 1.6s linear infinite; } .detail { - margin-top: 40rpx; - font-size: 26rpx; + display: block; + margin: 20rpx 30rpx; + font-size: 30rpx; +} +@keyframes bounce-down { + 25% {transform: translateY(-10rpx);opacity:0.3;} + 50%{transform: translateY(0);opacity:1;} + 75% {transform: translateY(10rpx);opacity:1;} + 100% {transform: translateY(0);opacity:1;} +} +.title2.title{ + font-size: 36rpx; + height: 126rpx; + margin-bottom: 0; } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 846d55f..7c3c1aa 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -13,9 +13,9 @@ "miniprogram": { "list": [ { - "name": "pages/info/postProductInfo/index", - "pathName": "pages/info/postProductInfo/index", - "query": "id=12677", + "name": "pages/pbService/feiyi/info/index", + "pathName": "pages/pbService/feiyi/info/index", + "query": "id=24", "scene": null }, {