Browse Source

4055

pull/15/head
xieying 1 year ago
parent
commit
3f792eebfb
24 changed files with 90 additions and 26 deletions
  1. +7
    -0
      api/learining.js
  2. +7
    -0
      api/volunteer.js
  3. BIN
      assets/first/ask.png
  4. BIN
      assets/first/home_banner.png
  5. BIN
      assets/first/new.png
  6. BIN
      assets/first/rivers.png
  7. BIN
      assets/first/stores.png
  8. BIN
      assets/img/activitytitle.png
  9. BIN
      assets/img/attention.png
  10. BIN
      assets/img/submitsuggestion.png
  11. BIN
      assets/img/takepart.png
  12. +0
    -0
      package_first/img/activitybg.png
  13. BIN
      package_first/img/attention.png
  14. +1
    -1
      package_first/pages/AttentionMethod/index.wxml
  15. +2
    -2
      package_first/pages/AttentionMethod/index.wxss
  16. +7
    -2
      package_first/pages/LearningVideo/index.wxss
  17. +1
    -1
      package_first/pages/ProtectionActivity/index.wxml
  18. +8
    -1
      package_first/pages/VolunteerActivity/index.js
  19. +27
    -1
      package_first/pages/VolunteerDetail/index.js
  20. +1
    -1
      package_first/pages/VolunteerDetail/index.wxml
  21. +26
    -15
      package_first/pages/videoDetail/index.js
  22. +1
    -1
      package_first/pages/videoDetail/index.wxml
  23. +1
    -1
      pages/FirstPage/index.wxml
  24. +1
    -0
      pages/FirstPage/index.wxss

+ 7
- 0
api/learining.js View File

@@ -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
})
}

+ 7
- 0
api/volunteer.js View File

@@ -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
})
}

BIN
assets/first/ask.png View File

Before After
Width: 45  |  Height: 45  |  Size: 1.5KB Width: 109  |  Height: 109  |  Size: 5.6KB

BIN
assets/first/home_banner.png View File

Before After
Width: 1035  |  Height: 492  |  Size: 624KB Width: 690  |  Height: 283  |  Size: 72KB

BIN
assets/first/new.png View File

Before After
Width: 45  |  Height: 45  |  Size: 2.0KB Width: 109  |  Height: 109  |  Size: 7.4KB

BIN
assets/first/rivers.png View File

Before After
Width: 45  |  Height: 45  |  Size: 1.8KB Width: 109  |  Height: 109  |  Size: 5.4KB

BIN
assets/first/stores.png View File

Before After
Width: 45  |  Height: 45  |  Size: 2.3KB Width: 109  |  Height: 109  |  Size: 7.4KB

BIN
assets/img/activitytitle.png View File

Before After
Width: 752  |  Height: 176  |  Size: 19KB

BIN
assets/img/attention.png View File

Before After
Width: 1322  |  Height: 4089  |  Size: 971KB

BIN
assets/img/submitsuggestion.png View File

Before After
Width: 609  |  Height: 419  |  Size: 31KB

BIN
assets/img/takepart.png View File

Before After
Width: 143  |  Height: 73  |  Size: 6.8KB

assets/img/activitybg.png → package_first/img/activitybg.png View File


BIN
package_first/img/attention.png View File

Before After
Width: 937  |  Height: 2563  |  Size: 799KB

+ 1
- 1
package_first/pages/AttentionMethod/index.wxml View File

@@ -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">
上传图片

+ 2
- 2
package_first/pages/AttentionMethod/index.wxss View File

@@ -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);

+ 7
- 2
package_first/pages/LearningVideo/index.wxss View File

@@ -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;

+ 1
- 1
package_first/pages/ProtectionActivity/index.wxml View File

@@ -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 }}">

+ 8
- 1
package_first/pages/VolunteerActivity/index.js View File

@@ -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({

+ 27
- 1
package_first/pages/VolunteerDetail/index.js View File

@@ -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({

+ 1
- 1
package_first/pages/VolunteerDetail/index.wxml View File

@@ -17,6 +17,6 @@
</view>
</view>
<view class="button" bindtap="goApply">
报名
{{status==3?'已报名':'报名'}}
</view>
</view>

+ 26
- 15
package_first/pages/videoDetail/index.js View File

@@ -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,
})
})
}

+ 1
- 1
package_first/pages/videoDetail/index.wxml View File

@@ -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>

+ 1
- 1
pages/FirstPage/index.wxml View File

@@ -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>



+ 1
- 0
pages/FirstPage/index.wxss View File

@@ -41,6 +41,7 @@
.banner_image {
width: 100%;
height: 380rpx;
}
/* 公告 */
.announcement {

Loading…
Cancel
Save