大数据详情浏览量、首页动态栏目接口修改

This commit is contained in:
itgaojian 2023-03-16 15:57:03 +08:00
parent 7e80b99032
commit 859d40a127
9 changed files with 782 additions and 696 deletions

View File

@ -10,9 +10,9 @@ Page({
dataMap: {}, dataMap: {},
token: '' token: ''
}, },
getToken: function() { getToken: function () {
var self = this; var self = this;
return new Promise(resolve =>{ return new Promise(resolve => {
wx.getStorage({ wx.getStorage({
key: 'token', key: 'token',
success(res) { success(res) {
@ -30,22 +30,22 @@ Page({
url: '../activitySign/activitySign?id=' + activityId url: '../activitySign/activitySign?id=' + activityId
}) })
}, },
cancel: function(e) { cancel: function (e) {
var activityId = e.currentTarget.dataset.id; var activityId = e.currentTarget.dataset.id;
app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/activityuserapply/cancelapply/' + activityId, []), app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/activityuserapply/cancelapply/' + activityId, []),
{}, { {}, {
headers: { headers: {
token: self.data.token token: self.data.token
} }
}, function(code, data) { }, function (code, data) {
if('200' == code) { if ('200' == code) {
wx.navigateTo({ wx.navigateTo({
url: '../activityDetail/activityDetail?id=' + activityId url: '../activityDetail/activityDetail?id=' + activityId
}) })
} }
}, function() { }, function () {
}, function() { }, function () {
}) })
}, },
@ -57,12 +57,12 @@ Page({
this.getToken().then(result => { this.getToken().then(result => {
var url; var url;
var id = options.id; var id = options.id;
if(!self.data.token) { if (!self.data.token) {
url = '/app/activitylibrary/getactivitylibrarybyidrelease/' + id; url = '/app/activitylibrary/getactivitylibrarybyidrelease/' + id;
self.setData({ self.setData({
token: null token: null
}) })
}else { } else {
url = '/app/activitylibrary/getactivitylibrarybyid/' + id url = '/app/activitylibrary/getactivitylibrarybyid/' + id
self.getToken() self.getToken()
} }
@ -70,17 +70,29 @@ Page({
headers: { headers: {
token: self.data.token token: self.data.token
} }
}, function(code, data) { }, function (code, data) {
data.activityImageArray = data.activityImage.split(','); data.activityImageArray = data.activityImage.split(',');
self.setData({ self.setData({
dataMap: data dataMap: data
}) })
}, function(code, data) { }, function (code, data) {
app.dialog.msg(data.msg); app.dialog.msg(data.msg);
}); });
}) })
this.saveBigdata(options.id);
}, },
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) {
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

View File

@ -29,25 +29,37 @@ Page({
}, },
getLivePlan(livePlanId) { getLivePlan(livePlanId) {
var self = this; var self = this;
app.restAjax.get(app.restAjax.path('{liveUrl}/app/liveplan/getliveplanbyidrelease/{livePlanId}', [self.data.liveUrl, livePlanId]), {}, null, function(code, data) { app.restAjax.get(app.restAjax.path('{liveUrl}/app/liveplan/getliveplanbyidrelease/{livePlanId}', [self.data.liveUrl, livePlanId]), {}, null, function (code, data) {
self.setData({ self.setData({
liveDetail: data liveDetail: data
}); });
self.videoContext = wx.createLivePlayerContext('liveVideo'); self.videoContext = wx.createLivePlayerContext('liveVideo');
self.videoContext.play(); self.videoContext.play();
}, function(code, data) { }, function (code, data) {
app.dialog.msg(data.msg); app.dialog.msg(data.msg);
}); });
}, },
goLiveRecord(event) { goLiveRecord(event) {
wx.navigateTo({ wx.navigateTo({
url: '../broadcastList/broadcastList?livePlanId='+ event.currentTarget.dataset.livePlanId, url: '../broadcastList/broadcastList?livePlanId=' + event.currentTarget.dataset.livePlanId,
}) })
}, },
onLoad(option) { onLoad(option) {
this.getLivePlan(option.livePlanId); this.getLivePlan(option.livePlanId);
this.saveBigdata(option.livePlanId)
}, },
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) {
})
},
onHide() { onHide() {
}, },

View File

@ -24,7 +24,7 @@ Page({
swiper: swiper, swiper: swiper,
}) })
}, },
nextImg: function() { nextImg: function () {
var swiper = this.data.swiper; var swiper = this.data.swiper;
var current = swiper.current; var current = swiper.current;
swiper.current = current < (swiper.imgUrl.length - 1) ? current + 1 : 0; swiper.current = current < (swiper.imgUrl.length - 1) ? current + 1 : 0;
@ -32,35 +32,35 @@ Page({
swiper: swiper, swiper: swiper,
}) })
}, },
doGetLibrary: function(libraryId) { doGetLibrary: function (libraryId) {
var self = this; var self = this;
app.dialog.loading('正在加载'); app.dialog.loading('正在加载');
app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibrary/getintangiblelibrarybyidrelease/{libraryId}', [self.data.libraryUrl, libraryId]), {}, null, function(code, data) { app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibrary/getintangiblelibrarybyidrelease/{libraryId}', [self.data.libraryUrl, libraryId]), {}, null, function (code, data) {
var covers = data.libraryCover.split(','); var covers = data.libraryCover.split(',');
var imageArray = []; var imageArray = [];
for(var i = 0, item; item = covers[i++];) { for (var i = 0, item; item = covers[i++];) {
imageArray.push(app.restAjax.path('{libraryUrl}/route/file/download/true/{cover}', [self.data.libraryUrl, item])); imageArray.push(app.restAjax.path('{libraryUrl}/route/file/download/true/{cover}', [self.data.libraryUrl, item]));
} }
self.setData({ self.setData({
library: data, library: data,
'swiper.imgUrl': imageArray 'swiper.imgUrl': imageArray
}); });
}, function(code, data) { }, function (code, data) {
app.dialog.msg(data.msg); app.dialog.msg(data.msg);
}, function() { }, function () {
wx.stopPullDownRefresh(); wx.stopPullDownRefresh();
wx.hideLoading(); wx.hideLoading();
}) })
}, },
doGetLibraryPerson: function(libraryId) { doGetLibraryPerson: function (libraryId) {
var self = this; var self = this;
app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibraryperson/listintangiblelibrarypersonrelease', [self.data.libraryUrl]), { app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibraryperson/listintangiblelibrarypersonrelease', [self.data.libraryUrl]), {
intangibleLibraryId: libraryId intangibleLibraryId: libraryId
}, null, function(code, data) { }, null, function (code, data) {
self.setData({ self.setData({
libraryPersonList: data libraryPersonList: data
}) })
}, function(code, data) { }, function (code, data) {
app.dialog.msg(data.msg); app.dialog.msg(data.msg);
}); });
}, },
@ -71,6 +71,19 @@ Page({
var libraryId = options.libraryId var libraryId = options.libraryId
this.doGetLibrary(libraryId); this.doGetLibrary(libraryId);
this.doGetLibraryPerson(libraryId) this.doGetLibraryPerson(libraryId)
this.saveBigdata(libraryId);
},
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) {
})
}, },
/** /**

View File

@ -83,7 +83,7 @@ Page({
//获取首页新闻动态 //获取首页新闻动态
getMainNewsTab() { getMainNewsTab() {
var _self = this; var _self = this;
app.restAjax.get(app.restAjax.path('{newsUrl}/app/newsdirectories/list/areaplate/release/{areaCode}', [_self.data.news.newsUrl, app.areaCode]), app.restAjax.get(app.restAjax.path('{newsUrl}/app/newsdirectories/listsub/areaauth/release/{newsDirectoriesId}/{areaCode}', [_self.data.news.newsUrl, '0', app.areaCode]),
null, null,
null, null,
function (code, data) { function (code, data) {

View File

@ -15,7 +15,7 @@ swiper {
right: 50rpx; right: 50rpx;
width: 70rpx; width: 70rpx;
height: 70rpx; height: 70rpx;
background: linear-gradient(to right bottom, rgb(238 238 236 / 22%), rgb(105 105 104 / 28%) 70px); background: linear-gradient(to right bottom, #9f15129e, #9f1512 70px);
border-radius: 50%; border-radius: 50%;
padding: 10rpx; padding: 10rpx;

View File

@ -33,6 +33,19 @@ Page({
pageHeight: wx.getSystemInfoSync().windowHeight pageHeight: wx.getSystemInfoSync().windowHeight
}) })
this.getNewsDetail(); this.getNewsDetail();
this.saveBigdata(options.id);
},
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) {
})
}, },
getNewsDetail() { getNewsDetail() {
var _self = this; var _self = this;

View File

@ -16,9 +16,9 @@ Page({
team: {}, // 服务区域-市 team: {}, // 服务区域-市
teamArray: [], // 服务区域-市 teamArray: [], // 服务区域-市
}, },
getToken: function() { getToken: function () {
var self = this; var self = this;
return new Promise(resolve =>{ return new Promise(resolve => {
wx.getStorage({ wx.getStorage({
key: 'token', key: 'token',
success(res) { success(res) {
@ -30,34 +30,34 @@ Page({
}) })
}) })
}, },
getDetail: function(id) { getDetail: function (id) {
var self = this; var self = this;
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/volunteerservice/getvolunteerservicebyid/' + id, []), app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/volunteerservice/getvolunteerservicebyid/' + id, []),
{}, { {}, {
headers: { headers: {
'token': self.data.token 'token': self.data.token
} }
}, function(code, data) { }, function (code, data) {
if('200' == code) { if ('200' == code) {
var ph=data.photo var ph = data.photo
if(data.photo.endsWith(",")){ if (data.photo.endsWith(",")) {
ph=data.photo.substr(0,data.photo.length-1); ph = data.photo.substr(0, data.photo.length - 1);
} }
data.photo = app.volunteerUrl + '/route/file/download/true/' +ph; data.photo = app.volunteerUrl + '/route/file/download/true/' + ph;
self.setData({ self.setData({
dataMap: data dataMap: data
}) })
} }
}, function() { }, function () {
}, function() { }, function () {
}) })
}, },
/** /**
* 志愿者团队报名 * 志愿者团队报名
*/ */
enroll: function(e) { enroll: function (e) {
var self = this; var self = this;
self.setData({ self.setData({
serviceId: e.target.dataset.serviceid, serviceId: e.target.dataset.serviceid,
@ -68,7 +68,7 @@ Page({
* *
* @param {志愿者报名} e * @param {志愿者报名} e
*/ */
volunteerEnroll: function(e) { volunteerEnroll: function (e) {
var self = this; var self = this;
self.setData({ self.setData({
serviceId: e.target.dataset.serviceid, serviceId: e.target.dataset.serviceid,
@ -87,7 +87,7 @@ Page({
* *
* @param {团队报名} e * @param {团队报名} e
*/ */
teamChange: function(e) { teamChange: function (e) {
var self = this; var self = this;
self.setData({ self.setData({
@ -106,7 +106,7 @@ Page({
* *
* @param {团队取消报名} e * @param {团队取消报名} e
*/ */
teamCancelChange: function(e) { teamCancelChange: function (e) {
var self = this; var self = this;
self.setData({ self.setData({
@ -119,7 +119,7 @@ Page({
* *
* @param {志愿者取消报名} e * @param {志愿者取消报名} e
*/ */
volunteerCancelEnroll: function(e) { volunteerCancelEnroll: function (e) {
var self = this; var self = this;
self.setData({ self.setData({
serviceId: e.target.dataset.serviceid, serviceId: e.target.dataset.serviceid,
@ -132,23 +132,23 @@ Page({
* *
* @param {发送报名请求} serviceMemberVO * @param {发送报名请求} serviceMemberVO
*/ */
sendEnrollRequest: function(serviceMemberVO) { sendEnrollRequest: function (serviceMemberVO) {
var self = this; var self = this;
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/app/servicemember/saveservicemember', []), app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/app/servicemember/saveservicemember', []),
serviceMemberVO, { serviceMemberVO, {
headers: { headers: {
token: self.data.token token: self.data.token
} }
}, function(code, data) { }, function (code, data) {
if('200' == code) { if ('200' == code) {
app.dialog.msg('注册成功!'); app.dialog.msg('注册成功!');
wx.redirectTo({ wx.redirectTo({
url: '../volunteer/volunteer', url: '../volunteer/volunteer',
}) })
} }
}, function() { }, function () {
}, function() { }, function () {
}) })
}, },
@ -158,33 +158,33 @@ Page({
sendCancelEnrollRequest() { sendCancelEnrollRequest() {
var self = this; var self = this;
var url; var url;
if(self.data.teamArray.length > 0) { if (self.data.teamArray.length > 0) {
url = app.volunteerUrl + '/app/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId; url = app.volunteerUrl + '/app/servicemember/cancelapply/' + self.data.type + '/' + self.data.serviceId + '/' + self.data.team[self.data.teamIndex].teamId;
}else { } else {
url = app.volunteerUrl + '/app/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null'; url = app.volunteerUrl + '/app/servicemember/cancelapply/' + self.data.type + '/' + self.data.serviceId + '/null';
} }
app.restAjax.get(app.restAjax.path(url, []), {}, { app.restAjax.get(app.restAjax.path(url, []), {}, {
headers: { headers: {
token: self.data.token token: self.data.token
} }
}, function(code, data) { }, function (code, data) {
if('200' == code) { if ('200' == code) {
app.dialog.msg('取消报名成功!'); app.dialog.msg('取消报名成功!');
wx.redirectTo({ wx.redirectTo({
url: '../volunteer/volunteer', url: '../volunteer/volunteer',
}) })
} }
}, function() { }, function () {
}, function() { }, function () {
}) })
}, },
/** /**
* 获取我的团队 * 获取我的团队
*/ */
getMyTeam: function() { getMyTeam: function () {
var self = this; var self = this;
console.log(self.data.token) console.log(self.data.token)
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/team/myteamm', []), app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/team/myteamm', []),
@ -192,10 +192,10 @@ Page({
headers: { headers: {
token: self.data.token token: self.data.token
} }
}, function(code, data) { }, function (code, data) {
if('200' == code) { if ('200' == code) {
var array = []; var array = [];
for(var item of data.rows) { for (var item of data.rows) {
delete item.teamArea; delete item.teamArea;
delete item.teamAreaDictionaryName; delete item.teamAreaDictionaryName;
delete item.teamWatchword; delete item.teamWatchword;
@ -222,13 +222,13 @@ Page({
team: data.rows team: data.rows
}) })
} }
}, function(code, data) { }, function (code, data) {
app.dialog.msg(data.msg); app.dialog.msg(data.msg);
}, function() { }, function () {
}) })
}, },
toActivityHis: function(e) { toActivityHis: function (e) {
var self = this; var self = this;
const status = e.currentTarget.dataset.status; const status = e.currentTarget.dataset.status;
wx.navigateTo({ wx.navigateTo({
@ -248,8 +248,20 @@ Page({
this.getDetail(id); this.getDetail(id);
this.getMyTeam(); this.getMyTeam();
}) })
this.saveBigdata(id);
}, },
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) {
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

View File

@ -6,30 +6,30 @@ Page({
*/ */
data: { data: {
venueUrl: app.venueUrl, venueUrl: app.venueUrl,
imgRoute : '/route/file/download/true/', imgRoute: '/route/file/download/true/',
indicatorDots: true, indicatorDots: true,
autoplay: true, autoplay: true,
venuesInfoId: '', venuesInfoId: '',
venuesDetail:{}, venuesDetail: {},
venuesProjectList: [], venuesProjectList: [],
swiperImg:[], swiperImg: [],
venueCharge: '', venueCharge: '',
hasProject:'' hasProject: ''
}, },
//场馆详情接口 //场馆详情接口
getVenuesDetail: function(){ getVenuesDetail: function () {
var self = this; var self = this;
app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/getvenuesinfobyidrelease/{venuesInfoId}',[app.venueUrl, self.data.venuesInfoId]), app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/getvenuesinfobyidrelease/{venuesInfoId}', [app.venueUrl, self.data.venuesInfoId]),
{ {
resultLocation: 'TX' resultLocation: 'TX'
}, null, function(code, data){ }, null, function (code, data) {
var src = 'img src="' + app.venueUrl + '/' var src = 'img src="' + app.venueUrl + '/'
if(data.venueDescription.indexOf('src="') != -1){ if (data.venueDescription.indexOf('src="') != -1) {
data.venueDescription = data.venueDescription.replace(/src="/g, src) data.venueDescription = data.venueDescription.replace(/src="/g, src)
} }
var swiperImg = data.venuePanorama.split(','); var swiperImg = data.venuePanorama.split(',');
if(swiperImg.length <= 1){ if (swiperImg.length <= 1) {
self.setData({ self.setData({
indicatorDots: false, indicatorDots: false,
autoplay: false autoplay: false
@ -39,16 +39,16 @@ Page({
venuesDetail: data, venuesDetail: data,
swiperImg: swiperImg, swiperImg: swiperImg,
venueCharge: data.venueCharge, venueCharge: data.venueCharge,
hasProject : data.hasProject hasProject: data.hasProject
}); });
}, function(code,data){ }, function (code, data) {
app.dialog.msg(data.msg); app.dialog.msg(data.msg);
} }
); );
}, },
//场馆地图导航 //场馆地图导航
showMap: function(options){ showMap: function (options) {
var dataObj = options.currentTarget.dataset var dataObj = options.currentTarget.dataset
wx.openLocation({//​使用微信内置地图查看位置。 wx.openLocation({//​使用微信内置地图查看位置。
latitude: Number(dataObj.latitude),//要去的纬度-地址 latitude: Number(dataObj.latitude),//要去的纬度-地址
@ -58,7 +58,7 @@ Page({
}); });
}, },
goBooking: function(){ goBooking: function () {
wx.navigateTo({ wx.navigateTo({
url: '../book/book?venuesInfoId=' + this.data.venuesInfoId, url: '../book/book?venuesInfoId=' + this.data.venuesInfoId,
}) })
@ -72,8 +72,20 @@ Page({
venuesInfoId: options.venuesInfoId venuesInfoId: options.venuesInfoId
}); });
this.getVenuesDetail(); 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) {
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

View File

@ -24,8 +24,20 @@ Page({
planId: options.id planId: options.id
}) })
this.getList(); this.getList();
this.saveBigdata(options.id)
}, },
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) {
})
},
getList() { getList() {
var _self = this; var _self = this;
app.restAjax.get(app.restAjax.path(_self.data.liveUrl + '/app/liverecord/listpageliverecordrelease/' + _self.data.planId, []), app.restAjax.get(app.restAjax.path(_self.data.liveUrl + '/app/liverecord/listpageliverecordrelease/' + _self.data.planId, []),