Commit 63691b2e by 严立

代码合并

1.畅玩详情修改
2.导览地图功能
parent beb018c3
{ {
"pages": [ "pages": [
"pages/home/home", "pages/home/home",
"pages/mine/mine", "pages/mine/mine",
"pages/play/play",
"pages/ownerCertification/ownerCertification", "pages/ownerCertification/ownerCertification",
"pages/hotelAccommodation/hotelAccommodation", "pages/hotelAccommodation/hotelAccommodation",
"pages/login/login", "pages/login/login",
"pages/play/play",
"pages/campsite/campsite", "pages/campsite/campsite",
"pages/myInfo/myInfo", "pages/myInfo/myInfo",
...@@ -23,7 +25,7 @@ ...@@ -23,7 +25,7 @@
"pages/notice-detail/notice-detail", "pages/notice-detail/notice-detail",
"pages/shop-detail/shop-detail", "pages/shop-detail/shop-detail",
"pages/strategy/strategy", "pages/strategy/strategy",
"pages/sites/sites", "pages/guide/guide",
"pages/index/index" "pages/index/index"
], ],
"usingComponents": { "usingComponents": {
......
Page({
data: {
mapWidth: 500,
mapHeight: 338,
mapStyleWidth: 0,
mapStyleHeight: 0,
pointInfo: [
{
x: 50,
y: 50,
name: '景点11',
},
{
x: 140,
y: 110,
name: '景点22',
},
{
x: 230,
y: 200,
name: '景点33',
}
]
},
onLoad: function (options) {
this.setMapStyle()
},
setMapStyle: function () {
let funcWindowHeight = wx.getSystemInfoSync().windowHeight
let funcProportion = funcWindowHeight / this.data.mapHeight
// let funcUnitProportion = wx.getStorageSync('unitProportion')
let funcPointInfo = this.data.pointInfo
for (let i = 0, l = funcPointInfo.length; i < l; i++) {
funcPointInfo[i].x = funcPointInfo[i].x * funcProportion
funcPointInfo[i].y = funcPointInfo[i].y * funcProportion
}
this.setData({
mapStyleWidth: this.data.mapWidth * funcProportion,
mapStyleHeight: funcWindowHeight,
pointInfo: funcPointInfo
})
console.log(funcPointInfo)
},
onPointInfo: function (event) {
console.log(event)
}
})
\ No newline at end of file
<view class="guide">
<image src="./image/guide.jpg" style="{{'width: ' + mapStyleWidth + 'px;height: ' + mapStyleHeight + 'px;'}}"></image>
<view>
<block wx:for="{{pointInfo}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="point-info" style="{{'top: ' + item.y + 'px;left: ' + item.x + 'px;'}}">
<button bind:tap="onPointInfo" data-item="{{item}}">{{item.name}}</button>
</view>
</block>
</view>
</view>
<view class="point-detail">
</view>
\ No newline at end of file
.guide {
position: relative;
height: 100%;
background: #808080;
overflow-x: scroll;
}
/* .point {
position: fixed;
bottom: 0;
width: 750rpx;
height: 200rpx;
background: #ffffff;
} */
.point-info {
position: absolute;
width: 100rpx;
height: 40rpx;
}
\ No newline at end of file
...@@ -46,7 +46,7 @@ Page({ ...@@ -46,7 +46,7 @@ Page({
navigationBackground: 'rgba(0, 0, 0, 0)', navigationBackground: 'rgba(0, 0, 0, 0)',
navigationFixed: false, navigationFixed: false,
navigationFixedBoundary: 0, navigationFixedBoundary: 212,
navigationCapsuleTop: wx.getMenuButtonBoundingClientRect().top, navigationCapsuleTop: wx.getMenuButtonBoundingClientRect().top,
}, },
...@@ -81,96 +81,59 @@ Page({ ...@@ -81,96 +81,59 @@ Page({
let response = [ let response = [
{ {
describe: [ describe: [
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-healthy.png' 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-1-1.png'
], ],
shop: [{ shop: [{
id: '1', id: '1',
logo: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-logo-1.png', cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-1-2.png',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-background-1.png', x: 108,
name: '元养水韵SPA馆', y: 212,
describe: '舒缓压力,缓解紧张情绪,沉静心灵,带走负面情绪。在沉静的空气中,身心灵三者合一', }, {
time: '10:00~18:00', id: '1',
price: '¥20~¥50/人' cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-1-3.png',
x: 108,
y: 264,
}] }]
}, { }, {
describe: [ describe: [
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-food.png' 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-2-1.png'
], ],
shop: [{ shop: [{
id: '1', id: '1',
logo: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-logo-2.png', cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-2-2.png',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-background-2.png', x: 108,
name: '原味舒食生态餐厅', y: 212,
describe: '打造自然和平饮食,传递与自然共生的饮食信念感。“美食界的乌托邦,自然界的米其林”',
time: '10:00~18:00',
price: '¥20~¥50/人'
},
{
id: '1',
logo: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-logo-3.png',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-background-3.png',
name: '原野MOJITO',
describe: '打造自然和平饮食,传递与自然共生的饮食信念感。“美食界的乌托邦,自然界的米其林”',
time: '10:00~18:00',
price: '¥20~¥50/人'
}] }]
}, { }, {
describe: [ describe: [
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-food.png' 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-3-1.png'
], ],
shop: [{ shop: [{
id: '1', id: '1',
logo: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-logo-2.png', cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-3-2.png',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-background-2.png', x: 108,
name: '原味舒食生态餐厅', y: 212,
describe: '打造自然和平饮食,传递与自然共生的饮食信念感。“美食界的乌托邦,自然界的米其林”', }, {
time: '10:00~18:00',
price: '¥20~¥50/人'
},
{
id: '1', id: '1',
logo: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-logo-3.png', cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-3-3.png',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-background-3.png', x: 108,
name: '原野MOJITO', y: 212,
describe: '打造自然和平饮食,传递与自然共生的饮食信念感。“美食界的乌托邦,自然界的米其林”',
time: '10:00~18:00',
price: '¥20~¥50/人'
}] }]
}, { }, {
describe: [ describe: [
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-food.png' 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-4-1.png'
], ],
shop: [{ shop: [{
id: '1', id: '1',
logo: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-logo-2.png', cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-4-2.png',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-background-2.png', x: 108,
name: '原味舒食生态餐厅', y: 212,
describe: '打造自然和平饮食,传递与自然共生的饮食信念感。“美食界的乌托邦,自然界的米其林”',
time: '10:00~18:00',
price: '¥20~¥50/人'
},
{
id: '1',
logo: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-logo-3.png',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-background-3.png',
name: '原野MOJITO',
describe: '打造自然和平饮食,传递与自然共生的饮食信念感。“美食界的乌托邦,自然界的米其林”',
time: '10:00~18:00',
price: '¥20~¥50/人'
}] }]
}, { }, {
describe: [ describe: [
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-healthy.png' 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/item/detail-5-1.png'
], ],
shop: [{ shop: []
id: '1',
logo: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-logo-1.png',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/play-background-1.png',
name: '元养水韵SPA馆',
describe: '舒缓压力,缓解紧张情绪,沉静心灵,带走负面情绪。在沉静的空气中,身心灵三者合一',
time: '10:00~18:00',
price: '¥20~¥50/人'
}]
}, },
] ]
......
...@@ -50,33 +50,8 @@ ...@@ -50,33 +50,8 @@
<view class="shop"> <view class="shop">
<block wx:for="{{tabDetail[tabIndex].shop}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{tabDetail[tabIndex].shop}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="shop-item"> <view class="shop-item">
<view class="shop-cover"> <image src="{{item.cover}}"></image>
<image src="{{item.cover}}"></image> <button class="button row con-c align-c" style="{{'bottom: ' + item.y + 'rpx;left: ' + item.x + 'rpx;'}}" data-id="{{item.id}}" bindtap="onShopDetail">立即预定</button>
</view>
<view class="shop-info col">
<view class="shop-logo">
<image src="{{item.logo}}"></image>
</view>
<view class="shop-title">
<text>{{item.name}}</text>
</view>
<view class="shop-describe">
<text>{{item.describe}}</text>
</view>
<view class="shop-tip col">
<view class="row align-c">
<text class="tip-title">时间</text>
<text class="tip-describe">{{item.time}}</text>
</view>
<view class="row align-c">
<text class="tip-title">票价</text>
<text class="tip-describe">{{item.price}}</text>
</view>
</view>
<view class="shop-operation">
<button class="button row con-c align-c" data-id="{{item.id}}" bindtap="onShopDetail">立即预定</button>
</view>
</view>
</view> </view>
</block> </block>
</view> </view>
......
...@@ -159,94 +159,20 @@ swiper-item { ...@@ -159,94 +159,20 @@ swiper-item {
} }
/* 商店详情 */ /* 商店详情 */
.shop {
width: 750rpx;
min-height: 500rpx;
}
.shop-item { .shop-item {
position: relative; position: relative;
width: 750rpx; width: 750rpx;
height: 1160rpx; height: 1152rpx;
background: #f3f6fc; background: #f3f6fc;
} }
.shop-cover, .shop-item image {
.shop-cover image {
width: 750rpx; width: 750rpx;
height: 436rpx; height: 1152rpx;
} }
.shop-info { .shop-item .button {
position: absolute; position: absolute;
top: 230rpx;
left: 0;
width: 654rpx;
height: 770rpx;
margin: 0 48rpx;
padding: 40rpx 60rpx 0 60rpx;
background: #ffffff;
}
.shop-logo,
.shop-logo image {
width: 574rpx;
height: 120rpx;
}
.shop-title {
width: 304rpx;
height: 52rpx;
margin-top: 50rpx;
font-size: 38rpx;
font-weight: bold;
color: #15191F;
line-height: 52rpx;
}
.shop-describe {
width: 534rpx;
height: 72rpx;
margin-top: 40rpx;
font-size: 26rpx;
font-weight: 300;
color: #959DA9;
line-height: 36rpx;
}
.shop-tip {
margin-top: 64rpx;
font-size: 26rpx;
}
.shop-tip > view {
margin-top: 16rpx;
}
.tip-title {
margin-right: 48rpx;
width: 52rpx;
height: 36rpx;
font-size: 26rpx;
font-weight: 400;
color: #959DA9;
line-height: 36rpx;
}
.tip-describe {
width: 434rpx;
height: 36rpx;
font-size: 26rpx;
font-weight: 400;
color: #15191F;
line-height: 36rpx;
}
.shop-operation {
margin-top: 64rpx;
}
.shop-operation .button {
width: 534rpx; width: 534rpx;
height: 96rpx; height: 96rpx;
background: #86C5E1; background: #86C5E1;
......
// pages/sites/sites.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
<!--pages/sites/sites.wxml-->
<text>pages/sites/sites.wxml</text>
/* pages/sites/sites.wxss */
\ No newline at end of file
...@@ -20,15 +20,19 @@ ...@@ -20,15 +20,19 @@
"checkInvalidKey": true, "checkInvalidKey": true,
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": false,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"compileHotReLoad": false,
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": false, "useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false "userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": []
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.10.0", "libVersion": "2.10.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment