Merge remote-tracking branch 'refs/remotes/origin/master'
Conflicts: app.json
This commit is contained in:
commit
73b8e74e07
4
app.js
4
app.js
@ -5,11 +5,13 @@ App({
|
||||
loginUrl: 'http://192.168.0.113:7001/usercenter',
|
||||
usercenterUrl: 'http://192.168.0.113:7001/usercenter',
|
||||
newsUrl: 'http://192.168.0.113:8082/news',
|
||||
newsContentUrl: 'http://192.168.0.113',
|
||||
libraryUrl: 'http://192.168.0.113:8081/library',
|
||||
venueUrl: 'http://192.168.0.109:8082/venuebooking',
|
||||
activityUrl: 'http://192.168.0.111:8080/culturalactivity',
|
||||
volunteerUrl: 'http://192.168.0.111:8888/volunteer/',
|
||||
volunteerUrl: 'http://192.168.0.111:8888/volunteer',
|
||||
liveUrl: 'http://192.168.0.113:8084/live',
|
||||
liveRecordUrl: 'http://192.168.0.113:8085',
|
||||
restAjax: restAjax,
|
||||
dialog: dialog,
|
||||
onLaunch: function () {
|
||||
|
@ -6,7 +6,11 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
dataList: []
|
||||
dataList: [],
|
||||
pages: {
|
||||
page: 1,
|
||||
rows: 5
|
||||
}
|
||||
},
|
||||
goDetail: function (e) {
|
||||
var id = e.currentTarget.dataset.id;
|
||||
@ -14,29 +18,46 @@ Page({
|
||||
url: '../activityDetail/activityDetail?id=' + id
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
getActivityList: function() {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + 'wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []),
|
||||
{}, null, function(code, data) {
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + '/wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []),
|
||||
self.data.pages, null, function(code, data) {
|
||||
if('200' == code) {
|
||||
for(var item of data.rows) {
|
||||
if('' != item.activityImage) {
|
||||
item.activityImage = app.activityUrl + 'route/file/downloadfile/true/' + item.activityImage;
|
||||
item.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + item.activityImage;
|
||||
}
|
||||
}
|
||||
self.setData({
|
||||
dataList: data.rows,
|
||||
})
|
||||
if(1 === self.data.pages.page) {
|
||||
self.setData({
|
||||
dataList: data.rows,
|
||||
})
|
||||
}else {
|
||||
if(data.rows.length == 0) {
|
||||
self.setData({
|
||||
[`pages.page`] : self.data.pages.page - 1
|
||||
})
|
||||
app.dialog.msg('暂无更多')
|
||||
return false;
|
||||
}
|
||||
self.setData({
|
||||
dataList: data.rows.concat(self.data.dataList),
|
||||
})
|
||||
}
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
wx.hideNavigationBarLoading(); //完成停止加载图标
|
||||
wx.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getActivityList();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
@ -70,14 +91,20 @@ Page({
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
// 在标题栏中显示加载图标
|
||||
wx.showNavigationBarLoading();
|
||||
var self = this;
|
||||
self.setData({
|
||||
[`pages.page`] : self.data.pages.page + 1
|
||||
})
|
||||
this.getActivityList();
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,5 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true,
|
||||
"backgroundTextStyle": "dark"
|
||||
}
|
@ -6,31 +6,79 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
dataMap: {}
|
||||
dataMap: {},
|
||||
token: ''
|
||||
},
|
||||
goSign: function () {
|
||||
wx.navigateTo({
|
||||
url: '../activitySign/activitySign'
|
||||
getToken: function() {
|
||||
var self = this;
|
||||
return new Promise(resolve =>{
|
||||
wx.getStorage({
|
||||
key: 'token',
|
||||
success(res) {
|
||||
self.setData({
|
||||
token: res.data
|
||||
})
|
||||
return resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
goSign: function (e) {
|
||||
var activityId = e.currentTarget.dataset.id;
|
||||
wx.navigateTo({
|
||||
url: '../activitySign/activitySign?id=' + activityId
|
||||
})
|
||||
},
|
||||
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) {
|
||||
wx.navigateTo({
|
||||
url: '../activityDetail/activityDetail?id=' + activityId
|
||||
})
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var self = this;
|
||||
var id = options.id;
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + 'wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id, []),
|
||||
{}, null, function(code, data) {
|
||||
if('200' == code) {
|
||||
data.activityImage = app.activityUrl + 'route/file/downloadfile/true/' + data.activityImage;
|
||||
self.setData({
|
||||
dataMap: data
|
||||
})
|
||||
}
|
||||
}, function() {
|
||||
this.getToken().then(result => {
|
||||
console.log(self.data.token)
|
||||
var url;
|
||||
var id = options.id;
|
||||
if(!self.data.token) {
|
||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
||||
}else {
|
||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id
|
||||
}
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
data.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + data.activityImage;
|
||||
self.setData({
|
||||
dataMap: data
|
||||
})
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
@ -41,6 +41,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sign-box" bindtap="goSign" data-id="{{dataMap.activityLibraryId }}" wx-if="{{dataMap.activityState == 3 && dataMap.isEnroll == ''}}">
|
||||
<view class="sign-box" bindtap="goSign" data-id="{{dataMap.activityLibraryId}}" wx-if="{{dataMap.activityState == 3 && dataMap.isEnroll == ''}}">
|
||||
<view class="sign-btn">报名</view>
|
||||
</view>
|
||||
<view class="sign-box" bindtap="cancel" data-id="{{dataMap.activityLibraryId}}" wx-if="{{dataMap.activityState != 6 && dataMap.activityState != 7 && dataMap.activityState != 99 && dataMap.isEnroll != ''}}">
|
||||
<view class="sign-btn">取消报名</view>
|
||||
</view>
|
||||
|
@ -1,18 +1,98 @@
|
||||
// pages/activityDialog/activityDialog.js
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
token: '',
|
||||
serviceId: '',
|
||||
pages: {
|
||||
page: 1,
|
||||
rows: 5
|
||||
},
|
||||
dataList: {}
|
||||
},
|
||||
getToken: function() {
|
||||
var self = this;
|
||||
return new Promise(resolve =>{
|
||||
wx.getStorage({
|
||||
key: 'token',
|
||||
success(res) {
|
||||
self.setData({
|
||||
token: res.data
|
||||
})
|
||||
return resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getActivityHis: function() {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teamactivityhis/listpageteamactivityhis?serviceId=' + self.data.serviceId, []),
|
||||
self.data.pages, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
var photos = [];
|
||||
for(var item of data.rows) {
|
||||
if('' != item.photo) {
|
||||
item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + item.photo;
|
||||
}
|
||||
if('' != item.photos) {
|
||||
var photoArr = item.photos.split(",");
|
||||
for(var i=0; i<photoArr.length; i++) {
|
||||
photoArr[i] = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[i];
|
||||
}
|
||||
item.photos = photoArr
|
||||
}
|
||||
if('' != item.videos) {
|
||||
var videoArr = item.videos.split(",");
|
||||
for(var i=0; i<videoArr.length; i++) {
|
||||
videoArr[i] = app.volunteerUrl + '/route/file/downloadfile/true/' + videoArr[i];
|
||||
}
|
||||
item.videos = videoArr
|
||||
}
|
||||
}
|
||||
if(1 === self.data.pages.page) {
|
||||
self.setData({
|
||||
dataList: data.rows
|
||||
})
|
||||
}else {
|
||||
if(data.rows.length == 0) {
|
||||
self.setData({
|
||||
[`pages.page`] : self.data.pages.page - 1
|
||||
})
|
||||
app.dialog.msg('暂无更多')
|
||||
return false;
|
||||
}
|
||||
|
||||
self.setData({
|
||||
dataList: data.rows.concat(self.data.dataList)
|
||||
})
|
||||
}
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
wx.hideNavigationBarLoading(); //完成停止加载图标
|
||||
wx.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
var self = this;
|
||||
self.setData({
|
||||
serviceId: options.serviceId
|
||||
})
|
||||
this.getToken().then(result => {
|
||||
this.getActivityHis()
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@ -47,7 +127,14 @@ Page({
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
// 在标题栏中显示加载图标
|
||||
wx.showNavigationBarLoading();
|
||||
var self = this;
|
||||
self.setData({
|
||||
[`pages.page`] : self.data.pages.page + 1
|
||||
})
|
||||
console.log(self.data.pages)
|
||||
this.getActivityHis();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,5 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true,
|
||||
"backgroundTextStyle": "dark"
|
||||
}
|
@ -1,31 +1,23 @@
|
||||
<view class="dialog">
|
||||
<view class="dialog-box">
|
||||
<view class="dialog-box" wx:for="{{dataList}}">
|
||||
<view class="avatar">
|
||||
<image src="../../images/avatar.png"></image>
|
||||
<image wx:if="{{item.photo}}" src="{{item.photo}}"></image>
|
||||
<image wx:else src="../../images/avatar.png"></image>
|
||||
</view>
|
||||
<view class="user-info">
|
||||
<view class="name">姓名</view>
|
||||
<view class="content">哈哈哈哈哈</view>
|
||||
<view class="public-time">
|
||||
<view class="time">2020-02-02 00:00:00</view>
|
||||
<view class="delete">
|
||||
<image src="../../images/delete.png"></image>
|
||||
</view>
|
||||
<view class="name">{{item.volunteerName}}</view>
|
||||
<view class="content">{{item.content}}</view>
|
||||
<view class="content" wx:if="{{item.photos}}">
|
||||
<image wx:for="{{item.photos}}" wx:for-item="subItem" src="{{subItem}}"></image>
|
||||
</view>
|
||||
<view class="content" wx:if="{{item.videos}}">
|
||||
<video wx:for="{{item.videos}}" wx:for-item="subItem" src="{{subItem}}"></video>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="dialog-box">
|
||||
<view class="avatar">
|
||||
<image src="../../images/avatar.png"></image>
|
||||
</view>
|
||||
<view class="user-info">
|
||||
<view class="name">姓名</view>
|
||||
<view class="content">哈哈哈哈哈</view>
|
||||
<view class="public-time">
|
||||
<view class="time">2020-02-02 00:00:00</view>
|
||||
<view class="delete">
|
||||
<view class="time">{{item.uploadTime}}</view>
|
||||
<!--<view class="delete">
|
||||
<image src="../../images/delete.png"></image>
|
||||
</view>
|
||||
</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -1,18 +1,123 @@
|
||||
// pages/activitySign/activitySign.js
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
token: '',
|
||||
dataMap: {},
|
||||
phone: '',
|
||||
code: '',
|
||||
name: '',
|
||||
idCard: '',
|
||||
trueCode: '',
|
||||
activityId: ''
|
||||
},
|
||||
getToken: function() {
|
||||
var self = this;
|
||||
return new Promise(resolve =>{
|
||||
wx.getStorage({
|
||||
key: 'token',
|
||||
success(res) {
|
||||
self.setData({
|
||||
token: res.data
|
||||
})
|
||||
return resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getCode: function() {
|
||||
var self = this;
|
||||
if(!self.data.phone) {
|
||||
app.dialog.msg('请输入手机号');
|
||||
return false;
|
||||
}
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/activityuserapply/saveSmsCoderelease/' + self.data.phone, []),
|
||||
{}, null, function(code, data) {
|
||||
console.log(data)
|
||||
if('200' == code) {
|
||||
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
},
|
||||
commit: function() {
|
||||
var self = this;
|
||||
if(!self.data.phone) {
|
||||
app.dialog.msg('请输入手机号');
|
||||
return false;
|
||||
}
|
||||
if(!self.data.name) {
|
||||
app.dialog.msg('请输入姓名');
|
||||
return false;
|
||||
}
|
||||
if(!self.data.idCard) {
|
||||
app.dialog.msg('请输入身份证号码');
|
||||
return false;
|
||||
}
|
||||
var activityUserApplyVO = {
|
||||
activityId: self.data.activityId,
|
||||
code: self.data.code,
|
||||
userIdCard: self.data.idCard,
|
||||
userName: self.data.name,
|
||||
userPhone: self.data.phone
|
||||
}
|
||||
app.restAjax.post(app.restAjax.path(app.activityUrl + '/app/activityuserapply/saveactivityuserapplyrelease', []),
|
||||
activityUserApplyVO, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
console.log(data)
|
||||
if('200' == code) {
|
||||
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var self = this;
|
||||
this.getToken().then(result => {
|
||||
var url;
|
||||
var id = options.id;
|
||||
if(!self.data.token) {
|
||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
||||
}else {
|
||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id
|
||||
}
|
||||
self.setData({
|
||||
activityId: options.id
|
||||
})
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
data.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + data.activityImage;
|
||||
self.setData({
|
||||
dataMap: data
|
||||
})
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
@ -1,29 +1,29 @@
|
||||
<view class="activity">
|
||||
<view class="activity-img">
|
||||
<image src="../../images/big-news.png"></image>
|
||||
<image src="{{dataMap.activityImage}}"></image>
|
||||
</view>
|
||||
<view class="activity-info">
|
||||
<view class="activity-title">银保监会印发《关于加快推进意外金融风险…</view>
|
||||
<view class="activity-title">{{dataMap.activityTitle}}</view>
|
||||
<view class="activity-text">
|
||||
<view class="left-title">
|
||||
<image src="../../images/people.png"></image>
|
||||
<text>活动人数:</text>
|
||||
</view>
|
||||
<view class="right-content">100人</view>
|
||||
<view class="right-content">{{dataMap.activityUserNum }}</view>
|
||||
</view>
|
||||
<view class="activity-text">
|
||||
<view class="left-title">
|
||||
<image src="../../images/time.png"></image>
|
||||
<text>活动时间:</text>
|
||||
</view>
|
||||
<view class="right-content">2020-02-03至2020-02-04</view>
|
||||
<view class="right-content">{{dataMap.activityStartTime}}至{{dataMap.activityEndTime}}</view>
|
||||
</view>
|
||||
<view class="activity-text">
|
||||
<view class="left-title">
|
||||
<image src="../../images/address.png"></image>
|
||||
<text>活动地址:</text>
|
||||
</view>
|
||||
<view class="right-content">活动地址</view>
|
||||
<view class="right-content">{{dataMap.activityAddress }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -32,23 +32,23 @@
|
||||
<view class="personal-info">
|
||||
<view class="info-box">
|
||||
手机号:
|
||||
<input placeholder="请输入手机号"></input>
|
||||
<input placeholder="请输入手机号" model:value="{{phone}}"></input>
|
||||
</view>
|
||||
<view class="info-box">
|
||||
验证码:
|
||||
<input placeholder="请输入验证码"></input>
|
||||
<view class="get-code">获取验证码</view>
|
||||
<input placeholder="请输入验证码" model:value="{{code}}"></input>
|
||||
<view class="get-code" bindtap="getCode">获取验证码</view>
|
||||
</view>
|
||||
<view class="info-box">
|
||||
姓 名:
|
||||
<input placeholder="请输入姓名"></input>
|
||||
<input placeholder="请输入姓名" model:value="{{name}}"></input>
|
||||
</view>
|
||||
<view class="info-box">
|
||||
身份证:
|
||||
<input placeholder="请输入身份证号码"></input>
|
||||
<input placeholder="请输入身份证号码" model:value="{{idCard}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sign-box">
|
||||
<view class="sign-btn">立即报名</view>
|
||||
<view class="sign-btn" bindtap="commit">立即报名</view>
|
||||
</view>
|
@ -2,7 +2,10 @@
|
||||
<view class="broadcast-box" bindtap="goDetail" data-live-plan-id="{{item.livePlanId}}" wx:for="{{live.liveList}}" wx:for-index="idx" wx:for-item="item" wx:key="liveList">
|
||||
<view class="broadcast-img">
|
||||
<image src="{{live.liveUrl}}/route/file/downloadfile/true/{{item.livePlanPhoto}}"></image>
|
||||
<view class="broadcast-status">直播中</view>
|
||||
<view class="broadcast-status" wx:if="{{item.liveStatus == 0}}">已结束</view>
|
||||
<view class="broadcast-status" wx:elif="{{item.liveStatus == 1}}">未开始</view>
|
||||
<view class="broadcast-status" wx:elif="{{item.liveStatus == 2}}">直播中</view>
|
||||
<view class="broadcast-status" wx:else>错误</view>
|
||||
</view>
|
||||
<view class="broadcast-info">
|
||||
<view class="name">{{item.livePlanName}}</view>
|
||||
|
@ -39,6 +39,11 @@ Page({
|
||||
app.dialog.msg(data.msg);
|
||||
});
|
||||
},
|
||||
goLiveRecord(event) {
|
||||
wx.navigateTo({
|
||||
url: '../broadcastList/broadcastList?livePlanId='+ event.currentTarget.dataset.livePlanId,
|
||||
})
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getLivePlan(option.livePlanId);
|
||||
},
|
||||
|
@ -1,8 +1,9 @@
|
||||
<view class="broadcast">
|
||||
<!-- <view class="page-section tc">
|
||||
<video id="myVideo" src="{{liveDetail.liveDeviceRtmpUrl}}" binderror="videoErrorCallback" danmu-list="{{danmuList}}" enable-danmu show-center-play-btn='{{false}}' show-play-btn="{{true}}" controls autoplay="{{true}}" picture-in-picture-mode="{{['push', 'pop']}}" bindenterpictureinpicture='bindVideoEnterPictureInPicture' bindleavepictureinpicture='bindVideoLeavePictureInPicture'></video>
|
||||
</view> -->
|
||||
<live-player id="liveVideo" src="{{liveDetail.liveDeviceRtmpUrl}}" mode="live" object-fit="contain" style="width: 100%; height: 400rpx;"/>
|
||||
<image src="{{liveUrl}}/route/file/downloadfile/true/{{liveDetail.livePlanPhoto}}" wx:if="{{liveDetail.liveStatus == 0}}" style="width:100%; height:100%;"></image>
|
||||
<view class="play-button-box" wx:if="{{liveDetail.liveStatus == 0}}" bindtap="goLiveRecord" data-live-plan-id="{{liveDetail.livePlanId}}">
|
||||
<view class="play-button"></view>
|
||||
</view>
|
||||
<live-player id="liveVideo" src="{{liveDetail.liveDeviceRtmpUrl}}" mode="live" object-fit="contain" style="width: 100%; height: 400rpx;" wx:if="{{liveDetail.liveStatus == 2}}"/>
|
||||
</view>
|
||||
<view class="broadcast-title">{{liveDetail.livePlanName}}</view>
|
||||
<view class="broadcast-time">
|
||||
|
@ -41,4 +41,31 @@ video{
|
||||
color: #5F5F5F;
|
||||
line-height: 40rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
}
|
||||
.play-button-box {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
top: 100rpx;
|
||||
left: 50%;
|
||||
margin-left: -100rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
border: 1rpx dotted rgba(255, 255, 255, 0.8);
|
||||
border-radius: 100rpx;
|
||||
}
|
||||
.play-button-box .play-button {
|
||||
border-top-width: 60rpx;
|
||||
border-bottom-width: 60rpx;
|
||||
border-left-width: 100rpx;
|
||||
border-style: solid;
|
||||
border-top-color: transparent;
|
||||
border-left-color: red;
|
||||
border-bottom-color: transparent;
|
||||
border-right-color: transparent;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
left: 60rpx;
|
||||
}
|
||||
|
71
pages/broadcastList/broadcastList.js
Normal file
71
pages/broadcastList/broadcastList.js
Normal file
@ -0,0 +1,71 @@
|
||||
// pages/broadcastList/broadcastList.js
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
liveRecordContentUrl: app.newsContentUrl,
|
||||
liveUrl: app.liveUrl,
|
||||
liveRecordUrl: app.liveRecordUrl,
|
||||
livePlanId: null,
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.setData({
|
||||
livePlanId: options.livePlanId
|
||||
})
|
||||
// this.getLivePlanRecordList(1);
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
this.getLivePlanRecordList(1);
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
this.getLivePlanRecordList(this.data.currentPage + 1);
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
5
pages/broadcastList/broadcastList.json
Normal file
5
pages/broadcastList/broadcastList.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true,
|
||||
"backgroundTextStyle": "dark"
|
||||
}
|
1
pages/broadcastList/broadcastList.wxml
Normal file
1
pages/broadcastList/broadcastList.wxml
Normal file
@ -0,0 +1 @@
|
||||
<web-view src="{{liveRecordContentUrl}}/flv/index.html?livePlanId={{livePlanId}}&liveUrl={{liveUrl}}&liveRecordUrl={{liveRecordUrl}}" wx:if="{{livePlanId}}"></web-view>
|
49
pages/broadcastList/broadcastList.wxss
Normal file
49
pages/broadcastList/broadcastList.wxss
Normal file
@ -0,0 +1,49 @@
|
||||
.broadcast{
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
background: #000000;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
video{
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
}
|
||||
.broadcast-title{
|
||||
padding: 30rpx;
|
||||
font-size: 34rpx;
|
||||
color: #242424;
|
||||
border-bottom: 5px solid #FBFBFB;
|
||||
}
|
||||
.broadcast-list{
|
||||
margin-top: 400rpx;
|
||||
}
|
||||
.play-button-box {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
top: 100rpx;
|
||||
left: 50%;
|
||||
margin-left: -100rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
border: 1rpx dotted rgba(255, 255, 255, 0.8);
|
||||
border-radius: 100rpx;
|
||||
}
|
||||
.play-button-box .play-button {
|
||||
border-top-width: 60rpx;
|
||||
border-bottom-width: 60rpx;
|
||||
border-left-width: 100rpx;
|
||||
border-style: solid;
|
||||
border-top-color: transparent;
|
||||
border-left-color: red;
|
||||
border-bottom-color: transparent;
|
||||
border-right-color: transparent;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
left: 60rpx;
|
||||
}
|
@ -118,9 +118,9 @@ Page({
|
||||
app.dialog.msg(data.msg);
|
||||
});
|
||||
},
|
||||
goNewsDetail: function () {
|
||||
goNewsDetail: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../newsDetail/newsDetail',
|
||||
url: '../newsDetail/newsDetail?templateRecordUrl='+ event.currentTarget.dataset.templateRecordUrl,
|
||||
})
|
||||
},
|
||||
goNewsList: function() {
|
||||
@ -143,9 +143,9 @@ Page({
|
||||
url: '../venue/venue',
|
||||
})
|
||||
},
|
||||
goBroadcastDetail: function () {
|
||||
goBroadcastDetail: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../broadcastDetail/broadcastDetail',
|
||||
url: '../broadcastDetail/broadcastDetail?livePlanId='+ event.currentTarget.dataset.livePlanId,
|
||||
})
|
||||
},
|
||||
goActivity: function () {
|
||||
|
@ -53,7 +53,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view wx:for="{{news.newsList}}" wx:for-index="idx" wx:for-item="item" wx:key="newsList">
|
||||
<view class="news-box" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_1'}}">
|
||||
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_1'}}">
|
||||
<view class="news-title">{{item.newsContentTitle}}</view>
|
||||
<view class="news-small-pic">
|
||||
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
|
||||
@ -63,7 +63,7 @@
|
||||
<text>{{item.newsContentPublishTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news-box transverse-news" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_2'}}">
|
||||
<view class="news-box transverse-news" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_2'}}">
|
||||
<view class="news-row-img">
|
||||
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
|
||||
</view>
|
||||
@ -75,7 +75,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news-box transverse-news" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_3'}}">
|
||||
<view class="news-box transverse-news" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_3'}}">
|
||||
<view class="news-row-info">
|
||||
<view class="news-title">{{item.newsContentTitle}}</view>
|
||||
<view class="news-info">
|
||||
@ -87,7 +87,7 @@
|
||||
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news-box" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_4'}}">
|
||||
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_4'}}">
|
||||
<view class="news-title">{{item.newsContentTitle}}</view>
|
||||
<view class="news-big-pic">
|
||||
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
|
||||
@ -97,7 +97,7 @@
|
||||
<text>{{item.newsContentPublishTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news-box" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_5'}}">
|
||||
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_5'}}">
|
||||
<view class="news-title">{{item.newsContentTitle}}</view>
|
||||
<view class="news-info">
|
||||
<text>来源:{{item.newsContentResource}}</text>
|
||||
@ -115,10 +115,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="broadcast-container">
|
||||
<view class="broadcast-box" bindtap="goBroadcastDetail" wx:for="{{live.liveList}}" wx:for-index="index" wx:for-item="item" wx:key="liveList">
|
||||
<view class="broadcast-box" bindtap="goBroadcastDetail" data-live-plan-id="{{item.livePlanId}}" wx:for="{{live.liveList}}" wx:for-index="index" wx:for-item="item" wx:key="liveList">
|
||||
<image src="{{live.liveUrl}}/route/file/downloadfile/true/{{item.livePlanPhoto}}"></image>
|
||||
<view class="broadcast-text">文字</view>
|
||||
<view class="broadcast-status">直播中</view>
|
||||
<view class="broadcast-text">{{item.livePlanName}}</view>
|
||||
<view class="broadcast-status">直播中</view>
|
||||
<view class="broadcast-status" wx:if="{{item.liveStatus == 0}}">已结束</view>
|
||||
<view class="broadcast-status" wx:elif="{{item.liveStatus == 1}}">未开始</view>
|
||||
<view class="broadcast-status" wx:elif="{{item.liveStatus == 2}}">直播中</view>
|
||||
<view class="broadcast-status" wx:else>错误</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -9,8 +9,7 @@ Page({
|
||||
token: '',
|
||||
dataMap: {},
|
||||
type: '1',
|
||||
teamId: '',
|
||||
|
||||
teamId: ''
|
||||
},
|
||||
getToken: function() {
|
||||
var self = this;
|
||||
@ -49,16 +48,16 @@ Page({
|
||||
})
|
||||
if(self.data.type === '1') {
|
||||
// 我发起的活动
|
||||
self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservice');
|
||||
self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservice');
|
||||
}else {
|
||||
// 我参加的活动
|
||||
self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagemyjoinservice');
|
||||
self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagemyjoinservice');
|
||||
}
|
||||
},
|
||||
myActivity: function(url) {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(url, []),
|
||||
{}, {
|
||||
self.data.pages, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
@ -67,7 +66,7 @@ Page({
|
||||
for(var item of data.rows) {
|
||||
if('' != item.photo) {
|
||||
var photoArr = item.photo.split(",");
|
||||
item.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + photoArr[0];
|
||||
item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[0];
|
||||
}
|
||||
}
|
||||
self.setData({
|
||||
@ -77,50 +76,6 @@ Page({
|
||||
}, function(code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 申请/退出加入团队
|
||||
*/
|
||||
joinOrOutTeam: function(e) {
|
||||
var self = this;
|
||||
self.setData({
|
||||
teamId: e.currentTarget.dataset.teamid
|
||||
})
|
||||
var teamMemberVO;
|
||||
var url;
|
||||
var methodType;
|
||||
var title;
|
||||
if('1' == self.data.type) {
|
||||
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember'
|
||||
teamMemberVO = {
|
||||
teamId: e.currentTarget.dataset.teamid
|
||||
}
|
||||
methodType = app.restAjax.post
|
||||
title = '申请成功!'
|
||||
}else {
|
||||
url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||
methodType = app.restAjax.get
|
||||
title = '退出成功!'
|
||||
}
|
||||
|
||||
methodType(app.restAjax.path(url, []),
|
||||
teamMemberVO, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
app.dialog.msg(title);
|
||||
wx.navigateTo({
|
||||
url: '../volunteer/volunteer',
|
||||
})
|
||||
}
|
||||
}, function(code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
@ -128,7 +83,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getToken().then(result => {
|
||||
this.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservice');
|
||||
this.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservice');
|
||||
})
|
||||
},
|
||||
|
||||
@ -164,7 +119,7 @@ Page({
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
@ -10,7 +10,6 @@ Page({
|
||||
otherTeamMap: {},
|
||||
type: '1',
|
||||
teamId: '',
|
||||
|
||||
},
|
||||
getToken: function() {
|
||||
var self = this;
|
||||
@ -26,6 +25,12 @@ Page({
|
||||
})
|
||||
})
|
||||
},
|
||||
toTeamDetail: function(e) {
|
||||
var teamId = e.currentTarget.dataset.teamid;
|
||||
wx.navigateTo({
|
||||
url: '../teamDetail/teamDetail?teamId=' + teamId,
|
||||
})
|
||||
},
|
||||
newTeam: function () {
|
||||
wx.navigateTo({
|
||||
url: '../newTeam/newTeam',
|
||||
@ -63,14 +68,14 @@ Page({
|
||||
var methodType;
|
||||
var title;
|
||||
if('1' == self.data.type) {
|
||||
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember'
|
||||
url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember'
|
||||
teamMemberVO = {
|
||||
teamId: e.currentTarget.dataset.teamid
|
||||
}
|
||||
methodType = app.restAjax.post
|
||||
title = '申请成功!'
|
||||
}else {
|
||||
url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||
url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||
methodType = app.restAjax.get
|
||||
title = '退出成功!'
|
||||
}
|
||||
@ -98,7 +103,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getToken().then(result => {
|
||||
this.otherTeam(app.volunteerUrl + 'wxminiapp/team/myteamm');
|
||||
this.otherTeam(app.volunteerUrl + '/wxminiapp/team/myteamm');
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<view class="team">
|
||||
<view class="team-box" wx:for="{{otherTeamMap}}" data-id="{{item.teamId}}">
|
||||
<view class="team-box" bindtap="toTeamDetail" data-teamid="{{item.teamId}}" wx:for="{{otherTeamMap}}">
|
||||
<view class="name-join">
|
||||
<view class="name">{{item.teamName}}</view>
|
||||
<view class="join" wx:if="{{item.checkStatus == '' && type == 1}}" data-teamid="{{item.teamId}}" bindtap="joinOrOutTeam">申请加入</view>
|
||||
|
@ -64,7 +64,7 @@ Page({
|
||||
success (res) {
|
||||
const tempFilePaths = res.tempFilePaths
|
||||
console.log(tempFilePaths)
|
||||
app.restAjax.file(app.restAjax.path(app.volunteerUrl + 'app/file/uploadimage', []), tempFilePaths[0],
|
||||
app.restAjax.file(app.restAjax.path(app.volunteerUrl + '/app/file/uploadimage', []), tempFilePaths[0],
|
||||
'image', {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
@ -74,7 +74,7 @@ Page({
|
||||
var data = data.substr(9, data.length);
|
||||
data = data.substr(0, data.length - 2);
|
||||
self.setData({
|
||||
photo: data
|
||||
photo: app.volunteerUrl + '/route/file/downloadfile/true/' + data
|
||||
})
|
||||
}
|
||||
}, function(code, data) {
|
||||
@ -184,7 +184,7 @@ Page({
|
||||
self.data.teamArea[self.data.teamAreaIndex].dictionaryId :
|
||||
'',
|
||||
};
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/team/saveteam', []),
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/team/saveteam', []),
|
||||
teamVO, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
@ -208,7 +208,7 @@ Page({
|
||||
getDataFromDict: function(dictId, type) {
|
||||
var self = this;
|
||||
return new Promise(resolve => {
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/datadictionary/listdictionarybyparentid/' + dictId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
@ -1,10 +1,13 @@
|
||||
<view class="new-team">
|
||||
<view class="row img-row">
|
||||
<view class="row-title">团队头像:</view>
|
||||
<view class="row-text" bindtap="uploadPhoto">
|
||||
<!--<image src="http://192.168.0.111:8888/volunteer/route/file/downloadfile/true/{{photo}}" class="row-img"></image>-->
|
||||
<view class="row-text" bindtap="uploadPhoto" wx:if="{{photo}}">
|
||||
<image src="{{photo}}" class="row-img"></image>
|
||||
</view>
|
||||
<view class="row-text" wx:else bindtap="uploadPhoto">
|
||||
点击上传
|
||||
<image src="" class="row-img"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row-title">团队名称:</view>
|
||||
|
@ -89,7 +89,7 @@ Page({
|
||||
wx.chooseImage({
|
||||
success (res) {
|
||||
const tempFilePaths = res.tempFilePaths
|
||||
app.restAjax.file(app.restAjax.path(app.volunteerUrl + 'app/file/uploadimage', []), tempFilePaths[0],
|
||||
app.restAjax.file(app.restAjax.path(app.volunteerUrl + '/app/file/uploadimage', []), tempFilePaths[0],
|
||||
'image', {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
@ -99,7 +99,7 @@ Page({
|
||||
var data = data.substr(9, data.length);
|
||||
data = data.substr(0, data.length - 2);
|
||||
self.setData({
|
||||
photo: data
|
||||
photo: app.volunteerUrl + '/route/file/downloadfile/true/' + data
|
||||
})
|
||||
}
|
||||
}, function(code, data) {
|
||||
@ -175,7 +175,7 @@ Page({
|
||||
photo: self.data.photo,
|
||||
serviceRequirement: self.data.serviceRequirement
|
||||
};
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/savevolunteerservice', []),
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/savevolunteerservice', []),
|
||||
volunteerServiceVO, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
@ -86,8 +86,12 @@
|
||||
</view>
|
||||
<view class="row img-row">
|
||||
<view class="row-title">宣传图片:</view>
|
||||
<view class="row-text" bindtap="uploadPhoto">
|
||||
<image src="{{photo}}" class="row-img"></image>
|
||||
<view class="row-text" bindtap="uploadPhoto" wx:if="{{photo}}">
|
||||
<image wx:if="{{photo}}" src="{{photo}}" class="row-img"></image>
|
||||
</view>
|
||||
<view class="row-text" bindtap="uploadPhoto" wx:else>
|
||||
点击上传
|
||||
<image src="" class="row-img"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -1,18 +1,22 @@
|
||||
// pages/newsDetail/newsDetail.js
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
newsContentUrl: app.newsContentUrl,
|
||||
templateRecordUrl: null
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
this.setData({
|
||||
templateRecordUrl: options.templateRecordUrl
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@ -60,7 +64,5 @@ Page({
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
onShareAppMessage: function () {}
|
||||
})
|
@ -1,4 +1,5 @@
|
||||
<view class="news-title">
|
||||
<web-view src="{{newsContentUrl}}/{{templateRecordUrl}}" wx:if="{{templateRecordUrl}}"></web-view>
|
||||
<!-- <view class="news-title">
|
||||
<view class="title">银保监会印发《关于加快推进意外险改革的意见》</view>
|
||||
<view class="news-info">
|
||||
<text>来源</text>
|
||||
@ -90,4 +91,4 @@
|
||||
<image src="../../images/share.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
@ -41,6 +41,11 @@ Page({
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
goNewsDetail: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../newsDetail/newsDetail?templateRecordUrl='+ event.currentTarget.dataset.templateRecordUrl,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
<view class="news">
|
||||
<view wx:for="{{news.newsList}}" wx:for-index="idx" wx:for-item="item" wx:key="newsList">
|
||||
<view class="news-box" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_1'}}">
|
||||
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_1'}}">
|
||||
<view class="news-title">{{item.newsContentTitle}}</view>
|
||||
<view class="news-small-pic">
|
||||
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
|
||||
@ -10,7 +10,7 @@
|
||||
<text>{{item.newsContentPublishTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news-box transverse-news" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_2'}}">
|
||||
<view class="news-box transverse-news" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_2'}}">
|
||||
<view class="news-row-img">
|
||||
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
|
||||
</view>
|
||||
@ -22,7 +22,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news-box transverse-news" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_3'}}">
|
||||
<view class="news-box transverse-news" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_3'}}">
|
||||
<view class="news-row-info">
|
||||
<view class="news-title">{{item.newsContentTitle}}</view>
|
||||
<view class="news-info">
|
||||
@ -34,7 +34,7 @@
|
||||
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news-box" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_4'}}">
|
||||
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_4'}}">
|
||||
<view class="news-title">{{item.newsContentTitle}}</view>
|
||||
<view class="news-big-pic">
|
||||
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
|
||||
@ -44,7 +44,7 @@
|
||||
<text>{{item.newsContentPublishTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news-box" bindtap="goNewsDetail" wx:if="{{item.typesettingCode == 'key_5'}}">
|
||||
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_5'}}">
|
||||
<view class="news-title">{{item.newsContentTitle}}</view>
|
||||
<view class="news-info">
|
||||
<text>来源:{{item.newsContentResource}}</text>
|
||||
|
@ -32,14 +32,14 @@ Page({
|
||||
},
|
||||
getDetail: function(id) {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/getvolunteerservicebyid/' + id, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/getvolunteerservicebyid/' + id, []),
|
||||
{}, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
data.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + data.photo;
|
||||
data.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + data.photo;
|
||||
self.setData({
|
||||
dataMap: data
|
||||
})
|
||||
@ -130,7 +130,7 @@ Page({
|
||||
*/
|
||||
sendEnrollRequest: function(serviceMemberVO) {
|
||||
var self = this;
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/servicemember/saveservicemember', []),
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/servicemember/saveservicemember', []),
|
||||
serviceMemberVO, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
@ -155,9 +155,9 @@ Page({
|
||||
var self = this;
|
||||
var url;
|
||||
if(self.data.teamArray.length > 0) {
|
||||
url = app.volunteerUrl + 'wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId;
|
||||
url = app.volunteerUrl + '/wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId;
|
||||
}else {
|
||||
url = app.volunteerUrl + 'wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null';
|
||||
url = app.volunteerUrl + '/wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null';
|
||||
}
|
||||
|
||||
app.restAjax.get(app.restAjax.path(url, []), {}, {
|
||||
@ -183,7 +183,7 @@ Page({
|
||||
getMyTeam: function() {
|
||||
var self = this;
|
||||
console.log(self.data.token)
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/team/myteamm', []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/team/myteamm', []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
@ -224,11 +224,21 @@ Page({
|
||||
|
||||
})
|
||||
},
|
||||
toActivityHis: function() {
|
||||
var self = this;
|
||||
wx.navigateTo({
|
||||
url: '../activityDialog/activityDialog?serviceId=' + self.data.serviceId,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var id = options.id;
|
||||
var self = this;
|
||||
self.setData({
|
||||
serviceId: id
|
||||
})
|
||||
this.getToken().then(result => {
|
||||
this.getDetail(id);
|
||||
this.getMyTeam();
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
@ -22,7 +22,10 @@
|
||||
</view>
|
||||
<view class="activity-container">
|
||||
<view class="part">
|
||||
<view class="part-title">活动详情</view>
|
||||
<view class="part-title">
|
||||
活动详情
|
||||
<view class="comment-btn" bindtap="toActivityHis">评论列表</view>
|
||||
</view>
|
||||
<rich-text class="part-content" nodes="{{dataMap.introduce}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -51,6 +51,15 @@
|
||||
padding-left: 10rpx;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.comment-btn{
|
||||
padding: 0 10rpx;
|
||||
background: #9F1512;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.part-content{
|
||||
font-size: 28rpx;
|
||||
|
@ -1,18 +1,120 @@
|
||||
// pages/teamDetail/teamDetail.js
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
token: '',
|
||||
teamId: '',
|
||||
dataMap: [],
|
||||
memberData: {},
|
||||
checkData: {}
|
||||
},
|
||||
getToken: function() {
|
||||
var self = this;
|
||||
return new Promise(resolve =>{
|
||||
wx.getStorage({
|
||||
key: 'token',
|
||||
success(res) {
|
||||
self.setData({
|
||||
token: res.data
|
||||
})
|
||||
return resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getDetail(teamId) {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/team/getteambyid/' + teamId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
console.log(data)
|
||||
if('200' == code) {
|
||||
self.setData({
|
||||
dataMap: data
|
||||
})
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
},
|
||||
getMember(teamId) {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teammember/listteammember?teamId=' + teamId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
var teamMember = [];
|
||||
var checkMember = [];
|
||||
for(var item of data) {
|
||||
if('1' == item.status) {
|
||||
teamMember.push(item);
|
||||
}else {
|
||||
checkMember.push(item);
|
||||
}
|
||||
}
|
||||
self.setData({
|
||||
memberData: teamMember,
|
||||
checkData: checkMember
|
||||
})
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
},
|
||||
agree(e) {
|
||||
var self = this;
|
||||
console.log(e)
|
||||
var id = e.currentTarget.dataset.teammemberid;
|
||||
var type = e.currentTarget.dataset.type;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teammember/checkmember/'+id+'/' + type + '?teamId=' + self.data.teamId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
if('1' == type) {
|
||||
app.dialog.msg('审核通过!');
|
||||
}else {
|
||||
app.dialog.msg('审核驳回!');
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: '../myVolunteerTeam/myVolunteerTeam',
|
||||
})
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
var self = this;
|
||||
self.setData({
|
||||
teamId: options.teamId
|
||||
})
|
||||
this.getToken().then(result => {
|
||||
this.getDetail(options.teamId);
|
||||
this.getMember(options.teamId);
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -2,66 +2,55 @@
|
||||
<view class="team-info">
|
||||
<view class="row">
|
||||
<view class="title">团队名称:</view>
|
||||
<view class="content">团队名称</view>
|
||||
<view class="content">{{dataMap.teamName}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="title">团队人数:</view>
|
||||
<view class="content">1</view>
|
||||
<view class="content">{{dataMap.count}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="title">所属区域:</view>
|
||||
<view class="content">所属区域</view>
|
||||
<view class="content">{{dataMap.teamCityDictionaryName}} {{dataMap.teamCountyDictionaryName}} {{dataMap.teamAreaDictionaryName}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="title">团队口号:</view>
|
||||
<view class="content intro">{{dataMap.teamWatchword}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="title">团队介绍:</view>
|
||||
<view class="content intro">团队介绍</view>
|
||||
<view class="content intro">{{dataMap.content}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="team-member">
|
||||
<view class="member-title">团队成员</view>
|
||||
<view class="member-box">
|
||||
<view class="member-box" wx:for="{{memberData}}" data-teammemberid="{{item.teamMemberId}}">
|
||||
<view class="member-avatar">
|
||||
<image src="../../images/avatar.png"></image>
|
||||
</view>
|
||||
<view class="member-info">
|
||||
<view class="name">名字<text class="post">队长</text></view>
|
||||
<view class="join-time">加入时间:2020-02-02</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="member-box">
|
||||
<view class="member-avatar">
|
||||
<image src="../../images/avatar.png"></image>
|
||||
</view>
|
||||
<view class="member-info">
|
||||
<view class="name">名字<text class="post">队长</text></view>
|
||||
<view class="join-time">加入时间:2020-02-02</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="member-box">
|
||||
<view class="member-avatar">
|
||||
<image src="../../images/avatar.png"></image>
|
||||
</view>
|
||||
<view class="member-info">
|
||||
<view class="name">名字<text class="post">队长</text></view>
|
||||
<view class="join-time">加入时间:2020-02-02</view>
|
||||
<view class="name">{{item.memberName}}
|
||||
<text class="post" wx:if="{{item.memberType == '2'}}">队长</text>
|
||||
<text class="post" wx:if="{{item.memberType == '1'}}">成员</text>
|
||||
</view>
|
||||
<view class="join-time">加入时间:{{item.inputTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="team-member">
|
||||
<view class="member-title">申请人员</view>
|
||||
<view class="member-box">
|
||||
<view class="member-box" wx:for="{{checkData}}">
|
||||
<view class="member-avatar">
|
||||
<image src="../../images/avatar.png"></image>
|
||||
</view>
|
||||
<view class="member-info">
|
||||
<view class="name apply-member">
|
||||
<view class="name-box">名字</view>
|
||||
<view class="name-box">{{item.memberName}}</view>
|
||||
<view class="btn">
|
||||
<view class="agree">通过</view>
|
||||
<view class="refuse">拒绝</view>
|
||||
<view class="agree" bindtap="agree" data-teammemberid="{{item.teamMemberId}}" data-type="1">通过</view>
|
||||
<view class="refuse" bindtap="agree" data-teammemberid="{{item.teamMemberId}}" data-type="2">拒绝</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="join-time">加入时间:2020-02-02</view>
|
||||
<view class="join-time">加入时间:{{item.inputTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -68,7 +68,7 @@
|
||||
}
|
||||
.name{
|
||||
font-size: 30rpx;
|
||||
width: 70%;
|
||||
width: 60%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
@ -8,7 +8,11 @@ Page({
|
||||
data: {
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
serviceMap: []
|
||||
serviceMap: [],
|
||||
pages: {
|
||||
page: 1,
|
||||
rows: 5
|
||||
}
|
||||
},
|
||||
goDetail: function (e) {
|
||||
var id = e.currentTarget.dataset.id;
|
||||
@ -36,24 +40,40 @@ Page({
|
||||
*/
|
||||
activityList: function() {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservicerelease', []),
|
||||
{}, null, function(code, data) {
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservicerelease', []),
|
||||
self.data.pages, null, function(code, data) {
|
||||
if('200' == code) {
|
||||
// 将活动照片,拼接为可访问地址
|
||||
for(var item of data.rows) {
|
||||
if('' != item.photo) {
|
||||
var photoArr = item.photo.split(",");
|
||||
item.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + photoArr[0];
|
||||
item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[0];
|
||||
}
|
||||
}
|
||||
self.setData({
|
||||
serviceMap: data.rows
|
||||
})
|
||||
if(1 === self.data.pages.page) {
|
||||
self.setData({
|
||||
serviceMap: data.rows
|
||||
})
|
||||
}else {
|
||||
if(data.rows.length == 0) {
|
||||
self.setData({
|
||||
[`pages.page`] : self.data.pages.page - 1
|
||||
})
|
||||
app.dialog.msg('暂无更多')
|
||||
return false;
|
||||
}
|
||||
|
||||
self.setData({
|
||||
serviceMap: data.rows.concat(self.data.serviceMap),
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
wx.hideNavigationBarLoading(); //完成停止加载图标
|
||||
wx.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
/**
|
||||
@ -95,7 +115,13 @@ Page({
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
// 在标题栏中显示加载图标
|
||||
wx.showNavigationBarLoading();
|
||||
var self = this;
|
||||
self.setData({
|
||||
[`pages.page`] : self.data.pages.page + 1
|
||||
})
|
||||
this.activityList();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,5 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true,
|
||||
"backgroundTextStyle": "dark"
|
||||
}
|
@ -7,6 +7,7 @@ Page({
|
||||
*/
|
||||
data: {
|
||||
token: '',
|
||||
volunteerMsg: [],
|
||||
isAgree: false, // 是否同意志愿者注册协议
|
||||
openExperience: 0,
|
||||
tempObj: {}, // 用于临时存储字典表返回的数据
|
||||
@ -180,7 +181,7 @@ Page({
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
})
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
var volunteerVO = {
|
||||
serviceCity: self.data.teamCity[self.data.teamCityIndex] != ''
|
||||
@ -203,7 +204,13 @@ Page({
|
||||
agree: self.data.isAgree,
|
||||
openExperience : self.data.openExperience
|
||||
};
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteer/savevolunteer', []),
|
||||
var url;
|
||||
if(!self.data.volunteerMsg) {
|
||||
url = '/wxminiapp/volunteer/savevolunteer';
|
||||
}else {
|
||||
url = '/wxminiapp/volunteer/updatevolunteer/' + self.data.volunteerMsg.volunteerId;
|
||||
}
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + url, []),
|
||||
volunteerVO, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
@ -227,7 +234,7 @@ Page({
|
||||
getDataFromDict: function(dictId, type) {
|
||||
var self = this;
|
||||
return new Promise(resolve => {
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/datadictionary/listdictionarybyparentid/' + dictId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
@ -263,31 +270,55 @@ Page({
|
||||
})
|
||||
})
|
||||
},
|
||||
getVolunteerMsg() {
|
||||
var self = this;
|
||||
return new Promise(resolve => {
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteer/getvolunteerbyuserid', []),
|
||||
{}, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
self.setData({
|
||||
volunteerMsg: data
|
||||
})
|
||||
}
|
||||
return resolve();
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var self = this;
|
||||
this.getToken().then(result => {
|
||||
this.getDataFromDict('a223b308-014a-4e89-93fa-035a564e7fda', 1).then(result => {
|
||||
self.setData({
|
||||
serviceType: self.data.tempObj,
|
||||
tempObj: {}
|
||||
})
|
||||
}).then(result => {
|
||||
this.getDataFromDict('7b213c37-8575-4db3-bda1-86c4e38589f7', 1).then(result => {
|
||||
this.getVolunteerMsg().then(result => {
|
||||
this.getDataFromDict('a223b308-014a-4e89-93fa-035a564e7fda', 1).then(result => {
|
||||
self.setData({
|
||||
serviceIndustry: self.data.tempObj,
|
||||
serviceType: self.data.tempObj,
|
||||
tempObj: {}
|
||||
})
|
||||
})
|
||||
}).then(result => {
|
||||
this.getDataFromDict('4a03e904-81e2-48e9-9006-e15ea4a6bc69', 2).then(result => {
|
||||
self.setData({
|
||||
teamCity: self.data.tempObj,
|
||||
teamCityArray: self.data.tempArray,
|
||||
tempObj: {},
|
||||
tempArray: []
|
||||
}).then(result => {
|
||||
this.getDataFromDict('7b213c37-8575-4db3-bda1-86c4e38589f7', 1).then(result => {
|
||||
self.setData({
|
||||
serviceIndustry: self.data.tempObj,
|
||||
tempObj: {}
|
||||
})
|
||||
})
|
||||
}).then(result => {
|
||||
this.getDataFromDict('4a03e904-81e2-48e9-9006-e15ea4a6bc69', 2).then(result => {
|
||||
self.setData({
|
||||
teamCity: self.data.tempObj,
|
||||
teamCityArray: self.data.tempArray,
|
||||
tempObj: {},
|
||||
tempArray: []
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
@ -37,9 +37,9 @@ Page({
|
||||
type: e.currentTarget.dataset.type
|
||||
})
|
||||
if(self.data.type === '1') {
|
||||
self.otherTeam(app.volunteerUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
||||
self.otherTeam(app.volunteerUrl + '/wxminiapp/team/otherteamm?otherTeam=true');
|
||||
}else {
|
||||
self.otherTeam(app.volunteerUrl + 'wxminiapp/team/myjointeam?myTeam=true');
|
||||
self.otherTeam(app.volunteerUrl + '/wxminiapp/team/myjointeam?myTeam=true');
|
||||
}
|
||||
},
|
||||
otherTeam: function(url) {
|
||||
@ -74,14 +74,14 @@ Page({
|
||||
var methodType;
|
||||
var title;
|
||||
if('1' == self.data.type) {
|
||||
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember'
|
||||
url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember'
|
||||
teamMemberVO = {
|
||||
teamId: e.currentTarget.dataset.teamid
|
||||
}
|
||||
methodType = app.restAjax.post
|
||||
title = '申请成功!'
|
||||
}else {
|
||||
url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||
url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||
methodType = app.restAjax.get
|
||||
title = '退出成功!'
|
||||
}
|
||||
@ -109,7 +109,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getToken().then(result => {
|
||||
this.otherTeam(app.volunteerUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
||||
this.otherTeam(app.volunteerUrl + '/wxminiapp/team/otherteamm?otherTeam=true');
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
1
webview/flv/css/reset.css
Normal file
1
webview/flv/css/reset.css
Normal file
@ -0,0 +1 @@
|
||||
@charset "utf-8";a,body,dd,div,dl,dt,em,form,h1,h2,h3,h4,h5,h6,img,input,li,ol,option,p,select,span,strong,table,td,textarea,th,ul,var{margin:0;padding:0}body,html{font:400 100% "微软雅黑",Arail,Tabhoma;text-align:left;color:#535353;-webkit-font-smoothing:antialiased;line-height:normal}ol,ul{list-style:none}img{border:0;vertical-align:top}input,select,textarea{outline:0}textarea{resize:none}table{border-collapse:collapse;border-spacing:0}em,strong,th,var{font-weight:400;font-style:normal}a{text-decoration:none;color:#555}a,input{-webkit-tap-highlight-color:transparent}[v-cloak]{display: none}
|
27
webview/flv/css/style.css
Normal file
27
webview/flv/css/style.css
Normal file
@ -0,0 +1,27 @@
|
||||
.video{
|
||||
width: 100%;
|
||||
height: 4.75rem;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.video video{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000;
|
||||
}
|
||||
.video-list{
|
||||
margin-top: 4.75rem;
|
||||
}
|
||||
.video-list ul li{
|
||||
padding: 0 .2rem;
|
||||
line-height: 1rem;
|
||||
border-bottom: 1px solid #DEDEDE;
|
||||
font-size: .32rem;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
}
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
147
webview/flv/index.html
Normal file
147
webview/flv/index.html
Normal file
@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
|
||||
<title>直播历史</title>
|
||||
<link rel="stylesheet" href="css/reset.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/rem.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="video">
|
||||
<video src="" id="video" controls></video>
|
||||
</div>
|
||||
<div class="video-list">
|
||||
<ul v-cloak>
|
||||
<li v-for="(liveRecord, index) in liveRecordList" @click="playVideo(liveRecord.recordFilePath)">{{index+1}}.{{liveRecord.recordFileName}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script src="js/jquery-2.1.4.min.js"></script>
|
||||
<script src="js/layer_mobile/layer.js"></script>
|
||||
<script src="js/vue.js"></script>
|
||||
<script src="js/flv.min.js"></script>
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
liveUrl: null,
|
||||
livePlanId: null,
|
||||
liveRecordUrl: null,
|
||||
liveRecordSrc: null,
|
||||
liveRecordList: [],
|
||||
currentPage: 1,
|
||||
rows: 20
|
||||
},
|
||||
methods: {
|
||||
playVideo: function(liveRecordSrc) {
|
||||
this.initFlvPlayer(this.liveRecordUrl + '/' + liveRecordSrc);
|
||||
},
|
||||
getPathParams: function(url) {
|
||||
var params = url.split('?')[1];
|
||||
var paramsObj = {};
|
||||
if (typeof (params) == 'undefined' || params == null) {
|
||||
return paramsObj;
|
||||
}
|
||||
var paramsKVs = params.split('&');
|
||||
for (var i = 0, item = null; item = paramsKVs[i++];) {
|
||||
var kvs = item.split('=');
|
||||
if (kvs.length == 1) {
|
||||
paramsObj[kvs[0]] = null;
|
||||
}
|
||||
if (kvs.length == 2) {
|
||||
paramsObj[kvs[0]] = decodeURI(kvs[1]);
|
||||
}
|
||||
}
|
||||
return paramsObj;
|
||||
},
|
||||
getLivePlanRecordList: function(page) {
|
||||
var self = this;
|
||||
var layIndex = null;
|
||||
$.ajax({
|
||||
url: self.liveUrl +'/app/liverecord/listpageliverecordrelease/'+ self.livePlanId,
|
||||
type: 'GET',
|
||||
contentType: "application/json;charset=utf-8",
|
||||
headers: {},
|
||||
data: 'page='+ page +'&rows='+ self.rows,
|
||||
success: function (data, status, XMLHttpRequest) {
|
||||
var responseCode = XMLHttpRequest.status;
|
||||
if(data.rows.length === 0) {
|
||||
layer.open({
|
||||
content: '暂无数据',
|
||||
skin: 'msg',
|
||||
time: 2
|
||||
})
|
||||
return;
|
||||
}
|
||||
self.currentPage = page;
|
||||
var liveRecordArray = data.rows
|
||||
if(page === 1) {
|
||||
self.liveRecordList = liveRecordArray;
|
||||
self.$nextTick(function() {
|
||||
setTimeout(function() {
|
||||
self.playVideo(self.liveRecordList[0].recordFilePath);
|
||||
}, 500);
|
||||
});
|
||||
} else {
|
||||
self.liveRecordList = self.liveRecordList.concat(liveRecordArray);
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest) {
|
||||
var responseCode = XMLHttpRequest.status;
|
||||
var responseData = JSON.parse(XMLHttpRequest.responseText);
|
||||
layer.open({
|
||||
content: responseData.msg,
|
||||
shadeClose: false,
|
||||
skin: 'msg',
|
||||
time: 2
|
||||
});
|
||||
},
|
||||
beforeSend: function (XMLHttpRequest) {
|
||||
layIndex = layer.open({
|
||||
type: 2,
|
||||
shadeClose: false,
|
||||
content: '加载中...'
|
||||
});
|
||||
},
|
||||
complete: function (XMLHttpRequest, status) {
|
||||
setTimeout(function() {
|
||||
layer.close(layIndex);
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
},
|
||||
initFlvPlayer: function(videoUrl) {
|
||||
var self = this;
|
||||
if (flvjs.isSupported()) {
|
||||
var videoElement = document.getElementById('video');
|
||||
var flvPlayer = flvjs.createPlayer({
|
||||
type: 'flv',
|
||||
url: videoUrl
|
||||
});
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.load();
|
||||
flvPlayer.play();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
var self = this;
|
||||
var pathParams = this.getPathParams(window.location.href);
|
||||
self.livePlanId = pathParams.livePlanId;
|
||||
self.liveUrl = decodeURI(pathParams.liveUrl);
|
||||
self.liveRecordUrl = decodeURI(pathParams.liveRecordUrl);
|
||||
self.getLivePlanRecordList(1);
|
||||
$(window).scroll(function(){
|
||||
if ($(window).scrollTop() + $(window).height() == $(document).height()) {
|
||||
self.getLivePlanRecordList(self.currentPage + 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
7
webview/flv/js/flv.min.js
vendored
Normal file
7
webview/flv/js/flv.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
webview/flv/js/jquery-2.1.4.min.js
vendored
Normal file
3
webview/flv/js/jquery-2.1.4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
webview/flv/js/layer_mobile/layer.js
Normal file
2
webview/flv/js/layer_mobile/layer.js
Normal file
@ -0,0 +1,2 @@
|
||||
/*! layer mobile-v2.0 弹层组件移动版 License LGPL http://layer.layui.com/mobile By 贤心 */
|
||||
;!function(a){"use strict";var b=document,c="querySelectorAll",d="getElementsByClassName",e=function(a){return b[c](a)},f={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},g={extend:function(a){var b=JSON.parse(JSON.stringify(f));for(var c in a)b[c]=a[c];return b},timer:{},end:{}};g.touch=function(a,b){a.addEventListener("click",function(a){b.call(this,a)},!1)};var h=0,i=["layui-m-layer"],j=function(a){var b=this;b.config=g.extend(a),b.view()};j.prototype.view=function(){var a=this,c=a.config,f=b.createElement("div");a.id=f.id=i[0]+h,f.setAttribute("class",i[0]+" "+i[0]+(c.type||0)),f.setAttribute("index",h);var g=function(){var a="object"==typeof c.title;return c.title?'<h3 style="'+(a?c.title[1]:"")+'">'+(a?c.title[0]:c.title)+"</h3>":""}(),j=function(){"string"==typeof c.btn&&(c.btn=[c.btn]);var a,b=(c.btn||[]).length;return 0!==b&&c.btn?(a='<span yes type="1">'+c.btn[0]+"</span>",2===b&&(a='<span no type="0">'+c.btn[1]+"</span>"+a),'<div class="layui-m-layerbtn">'+a+"</div>"):""}();if(c.fixed||(c.top=c.hasOwnProperty("top")?c.top:100,c.style=c.style||"",c.style+=" top:"+(b.body.scrollTop+c.top)+"px"),2===c.type&&(c.content='<i></i><i class="layui-m-layerload"></i><i></i><p>'+(c.content||"")+"</p>"),c.skin&&(c.anim="up"),"msg"===c.skin&&(c.shade=!1),f.innerHTML=(c.shade?"<div "+("string"==typeof c.shade?'style="'+c.shade+'"':"")+' class="layui-m-layershade"></div>':"")+'<div class="layui-m-layermain" '+(c.fixed?"":'style="position:static;"')+'><div class="layui-m-layersection"><div class="layui-m-layerchild '+(c.skin?"layui-m-layer-"+c.skin+" ":"")+(c.className?c.className:"")+" "+(c.anim?"layui-m-anim-"+c.anim:"")+'" '+(c.style?'style="'+c.style+'"':"")+">"+g+'<div class="layui-m-layercont">'+c.content+"</div>"+j+"</div></div></div>",!c.type||2===c.type){var k=b[d](i[0]+c.type),l=k.length;l>=1&&layer.close(k[0].getAttribute("index"))}document.body.appendChild(f);var m=a.elem=e("#"+a.id)[0];c.success&&c.success(m),a.index=h++,a.action(c,m)},j.prototype.action=function(a,b){var c=this;a.time&&(g.timer[c.index]=setTimeout(function(){layer.close(c.index)},1e3*a.time));var e=function(){var b=this.getAttribute("type");0==b?(a.no&&a.no(),layer.close(c.index)):a.yes?a.yes(c.index):layer.close(c.index)};if(a.btn)for(var f=b[d]("layui-m-layerbtn")[0].children,h=f.length,i=0;h>i;i++)g.touch(f[i],e);if(a.shade&&a.shadeClose){var j=b[d]("layui-m-layershade")[0];g.touch(j,function(){layer.close(c.index,a.end)})}a.end&&(g.end[c.index]=a.end)},a.layer={v:"2.0",index:h,open:function(a){var b=new j(a||{});return b.index},close:function(a){var c=e("#"+i[0]+a)[0];c&&(c.innerHTML="",b.body.removeChild(c),clearTimeout(g.timer[a]),delete g.timer[a],"function"==typeof g.end[a]&&g.end[a](),delete g.end[a])},closeAll:function(){for(var a=b[d](i[0]),c=0,e=a.length;e>c;c++)layer.close(0|a[0].getAttribute("index"))}},"function"==typeof define?define(function(){return layer}):function(){var a=document.scripts,c=a[a.length-1],d=c.src,e=d.substring(0,d.lastIndexOf("/")+1);c.getAttribute("merge")||document.head.appendChild(function(){var a=b.createElement("link");return a.href=e+"need/layer.css?2.0",a.type="text/css",a.rel="styleSheet",a.id="layermcss",a}())}()}(window);
|
1
webview/flv/js/layer_mobile/need/layer.css
Normal file
1
webview/flv/js/layer_mobile/need/layer.css
Normal file
File diff suppressed because one or more lines are too long
12
webview/flv/js/rem.js
Normal file
12
webview/flv/js/rem.js
Normal file
@ -0,0 +1,12 @@
|
||||
function setPage() {
|
||||
var html = document.getElementsByTagName('html')[0];
|
||||
var deviceWidth = document.documentElement.clientWidth;
|
||||
var scale = deviceWidth / 750;//psd图上的宽度
|
||||
html.style.fontSize = scale * 100 + 'px';
|
||||
}
|
||||
|
||||
setPage();
|
||||
|
||||
window.onresize = function () {
|
||||
setPage();
|
||||
}
|
10947
webview/flv/js/vue.js
Normal file
10947
webview/flv/js/vue.js
Normal file
File diff suppressed because it is too large
Load Diff
1
webview/flv/readme.txt
Normal file
1
webview/flv/readme.txt
Normal file
@ -0,0 +1 @@
|
||||
直播历史,将此文件夹发布到远程web容器当中
|
Loading…
Reference in New Issue
Block a user