diff --git a/app.js b/app.js index 9dc828e..32f9a82 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,14 @@ //app.js +import commonApi from "./utils/https/common" App({ onLaunch: function () { let rect = wx.getSystemInfoSync(); this.globalData.safeBottom = rect.safeArea?(rect.safeArea.bottom - rect.safeArea.height):0 - - + // 获取uuid + commonApi._post("browse/get_uuid",{}).then(res=>{ + // console.log('uuid',res); + this.globalData.uuid = res.data.uuid; + }) // 展示本地存储能力 var logs = wx.getStorageSync('logs') || [] logs.unshift(Date.now()) @@ -38,6 +42,7 @@ App({ }) }, globalData: { + uuid:null,// 设备唯一uuid // 苏州市政府的经纬度 latitude:"31.297401",//纬度 longitude:"120.585639",//经度 diff --git a/app.json b/app.json index 3f17a68..699c400 100644 --- a/app.json +++ b/app.json @@ -1,5 +1,5 @@ { - "pages":[ + "pages": [ "pages/index/index", "pages/map/index", "pages/search/index", @@ -111,19 +111,20 @@ "pages/ask/info/index", "pages/ask/my/index", "pages/activity/year2020/index", - "pages/activity/suyear/index" + "pages/activity/suyear/index", + "pages/activity/spring2021/index" ], "permission": { "scope.userLocation": { "desc": "你的位置信息将用于小程序位置接口的效果展示" } }, - "window":{ - "backgroundTextStyle":"light", + "window": { + "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "君到苏州", - "navigationBarTextStyle":"black", - "navigationStyle":"custom" + "navigationBarTitleText": "君到苏州(文化旅游总入口)", + "navigationBarTextStyle": "black", + "navigationStyle": "custom" }, "style": "v2", "sitemapLocation": "sitemap.json", @@ -134,22 +135,22 @@ "list": [ { "pagePath": "pages/index/index", - "iconPath":"/images/home.png", - "selectedIconPath":"/images/homeSel.png", - "text":"首页" + "iconPath": "/images/home.png", + "selectedIconPath": "/images/homeSel.png", + "text": "首页" }, { "pagePath": "pages/map/index", - "iconPath":"/images/map.png", - "selectedIconPath":"/images/mapSeld.png", - "text":"图游" + "iconPath": "/images/map.png", + "selectedIconPath": "/images/mapSeld.png", + "text": "图游" }, { "pagePath": "pages/user/user", - "iconPath":"/images/user.png", - "selectedIconPath":"/images/userSel.png", - "text":"我的" + "iconPath": "/images/user.png", + "selectedIconPath": "/images/userSel.png", + "text": "我的" } ] } -} +} \ No newline at end of file diff --git a/pages/activity/spring2021/index.js b/pages/activity/spring2021/index.js new file mode 100644 index 0000000..08e845c --- /dev/null +++ b/pages/activity/spring2021/index.js @@ -0,0 +1,112 @@ +// 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 + + + + + + + {{item.title}} + + {{item.price/100}} + 点击预定 + + + + + + + + + + + + {{item.title}} + + {{item.price/100}} + 点击预定 + + + + + + + + + + + + {{item.title}} + + {{item.price/100}} + 点击预定 + + + + + \ No newline at end of file diff --git a/pages/activity/spring2021/index.wxss b/pages/activity/spring2021/index.wxss new file mode 100644 index 0000000..4235080 --- /dev/null +++ b/pages/activity/spring2021/index.wxss @@ -0,0 +1,119 @@ +/* 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: ""; +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 8c75f53..26c50d9 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,5 +1,5 @@ - + @@ -28,7 +28,7 @@ 景点门票 - + 酒店住宿 @@ -220,6 +220,7 @@ + {{date}} {{month}} diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 250b44d..4a2e2fe 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -411,6 +411,7 @@ position: relative; border-radius: 15rpx; font-size: 0; + overflow: hidden; } .today-hot .today-main-img { border-radius: 15rpx; diff --git a/pages/info/activityInfo/index.js b/pages/info/activityInfo/index.js index 333c161..9fbc9d1 100644 --- a/pages/info/activityInfo/index.js +++ b/pages/info/activityInfo/index.js @@ -25,9 +25,27 @@ Page({ this.setData({ info:res.data }) - console.log(res) + this.BroswerRecord() }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"page", + title:this.data.info.name, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/activityInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, order:function(){ let skuid = this.data.info.sku_id; if(!skuid) return; diff --git a/pages/info/cardInfo/index.js b/pages/info/cardInfo/index.js index 4ac81e4..1448ca5 100644 --- a/pages/info/cardInfo/index.js +++ b/pages/info/cardInfo/index.js @@ -52,6 +52,7 @@ Page({ this.setData({ info:res.data }) + this.BroswerRecord(); }) }, changeMenu:function(e){ @@ -121,7 +122,26 @@ Page({ * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { - + + }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"goods", + title:this.data.info.title, + drive:"mini", + source_id:this.data.id, + url:"/pages/info/cardInfo/index?id="+this.data.id, + uuid:app.globalData.uuid + }).then(res=>{ + console.log(res) + }) + } + else { + this.BroswerRecord(); + } + },500) }, /** diff --git a/pages/info/foodInfo/index.js b/pages/info/foodInfo/index.js index 34e0753..0314c80 100644 --- a/pages/info/foodInfo/index.js +++ b/pages/info/foodInfo/index.js @@ -1,24 +1,30 @@ // pages/info/foodInfo/index.js import commonApi from "../../../utils/https/common" +let app = getApp(); Page({ /** * 页面的初始数据 */ data: { - info:null + info:null, + id:null }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { + this.setData({ + id:options.id + }) commonApi._post("scene/detail",{ id:options.id }).then(res=>{ this.setData({ info:res.data }) + this.BroswerRecord() }) }, @@ -28,6 +34,25 @@ Page({ onReady: function () { }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"scene", + title:this.data.info.title, + drive:"mini", + source_id:this.data.id, + url:"/pages/info/foodInfo/index?id="+this.data.id, + uuid:app.globalData.uuid + }).then(res=>{ + console.log(res) + }) + } + else { + this.BroswerRecord(); + } + },500) + }, /** * 生命周期函数--监听页面显示 diff --git a/pages/info/foodProductInfo/index.js b/pages/info/foodProductInfo/index.js index 1effabf..c97632d 100644 --- a/pages/info/foodProductInfo/index.js +++ b/pages/info/foodProductInfo/index.js @@ -34,9 +34,28 @@ Page({ this.setData({ info:res.data }) + this.BroswerRecord() console.log(res) }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"goods", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/foodProductInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, changeSku:function(e){ this.setData({ skuIndex:e.currentTarget.dataset.index diff --git a/pages/info/hotelInfo/index.js b/pages/info/hotelInfo/index.js index 437fd31..877d9c3 100644 --- a/pages/info/hotelInfo/index.js +++ b/pages/info/hotelInfo/index.js @@ -2,6 +2,7 @@ let device = wx.getSystemInfoSync(); const ratio = device.windowWidth / 750; import commonApi from "../../../utils/https/common" +let app = getApp(); import util from "../../../utils/util" Page({ @@ -31,8 +32,27 @@ Page({ this.setData({ info:res.data }) + this.BroswerRecord() }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"scene", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/hotelInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, changeMenu:function(e){ let index = e.currentTarget.dataset.index,that = this; const query=wx.createSelectorQuery(); //创建节点查询器 diff --git a/pages/info/hotelProductInfo/index.js b/pages/info/hotelProductInfo/index.js index a885505..cc43621 100644 --- a/pages/info/hotelProductInfo/index.js +++ b/pages/info/hotelProductInfo/index.js @@ -8,6 +8,12 @@ Page({ * 页面的初始数据 */ data: { + invoiceModes:{ + 1:"如需发票,请向酒店前台索取", + 2:"美团开具发票", + 3:"第三方开具发票" + }, + showInfoFlag:false, listimgs:[], startDate:"",//入住时间 endDate:"",//离店时间 @@ -22,7 +28,10 @@ Page({ commentTotal:0, comment:[], products:[], - isTest:true + isTest:true, + activeSkuIndex:-1, + skuList:[], + roomInfo:null }, /** @@ -51,10 +60,28 @@ Page({ tomorrow:util.formatDate(tomorrow) }) this.getDetail() - this.getProduct() + // this.getProduct() + }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"scene", + title:this.data.sceneInfo.title, + drive:"mini", + source_id:this.data.sceneInfo.id, + url:"/pages/info/hotelProductInfo/index?id="+this.data.sceneInfo.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) }, getProduct:function(){ - commonApi._post("scene/get_hotel_sku_list",{ + commonApi._post(this.data.sceneInfo.third_supplier_type=='mt'?"scene/get_mt_hotel_real_rooms_list":"scene/get_hotel_sku_list",{ start_time:this.data.startDate, end_time:this.data.endDate, scene_id:this.data.id @@ -67,6 +94,28 @@ Page({ }) }) }, + // 获取产品下面的规格列表 + getSkuList:function(e){ + if(e.currentTarget.dataset.index==this.data.activeSkuIndex){ + this.setData({ + activeSkuIndex:-1 + }) + return; + } + this.setData({ + activeSkuIndex:e.currentTarget.dataset.index, + skuList:[] + }) + commonApi._post('scene/get_mt_hotel_real_rooms_sku_list',{ + start_date:this.data.startDate, + end_date:this.data.endDate, + real_room_id:e.currentTarget.dataset.id + }).then(res=>{ + this.setData({ + skuList:res.data + }) + }) + }, order:function(e){ let item = e.currentTarget.dataset.item; item.startDate = this.data.startDate; @@ -82,6 +131,31 @@ Page({ url: '/pages/order/hotel/index', }) }, + orderMt:function(e){ + let item = e.currentTarget.dataset.item,product = e.currentTarget.dataset.product; + item.startDate = this.data.startDate; + item.endDate = this.data.endDate; + item.startDateText = this.data.startDateText; + item.endDateText = this.data.endDateText; + item.startDay = this.getDay(item.startDate); + item.endDay = this.getDay(item.endDate); + item.days = this.data.days; + item.id = item.sku_id; + // item.product_id = product.real_room_id; + item.sku_name = product.room_name; + item.sku_model={}; + item.sku_model.area = product.useable_area+"m²"; + item.sku_model.bed_type = item.bed_type; + item.sku_model.breakfast=item.breakfast; + item.sku_model.max_room_num = item.max_room_num; + console.log(item); + app.globalData.product = item; + // return; + app.globalData.couponInfo = null; + wx.navigateTo({ + url: '/pages/order/hotel/index', + }) + }, getDay:function(date){ let d = new Date(date.replace(/-/g,'/')).getDay(); let days = ["日","一","二","三","四","五","六"]; @@ -101,6 +175,8 @@ Page({ this.setData({ sceneInfo:res.data }) + this.BroswerRecord(); + this.getProduct() }) // 获取问大家 commonApi._post("ask/getQuestionList",{ @@ -190,9 +266,38 @@ Page({ startDate = new Date(startDate).getTime(); let days = Math.round((endDate - startDate) / (1000 * 24 * 60 * 60)) this.setData({ - days:days + days:days, + activeSkuIndex:-1, + skuList:[] + }) + // this.getProduct() + }, + showRoomInfo:function(e){ + let product = e.currentTarget.dataset.info,sku = e.currentTarget.dataset.sku; + this.setData({ + showInfoFlag:true + // roomInfo: + }) + commonApi.user_post("product/getMtRoomSkuInfo",{ + real_room_id:product.real_room_id, + sku_id:sku.sku_id, + start_date: this.data.startDate, + end_date: this.data.endDate + }).then(res=>{ + this.setData({ + roomInfo:{ + sku:sku, + skuInfo:res.data, + productInfo:product + } + }) + }) + }, + hideRoomInfo:function(){ + this.setData({ + showInfoFlag:false, + roomInfo:null }) - this.getProduct() }, /** diff --git a/pages/info/hotelProductInfo/index.json b/pages/info/hotelProductInfo/index.json index 35cf02f..eb3533f 100644 --- a/pages/info/hotelProductInfo/index.json +++ b/pages/info/hotelProductInfo/index.json @@ -1,5 +1,6 @@ { "usingComponents": { - "title":"/pages/component/TitleHeader" + "title":"/pages/component/TitleHeader", + "common-image":"/pages/component/commonImage/index" } } \ No newline at end of file diff --git a/pages/info/hotelProductInfo/index.wxml b/pages/info/hotelProductInfo/index.wxml index e781e92..054c406 100644 --- a/pages/info/hotelProductInfo/index.wxml +++ b/pages/info/hotelProductInfo/index.wxml @@ -33,7 +33,7 @@ - + {{item.product.title+item.sku_name}} @@ -47,6 +47,30 @@ 预订 + + + + + {{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}} + + + + + + + + {{sku.breakfast}} {{sku.bed_type}} {{sku.max_room_num}}人入住 + {{sku.refund_policy}} + {{sku.price/100}} + {{sku.breakfast}} {{sku.bed_type}} {{sku.max_room_num}}人入住 + + + 预订 + + + 问大家 @@ -63,13 +87,6 @@ {{item.answer.total}}个回答 暂无回答 - 查看全部问答 @@ -95,4 +112,70 @@ {{item.content}} 查看全部点评 + + + + + + + + + + + + + 房间信息 + + {{roomInfo.skuInfo.bed_type}} + 可住{{roomInfo.skuInfo.max_room_num}}人 + {{roomInfo.productInfo.useable_area}}m² + {{roomInfo.productInfo.window}} + {{roomInfo.productInfo.floor}}层 + {{roomInfo.skuInfo.goodsStatusText}} + {{roomInfo.skuInfo.breakfast}} + {{roomInfo.skuInfo.goodsTypeText}} + + + 费用政策 + + 加床:该房型{{roomInfo.productInfo.extra_bed==0?'不可':'可以'}}加床 + {{roomInfo.skuInfo.confirmTypeText}} + + + + 是否需要身份证 + + {{roomInfo.skuInfo.needIdentityCard==false?'否':'是'}} + + + + 开票 + + {{invoiceModes[roomInfo.skuInfo.invoiceInfo.invoiceMode]}} + + + + 预订规则 + + {{item.ruleDateRangeText}} + + 连续入住最少天数 {{item.serialCheckinMin==0?"不限制":(item.serialCheckinMin+"天")}} + 连续入住最多天数 {{item.serialCheckinMax==0?"不限制":(item.serialCheckinMax+"天")}} + 最少预订间数 {{item.roomCountMin==0?"不限制":(item.roomCountMin+"间")}} + 最多预订间数 {{item.roomCountMax==0?"不限制":(item.roomCountMax+"间")}} + 最早预订时间 {{item.earliestBookingText}} + 最晚预订时间 {{item.latestBookingText}} + + + 取消政策 + + {{roomInfo.skuInfo.refund_policy}} + + + + 价格:¥{{roomInfo.skuInfo.price/100}} + 立即预订 + + \ No newline at end of file diff --git a/pages/info/hotelProductInfo/index.wxss b/pages/info/hotelProductInfo/index.wxss index 49df485..85dd114 100644 --- a/pages/info/hotelProductInfo/index.wxss +++ b/pages/info/hotelProductInfo/index.wxss @@ -112,6 +112,14 @@ page { background: white; border-radius: 13rpx; } +.product-item1 { + margin: 20rpx; + background: white; + border-radius: 13rpx; +} +.product-item1 .product-item { + margin: 0; +} .product-item image { width: 201rpx; height: 201rpx; @@ -131,16 +139,26 @@ page { flex-shrink: 0; margin-left: 20rpx; } -.product-right .price { +.product-right .price,.mt-price,.sku-price { color: #D62828; font-size: 40rpx; font-weight: 500; } -.product-right .price::before { +.sku-price { + font-size: 32rpx; + margin: 10rpx 0; +} +.product-right .price::before,.mt-price::before,.sku-price::before { content: "¥"; font-size: 27rpx; font-weight: 400; } +.mt-price::after { + content: "起"; + font-size: 20rpx; + color:#999; + margin-left: 4rpx; +} .product-right .btn { color: #fff; width: 120rpx; @@ -335,4 +353,124 @@ page { font-size: 29rpx; color: #999; font-weight: 400; +} +.product-item .product-arrow-img { + width: 44rpx; +} +.sku-item { + display: flex; + justify-content: space-between; + align-items: center; + border-top: 1rpx solid #d9d9d9; + padding: 24rpx 20rpx; +} +.sku-info { + flex: 1; + width: 500rpx; +} +.sku-title { + font-size: 29rpx; + color: #333; + font-weight: 500; +} +.sku-tip { + color: #0B898E; + font-size: 21rpx; + margin-top: 10rpx; +} +.sku-info { + font-size: 20rpx; + color: #999; +} +.hotel-info-mask { + width: 100%; + position: absolute; + bottom: 0; + left: 0; + right: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.hotel-info-mask-title { + font-size: 33rpx; + color: #333; + font-weight: 500; + margin: 20rpx; +} +.info-table { + margin: 20rpx; + border: 1rpx solid #999; + font-size: 24rpx; + display: flex; + text-align: center; + flex-wrap: wrap; + border-bottom: none; +} +.info-table .textOver { + width: 25%; + flex-shrink: 0; + box-sizing: border-box; + line-height: 60rpx; + border-right:1rpx solid #999; + border-bottom:1rpx solid #999; +} +.info-table .textOver:nth-child(4n){ + border-right: none; +} +.hotel-info-tips { + margin:0 20rpx; + display: flex; + line-height: 60rpx; + font-size: 24rpx; +} +.hotel-info-tips text { + flex-shrink: 0; + color: #333; + margin-right: 40rpx; +} +.hotel-info-tips .hotel-info-tip { + font-weight: blod; + flex: 1; +} +.info-border { + height: 14rpx; + background-color: #f2f2f2; +} +.fixed-bottom { + position: fixed; + left: 0; + right: 0; + bottom: 0; + height: 113rpx; + display: flex; + align-items: center; + background-color: white; + box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1); +} +.fixed-bottom-left { + flex: 1; + margin-left: 20rpx; + font-size: 29rpx; + color: #333; +} +.fixed-bottom-left text { + font-size: 36rpx; + font-weight: 500; + color: #D62828; +} +.fixed-bottom-btn { + font-size: 36rpx; + flex-shrink: 0; + color: #fff; + background: #D62828; + line-height: 113rpx; + width: 320rpx; + text-align: center; +} +.icon-ic_searchclosed { + position: absolute; + right: 10rpx; + top: 10rpx; + font-size: 50rpx; + color: #333; } \ No newline at end of file diff --git a/pages/info/museumInfo/index.js b/pages/info/museumInfo/index.js index f04eaee..727eac6 100644 --- a/pages/info/museumInfo/index.js +++ b/pages/info/museumInfo/index.js @@ -21,8 +21,27 @@ Page({ this.setData({ info:res.data }) + this.BroswerRecord(); }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"scene", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/museumInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/info/newsInfo/index.js b/pages/info/newsInfo/index.js index 48550db..6e70ab4 100644 --- a/pages/info/newsInfo/index.js +++ b/pages/info/newsInfo/index.js @@ -1,5 +1,6 @@ // pages/info/newsInfo/index.js import commonApi from "../../../utils/https/common" +let app = getApp() Page({ /** @@ -17,13 +18,30 @@ Page({ id:options.id }).then(res=>{ res.data.list_imgs = res.data.photographer?res.data.photographer.split(","):[]; - this.setData({ info:res.data }) - console.log(res) + this.BroswerRecord() }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"page", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/newsInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index df4cc2c..586e719 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -39,6 +39,7 @@ Page({ this.setData({ info:res.data }) + this.BroswerRecord() }) if(wx.getStorageSync("jstrip_token")){ commonApi.user_post("product/is_product_collection",{ @@ -62,6 +63,24 @@ Page({ }) }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"goods", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/postProductInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, like:function(){ let id = this.data.id,isLike = this.data.isLike; commonApi.user_post("product/"+(isLike==1?"product_cancel_collection":"product_collection"),{ diff --git a/pages/info/roadInfo/index.js b/pages/info/roadInfo/index.js index 468af80..140ab62 100644 --- a/pages/info/roadInfo/index.js +++ b/pages/info/roadInfo/index.js @@ -39,6 +39,7 @@ Page({ this.setData({ info:res.data }) + this.BroswerRecord() }) commonApi._post("product/product_comment_list",{ product_id:options.id, @@ -54,6 +55,24 @@ Page({ }) }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"goods", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/cardInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, changeMenu:function(e){ let index = e.currentTarget.dataset.index,that = this; const query=wx.createSelectorQuery(); //创建节点查询器 diff --git a/pages/info/sceneInfo/index.js b/pages/info/sceneInfo/index.js index 7c630d2..a654f3a 100644 --- a/pages/info/sceneInfo/index.js +++ b/pages/info/sceneInfo/index.js @@ -2,6 +2,7 @@ let device = wx.getSystemInfoSync(); const ratio = device.windowWidth / 750; import commonApi from "../../../utils/https/common" +let app = getApp() Page({ /** @@ -30,8 +31,27 @@ Page({ this.setData({ info:res.data }) + this.BroswerRecord() }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"scene", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/sceneInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, changeMenu:function(e){ let index = e.currentTarget.dataset.index,that = this; const query=wx.createSelectorQuery(); //创建节点查询器 diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js index 7a7a0cb..a3c70b1 100644 --- a/pages/info/sceneProductInfo/index.js +++ b/pages/info/sceneProductInfo/index.js @@ -60,6 +60,7 @@ Page({ this.setData({ info:res.data }) + this.BroswerRecord() }) // 获取收藏的状态 if(wx.getStorageSync("jstrip_token")){ @@ -95,6 +96,24 @@ Page({ console.log(res) }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"scene", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/sceneProductInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, like:function(){ let id = this.data.id,isLike = Number(this.data.isLike); console.log(isLike) diff --git a/pages/info/showInfo/index.js b/pages/info/showInfo/index.js index fe43400..6643dd4 100644 --- a/pages/info/showInfo/index.js +++ b/pages/info/showInfo/index.js @@ -21,8 +21,27 @@ Page({ this.setData({ info:res.data }) + this.BroswerRecord() }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"goods", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/showInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, order:function(){ if(this.data.info.sku.length==0){ wx.showToast({ diff --git a/pages/info/strategyInfo/index.js b/pages/info/strategyInfo/index.js index 5f982b3..3a9cdc5 100644 --- a/pages/info/strategyInfo/index.js +++ b/pages/info/strategyInfo/index.js @@ -1,5 +1,6 @@ // pages/info/strategyInfo/index.js import commonApi from "../../../utils/https/common" +let app = getApp() Page({ /** @@ -20,7 +21,7 @@ Page({ this.setData({ info:res.data }) - console.log(res) + this.BroswerRecord() }) commonApi._post("travels/addView",{ id:options.id @@ -28,6 +29,24 @@ Page({ }) }, + BroswerRecord:function(){ + setTimeout(()=>{ + if(app.globalData.uuid){ + commonApi._post('browse/browse_record',{ + type:"page", + title:this.data.info.title, + drive:"mini", + source_id:this.data.info.id, + url:"/pages/info/strategyInfo/index?id="+this.data.info.id, + uuid:app.globalData.uuid + }).then(res=>{ + }) + } + else { + this.BroswerRecord(); + } + },500) + }, setLike:function(){ commonApi.user_post("travels/like",{ id:this.data.info.id diff --git a/pages/list/activitynew/index.js b/pages/list/activitynew/index.js index c36a0f8..0eba8f7 100644 --- a/pages/list/activitynew/index.js +++ b/pages/list/activitynew/index.js @@ -10,7 +10,7 @@ Page({ data: { selectDay:new Date().getTime(), days: ['日','一','二','三','四','五','六'], - types:[null,'show','exhibition','scene','movie','lecture'], + types:[null,'show','exhibition','scene','movie','lecture','other'], weeks:[], pageNo:1, sort:"", @@ -44,7 +44,7 @@ Page({ commonApi._post("pbservice/Other/getSuzhouAreas").then(res=>{ res.data.unshift({ area_code:"", - area_name:"苏州" + area_name:"苏州市" }) this.setData({ areas:res.data @@ -69,7 +69,8 @@ Page({ area:e.detail.value, list:[], total:1, - pageNo:1 + pageNo:1, + moreFlag:true }) this.getList() }, @@ -133,7 +134,7 @@ Page({ date:this.data.date, category:this.data.types[this.data.type], keywords:this.data.realKeywords, - // area_key:this.data.areas[this.data.area].area_code, + area_key:this.data.areas[this.data.area].area_code, page_num:10 }).then(res=>{ this.setData({ diff --git a/pages/list/activitynew/index.wxml b/pages/list/activitynew/index.wxml index 9cadf18..b2ae1fb 100644 --- a/pages/list/activitynew/index.wxml +++ b/pages/list/activitynew/index.wxml @@ -1,10 +1,18 @@ -