@@ -13,4 +13,11 @@ export const updateProgress = function (data) { | |||
method: 'PUT', | |||
data | |||
}) | |||
} | |||
export const getVideoProgress = function (data) { | |||
return request({ | |||
url: '/westreamVideo/getVideoProgress', | |||
method: 'GET', | |||
data | |||
}) | |||
} |
@@ -13,4 +13,11 @@ export const activitySubmit = function (data) { | |||
method: 'POST', | |||
data | |||
}) | |||
} | |||
export const activityGetApply = function (data) { | |||
return request({ | |||
url: '/westreamActivityApply/getApply', | |||
method: 'GET', | |||
data | |||
}) | |||
} |
@@ -1,7 +1,7 @@ | |||
<!--package_first/pages/AttentionMethod/index.wxml--> | |||
<view class="attention_container"> | |||
<view> | |||
<image class="main" src="../../../assets/img/attention.png" mode=""/> | |||
<image class="main" src="../../img/attention.png" mode=""/> | |||
</view> | |||
<view bindtap="goPage" class="button"> | |||
上传图片 |
@@ -1,11 +1,11 @@ | |||
/* package_first/pages/AttentionMethod/index.wxss */ | |||
.attention_container{ | |||
position: relative; | |||
width: 100%; | |||
} | |||
.main{ | |||
width: 140%; | |||
width: 100%; | |||
height: 2640rpx; | |||
margin-top: -105rpx; | |||
} | |||
.button{ | |||
width: calc(100% - 60rpx); |
@@ -23,6 +23,7 @@ | |||
} | |||
.cotent{ | |||
padding: 20rpx 10rpx 0 23rpx; | |||
position: relative; | |||
} | |||
.title{ | |||
display: flex; | |||
@@ -50,17 +51,21 @@ | |||
color: #FFFFFF; | |||
line-height: 36rpx; | |||
text-align: center; | |||
float: right; | |||
} | |||
.title_content{ | |||
width: 328rpx; | |||
height: 117rpx; | |||
height: 160rpx; | |||
font-size: 28rpx; | |||
font-family: Source Han Sans CN; | |||
font-weight: 400; | |||
color: #767881; | |||
line-height: 45rpx; | |||
padding-top: 24rpx; | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 3; | |||
text-overflow:ellipsis; | |||
overflow: hidden; | |||
} | |||
.is--sutdy{ | |||
background: #006DF7; |
@@ -5,7 +5,7 @@ | |||
</view> --> | |||
<view class="activity_container"> | |||
<view class="top"> | |||
<image class="activity_bg" src="../../../assets/img/activitybg.png" mode=""/> | |||
<image class="activity_bg" src="../../img/activitybg.png" mode=""/> | |||
</view> | |||
<view class="part"> | |||
<view class="part__item" wx:key="index" wx:for="{{entersList}}" wx:if="{{ item.isShow }}"> |
@@ -1,5 +1,5 @@ | |||
// package_first/pages/volunteerActivity/index.js | |||
import {api_westreamActivity} from '../../../api/volunteer'; | |||
import {api_westreamActivity,activitySubmit,} from '../../../api/volunteer'; | |||
Page({ | |||
/** | |||
@@ -7,6 +7,11 @@ Page({ | |||
*/ | |||
data: { | |||
list:[], | |||
activityId:'', | |||
nickname:'', | |||
activityTitle:'', | |||
applyName:'', | |||
applyPhone:'', | |||
userPage:{ | |||
page:1, | |||
limit:10 | |||
@@ -91,6 +96,7 @@ Page({ | |||
}else{ | |||
list = [...this.data.list,...res.data.records] | |||
} | |||
let total = res.data.total | |||
list = list.reduce((pre,item)=>{ | |||
return [...pre,{ | |||
@@ -107,6 +113,7 @@ Page({ | |||
}) | |||
}, | |||
showDetail(e) { | |||
let data = JSON.stringify(e.currentTarget.dataset.item) | |||
wx.navigateTo({ |
@@ -1,11 +1,13 @@ | |||
// package_first/pages/VolunteerDetail/index.js | |||
import {api_westreamActivity} from '../../../api/volunteer'; | |||
import {api_westreamActivity,activitySubmit} from '../../../api/volunteer'; | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
status:false, | |||
activityInfo:{}, | |||
list:[], | |||
userPage:{ | |||
@@ -38,6 +40,7 @@ Page({ | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow() { | |||
this.activitySubmit() | |||
}, | |||
/** | |||
@@ -67,6 +70,25 @@ Page({ | |||
onReachBottom() { | |||
}, | |||
activitySubmit(){ | |||
let tenantObj = wx.getStorageSync('tenant') | |||
let openid = wx.getStorageSync('openid') | |||
let data = { | |||
openid:openid, | |||
activityId: this.data.activityInfo.id, | |||
tenantId:tenantObj.tenantId, | |||
nickname:'', | |||
applyPhone:'', | |||
applyName:'', | |||
activityTitle:this.data.activityInfo.activityTitle | |||
} | |||
activitySubmit(data).then(res=>{ | |||
console.log(res); | |||
}).catch(res=>{ | |||
console.log(res); | |||
}) | |||
}, | |||
formatDate(dateString) { | |||
const date = new Date(dateString); | |||
@@ -76,6 +98,10 @@ Page({ | |||
return `${year}年${month}月${day}日`; | |||
}, | |||
goApply(e){ | |||
if(this.data.status){ | |||
return | |||
} | |||
// if(status == 2){ | |||
// console.log(this.data.status); | |||
// wx.navigateTo({ |
@@ -17,6 +17,6 @@ | |||
</view> | |||
</view> | |||
<view class="button" bindtap="goApply"> | |||
报名 | |||
{{status==3?'已报名':'报名'}} | |||
</view> | |||
</view> |
@@ -1,9 +1,9 @@ | |||
import { updateProgress } from '../../../api/learining.js' | |||
import { updateProgress , getVideoProgress } from '../../../api/learining.js' | |||
Page({ | |||
data:{ | |||
videoInfo:{}, | |||
videoProgress:'', | |||
videoProgress: 0, | |||
openid: null, | |||
initialTime: 0, | |||
statusList:{ | |||
@@ -25,26 +25,38 @@ Page({ | |||
detail:data, | |||
openid | |||
}) | |||
}, | |||
onShow(){ | |||
this.handleEnded() | |||
this.getProgress() | |||
}, | |||
onHide(){ | |||
this.handleEnded() | |||
this.handleEnded(this.data.detail.status) | |||
}, | |||
onUnload(){ | |||
this.handleEnded() | |||
this.handleEnded(this.data.detail.status) | |||
}, | |||
saveTime(e){ | |||
let time = e.detail.currentTime | |||
this.setData({ | |||
videoProgress:time | |||
}) | |||
}, | |||
getProgress(){ | |||
const data = { | |||
videoId: this.data.detail.id, | |||
openid: this.data.openid, | |||
} | |||
getVideoProgress(data).then(res=>{ | |||
this.setData({ | |||
initialTime:res.data.videoProgress | |||
}) | |||
}) | |||
}, | |||
handleEnded(){ | |||
let tenantObj = wx.getStorageSync('tenant') | |||
handleEnded(status){ | |||
const params = { | |||
status: 2, | |||
status: status === 1 ? 1 : 2, | |||
videoId: this.data.detail.id, | |||
openid: this.data.openid, | |||
tenantId:tenantObj.tenantId, | |||
videoProgress:this.data.initialTime | |||
videoProgress: typeof(status) === 'number' ? this.data.videoProgress : 0 | |||
} | |||
updateProgress(params) | |||
.then(res=>{ | |||
@@ -53,8 +65,7 @@ Page({ | |||
initialTime = res.data==null?0:res.data | |||
} | |||
this.setData({ | |||
'detail.status': 2, | |||
initialTime | |||
'detail.status': status === 1 ? 1 : 2, | |||
}) | |||
}) | |||
} |
@@ -9,8 +9,8 @@ | |||
show-progress="{{false}}" | |||
show-mute-btn="{{true}}" | |||
enable-progress-gesture="{{false}}" | |||
bindtimeupdate="saveTime" | |||
bindended="handleEnded"> | |||
</video> | |||
<view class="header__tips"> | |||
<view class="title_text">{{detail.videoTitle}}</view> |
@@ -7,7 +7,7 @@ | |||
<view class="main_container"> | |||
<!-- 图片 --> | |||
<view class="banner"> | |||
<image class="banner_image" src="../../assets/first/home_banner.png" mode="aspectFill" bindtap="redirectToAd"></image> | |||
<image class="banner_image" src="../../assets/first/home_banner.png" bindtap="redirectToAd"></image> | |||
</view> | |||
@@ -41,6 +41,7 @@ | |||
.banner_image { | |||
width: 100%; | |||
height: 380rpx; | |||
} | |||
/* 公告 */ | |||
.announcement { |