2020-06-26 15:28:31 +08:00
|
|
|
var app = getApp();
|
2020-06-23 19:14:44 +08:00
|
|
|
// pages/venueDetail/venueDetail.js
|
|
|
|
Page({
|
2023-03-16 15:57:03 +08:00
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
|
|
|
venueUrl: app.venueUrl,
|
|
|
|
imgRoute: '/route/file/download/true/',
|
|
|
|
indicatorDots: true,
|
|
|
|
autoplay: true,
|
|
|
|
venuesInfoId: '',
|
|
|
|
venuesDetail: {},
|
|
|
|
venuesProjectList: [],
|
|
|
|
swiperImg: [],
|
|
|
|
venueCharge: '',
|
|
|
|
hasProject: ''
|
|
|
|
},
|
|
|
|
|
|
|
|
//场馆详情接口
|
|
|
|
getVenuesDetail: function () {
|
|
|
|
var self = this;
|
|
|
|
app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/getvenuesinfobyidrelease/{venuesInfoId}', [app.venueUrl, self.data.venuesInfoId]),
|
|
|
|
{
|
|
|
|
resultLocation: 'TX'
|
|
|
|
}, null, function (code, data) {
|
|
|
|
var src = 'img src="' + app.venueUrl + '/'
|
|
|
|
if (data.venueDescription.indexOf('src="') != -1) {
|
|
|
|
data.venueDescription = data.venueDescription.replace(/src="/g, src)
|
|
|
|
}
|
|
|
|
var swiperImg = data.venuePanorama.split(',');
|
|
|
|
if (swiperImg.length <= 1) {
|
|
|
|
self.setData({
|
|
|
|
indicatorDots: false,
|
|
|
|
autoplay: false
|
|
|
|
})
|
|
|
|
};
|
|
|
|
self.setData({
|
|
|
|
venuesDetail: data,
|
|
|
|
swiperImg: swiperImg,
|
|
|
|
venueCharge: data.venueCharge,
|
|
|
|
hasProject: data.hasProject
|
|
|
|
});
|
|
|
|
}, function (code, data) {
|
|
|
|
app.dialog.msg(data.msg);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
},
|
|
|
|
|
|
|
|
//场馆地图导航
|
|
|
|
showMap: function (options) {
|
|
|
|
var dataObj = options.currentTarget.dataset
|
|
|
|
wx.openLocation({//使用微信内置地图查看位置。
|
|
|
|
latitude: Number(dataObj.latitude),//要去的纬度-地址
|
|
|
|
longitude: Number(dataObj.longitude),//要去的经度-地址
|
|
|
|
name: dataObj.venuename,
|
|
|
|
address: dataObj.venueposition
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
goBooking: function () {
|
|
|
|
wx.navigateTo({
|
|
|
|
url: '../book/book?venuesInfoId=' + this.data.venuesInfoId,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad: function (options) {
|
|
|
|
this.setData({
|
|
|
|
venuesInfoId: options.venuesInfoId
|
2020-06-23 19:14:44 +08:00
|
|
|
});
|
2023-03-16 15:57:03 +08:00
|
|
|
this.getVenuesDetail();
|
|
|
|
this.saveBigdata(options.venuesInfoId);
|
|
|
|
},
|
|
|
|
saveBigdata(id) {
|
|
|
|
var params = "小程序" + id + "场馆";
|
|
|
|
var info = {
|
|
|
|
requestUrl: params
|
|
|
|
}
|
|
|
|
app.restAjax.get(app.restAjax.path(app.bigDataUrl + '/app/contentcensusrelease/log', []), info, null,
|
|
|
|
function (code, data) {
|
|
|
|
|
|
|
|
}, function (code, err) {
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
*/
|
|
|
|
onReady: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
|
*/
|
|
|
|
onHide: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
|
*/
|
|
|
|
onUnload: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
|
*/
|
|
|
|
onPullDownRefresh: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
*/
|
|
|
|
onReachBottom: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
|
|
onShareAppMessage: function () {
|
|
|
|
|
|
|
|
}
|
2020-06-23 19:14:44 +08:00
|
|
|
})
|