Quellcode durchsuchen

2442

pull/13/head
zhangtao vor 1 Jahr
Ursprung
Commit
c6fe603bca
34 geänderte Dateien mit 1186 neuen und 20 gelöschten Zeilen
  1. +16
    -0
      api/learining.js
  2. +16
    -0
      api/volunteer.js
  3. +6
    -1
      app.json
  4. BIN
      assets/img/submitsuggestion.png
  5. +98
    -0
      package_first/pages/ActivityApply/index.js
  6. +5
    -0
      package_first/pages/ActivityApply/index.json
  7. +28
    -0
      package_first/pages/ActivityApply/index.wxml
  8. +84
    -0
      package_first/pages/ActivityApply/index.wxss
  9. +5
    -4
      package_first/pages/AddPicture/index.js
  10. +4
    -1
      package_first/pages/AddPicture/index.wxml
  11. +10
    -3
      package_first/pages/AddPicture/index.wxss
  12. +115
    -0
      package_first/pages/LearningVideo/index.js
  13. +8
    -0
      package_first/pages/LearningVideo/index.json
  14. +18
    -0
      package_first/pages/LearningVideo/index.wxml
  15. +82
    -0
      package_first/pages/LearningVideo/index.wxss
  16. +2
    -2
      package_first/pages/ProtectionActivity/index.js
  17. +14
    -6
      package_first/pages/ProtectionSuggestion/index.js
  18. +5
    -0
      package_first/pages/ProtectionSuggestion/index.wxml
  19. +27
    -0
      package_first/pages/ProtectionSuggestion/index.wxss
  20. +117
    -0
      package_first/pages/VolunteerActivity/index.js
  21. +8
    -0
      package_first/pages/VolunteerActivity/index.json
  22. +29
    -0
      package_first/pages/VolunteerActivity/index.wxml
  23. +106
    -0
      package_first/pages/VolunteerActivity/index.wxss
  24. +100
    -0
      package_first/pages/VolunteerDetail/index.js
  25. +5
    -0
      package_first/pages/VolunteerDetail/index.json
  26. +22
    -0
      package_first/pages/VolunteerDetail/index.wxml
  27. +73
    -0
      package_first/pages/VolunteerDetail/index.wxss
  28. +1
    -1
      package_first/pages/beautyList/index.wxml
  29. +52
    -0
      package_first/pages/videoDetail/index.js
  30. +3
    -0
      package_first/pages/videoDetail/index.json
  31. +32
    -0
      package_first/pages/videoDetail/index.wxml
  32. +65
    -0
      package_first/pages/videoDetail/index.wxss
  33. +1
    -1
      pages/FirstPage/index.wxml
  34. +29
    -1
      project.private.config.json

+ 16
- 0
api/learining.js Datei anzeigen

@@ -0,0 +1,16 @@
const {request} = require("../request/index")

export const api_westreamVideo = function (data) {
return request({
url: '/westreamVideo/index',
method: 'GET',
data
})
}
export const updateProgress = function (data) {
return request({
url: '/westreamVideo/updateProgress',
method: 'PUT',
data
})
}

+ 16
- 0
api/volunteer.js Datei anzeigen

@@ -0,0 +1,16 @@
const {request} = require("../request/index")

export const api_westreamActivity = function (data) {
return request({
url: '/westreamActivity/index',
method: 'GET',
data
})
}
export const activitySubmit = function (data) {
return request({
url: '/westreamActivityApply/submit',
method: 'POST',
data
})
}

+ 6
- 1
app.json Datei anzeigen

@@ -52,7 +52,12 @@
"pages/ProtectionSuggestion/index",
"pages/ProtectionActivity/index",
"pages/AttentionMethod/index",
"pages/AddPicture/index"
"pages/AddPicture/index",
"pages/LearningVideo/index",
"pages/videoDetail/index",
"pages/VolunteerActivity/index",
"pages/VolunteerDetail/index",
"pages/ActivityApply/index"

]
},

BIN
assets/img/submitsuggestion.png Datei anzeigen

Vorher Nachher
Breite: 609  |  Höhe: 419  |  Größe: 31KB

+ 98
- 0
package_first/pages/ActivityApply/index.js Datei anzeigen

@@ -0,0 +1,98 @@
import { activitySubmit } from '../../../api/volunteer.js'

Page({

/**
* 页面的初始数据
*/
data: {
activityId: null,
userInfo: {
applyName: null,
applyPhone: null
}
},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const activityId = options.id
this.setData({
activityId
})
},

setApplyName(e){
this.setData({
'userInfo.applyName': e.detail.value
})
},
setApplyPhone(e){
this.setData({
'userInfo.applyPhone': e.detail.value
})
},

handleSubmit(){
const openid = wx.getStorageSync('openid')
const params = {
...this.data.userInfo,
openid,
activityId: this.data.activityId
}
activitySubmit(params)
.then(re=>{
})
},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow() {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage() {

}
})

+ 5
- 0
package_first/pages/ActivityApply/index.json Datei anzeigen

@@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTitleText": "参加活动",
"navigationBarBackgroundColor": "#1F80F4"
}

+ 28
- 0
package_first/pages/ActivityApply/index.wxml Datei anzeigen

@@ -0,0 +1,28 @@
<view class="activity__container">
<view class="activity__header">
<view class="header__title">
期待您的加入!
</view>
<view class="header__tips">
全民护河 全民参与 助力生态文明建设
</view>
</view>
<view class="activity__back"></view>
<view class="activity__content">
<view class="content__item">
<view class="item__label">
姓名
</view>
<input class="item__input" type="text" bindinput="setApplyName" placeholder="请填写姓名" />
</view>
<view class="content__item">
<view class="item__label">
手机号
</view>
<input class="item__input" type="text" bindinput="setApplyPhone" placeholder="请填写手机号" />
</view>
</view>
<view class="activity__button" bindtap="handleSubmit">
提交
</view>
</view>

+ 84
- 0
package_first/pages/ActivityApply/index.wxss Datei anzeigen

@@ -0,0 +1,84 @@
.activity__container{
position: relative;
height: 100vh;
background: #F2F6F9;
}
.activity__header{
height: 210rpx;
background: #1F80F4;
padding: 10rpx 100rpx;
border-bottom-left-radius: 15%;
border-bottom-right-radius: 15%;
}
.header__title{
font-size: 38rpx;
color: #FFFFFF;
margin-bottom: 20rpx;
}
.header__tips{
font-size: 28rpx;
color: #CAE5FF;
}

.activity__back{
width: calc(100% - 140rpx);
height: 100rpx;
background: #CBE5FF;
border-radius: 20rpx;
position: absolute;
left: 50%;
top: 140rpx;
transform: translate(-50%,0);
}

.activity__content{
position: absolute;
left: 50%;
top: 160rpx;
transform: translate(-50%,0);
width: calc(100% - 60rpx);
height: calc(100vh - 320rpx);
padding: 70rpx 30rpx;
background: #FFFFFF;
border: 1rpx solid #E4F0FE;
border-radius: 20rpx;
box-shadow: 0rpx 4rpx 29rpx 0rpx rgba(32,123,242,0.08);
}

.content__item{
margin-bottom: 50rpx;
}

.item__label{
font-size: 32rpx;
color: #333333;
display: flex;
align-items: center;
margin-bottom: 30rpx;
}
.item__label::before{
content: "";
width: 10rpx;
height: 40rpx;
display: inline-block;
background: #1F80F4;
margin-right: 24rpx;
}

.item__input{
border-bottom: 1px solid #F2F2F2;
font-size: 32rpx;
padding: 10rpx 40rpx;
}

.activity__button{
position: absolute;
left: 30rpx;
bottom: 30rpx;
width: calc(100% - 60rpx);
line-height: 90rpx;
text-align: center;
color: #FFFFFF;
background: #3275E9;
border-radius: 40rpx;
}

+ 5
- 4
package_first/pages/AddPicture/index.js Datei anzeigen

@@ -68,7 +68,8 @@ Page({
//上传图片
uploadImage(){
wx.chooseMedia({
count: 1 - this.data.imageList.length, // 最多可以选择的图片张数,默认9
count: 1, // 最多可以选择的图片张数,默认9
// count: 1 - this.data.imageList.length, // 最多可以选择的图片张数,默认9
mediaType: ['image'], // 图片
sizeType: ['original'], // original 原图,compressed 压缩图,默认二者都有
sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有
@@ -77,10 +78,10 @@ Page({
return item.tempFilePath
})
// success
let imagePreviewList = this.data.imagePreviewList.concat(list)
let imageList = this.data.imageList.concat(list);
let imagePreviewList = list
let imageList = list;
this.setData({ imageList, imagePreviewList })
this.validate('imageList')
// this.validate('imageList')
},
fail: (e) => {
console.log(e);

+ 4
- 1
package_first/pages/AddPicture/index.wxml Datei anzeigen

@@ -3,7 +3,10 @@
<view class="add_container">
<view class="title">上传图片</view>
<view class="upload_image" bindtap="uploadImage">
<view>
<view class="add_imageList" wx:for="{{imageList}}" wx:key="index">
<image style="width:100%;" mode="widthFix" src="{{item}}"></image>
</view>
<view wx:if="{{imageList.length<1}}" class="upload_part">
<image style="height: 70rpx;width:70rpx;" mode="widthFix" src="../../../assets/img/upload.png"></image>
<view class="upload_text">上传图片</view>
</view>

+ 10
- 3
package_first/pages/AddPicture/index.wxss Datei anzeigen

@@ -4,7 +4,6 @@
margin: 80rpx 30rpx 0rpx 30rpx;
}
.title{
width: 124rpx;
height: 30rpx;
font-size: 32rpx;
font-family: Source Han Sans CN;
@@ -23,13 +22,17 @@
}
.upload_image{
width:calc(100% - 60rpx);
height: 265rpx;
min-height: 265rpx;
border: 4rpx dotted #006DF7;
border-radius: 10rpx;
text-align: center;
padding: 70rpx 0rpx 0rpx 0rpx;
margin: 52rpx 0rpx 192rpx 0rpx;
}

.upload_part {
padding-top: 70rpx;
}

.upload_text{
font-size: 32rpx;
font-family: Source Han Sans CN;
@@ -46,4 +49,8 @@
background-color: #2878ff;
height: 80rpx;
line-height: 80rpx;
}

.add_imageList {
width: 100%;
}

+ 115
- 0
package_first/pages/LearningVideo/index.js Datei anzeigen

@@ -0,0 +1,115 @@
// package_first/pages/LearningVideo/index.js
import {api_westreamVideo} from '../../../api/learining';
Page({

/**
* 页面的初始数据
*/
data: {
list:[],
params: {
openid: null
},
current: ''
},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const openid = wx.getStorageSync('openid')
this.setData({
params:{ openid }
})
},

/* 更新数据 */
updateList(e) {
let list = this.data.list.concat(e.detail || [])
this.setData({ list })
},
/* 重置数据 */
resetList() {
this.setData({ list: [] })
},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
current:'/westreamVideo/index'
})
},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage() {

},
westreamVideo(){
const tenantObj = wx.getStorageSync('tenant')
const openid = wx.getStorageSync('openid')
let data = {
tenantId:tenantObj.tenantId,
openid : openid,
...this.data.userPage
}
api_westreamVideo(data).then(res=>{
let list = [...this.data.list,...res.data.records]
let total = res.data.total
this.setData({
total,
list,
})
if(list.status == 0){
data.entersList[0].isstudy = true
}else if(list.status == 1){
data.entersList[1].isstudy = true
}
})
},
handleDetail(e){
const data = JSON.stringify(e.currentTarget.dataset.item)
wx.navigateTo({
url: '/package_first/pages/videoDetail/index?data='+ encodeURIComponent(data)
})
}

})

+ 8
- 0
package_first/pages/LearningVideo/index.json Datei anzeigen

@@ -0,0 +1,8 @@
{
"usingComponents": {
"list": "../../../components/List/index",
"ImageList": "../../../components/ImageList/index"
},
"navigationBarTitleText": "学习视频",
"navigationBarBackgroundColor": "#DBE8FF"
}

+ 18
- 0
package_first/pages/LearningVideo/index.wxml Datei anzeigen

@@ -0,0 +1,18 @@
<!--package_first/pages/LearningVideo/index.wxml-->
<view class="LearningVideo_container">
<list id="list" class="shop_list" url="{{current}}" bind:update-list="updateList" list="{{list}}" bind:reset-list="resetList" params="{{params}}">
<view class="part" wx:for="{{list}}" wx:key="index" data-item="{{ item }}" bindtap="handleDetail">
<view><image class="sutdy_picture" src="{{item.imageUrl}}" mode=""/></view>
<view class="cotent">
<view class="title">
<view class="title_text">{{item.videoTitle}}</view>
<view class="{{item.status==2?'item__tag sutdying':item.status==1?'item__tag no--sutdy':'item__tag is--sutdy'}}">
{{item.status==2?'学习中':item.status==1?'待学习':'已学习'}}
</view>
</view>
<view class="title_content">{{item.videoBrief}}</view>
</view>
</view>
</list>
<view class="bottom">- 更多视频 敬请期待 -</view>
</view>

+ 82
- 0
package_first/pages/LearningVideo/index.wxss Datei anzeigen

@@ -0,0 +1,82 @@
/* package_first/pages/LearningVideo/index.wxss */
.LearningVideo_container{
height: 100vh;
background: #F2F6F9;
padding: 0 30rpx 0 29rpx;
}
.part{
padding: 32rpx 10rpx 31rpx 30rpx;
height: 283rpx;
background: #FFFFFF;
box-shadow: 0px 0px 14px 2px rgba(43,93,184,0.09);
border-radius: 20px;
display: flex;
margin-bottom: 21rpx;
margin-top: 2rpx;
}
.sutdy_picture{
width: 296rpx;
height: 220rpx;
background-color: black;
background: #B5B5B5;
border-radius: 10rpx;
}
.cotent{
padding: 20rpx 10rpx 0 23rpx;
}
.title{
display: flex;
flex-wrap: wrap;
justify-content:space-between;

}
.title_text{
width: 224rpx;
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item__tag{
width: 84rpx;
height: 34rpx;
border-radius: 4rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
line-height: 36rpx;
text-align: center;
float: right;
}
.title_content{
width: 328rpx;
height: 117rpx;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #767881;
line-height: 45rpx;
padding-top: 24rpx;
}
.is--sutdy{
background: #006DF7;
}
.no--sutdy{
background: #EBAC14;
}
.sutdying{
background-color: #1BE9BC;
}
.bottom{
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #C5C5C5;
line-height: 36rpx;
text-align: center;
margin-top: 27rpx;
}

+ 2
- 2
package_first/pages/ProtectionActivity/index.js Datei anzeigen

@@ -21,7 +21,7 @@ Page({
{
title:'学习视频',
iconPath:'../../../assets/img/video.png',
path: '2',
path: '/package_first/pages/LearningVideo/index',
isJoin: false,
isShow: true
// type: 'video'
@@ -29,7 +29,7 @@ Page({
{
title:'志愿者活动',
iconPath:'../../../assets/img/volunteer.png',
path: '3',
path: '/package_first/pages/VolunteerActivity/index',
isJoin: false,
isShow: true
// type: 'activity'

+ 14
- 6
package_first/pages/ProtectionSuggestion/index.js Datei anzeigen

@@ -1,4 +1,5 @@
// package_first/pages/ProtectionSuggestion/ProtectionSuggestion.js
// import { PostProcess } from 'XrFrame/xrFrameSystem';
import { api_westreamSuggest,
api_getUserInfo
} from '../../../api/suggestion';
@@ -11,6 +12,7 @@ Page({
form : {
content:''
},
dialogShow:false,
userInfo:{},
formRules: {
content: {
@@ -78,6 +80,14 @@ Page({

},
// 关闭弹窗
colseDialog(){
console.log(111);
wx.switchTab({
url: '/pages/FirstPage/index',
})
},

remarkInputAction(options){
let content= options.detail.value
this.setData({
@@ -118,12 +128,10 @@ Page({
suggestName:this.data.form.content
}
api_westreamSuggest(data).then(res=>{
wx.showToast({
title: '提交成功',
icon:'none',
duration:2000
})

let dialogShow = true
this.setData({
dialogShow,
})
})
}
},

+ 5
- 0
package_first/pages/ProtectionSuggestion/index.wxml Datei anzeigen

@@ -17,4 +17,9 @@
</view>
</view>
</view>
<view class="submit_suggestion_dialog">
<view class="submit_suggestion_bg" wx:if="{{dialogShow}}"></view>
<image class="submit_suggestion" wx:if="{{dialogShow}}" src="../../../assets/img/submitsuggestion.png" mode=""/>
<view class="close_submit_suggestion" bindtap="colseDialog" wx:if="{{dialogShow}}"></view>
</view>
</view>

+ 27
- 0
package_first/pages/ProtectionSuggestion/index.wxss Datei anzeigen

@@ -79,3 +79,30 @@
height: 80rpx;
line-height: 80rpx;
}
.submit_suggestion{
width: 609rpx;
height: 419rpx;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}

.submit_suggestion_bg {
width: 100vw;
height: 100vh;
background-color: rgba(000, 000,000, 0.4);
position: fixed;
left: 0;
top: 0;
}

.close_submit_suggestion {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
position: fixed;
top: 38%;
left: 78.5%;
z-index: 999;
}

+ 117
- 0
package_first/pages/VolunteerActivity/index.js Datei anzeigen

@@ -0,0 +1,117 @@
// package_first/pages/volunteerActivity/index.js
import {api_westreamActivity} from '../../../api/volunteer';
Page({

/**
* 页面的初始数据
*/
data: {
list:[],
userPage:{
page:1,
limit:10
},
total:0,
},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.westreamActivity()
},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage() {

},

formatDate(dateString) {
const date = new Date(dateString);
const year = date.getFullYear();
const month = ("0" + (date.getMonth() + 1)).slice(-2);
const day = ("0" + date.getDate()).slice(-2);
return `${year}年${month}月${day}日`;
},

westreamActivity(){
const tenantObj = wx.getStorageSync('tenant')
let data = {
tenantId:tenantObj.tenantId,
...this.data.userPage
}
api_westreamActivity(data).then(res=>{
let list =[]
if(this.data.userPage.page==1){
list =res.data.records
}else{
list = [...this.data.list,...res.data.records]
}
let total = res.data.total
list = list.reduce((pre,item)=>{
return [...pre,{
...item,
activityBeginTime:this.formatDate(item.activityBeginTime),
activityEndTime:this.formatDate(item.activityEndTime)
}]
},[])
this.setData({
total,
list,
}),
// res.activityBeginTime = res.activityBeginTime.replace(/\s[\x00-\xff]*/g,'')
console.log(res);
})
},
showDetail(e) {
let data = JSON.stringify(e.currentTarget.dataset.item)
wx.navigateTo({
url: '/package_first/pages/VolunteerDetail/index?data='+ encodeURIComponent(data),
})
}
})

+ 8
- 0
package_first/pages/VolunteerActivity/index.json Datei anzeigen

@@ -0,0 +1,8 @@
{
"usingComponents": {
"list": "../../../components/List/index",
"ImageList": "../../../components/ImageList/index"
},
"navigationBarTitleText": "志愿者活动",
"navigationBarBackgroundColor": "#3275E9"
}

+ 29
- 0
package_first/pages/VolunteerActivity/index.wxml Datei anzeigen

@@ -0,0 +1,29 @@
<!--package_first/pages/volunteerActivity/index.wxml-->
<view class="volunteerActivity_container">
<view>
<view class="part" wx:for="{{list}}" wx:key="index">
<view>
<image class="activity_image" src="{{item.imageUrl}}" mode=""/>
</view>
<view class="part_middle">
<view class="activity">
<view class="activity_name">{{item.activityTitle}}</view>
<view class="{{item.status==2?'activity_tag is_apply':item.status==1?'activity_tag no_apply':'activity_tag over_apply'}}">
{{item.status==2?'报名进行中':item.status==1?'报名未开始':'报名已结束'}}
</view>
</view>
<view class="activity_date">
<view class="dot"></view>
<view class="activity_time">{{item.activityBeginTime}}~{{item.activityEndTime}}</view>
</view>
</view>
<view class="activity_bottom">
<view>
<view class="apply" wx:if="{{item.status==2}}">立即报名</view>
<view class="join" bindtap="showDetail" data-item="{{item}}">进入活动 》</view>
</view>
</view>
</view>
<view class="bottom">- 更多视频 敬请期待 -</view>
</view>
</view>

+ 106
- 0
package_first/pages/VolunteerActivity/index.wxss Datei anzeigen

@@ -0,0 +1,106 @@
/* package_first/pages/volunteerActivity/index.wxss */
.volunteerActivity_container{
width: 100%;
height: 100vh;
background: #F2F6F9;
padding: 30rpx;
}
.part{
width: calc(100%-60rpx);
background-color:#FFFFFF ;
margin-bottom: 19rpx;
padding-bottom: 19rpx;
}
.activity_image{
width: 100%;
height: 277rpx;
border-radius: 10rpx;
}
.activity{
display: flex;
flex-wrap: wrap;
}
.activity_name{
font-size: 34rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #000000;
}
.part_middle{
margin: 31rpx 31rpx 22rpx 27rpx;
border-bottom: 2rpx solid #E1E1E1;
padding-bottom:38rpx ;
}
.activity_tag{
width: 140rpx;
height: 42rpx;
border-radius: 4rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
line-height: 36rpx;
text-align: center;
margin-left: 39rpx;
}
.is_apply{
background: #006DF7;
}
.no_apply{
background: #1BE9BC;
}
.over_apply{
background: #EBAC14;
}
.activity_date{
display: flex;
align-items: center;
font-size: 30rpx;
padding: 38rpx 38rpx 0 6rpx;
}
.dot{
width: 14rpx;
height: 14rpx;
background: #3275E9;
margin-right: 18rpx;
}
.activity_time{
background: #FFFFFF;
border-radius: 10px;
}
.activity_bottom{
position: relative;
padding: 0 30rpx 35rpx 33rpx;
}
.join{
position: absolute;
top: 0;
right: 0;
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #3275E9;
line-height: 36rpx;

}
.apply{
width: 125rpx;
height: 42rpx;
background: #006DF7;
border-radius: 4rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
line-height: 36rpx;
text-align: center;
}
.bottom{
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #C5C5C5;
line-height: 36rpx;
text-align: center;
margin-top: 27rpx;
}

+ 100
- 0
package_first/pages/VolunteerDetail/index.js Datei anzeigen

@@ -0,0 +1,100 @@
// package_first/pages/VolunteerDetail/index.js
import {api_westreamActivity} from '../../../api/volunteer';
Page({

/**
* 页面的初始数据
*/
data: {
activityInfo:{},
list:[],
userPage:{
page:1,
limit:10
},
total:0,
},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let data = JSON.parse(decodeURIComponent(options.data))
data.applyBeginTime = this.formatDate(data.applyBeginTime)
data.applyEndTime = this.formatDate(data.applyEndTime)
this.setData({
activityInfo:data
})
},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow() {
},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {

},

formatDate(dateString) {
const date = new Date(dateString);
const year = date.getFullYear();
const month = ("0" + (date.getMonth() + 1)).slice(-2);
const day = ("0" + date.getDate()).slice(-2);
return `${year}年${month}月${day}日`;
},
goApply(e){
// if(status == 2){
// console.log(this.data.status);
// wx.navigateTo({
// url:"/package_first/pages/ActivityApply/index"
// })
// }else{
// wx.showToast({
// title: '不在报名时间',
// icon:'none'
// })
// }
wx.navigateTo({
url:"/package_first/pages/ActivityApply/index?id=" + this.data.activityInfo.id
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {

}
})

+ 5
- 0
package_first/pages/VolunteerDetail/index.json Datei anzeigen

@@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTitleText": "活动详情",
"navigationBarBackgroundColor": "#C2D8FF"
}

+ 22
- 0
package_first/pages/VolunteerDetail/index.wxml Datei anzeigen

@@ -0,0 +1,22 @@
<!--package_first/pages/VolunteerDetail/index.wxml-->
<view class="VolunteerDetail_container">
<view class="main">
<view class="content">
{{activityInfo.intro}}
</view>
<view >
<image class="Volunteer_image" src="{{activityInfo.imageUrl}}" mode=""/>
</view>
<view class="apply_time">
<view class="apply">报名时间:</view>
<view class="time">{{activityInfo.applyBeginTime}}~{{activityInfo.applyEndTime}}</view>
</view>
<view class="activity_time">
<view class="activity">活动时间:</view>
<view class="time_act">{{activityInfo.activityBeginTime}}~{{activityInfo.activityEndTime}}</view>
</view>
</view>
<view class="button" bindtap="goApply">
报名
</view>
</view>

+ 73
- 0
package_first/pages/VolunteerDetail/index.wxss Datei anzeigen

@@ -0,0 +1,73 @@
/* package_first/pages/VolunteerDetail/index.wxss */
.VolunteerDetail_container{
width: 100%;
height: 100vh;
background: #F2F6F9;
padding: 30rpx;
}
.main{
width: 100%;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 14rpx 2rpx rgba(43,93,184,0.09);
border-radius: 20rpx;
padding: 62rpx 30rpx 56rpx 29rpx ;
}
.content{
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #000000;
line-height: 48rpx;
margin-bottom:40rpx;
}
.Volunteer_image{
width: 100%;
height: 340rpx;
border-radius: 10rpx;
}
.apply{
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #000000;
line-height: 48rpx;
margin: 30rpx 0 31rpx 0;
}
.time_act{
width: 645rpx;
height: 66rpx;
background: rgba(50, 117, 233, 0.2);
border-radius: 4rpx;
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #3275E9;
text-align: center;
line-height:66rpx;
}
.time{
width: 645rpx;
height: 66rpx;
background: rgba(16, 177, 255, 0.2);
border-radius: 4rpx;
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: rgba(16, 177, 255, 1);
text-align: center;
line-height:66rpx;
}
.activity{
margin: 31rpx 0 30rpx 0;
}
.button{
width:calc(100% - 60rpx);
text-align: center;
border-radius: 32rpx;
color: white;
background-color: #2878ff;
position: absolute;
bottom: 24rpx;
height: 90rpx;
line-height: 80rpx;
}

+ 1
- 1
package_first/pages/beautyList/index.wxml Datei anzeigen

@@ -2,7 +2,7 @@
<view class="beauty_container">
<!-- 列表 -->
<list id="list" class="beauty_list" url="{{current}}" bind:update-list="updateList" list="{{list}}" bind:reset-list="resetList" params="{{params}}">
<view class="beauty_item" data-item="{{item}}" bindtap="showDetail" wx:for="{{list}}" wx:key="index">
<view class="beauty_item" data-item="{{item}}" bindtap="showDetail" bindtap="showDetail" wx:for="{{list}}" wx:key="index">
<view class="item_head">
<image class="user_avatar" src="{{item.headimgurl}}"></image>
<view class="other_info">

+ 52
- 0
package_first/pages/videoDetail/index.js Datei anzeigen

@@ -0,0 +1,52 @@
import { updateProgress } from '../../../api/learining.js'

Page({
data:{
openid: null,
initialTime: 10,
statusList:{
0: '待学习',
1: '学习中',
2: '已学习',
},
classList:{
0: 'no--sutdy',
1: 'is--sutdy',
2: 'is--finish',
},
detail: {"id":4,
"createUser":10,
"createTime":"2023-06-08 15:02:47",
"updateUser":0,
"updateTime":null,
"mark":1,
"tenantId":1,
"videoTitle":"端午节的由来",
"videoBrief":"端午节即将来临,河长制整理了关于端午习俗的学习视频",
"videoUrl":"http://vod.play.t-aaron.com/customerTrans/edc96ea2115a0723a003730956208134/3507f116-18899d07d1c-0004-f90c-f2c-7ec68.mp4",
"imageUrl":"https://image.t-aaron.com/imagedir/mk6te6rob9s_1686207766029.jpg",
"status":0}
},
onLoad(options){
const openid = wx.getStorageSync('openid')
// const str = decodeURIComponent(options.data)
this.setData({
// detail: JSON.parse(str)
openid
})
},

handleEnded(){
const params = {
status: 2,
videoId: this.data.detail.id,
openid: this.data.openid
}
updateProgress(params)
.then(res=>{
this.setData({
'detail.status': 2
})
})
}
})

+ 3
- 0
package_first/pages/videoDetail/index.json Datei anzeigen

@@ -0,0 +1,3 @@
{
"navigationBarTitleText": "学习视频"
}

+ 32
- 0
package_first/pages/videoDetail/index.wxml Datei anzeigen

@@ -0,0 +1,32 @@
<view class="video__container">
<view class="video__header">
<video
src="{{ detail.videoUrl }}"
poster="{{detail.imageUrl}}"
autoplay="{{false}}"
muted="{{true}}"
initial-time="{{ initialTime }}"
show-progress="{{false}}"
show-mute-btn="{{true}}"
enable-progress-gesture="{{false}}"
bindended="handleEnded">
</video>
<view class="header__tips">
<view class="title_text">{{detail.videoTitle}}</view>
<view class="item__tag {{classList[detail.status]}}">
{{ statusList[detail.status] }}
</view>
</view>
</view>
<view class="video__content">
<view class="content">
<view class="content__title">
视频详情
</view>
<view class="content__detail">
{{detail.videoBrief}}
</view>
</view>
</view>
</view>

+ 65
- 0
package_first/pages/videoDetail/index.wxss Datei anzeigen

@@ -0,0 +1,65 @@

.video__header{
width: 100%;
}

.video__header video{
width: 100% !important;
height: 420rpx !important;
}
.header__tips{
background: #FFFFFF;
padding: 30rpx 38rpx;
font-size: 32rpx;
color: #020202;
display: flex;
align-items: center;
justify-content: space-between;
}

.item__tag{
width: 84rpx;
height: 34rpx;
font-size: 24rpx;
text-align: center;
color: #FFFFFF;
border-radius: 4rpx;
}

.no--sutdy{
background: #EBAC14;
}

.is--study{
background: #1BE9BC;
}

.is--finish{
background: #006DF7;
}

.video__content{
background: #F6F6F6;
padding: 20rpx 30rpx;
}

.content{
padding: 36rpx 40rpx;
min-height: calc(100vh - 580rpx);
background: #FFFFFF;
border-radius: 30rpx 30rpx 0px 0px;
}

.content__title{
font-size: 32rpx;
color: #000000;
margin-bottom: 50rpx;
display: inline-block;
box-shadow: 0 -10rpx 0rpx 0rpx rgba(30, 121, 250, 0.5) inset;
}

.content__detail{
font-size: 32rpx;
color: #767881;
line-height: 50rpx;
}

+ 1
- 1
pages/FirstPage/index.wxml Datei anzeigen

@@ -17,7 +17,7 @@
<image class="enter_icon" src="{{item.iconPath}}"></image>
<text class="enter_title">{{item.title}}</text>
</view>
</view>
</view>

<!-- 在线人数 -->
<view class="live_box">

+ 29
- 1
project.private.config.json Datei anzeigen

@@ -175,11 +175,39 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "学习视频",
"pathName": "package_first/pages/LearningVideo/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "志愿者活动",
"pathName": "package_first/pages/VolunteerActivity/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "志愿者活动详情",
"pathName": "package_first/pages/VolunteerDetail/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "package_first/pages/videoDetail/index",
"query": "data=%257B%2522id%2522%253A4%252C%2522createUser%2522%253A10%252C%2522createTime%2522%253A%25222023-06-08%252015%253A02%253A47%2522%252C%2522updateUser%2522%253A0%252C%2522updateTime%2522%253Anull%252C%2522mark%2522%253A1%252C%2522tenantId%2522%253A1%252C%2522videoTitle%2522%253A%2522%25E7%25AB%25AF%25E5%258D%2588%25E8%258A%2582%25E7%259A%2584%25E7%2594%25B1%25E6%259D%25A5%2522%252C%2522videoBrief%2522%253A%2522%25E7%25AB%25AF%25E5%258D%2588%25E8%258A%2582%25E5%258D%25B3%25E5%25B0%2586%25E6%259D%25A5%25E4%25B8%25B4%25EF%25BC%258C%25E6%25B2%25B3%25E9%2595%25BF%25E5%2588%25B6%25E6%2595%25B4%25E7%2590%2586%25E4%25BA%2586%25E5%2585%25B3%25E4%25BA%258E%25E7%25AB%25AF%25E5%258D%2588%25E4%25B9%25A0%25E4%25BF%2597%25E7%259A%2584%25E5%25AD%25A6%25E4%25B9%25A0%25E8%25A7%2586%25E9%25A2%2591%2522%252C%2522videoUrl%2522%253A%2522http%253A%252F%252Fvod.play.t-aaron.com%252FcustomerTrans%252Fedc96ea2115a0723a003730956208134%252F3507f116-18899d07d1c-0004-f90c-f2c-7ec68.mp4%2522%252C%2522imageUrl%2522%253A%2522https%253A%252F%252Fimage.t-aaron.com%252Fimagedir%252Fmk6te6rob9s_1686207766029.jpg%2522%252C%2522status%2522%253A0%257D",
"launchMode": "default",
"scene": null
}
]
}
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "%E5%85%A8%E6%B0%91%E6%8A%A4%E6%B2%B3%E5%B0%8F%E7%A8%8B%E5%BA%8F",
"libVersion": "2.16.0"
"libVersion": "2.17.0"
}

Laden…
Abbrechen
Speichern