Browse Source

Merge branch 'zhangtao' of gitadmin/tuoheng_qmhh_web into develop

pull/14/head
zhangtao 1 year ago
parent
commit
8e19b1ac12
24 changed files with 397 additions and 52 deletions
  1. +1
    -1
      api/learining.js
  2. +10
    -0
      api/mine.js
  3. +1
    -1
      api/volunteer.js
  4. +1
    -0
      app.json
  5. +34
    -2
      package_first/pages/ActivityApply/index.js
  6. +3
    -1
      package_first/pages/ActivityApply/index.json
  7. +28
    -2
      package_first/pages/ActivityApply/index.wxml
  8. +84
    -1
      package_first/pages/ActivityApply/index.wxss
  9. +25
    -19
      package_first/pages/LearningVideo/index.js
  10. +12
    -10
      package_first/pages/LearningVideo/index.wxml
  11. +2
    -2
      package_first/pages/ProtectionActivity/index.json
  12. +2
    -1
      package_first/pages/VolunteerActivity/index.wxss
  13. +1
    -1
      package_first/pages/VolunteerDetail/index.js
  14. +3
    -1
      package_first/pages/VolunteerDetail/index.json
  15. +3
    -3
      package_first/pages/VolunteerDetail/index.wxml
  16. +2
    -4
      package_first/pages/VolunteerDetail/index.wxss
  17. +52
    -0
      package_first/pages/videoDetail/index.js
  18. +3
    -0
      package_first/pages/videoDetail/index.json
  19. +32
    -0
      package_first/pages/videoDetail/index.wxml
  20. +65
    -0
      package_first/pages/videoDetail/index.wxss
  21. +12
    -1
      pages/mine/index.js
  22. +2
    -1
      pages/mine/index.wxml
  23. +11
    -0
      pages/mine/index.wxss
  24. +8
    -1
      project.private.config.json

+ 1
- 1
api/learining.js View File

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

+ 10
- 0
api/mine.js View File

method: 'PUT', method: 'PUT',
data data
}) })
}
/**
* 全部已读
*/
export const messageSum = function (data) {
return request({
url: '/message/sum',
method: 'get',
data
})
} }

+ 1
- 1
api/volunteer.js View File

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

+ 1
- 0
app.json View File

"pages/AttentionMethod/index", "pages/AttentionMethod/index",
"pages/AddPicture/index", "pages/AddPicture/index",
"pages/LearningVideo/index", "pages/LearningVideo/index",
"pages/videoDetail/index",
"pages/VolunteerActivity/index", "pages/VolunteerActivity/index",
"pages/VolunteerDetail/index", "pages/VolunteerDetail/index",
"pages/ActivityApply/index" "pages/ActivityApply/index"

+ 34
- 2
package_first/pages/ActivityApply/index.js View File

// package_first/pages/ActivityApply/index.js
import { activitySubmit } from '../../../api/volunteer.js'

Page({ Page({


/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {

activityId: null,
userInfo: {
applyName: null,
applyPhone: null
}
}, },


/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { 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=>{
})
}, },


/** /**

+ 3
- 1
package_first/pages/ActivityApply/index.json View File

{ {
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "参加活动",
"navigationBarBackgroundColor": "#1F80F4"
} }

+ 28
- 2
package_first/pages/ActivityApply/index.wxml View File

<!--package_first/pages/ActivityApply/index.wxml-->
<text>package_first/pages/ActivityApply/index.wxml</text>
<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
- 1
package_first/pages/ActivityApply/index.wxss View File

/* package_first/pages/ActivityApply/index.wxss */
.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;
}

+ 25
- 19
package_first/pages/LearningVideo/index.js View File

*/ */
data: { data: {
list:[], list:[],
entersList:[
{
title:'未学习',
isstudy:false
},
{
title:'学习中',
isstudy:false
},
{
title:'已学习',
isstudy:false
}
],
userPage:{
page:1,
limit:10
params: {
openid: null
}, },
total:0,
current: ''
}, },


/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { 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: [] })
}, },


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


/** /**
data.entersList[1].isstudy = true 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)
})
} }


}) })

+ 12
- 10
package_first/pages/LearningVideo/index.wxml View File

<!--package_first/pages/LearningVideo/index.wxml--> <!--package_first/pages/LearningVideo/index.wxml-->
<view class="LearningVideo_container"> <view class="LearningVideo_container">
<view class="part" wx:for="{{list}}" wx:key="index">
<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>
<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>
<view class="title_content">{{item.videoBrief}}</view>
</view> </view>
</view>
</list>
<view class="bottom">- 更多视频 敬请期待 -</view> <view class="bottom">- 更多视频 敬请期待 -</view>
</view> </view>

+ 2
- 2
package_first/pages/ProtectionActivity/index.json View File

"list": "../../../components/List/index", "list": "../../../components/List/index",
"ImageList": "../../../components/ImageList/index" "ImageList": "../../../components/ImageList/index"
}, },
"navigationBarTitleText": "护河建议",
"navigationBarBackgroundColor": "#2E7BF3"
"navigationBarTitleText": "护河活动",
"navigationBarBackgroundColor": "#2C81F6"
} }

+ 2
- 1
package_first/pages/VolunteerActivity/index.wxss View File

} }
.activity_date{ .activity_date{
display: flex; display: flex;
line-height: 14rpx;
align-items: center;
font-size: 30rpx;
padding: 38rpx 38rpx 0 6rpx; padding: 38rpx 38rpx 0 6rpx;
} }
.dot{ .dot{

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

// }) // })
// } // }
wx.navigateTo({ wx.navigateTo({
url:"/package_first/pages/ActivityApply/index"
url:"/package_first/pages/ActivityApply/index?id=" + this.data.activityInfo.id
}) })
}, },
/** /**

+ 3
- 1
package_first/pages/VolunteerDetail/index.json View File

{ {
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "活动详情",
"navigationBarBackgroundColor": "#C2D8FF"
} }

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

<view class="time_act">{{activityInfo.activityBeginTime}}~{{activityInfo.activityEndTime}}</view> <view class="time_act">{{activityInfo.activityBeginTime}}~{{activityInfo.activityEndTime}}</view>
</view> </view>
</view> </view>
<view class="button" bindtap="goApply">
报名
</view>
<view class="button" bindtap="goApply">
报名
</view>
</view> </view>

+ 2
- 4
package_first/pages/VolunteerDetail/index.wxss View File

width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: #F2F6F9; background: #F2F6F9;
padding: 30rpx 29rpx 24 prx 60rpx;
padding: 30rpx;
} }
.main{ .main{
width: calc(100% - 60rpx);
width: 100%;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 0rpx 14rpx 2rpx rgba(43,93,184,0.09); box-shadow: 0rpx 0rpx 14rpx 2rpx rgba(43,93,184,0.09);
border-radius: 20rpx; border-radius: 20rpx;
margin-left: 30rpx;
padding: 62rpx 30rpx 56rpx 29rpx ; padding: 62rpx 30rpx 56rpx 29rpx ;
} }
.content{ .content{
bottom: 24rpx; bottom: 24rpx;
height: 90rpx; height: 90rpx;
line-height: 80rpx; line-height: 80rpx;
margin: 0 30rpx 0 30rpx;
} }

+ 52
- 0
package_first/pages/videoDetail/index.js View File

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 View File

{
"navigationBarTitleText": "学习视频"
}

+ 32
- 0
package_first/pages/videoDetail/index.wxml View File

<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 View File


.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;
}

+ 12
- 1
pages/mine/index.js View File

// pages/mine/index.js // pages/mine/index.js
import {getUserData} from '../../api/login.js' import {getUserData} from '../../api/login.js'
import {messageSum} from '../../api/mine.js'
Page({ Page({


/** /**
{title: '我的兑换', type: 'exchange', path: '/package_mine/pages/exchange/index'}, {title: '我的兑换', type: 'exchange', path: '/package_mine/pages/exchange/index'},
{title: '河湖问题反馈', type: 'feedback', path: '/package_mine/pages/records/index'}, {title: '河湖问题反馈', type: 'feedback', path: '/package_mine/pages/records/index'},
// {title: '我的美拍', type: 'beauty', path: '/package_mine/pages/beauties/index'}, // {title: '我的美拍', type: 'beauty', path: '/package_mine/pages/beauties/index'},
{title: '消息通知', type: 'notice', path: '/package_mine/pages/notice/index'},
{title: '消息通知', type: 'notice', path: '/package_mine/pages/notice/index',showNumbers: true},
], ],
myId: '', // 身份 myId: '', // 身份
integral: 0, // 积分 integral: 0, // 积分
numbers: 0
}, },


/** /**
}, },
onShow:function() { onShow:function() {
this.getUserInfo() this.getUserInfo()
this.getUnReadNums()
}, },


goRecords(e) { goRecords(e) {
this.setData({userInfo}) this.setData({userInfo})
}) })
}, },
getUnReadNums(){
const openId = wx.getStorageSync('openid')
messageSum({openId}).then(res=>{
this.setData({
numbers: res.data || 0
})
})
},
// 进入申请身份页面 // 进入申请身份页面
goApprove() { goApprove() {
wx.navigateTo({ wx.navigateTo({

+ 2
- 1
pages/mine/index.wxml View File

<view class="function_item" wx:for="{{list}}" wx:key="index" bindtap="goRecords" data-path="{{item.path}}"> <view class="function_item" wx:for="{{list}}" wx:key="index" bindtap="goRecords" data-path="{{item.path}}">
<view class="item_title"> <view class="item_title">
<image style="height: 60rpx;width: 60rpx;margin-right: 20rpx;" src="{{'../../assets/img/'+ item.type +'.png'}}"></image> <image style="height: 60rpx;width: 60rpx;margin-right: 20rpx;" src="{{'../../assets/img/'+ item.type +'.png'}}"></image>
<text style="font-size: 26rpx;">{{item.title}}</text>
<view style="font-size: 26rpx;z-index:99">{{item.title}}</view>
<text wx:if="{{item.showNumbers && numbers > 0}}" class="badge">{{numbers > 99 ? '99+' : numbers }}</text>
</view> </view>
<image style="height: 30rpx;width: 30rpx;" src="../../assets/img/more.png"></image> <image style="height: 30rpx;width: 30rpx;" src="../../assets/img/more.png"></image>
</view> </view>

+ 11
- 0
pages/mine/index.wxss View File

display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
}

.badge{
background: #E73F3F;
border-radius: 10px;
padding: 0 15rpx;
color: #FFFFFF;
font-size: 24rpx;
position: relative;
top: -10rpx;
right: 20rpx;
} }

+ 8
- 1
project.private.config.json View File

"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "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", "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", "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"
} }

Loading…
Cancel
Save