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

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: {},
token: ''
},
getToken: function() {
getToken: function () {
var self = this;
return new Promise(resolve =>{
return new Promise(resolve => {
wx.getStorage({
key: 'token',
success(res) {
@ -30,22 +30,22 @@ Page({
url: '../activitySign/activitySign?id=' + activityId
})
},
cancel: function(e) {
cancel: function (e) {
var activityId = e.currentTarget.dataset.id;
app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/activityuserapply/cancelapply/' + activityId, []),
{}, {
headers: {
token: self.data.token
}
}, function(code, data) {
if('200' == code) {
}, function (code, data) {
if ('200' == code) {
wx.navigateTo({
url: '../activityDetail/activityDetail?id=' + activityId
})
}
}, function() {
}, function () {
}, function() {
}, function () {
})
},
@ -57,12 +57,12 @@ Page({
this.getToken().then(result => {
var url;
var id = options.id;
if(!self.data.token) {
if (!self.data.token) {
url = '/app/activitylibrary/getactivitylibrarybyidrelease/' + id;
self.setData({
token: null
})
}else {
} else {
url = '/app/activitylibrary/getactivitylibrarybyid/' + id
self.getToken()
}
@ -70,17 +70,29 @@ Page({
headers: {
token: self.data.token
}
}, function(code, data) {
}, function (code, data) {
data.activityImageArray = data.activityImage.split(',');
self.setData({
dataMap: data
})
}, function(code, data) {
}, function (code, data) {
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) {
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({
liveDetail: data
});
self.videoContext = wx.createLivePlayerContext('liveVideo');
self.videoContext.play();
}, function(code, data) {
}, function (code, data) {
app.dialog.msg(data.msg);
});
},
goLiveRecord(event) {
wx.navigateTo({
url: '../broadcastList/broadcastList?livePlanId='+ event.currentTarget.dataset.livePlanId,
url: '../broadcastList/broadcastList?livePlanId=' + event.currentTarget.dataset.livePlanId,
})
},
onLoad(option) {
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() {
},

View File

@ -24,7 +24,7 @@ Page({
swiper: swiper,
})
},
nextImg: function() {
nextImg: function () {
var swiper = this.data.swiper;
var current = swiper.current;
swiper.current = current < (swiper.imgUrl.length - 1) ? current + 1 : 0;
@ -32,35 +32,35 @@ Page({
swiper: swiper,
})
},
doGetLibrary: function(libraryId) {
doGetLibrary: function (libraryId) {
var self = this;
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 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]));
}
self.setData({
library: data,
'swiper.imgUrl': imageArray
});
}, function(code, data) {
}, function (code, data) {
app.dialog.msg(data.msg);
}, function() {
}, function () {
wx.stopPullDownRefresh();
wx.hideLoading();
})
},
doGetLibraryPerson: function(libraryId) {
doGetLibraryPerson: function (libraryId) {
var self = this;
app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibraryperson/listintangiblelibrarypersonrelease', [self.data.libraryUrl]), {
intangibleLibraryId: libraryId
}, null, function(code, data) {
}, null, function (code, data) {
self.setData({
libraryPersonList: data
})
}, function(code, data) {
}, function (code, data) {
app.dialog.msg(data.msg);
});
},
@ -71,6 +71,19 @@ Page({
var libraryId = options.libraryId
this.doGetLibrary(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() {
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,
function (code, data) {

View File

@ -15,7 +15,7 @@ swiper {
right: 50rpx;
width: 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%;
padding: 10rpx;

View File

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

View File

@ -16,9 +16,9 @@ Page({
team: {}, // 服务区域-市
teamArray: [], // 服务区域-市
},
getToken: function() {
getToken: function () {
var self = this;
return new Promise(resolve =>{
return new Promise(resolve => {
wx.getStorage({
key: 'token',
success(res) {
@ -30,34 +30,34 @@ Page({
})
})
},
getDetail: function(id) {
getDetail: function (id) {
var self = this;
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/volunteerservice/getvolunteerservicebyid/' + id, []),
{}, {
headers: {
'token': self.data.token
}
}, function(code, data) {
if('200' == code) {
var ph=data.photo
if(data.photo.endsWith(",")){
ph=data.photo.substr(0,data.photo.length-1);
}, function (code, data) {
if ('200' == code) {
var ph = data.photo
if (data.photo.endsWith(",")) {
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({
dataMap: data
})
}
}, function() {
}, function () {
}, function() {
}, function () {
})
},
/**
* 志愿者团队报名
*/
enroll: function(e) {
enroll: function (e) {
var self = this;
self.setData({
serviceId: e.target.dataset.serviceid,
@ -68,7 +68,7 @@ Page({
*
* @param {志愿者报名} e
*/
volunteerEnroll: function(e) {
volunteerEnroll: function (e) {
var self = this;
self.setData({
serviceId: e.target.dataset.serviceid,
@ -87,7 +87,7 @@ Page({
*
* @param {团队报名} e
*/
teamChange: function(e) {
teamChange: function (e) {
var self = this;
self.setData({
@ -106,7 +106,7 @@ Page({
*
* @param {团队取消报名} e
*/
teamCancelChange: function(e) {
teamCancelChange: function (e) {
var self = this;
self.setData({
@ -119,7 +119,7 @@ Page({
*
* @param {志愿者取消报名} e
*/
volunteerCancelEnroll: function(e) {
volunteerCancelEnroll: function (e) {
var self = this;
self.setData({
serviceId: e.target.dataset.serviceid,
@ -132,23 +132,23 @@ Page({
*
* @param {发送报名请求} serviceMemberVO
*/
sendEnrollRequest: function(serviceMemberVO) {
sendEnrollRequest: function (serviceMemberVO) {
var self = this;
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/app/servicemember/saveservicemember', []),
serviceMemberVO, {
headers: {
token: self.data.token
}
}, function(code, data) {
if('200' == code) {
}, function (code, data) {
if ('200' == code) {
app.dialog.msg('注册成功!');
wx.redirectTo({
url: '../volunteer/volunteer',
})
}
}, function() {
}, function () {
}, function() {
}, function () {
})
},
@ -158,33 +158,33 @@ Page({
sendCancelEnrollRequest() {
var self = this;
var url;
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;
}else {
url = app.volunteerUrl + '/app/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null';
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;
} else {
url = app.volunteerUrl + '/app/servicemember/cancelapply/' + self.data.type + '/' + self.data.serviceId + '/null';
}
app.restAjax.get(app.restAjax.path(url, []), {}, {
headers: {
token: self.data.token
}
}, function(code, data) {
if('200' == code) {
}, function (code, data) {
if ('200' == code) {
app.dialog.msg('取消报名成功!');
wx.redirectTo({
url: '../volunteer/volunteer',
})
}
}, function() {
}, function () {
}, function() {
}, function () {
})
},
/**
* 获取我的团队
*/
getMyTeam: function() {
getMyTeam: function () {
var self = this;
console.log(self.data.token)
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/team/myteamm', []),
@ -192,10 +192,10 @@ Page({
headers: {
token: self.data.token
}
}, function(code, data) {
if('200' == code) {
}, function (code, data) {
if ('200' == code) {
var array = [];
for(var item of data.rows) {
for (var item of data.rows) {
delete item.teamArea;
delete item.teamAreaDictionaryName;
delete item.teamWatchword;
@ -222,13 +222,13 @@ Page({
team: data.rows
})
}
}, function(code, data) {
}, function (code, data) {
app.dialog.msg(data.msg);
}, function() {
}, function () {
})
},
toActivityHis: function(e) {
toActivityHis: function (e) {
var self = this;
const status = e.currentTarget.dataset.status;
wx.navigateTo({
@ -248,8 +248,20 @@ Page({
this.getDetail(id);
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: {
venueUrl: app.venueUrl,
imgRoute : '/route/file/download/true/',
imgRoute: '/route/file/download/true/',
indicatorDots: true,
autoplay: true,
venuesInfoId: '',
venuesDetail:{},
venuesDetail: {},
venuesProjectList: [],
swiperImg:[],
swiperImg: [],
venueCharge: '',
hasProject:''
hasProject: ''
},
//场馆详情接口
getVenuesDetail: function(){
getVenuesDetail: function () {
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'
}, null, function(code, data){
}, null, function (code, data) {
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)
}
var swiperImg = data.venuePanorama.split(',');
if(swiperImg.length <= 1){
if (swiperImg.length <= 1) {
self.setData({
indicatorDots: false,
autoplay: false
@ -39,16 +39,16 @@ Page({
venuesDetail: data,
swiperImg: swiperImg,
venueCharge: data.venueCharge,
hasProject : data.hasProject
hasProject: data.hasProject
});
}, function(code,data){
}, function (code, data) {
app.dialog.msg(data.msg);
}
);
},
//场馆地图导航
showMap: function(options){
showMap: function (options) {
var dataObj = options.currentTarget.dataset
wx.openLocation({//​使用微信内置地图查看位置。
latitude: Number(dataObj.latitude),//要去的纬度-地址
@ -58,7 +58,7 @@ Page({
});
},
goBooking: function(){
goBooking: function () {
wx.navigateTo({
url: '../book/book?venuesInfoId=' + this.data.venuesInfoId,
})
@ -72,8 +72,20 @@ Page({
venuesInfoId: options.venuesInfoId
});
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
})
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() {
var _self = this;
app.restAjax.get(app.restAjax.path(_self.data.liveUrl + '/app/liverecord/listpageliverecordrelease/' + _self.data.planId, []),