This commit is contained in:
wenc000 2020-06-23 19:14:44 +08:00
commit 36b3061f86
130 changed files with 5662 additions and 0 deletions

39
app.js Normal file
View File

@ -0,0 +1,39 @@
//app.js
App({
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
// 获取用户信息
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
wx.getUserInfo({
success: res => {
// 可以将 res 发送给后台解码出 unionId
this.globalData.userInfo = res.userInfo
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
}
})
}
}
})
},
globalData: {
userInfo: null
}
})

68
app.json Normal file
View File

@ -0,0 +1,68 @@
{
"pages":[
"pages/index/index",
"pages/volunteerRegister/volunteerRegister",
"pages/volunteer/volunteer",
"pages/heritage/heritage",
"pages/broadcastDetail/broadcastDetail",
"pages/venueDetail/venueDetail",
"pages/register/register",
"pages/login/login",
"pages/broadcast/broadcast",
"pages/newVolunteerActivity/newVolunteerActivity",
"pages/newTeam/newTeam",
"pages/volunteerTeam/volunteerTeam",
"pages/venue/venue",
"pages/center/center",
"pages/cultureDetail/cultureDetail",
"pages/activitySign/activitySign",
"pages/activityDetail/activityDetail",
"pages/activity/activity",
"pages/newsDetail/newsDetail"
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#9F1512",
"navigationBarTitleText": "日喀则数字文化馆",
"navigationBarTextStyle":"white"
},
"tabBar": {
"color": "#BBBBBB",
"borderStyle": "black",
"selectedColor": "#000000",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "images/index.png",
"text": "首页",
"selectedIconPath": "images/index-on.png"
},
{
"pagePath": "pages/activity/activity",
"iconPath": "images/activity.png",
"text": "活动",
"selectedIconPath": "images/activity-on.png"
},
{
"pagePath": "pages/venue/venue",
"iconPath": "images/venue.png",
"text": "场馆",
"selectedIconPath": "images/venue-on.png"
},
{
"pagePath": "pages/heritage/heritage",
"iconPath": "images/culture.png",
"text": "文化",
"selectedIconPath": "images/culture-on.png"
},
{
"pagePath": "pages/center/center",
"iconPath": "images/center.png",
"text": "我的",
"selectedIconPath": "images/center-on.png"
}
]
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}

10
app.wxss Normal file
View File

@ -0,0 +1,10 @@
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}

BIN
images/activity-on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/activity.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/address.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/big-news.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
images/center-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

BIN
images/center-on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/center.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/collect.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/collected.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/culture-on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/culture-slide.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 KiB

BIN
images/culture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/good.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

BIN
images/index-on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/index.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/login-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/my-collect.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/my-comment.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/my-sign.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1002 B

BIN
images/next.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

BIN
images/people.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/person.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

BIN
images/prev.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

BIN
images/select-tab.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
images/selected-l.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

BIN
images/selected-r.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

BIN
images/setting.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/share.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/tab1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/tab2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/tab3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/tab4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/tab5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/team.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

BIN
images/time.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

BIN
images/user-avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
images/venue-on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/venue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/venue1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/venue2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/venue3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/view.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

View File

@ -0,0 +1,88 @@
// pages/activity/activity.js
Page({
/**
* 页面的初始数据
*/
data: {
url: 'http://192.168.0.111:8080/culturalactivity/',
imgUrl: 'http://192.168.0.111:8080/culturalactivity/route/file/downloadfile/true/',
dataList: []
},
goDetail: function (e) {
var id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '../activityDetail/activityDetail?id=' + id
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var self = this;
wx.request({
url: self.data.url + 'wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease',
success: function(res) {
if('200' == res.statusCode) {
for(var item of res.data.rows) {
if('' != item.activityImage) {
item.activityImage = self.data.imgUrl + item.activityImage;
}
}
self.setData({
dataList: res.data.rows,
})
}
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,19 @@
<view class="activity">
<view class="activity-box" bindtap="goDetail" data-id="{{item.activityLibraryId}}" wx:for="{{dataList}}" wx:key="index">
<view class="activity-img">
<image src="{{item.activityImage}}"></image>
</view>
<view class="activity-info">
<view class="title">
<view class="activity-title">{{item.activityTitle}}</view>
<view class="sign" wx:if="{{item.activityState == '3'}}">报名中</view>
<view class="sign" wx:if="{{item.activityState == '4'}}">报名人数已满</view>
<view class="sign" wx:if="{{item.activityState == '5'}}">停止报名</view>
<view class="sign" wx:if="{{item.activityState == '6'}}">进行中</view>
<view class="sign" wx:if="{{item.activityState == '7'}}">直接进入</view>
<view class="sign" wx:if="{{item.activityState == '99'}}">已结束</view>
</view>
<view class="date">{{item.activityStartTime}}至{{item.activityEndTime}}</view>
</view>
</view>
</view>

View File

@ -0,0 +1,68 @@
.activity{
padding: 20rpx 30rpx 0;
}
.activity-box{
margin-bottom: 20rpx;
box-shadow:0px 0px 17rpx 0px rgba(0,0,0,0.1);
border-radius: 10rpx;
overflow: hidden;
}
.activity-img{
height: 320rpx;
position: relative;
}
.activity-img image{
width: 100%;
height: 100%;
}
.corner{
position: absolute;
top: 20rpx;
right: 20rpx;
display: flex;
color: #fff;
}
.corner view{
padding: 0 10rpx;
background: rgba(0,0,0,0.6);
line-height: 40rpx;
vertical-align: middle;
display: flex;
align-items: center;
border-radius: 5rpx;
}
.view-count{
margin-right: 20rpx;
}
.view-count image{
width: 40rpx;
height: 40rpx;
}
.activity-info{
padding: 15rpx 20rpx;
}
.title{
display: flex;
justify-content: space-between;
}
.activity-title{
width: 70%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 30rpx;
color: #242424;
line-height: 40rpx;
}
.sign{
background: rgba(159,21,18,.1);
color: #9F1512;
border-radius: 10rpx;
padding: 0 20rpx;
line-height: 40rpx;
}
.date{
margin-top: 10rpx;
font-size: 22rpx;
color: #242424;
}

View File

@ -0,0 +1,84 @@
// pages/activityDetail/activityDetail.js
Page({
/**
* 页面的初始数据
*/
data: {
url: 'http://192.168.0.111:8080/culturalactivity/',
imgUrl: 'http://192.168.0.111:8080/culturalactivity/route/file/downloadfile/true/',
dataMap: {}
},
goSign: function () {
wx.navigateTo({
url: '../activitySign/activitySign'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var self = this;
var id = options.id;
wx.request({
url: self.data.url + 'wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id,
success: function(res) {
if('200' == res.statusCode) {
res.data.activityImage = self.data.imgUrl + res.data.activityImage;
self.setData({
dataMap: res.data
})
}
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,46 @@
<view class="activity-img">
<image src="{{dataMap.activityImage}}"></image>
</view>
<view class="activity-detail">
<view class="activity-title">{{dataMap.activityTitle}}</view>
<view class="activity-info">
<view class="activity-text">
<image src="../../images/people.png"></image>
<text>活动人数:</text>
{{dataMap.activityUserNum }}
</view>
<view class="activity-text">
<image src="../../images/time.png"></image>
<text>活动时间:</text>
{{dataMap.activityStartTime}}至{{dataMap.activityEndTime}}
</view>
<view class="activity-text">
<image src="../../images/people.png"></image>
<text>活动地址:</text>
{{dataMap.activityAddress }}
</view>
</view>
<view class="activity-container">
<view class="part">
<view class="part-title">活动详情</view>
<rich-text class="part-content" nodes="{{dataMap.activityDetails}}"></rich-text>
</view>
<view class="part">
<view class="part-title">活动单位</view>
<view class="part-content">
<view class="part-info">
<text>主办单位:</text>{{dataMap.activitySponsor}}
</view>
<view class="part-info">
<text>承办单位:</text>{{dataMap.activityOrganizer}}
</view>
<view class="part-info">
<text>协办单位:</text>{{dataMap.activityCoOrganizer}}
</view>
</view>
</view>
</view>
</view>
<view class="sign-box" bindtap="goSign" data-id="{{dataMap.activityLibraryId }}" wx-if="{{dataMap.activityState == 3 && dataMap.isEnroll == ''}}">
<view class="sign-btn">报名</view>
</view>

View File

@ -0,0 +1,88 @@
.activity-img, .activity-img image{
width: 100%;
height: 480rpx;
}
.activity-detail{
position: absolute;
left: 0;
right: 0;
top: 430rpx;
background: #fff;
border-radius:30rpx 30rpx 0px 0px;
overflow: hidden;
padding-bottom: 120rpx;
}
.activity-title, .activity-info{
padding: 30rpx;
font-size: 32rpx;
color: #242424;
border-bottom: 5px solid #FBFBFB;
}
.activity-text{
line-height: 35rpx;
font-size: 28rpx;
margin-bottom: 15rpx;
}
.activity-text:last-child{
margin-bottom: 0;
}
.activity-info image{
width: 35rpx;
height: 35rpx;
margin-right: 10rpx;
vertical-align: middle;
margin-top: -5rpx;
}
.activity-text text{
color: #BBBBBB;
}
.activity-container{
padding: 30rpx;
}
.part{
margin-bottom: 30rpx;
}
.part:last-child{
margin-bottom: 0;
}
.part-title{
border-left: 3px solid #9F1512;
color: #242424;
padding-left: 10rpx;
font-size: 30rpx;
margin-bottom: 10rpx;
}
.part-content{
font-size: 28rpx;
line-height: 40rpx;
}
.part-info{
line-height: 50rpx;
color: #242424;
font-size: 28rpx;
}
.part-info text{
color: #BBBBBB;
}
.sign-box{
position: fixed;
bottom: 0;
left: 0;
right: 0;
box-shadow:0px 0px 17px 0px rgba(0,0,0,0.1);
height: 120rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
background: #fff;
}
.sign-btn{
width: 100%;
height: 100%;
background: #9F1512;
border-radius: 10rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
color: #fff;
}

View File

@ -0,0 +1,66 @@
// pages/activitySign/activitySign.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,54 @@
<view class="activity">
<view class="activity-img">
<image src="../../images/big-news.png"></image>
</view>
<view class="activity-info">
<view class="activity-title">银保监会印发《关于加快推进意外金融风险…</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>
<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>
<view class="activity-text">
<view class="left-title">
<image src="../../images/address.png"></image>
<text>活动地址:</text>
</view>
<view class="right-content">活动地址</view>
</view>
</view>
</view>
<view class="personal">
<view class="title">填写信息</view>
<view class="personal-info">
<view class="info-box">
手机号:
<input placeholder="请输入手机号"></input>
</view>
<view class="info-box">
验证码:
<input placeholder="请输入验证码"></input>
<view class="get-code">获取验证码</view>
</view>
<view class="info-box">
姓 名:
<input placeholder="请输入姓名"></input>
</view>
<view class="info-box">
身份证:
<input placeholder="请输入身份证号码"></input>
</view>
</view>
</view>
<view class="sign-box">
<view class="sign-btn">立即报名</view>
</view>

View File

@ -0,0 +1,97 @@
.activity{
padding: 30rpx;
border-bottom: 5px solid #EFEFEF;
display: flex;
}
.activity-img, .activity-img image{
width: 290rpx;
height: 200rpx;
border-radius: 10rpx;
}
.activity-info{
width: 370rpx;
margin-left: 20rpx;
}
.activity-title{
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 30rpx;
color: #242424;
}
.activity-text{
display: flex;
font-size: 26rpx;
}
.activity-text view{
flex-shrink: 0;
width: 50%;
word-break: break-all;
}
.activity-text image{
width: 35rpx;
height: 35rpx;
margin-right: 10rpx;
vertical-align: middle;
margin-top: -5rpx;
}
.activity-text text{
color: #BBB;
}
.personal{
padding: 30rpx 30rpx 0;
margin-bottom: 120rpx;
}
.title{
padding-left: 10rpx;
border-left: 3px solid #9F1512;
font-size: 32rpx;
color: #242424;
}
.info-box{
padding: 20rpx 0;
border-bottom: 1px solid #EBEBEB;
font-size: 28rpx;
color: #242424;
line-height: 40rpx;
position: relative;
}
.info-box input{
display: inline-block;
vertical-align: middle;
width: 300rpx;
height: 40rpx;
margin-top: -5rpx;
}
.get-code{
position: absolute;
top: 15rpx;
right: 0;
height: 40rpx;
background: rgba(159,21,18,.1);
padding: 5rpx 10rpx;
color: #9F1512;
font-size: 26rpx;
}
.sign-box{
position: fixed;
bottom: 0;
left: 0;
right: 0;
box-shadow:0px 0px 17px 0px rgba(0,0,0,0.1);
height: 120rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
background: #fff;
}
.sign-btn{
width: 100%;
height: 100%;
background: #9F1512;
border-radius: 10rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
color: #fff;
}

View File

@ -0,0 +1,70 @@
// pages/broadcast/broadcast.js
Page({
/**
* 页面的初始数据
*/
data: {
},
goDetail: function () {
wx.navigateTo({
url: '../broadcastDetail/broadcastDetail',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,20 @@
<view class="broadcast">
<view class="broadcast-box" bindtap="goDetail">
<view class="broadcast-img">
<image src="../../images/center-bg.png"></image>
</view>
<view class="broadcast-info">
<view class="name">银保监会印发《关于加快推进意外险改直播标题</view>
<view class="time">2020-02-02 14:00:00至2020-02-03 14:00:00</view>
</view>
</view>
<view class="broadcast-box" bindtap="goDetail">
<view class="broadcast-img">
<image src="../../images/center-bg.png"></image>
</view>
<view class="broadcast-info">
<view class="name">银保监会印发《关于加快推进意外险改直播标题</view>
<view class="time">2020-02-02 14:00:00至2020-02-03 14:00:00</view>
</view>
</view>
</view>

View File

@ -0,0 +1,28 @@
.broadcast{
padding: 30rpx;
}
.broadcast-box{
box-shadow:0 0 17rpx 0 rgba(0,0,0,0.1);
border-radius:10rpx;
overflow: hidden;
margin-bottom: 20rpx;
}
.broadcast-img, .broadcast-img image{
width: 100%;
height: 310rpx;
}
.broadcast-info{
padding: 20rpx;
}
.name{
font-size: 32rpx;
color: #242424;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.time{
color: #242424;
font-size: 26rpx;
margin-top: 10rpx;
}

View File

@ -0,0 +1,75 @@
function getRandomColor() {
const rgb = []
for (let i = 0; i < 3; ++i) {
let color = Math.floor(Math.random() * 256).toString(16)
color = color.length === 1 ? '0' + color : color
rgb.push(color)
}
return '#' + rgb.join('')
}
Page({
data: {
src: '',
},
onShareAppMessage() {
return {
title: 'video',
path: 'page/component/pages/video/video'
}
},
onReady() {
this.videoContext = wx.createVideoContext('myVideo')
},
onHide() {
},
inputValue: '',
bindInputBlur(e) {
this.inputValue = e.detail.value
},
bindButtonTap() {
const that = this
wx.chooseVideo({
sourceType: ['album', 'camera'],
maxDuration: 60,
camera: ['front', 'back'],
success(res) {
that.setData({
src: res.tempFilePath
})
}
})
},
bindVideoEnterPictureInPicture() {
console.log('进入小窗模式')
},
bindVideoLeavePictureInPicture() {
console.log('退出小窗模式')
},
bindPlayVideo() {
console.log('1')
this.videoContext.play()
},
bindSendDanmu() {
this.videoContext.sendDanmu({
text: this.inputValue,
color: getRandomColor()
})
},
videoErrorCallback(e) {
console.log('视频错误信息:')
console.log(e.detail.errMsg)
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,35 @@
<view class="broadcast">
<view class="page-section tc">
<video
id="myVideo"
src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
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>
</view>
<view class="broadcast-title">银保监会印发《关于加快推进意外直播标题</view>
<view class="broadcast-time">
<view class="time">
<image src="../../images/time.png"></image>
<text>开始时间:</text>
2020-02-03 14:00:00
</view>
<view class="time">
<image src="../../images/time.png"></image>
<text>结束时间:</text>
2020-02-03 14:00:00
</view>
</view>
<view class="broadcast-intro">
<view class="broadcast-intro-title">直播介绍</view>
<view class="intro-text">光拉便半运县写员二到院细天县见运命运感知争公着解全得律号深共权发市以家情军少先意单理样好族权达保很具你住红许气已第白知题候其然知王公众我头务族观经市指或七比生。适基历然题和低是局着先重信知议过说心龙素标安放大支入完二种设力果每角解收美约声里历美节办约管运但然新分活们心毛手过共点家或。革解快和特技县应精术被心走小器风育明油备己世国生往支因叫正心在备什新候流广这地。离克的却五北林越用变义按地界你值名证所局的况果被半去量片来参例形极别色部米老近和住例外七强可学变山意断群济。到报还省边速低起分力少族。</view>
</view>

View File

@ -0,0 +1,44 @@
.broadcast{
width: 100%;
height: 400rpx;
background: #D8D8D8;
}
video{
width: 100%;
height: 400rpx;
}
.broadcast-title{
padding: 30rpx;
font-size: 34rpx;
color: #242424;
border-bottom: 5px solid #FBFBFB;
}
.time{
margin-bottom: 10rpx;
}
.broadcast-time{
padding: 30rpx 30rpx 20rpx;
border-bottom: 5px solid #FBFBFB;
font-size: 30rpx;
color: #242424;
}
.broadcast-time image{
width: 40rpx;
height: 40rpx;
vertical-align: middle;
}
.broadcast-intro{
padding: 30rpx;
}
.broadcast-intro-title{
padding-left: 15rpx;
border-left: 5px solid #9F1512;
font-size: 32rpx;
color: #242424;
}
.intro-text{
font-size: 28rpx;
color: #5F5F5F;
line-height: 40rpx;
margin-top: 15rpx;
}

66
pages/center/center.js Normal file
View File

@ -0,0 +1,66 @@
// pages/center/center.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

3
pages/center/center.json Normal file
View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

32
pages/center/center.wxml Normal file
View File

@ -0,0 +1,32 @@
<view class="top-img">
<image src="../../images/center-bg.png"></image>
</view>
<view class="page-container">
<view class="person">
<view class="user-avatar">
<image src="../../images/user-avatar.png"></image>
</view>
<view class="user-name">杜若无心</view>
</view>
<view class="main">
<view class="main-title">常用功能</view>
<view class="main-container">
<view class="main-box">
<image src="../../images/my-sign.png"></image>
<view class="title">我的报名</view>
</view>
<view class="main-box">
<image src="../../images/my-comment.png"></image>
<view class="title">我的评论</view>
</view>
<view class="main-box">
<image src="../../images/my-collect.png"></image>
<view class="title">我的收藏</view>
</view>
<view class="main-box">
<image src="../../images/setting.png"></image>
<view class="title">设置</view>
</view>
</view>
</view>
</view>

66
pages/center/center.wxss Normal file
View File

@ -0,0 +1,66 @@
.top-img, .top-img image{
width: 100%;
height: 450rpx
}
.page-container{
position: absolute;
top: 420rpx;
left: 0;
right: 0;
border-radius:31rpx 31rpx 0px 0px;
background: #fff;
}
.person{
padding: 50rpx 30rpx 30rpx;
position: relative;
border-bottom: 3px solid #FBFBFB;
}
.user-avatar{
width: 180rpx;
height: 180rpx;
border-radius: 50%;
overflow: hidden;
border: 2px solid #fff;
position: absolute;
left: 50%;
margin-left: -90rpx;
top: -150rpx;
}
.user-avatar image{
width: 100%;
height: 100%;
}
.user-name{
font-size: 32rpx;
text-align: center;
color: #242424;
}
.main{
padding: 30rpx;
}
.main-title{
border-left: 3px solid #9F1512;
padding-left: 10rpx;
font-size: 30rpx;
color: #242424;
margin-bottom: 20rpx;
}
.main-container{
display: flex;
flex-wrap: wrap;
}
.main-box{
width: 25%;
flex-shrink: 0;
text-align: center;
padding: 0 15rpx;
box-sizing: border-box;
}
.main-box image{
width: 65rpx;
height: 65rpx;
}
.title{
font-size: 28rpx;
color: #242424;
}

View File

@ -0,0 +1,91 @@
// pages/cultureDetail/cultureDetail.js
Page({
/**
* 页面的初始数据
*/
data: {
swiper: {
imgUrl: [
'../../images/culture-slide.png',
'../../images/culture-slide.png',
'../../images/culture-slide.png'
],
indicatorDots: false,
autoplay: true,
current: 0
}
},
prevImg: function () {
var swiper = this.data.swiper;
var current = swiper.current;
swiper.current = current > 0 ? current - 1 : swiper.imgUrl.length - 1;
this.setData({
swiper: swiper,
})
},
nextImg: function() {
console.log(2);
var swiper = this.data.swiper;
var current = swiper.current;
swiper.current = current < (swiper.imgUrl.length - 1) ? current + 1 : 0;
this.setData({
swiper: swiper,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,98 @@
<view class="culture-swiper">
<swiper indicator-dots="{{swiper.indicatorDots}}" autoplay="{{swiper.autoplay}}" current="{{swiper.current}}">
<swiper-item class="swiper-item" wx:for="{{swiper.imgUrl}}" wx:key="{{index}}">
<image src="{{item}}" class="swiper-img"></image>
</swiper-item>
</swiper>
<view class="prev" bindtap="prevImg">
<image src="../../images/prev.png"></image>
</view>
<view class="next" bindtap="nextImg">
<image src="../../images/next.png"></image>
</view>
</view>
<view class="culture">
<view class="culture-title">民间舞蹈</view>
<view class="culture-info">
<view class="row">
<view class="info">
<text>项目编号:</text>
EKLAJNKAS09
</view>
<view class="info">
<text>数据来源:</text>
EKLAJNKAS09
</view>
</view>
<view class="row">
<view class="info">
<text>公布时间:</text>
2020-02-03
</view>
<view class="info">
<text>非遗级别:</text>
三级
</view>
</view>
<view class="row">
<view class="info">
<text>所属地区:</text>
西藏林芝市
</view>
<view class="info">
<text>类  型:</text>
新增项目
</view>
</view>
<view class="row">
<view class="info">
<text>申报地区或单位:</text>
测试
</view>
</view>
<view class="row">
<view class="info">
<text>保护单位:</text>
测试
</view>
</view>
</view>
<view class="part">
<view class="part-title">相关描述</view>
<view class="part-content">
光拉便半运县写员二到院细天县见运命运感知争公着解全得律号深共权发市以家情军少先意单理样好族权达保很具你住红许气已第白知题候其然知王公众我头务族观经市指或七比生。适基历然题和低是局着先重信知议过说心龙素标安放大支入完二种设力果每角解收美约声里历美节办约管运但然新分活们心毛手过共点家或。革解快和特技县应精术被心走小器风育相条际北些有品同自群素革拉林积张严求选马打书。力问业光者最论快决装争每保时造何历入越日劳经干好东此金区法思设断这层压很决给地确思引光各年与队太习面方加族社种斗表越划快。
</view>
</view>
<view class="part">
<view class="part-title">相关传承人</view>
<view class="row">
<view class="info">
<text>编  号:</text>
EKLAJNKAS09
</view>
<view class="info">
<text>姓  名:</text>
Ruby Pope
</view>
</view>
<view class="row">
<view class="info">
<text>性  别:</text>
</view>
<view class="info">
<text>出生日期:</text>
1989年5月23日
</view>
</view>
<view class="row">
<view class="info">
<text>民  族:</text>
藏族
</view>
</view>
</view>
</view>
<view class="sign-box">
<view class="sign-btn">报名</view>
</view>

View File

@ -0,0 +1,111 @@
.culture-swiper, swiper, .swiper-img{
width: 100%;
height: 850rpx;
}
.culture-swiper{
position: relative;
}
.prev{
width: 60rpx;
height: 100rpx;
position: absolute;
top: 50%;
left: 0rpx;
transform: translate(0, -50%);
background-color: rgba(0, 0, 0, 0.5);
border-top-right-radius: 100rpx;
border-bottom-right-radius: 100rpx;
display: flex;
justify-content: center;
align-items: center;
}
.next image, .prev image{
width: 30rpx;
height: 30rpx;
}
.next{
width: 60rpx;
height: 100rpx;
position: absolute;
top: 50%;
right: 0rpx;
transform: translate(0, -50%);
background-color: rgba(0, 0, 0, 0.5);
border-top-left-radius: 100rpx;
border-bottom-left-radius: 100rpx;
display: flex;
justify-content: center;
align-items: center;
}
.culture{
position: absolute;
top: 800rpx;
left: 0;
right: 0;
border-radius:31rpx 31rpx 0px 0px;
background: #fff;
margin-bottom: 120rpx;
}
.culture-title{
padding: 30rpx;
border-bottom: 3px solid #FBFBFB;
font-size: 34rpx;
color: #242424;
}
.culture-info{
padding: 20rpx 30rpx;
border-bottom: 3px solid #FBFBFB;
}
.row{
display: flex;
}
.info{
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 26rpx;
color: #242424;
padding-right: 10rpx;
line-height: 50rpx;
}
.info text{
color: #BBBBBB;
}
.part{
padding: 30rpx;
border-bottom: 3px solid #FBFBFB;
}
.part-title{
font-size: 32rpx;
border-left: 3px solid #9F1512;
padding-left: 10rpx;
margin-bottom: 20rpx;
}
.part-content{
font-size: 26rpx;
line-height: 40rpx;
color: #5F5F5F;
}
.sign-box{
position: fixed;
bottom: 0;
left: 0;
right: 0;
box-shadow:0px 0px 17px 0px rgba(0,0,0,0.1);
height: 120rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
background: #fff;
}
.sign-btn{
width: 100%;
height: 100%;
background: #9F1512;
border-radius: 10rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
color: #fff;
}

View File

@ -0,0 +1,70 @@
// pages/heritage/heritage.js
Page({
/**
* 页面的初始数据
*/
data: {
},
goDetail: function () {
wx.navigateTo({
url: '../cultureDetail/cultureDetail',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,49 @@
<view class="top-select">
<view class="select-box active">
<image src="../../images/select-tab.png"></image>
<view class="select-title">非遗数据库</view>
</view>
<view class="select-box">
<image src="../../images/select-tab.png"></image>
<view class="select-title">非遗数据库</view>
</view>
<view class="select-box">
<image src="../../images/select-tab.png"></image>
<view class="select-title">非遗数据库</view>
</view>
</view>
<view class="activity">
<view class="activity-box" bindtap="goDetail">
<view class="activity-img">
<image src="../../images/big-news.png"></image>
</view>
<view class="activity-info">
<view class="title">
<view class="activity-title">银保监会印发《关于加快推进意外险改…</view>
</view>
<view class="date">2020-02-02 14:00:00至2020-02-03 14:00:00</view>
</view>
</view>
<view class="activity-box" bindtap="goDetail">
<view class="activity-img">
<image src="../../images/big-news.png"></image>
</view>
<view class="activity-info">
<view class="title">
<view class="activity-title">银保监会印发《关于加快推进意外险改…</view>
</view>
<view class="date">2020-02-02 14:00:00至2020-02-03 14:00:00</view>
</view>
</view>
<view class="activity-box" bindtap="goDetail">
<view class="activity-img">
<image src="../../images/big-news.png"></image>
</view>
<view class="activity-info">
<view class="title">
<view class="activity-title">银保监会印发《关于加快推进意外险改…</view>
</view>
<view class="date">2020-02-02 14:00:00至2020-02-03 14:00:00</view>
</view>
</view>
</view>

View File

@ -0,0 +1,87 @@
.top-select{
position: fixed;
top: 0;
left: 0;
right: 0;
display: flex;
padding: 30rpx 30rpx 10rpx;
flex-wrap: nowrap;
overflow-x: auto;
background: #fff;
z-index: 100;
}
.select-box{
flex-shrink: 0;
width: 25%;
padding: 0 10rpx;
box-sizing: border-box;
text-align: center;
}
.select-box image{
width: 100rpx;
height: 100rpx;
}
.select-title{
color: #242424;
font-size: 30rpx;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.select-box.active .select-title{
color: #9F1512;
}
.activity{
padding: 20rpx 30rpx 0;
margin-top: 200rpx;
}
.activity-box{
margin-bottom: 20rpx;
box-shadow:0px 0px 17rpx 0px rgba(0,0,0,0.1);
border-radius: 10rpx;
overflow: hidden;
}
.activity-img{
height: 320rpx;
position: relative;
}
.activity-img image{
width: 100%;
height: 100%;
}
.corner{
position: absolute;
top: 20rpx;
right: 20rpx;
display: flex;
color: #fff;
}
.activity-info{
padding: 10rpx;
}
.title{
display: flex;
justify-content: space-between;
}
.activity-title{
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 30rpx;
color: #242424;
line-height: 40rpx;
}
.sign{
background: rgba(159,21,18,.1);
color: #9F1512;
border-radius: 10rpx;
padding: 0 20rpx;
line-height: 40rpx;
}
.date{
margin-top: 10rpx;
font-size: 22rpx;
color: #242424;
}

131
pages/index/index.js Normal file
View File

@ -0,0 +1,131 @@
Page({
/**
* 页面的初始数据
*/
data: {
indicatorDots: true,
autoplay: true,
baseUrl: 'http://192.168.0.111:8888/volunteer/',
token: '',
key: ''
},
doLogin: function() {
var self = this;
wx.login({
success(res) {
console.log(res)
if(res.code) {
var WechatMiniAppLoginVO = {jsCode: res.code};
wx.request({
url: self.data.baseUrl + 'wxminiapp/auth/login',
method: 'post',
data: WechatMiniAppLoginVO,
success: function(res) {
self.setData({
token: res.data.data
})
wx.setStorage({
data: res.data.data,
key: 'token'
})
}
})
}else {
console.log('登陆失败!' + res.errMsg);
}
}
})
},
goNewsDetail: function () {
wx.navigateTo({
url: '../newsDetail/newsDetail',
})
},
goVolunteer: function () {
wx.navigateTo({
url: '../volunteer/volunteer',
})
},
goBroadcast: function () {
wx.navigateTo({
url: '../broadcast/broadcast',
})
},
goVenue: function () {
wx.switchTab({
url: '../venue/venue',
})
},
goBroadcastDetail: function () {
wx.navigateTo({
url: '../broadcastDetail/broadcastDetail',
})
},
goActivity: function () {
wx.switchTab({
url: '../activity/activity',
})
},
goHeritage: function () {
wx.switchTab({
url: '../heritage/heritage',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var self = this;
self.doLogin();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

3
pages/index/index.json Normal file
View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

135
pages/index/index.wxml Normal file
View File

@ -0,0 +1,135 @@
<view class="swiper-box">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" >
<swiper-item class="swiper-item">
<image src="../../images/center-bg.png" class="swiper-img"></image>
</swiper-item>
<swiper-item class="swiper-item">
<image src="../../images/center-bg.png" class="swiper-img"></image>
</swiper-item>
<swiper-item class="swiper-item">
<image src="../../images/center-bg.png" class="swiper-img"></image>
</swiper-item>
</swiper>
</view>
<view class="tab">
<view class="tab-box" bindtap="goVolunteer">
<image src="../../images/tab1.png"></image>
<view class="tab-title">志愿者服务</view>
</view>
<view class="tab-box" bindtap="goActivity">
<image src="../../images/tab2.png"></image>
<view class="tab-title">精品活动</view>
</view>
<view class="tab-box" bindtap="goVenue">
<image src="../../images/tab3.png"></image>
<view class="tab-title">场馆导航</view>
</view>
<view class="tab-box" bindtap="goHeritage">
<image src="../../images/tab4.png"></image>
<view class="tab-title">非遗文化</view>
</view>
<view class="tab-box" bindtap="goBroadcast">
<image src="../../images/tab5.png"></image>
<view class="tab-title">直播点播</view>
</view>
</view>
<view class="recommend">
<view class="public-title">
<view class="title-text">
<image src="../../images/selected-l.png" class="selected-l"></image>
精彩推荐
<image src="../../images/selected-r.png" class="selected-r"></image>
</view>
</view>
<view class="recommend-container">
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
</view>
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
</view>
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
</view>
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
</view>
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
</view>
</view>
</view>
<view class="news">
<view class="public-title">
<view class="title-text">
<image src="../../images/selected-l.png" class="selected-l"></image>
新闻资讯
<image src="../../images/selected-r.png" class="selected-r"></image>
</view>
</view>
<view class="news-box" bindtap="goNewsDetail">
<view class="news-title">银保监会印发《关于加快推进意外险改革的意见》</view>
<view class="news-info">
<text>来源:百度</text>
<text>10评论</text>
<text>2020-03-02</text>
</view>
</view>
<view class="news-box" bindtap="goNewsDetail">
<view class="news-title">银保监会印发《关于加快推进意外险改革的意见》</view>
<view class="news-big-pic">
<image src="../../images/big-news.png"></image>
</view>
<view class="news-info">
<text>来源:百度</text>
<text>10评论</text>
<text>2020-03-02</text>
</view>
</view>
<view class="news-box" bindtap="goNewsDetail">
<view class="news-title">银保监会印发《关于加快推进意外险改革的意见》</view>
<view class="news-small-pic">
<image src="../../images/big-news.png"></image>
<image src="../../images/big-news.png"></image>
<image src="../../images/big-news.png"></image>
</view>
<view class="news-info">
<text>来源:百度</text>
<text>10评论</text>
<text>2020-03-02</text>
</view>
</view>
<view class="news-box transverse-news" bindtap="goNewsDetail">
<view class="news-row-img">
<image src="../../images/big-news.png"></image>
</view>
<view class="news-row-info">
<view class="news-title">银保监会印发《关于加快推进意外险改革的意见》</view>
<view class="news-info">
<text>来源:百度</text>
<text>10评论</text>
<text>2020-03-02</text>
</view>
</view>
</view>
</view>
<view class="broadcast">
<view class="public-title">
<view class="title-text">
<image src="../../images/selected-l.png" class="selected-l"></image>
直播专区
<image src="../../images/selected-r.png" class="selected-r"></image>
</view>
</view>
<view class="broadcast-container">
<view class="broadcast-box" bindtap="goBroadcastDetail">
<image src="../../images/center-bg.png"></image>
</view>
<view class="broadcast-box" bindtap="goBroadcastDetail">
<image src="../../images/center-bg.png"></image>
</view>
<view class="broadcast-box" bindtap="goBroadcastDetail">
<image src="../../images/center-bg.png"></image>
</view>
</view>
</view>

135
pages/index/index.wxss Normal file
View File

@ -0,0 +1,135 @@
.swiper-box, .swiper-img, swiper{
width: 100%;
height: 330rpx;
}
.tab{
padding: 30rpx;
display: flex;
border-bottom: 5px solid #FBFBFB;
}
.tab-box{
flex: 1;
text-align: center;
}
.tab-box image{
width: 65rpx;
height: 65rpx;
}
.tab-title{
font-size: 26rpx;
}
.recommend{
padding: 30rpx;
border-bottom: 5px solid #FBFBFB;
}
.recommend-container{
width: 100%;
display: flex;
overflow-x: auto;
}
.recommend-box{
flex-shrink: 0;
width: 220rpx;
height: 130rpx;
border-radius: 10rpx;
overflow: hidden;
position: relative;
margin-right: 30rpx;
}
.recommend-box image{
width: 100%;
height: 100%;
}
.public-title{
text-align: center;
}
.title-text{
display: inline-block;
font-size: 28rpx;
color: #9F1512;
padding: 0 15rpx 0;
position: relative;
margin-bottom: 15rpx;
}
.title-text image{
position: absolute;
top: 0;
width: 10rpx;
height: 100%;
}
.selected-l{
left: 0;
}
.selected-r{
right: 0;
}
.news{
padding: 30rpx;
border-bottom: 5px solid #FBFBFB;
}
.news-box{
padding: 30rpx 0;
border-bottom: 1px solid #EBEBEB;
display: flex;
flex-direction: column;
}
.news-title{
color: #242424;
font-size: 30rpx;
font-weight: bold;
}
.news-info{
color: #949494;
margin-top: 15rpx;
font-size: 24rpx;
}
.news-info text{
margin-right: 20rpx;
}
.news-big-pic, .news-small-pic{
margin-top: 10rpx;
}
.news-big-pic image{
width: 100%;
}
.news-small-pic image{
width: 30%;
height: 150rpx;
margin-right: 20rpx;
}
.transverse-news{
flex-direction: row;
justify-content: space-between;
}
.news-row-img{
width: 30%;
height: 150rpx;
}
.news-row-img image{
width: 100%;
height: 100%;
}
.news-row-info{
width: 68%;
}
.broadcast{
margin-top: 15rpx;
padding: 0 30rpx;
}
.broadcast-container{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.broadcast-box{
flex-shrink: 0;
width: 49%;
border-radius: 10rpx;
overflow: hidden;
height: 185rpx;
margin-bottom: 15rpx;
}
.broadcast-box image{
width: 100%;
height: 100%;
}

66
pages/login/login.js Normal file
View File

@ -0,0 +1,66 @@
// pages/login/login.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

3
pages/login/login.json Normal file
View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

25
pages/login/login.wxml Normal file
View File

@ -0,0 +1,25 @@
<view class="login-top">
<image src="../../images/login-bg.png" class="login-bg"></image>
<image src="../../images/logo.png" class="logo"></image>
</view>
<view class="login">
<view class="login-info">
<view class="row">
<view class="row-title">登录账号:</view>
<view class="row-text">
<input placeholder="请输入登录账号"></input>
</view>
</view>
<view class="row password">
<view class="row-title">登录密码:</view>
<view class="row-text">
<input placeholder="请输入登录密码" type="password"></input>
</view>
</view>
</view>
<view class="login-btn-box">
<view class="login-btn">立即登录</view>
<view class="register-btn">前往注册</view>
</view>
</view>
<view class="copyright">版权所有</view>

84
pages/login/login.wxss Normal file
View File

@ -0,0 +1,84 @@
.login-top{
width: 100%;
height: 610rpx;
position: relative;
text-align: center;
}
.login-bg{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.logo{
width: 295rpx;
height: 265rpx;
margin-top: 75rpx;
}
.login{
position: absolute;
top: 410rpx;
left: 0;
right: 0;
padding: 0 30rpx;
}
.login-info{
padding: 45rpx 30rpx;
background: #fff;
box-shadow:0 0 17rpx 0 rgba(0,0,0,0.1);
border-radius:10rpx;
}
.row{
display: flex;
justify-content: space-between;
border-radius:6rpx;
border:2rpx solid rgba(237,237,237,1);
align-items: center;
height: 100rpx;
}
.row-title{
width: 30%;
text-align: center;
color: #9F1512;
font-size: 28rpx;
}
.row-text{
width: 69%;
}
.row-text input{
width: 100%;
height: 100%;
}
.password{
margin-top: 25rpx;
}
.login-btn-box{
margin-top: 45rpx;
}
.login-btn, .register-btn{
display: flex;
justify-content: center;
align-items: center;
height: 90rpx;
background:#9F1512;
border-radius: 10rpx;
font-size: 32rpx;
color: #fff;
}
.register-btn{
margin-top: 20rpx;
background: #fff;
color: #9F1512;
}
.copyright{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 20rpx 0;
font-size: 28rpx;
color: #949494;
text-align: center;
}

316
pages/newTeam/newTeam.js Normal file
View File

@ -0,0 +1,316 @@
// pages/newTeam/newTeam.js
Page({
/**
* 页面的初始数据
*/
data: {
baseUrl: 'http://192.168.0.111:8888/volunteer/',
isAgree: false, // 是否同意志愿者注册协议
index: 0,
array: ['区域1','区域2','区域3','区域4'],
photo: '',
teamName: '',
count:'',
teamWatchword: '',
content: '',
tempObj: {}, // 用于临时存储字典表返回的数据
tempArray: [], // 用于临时存储字典表返回的数据
teamCityIndex: 0,
teamCityResult: '请选择服务区域',
teamCity: {}, // 服务区域-市
teamCityArray: [], // 服务区域-市
teamCountyIndex: 0,
teamCountyResult: '请选择旗县区',
teamCounty: {}, // 服务区域-旗县区
teamCountyArray: [], // 服务区域-旗县区
teamAreaIndex: 0,
teamAreaResult: '请选择乡镇村',
teamArea: {}, // 服务区域-乡镇村
teamAreaArray: [], // 服务区域-乡镇村
countyShowStatus: true,
areaShowStatus: true
},
getToken: function() {
var self = this;
return new Promise(resolve =>{
wx.getStorage({
key: 'token',
success(res) {
self.setData({
token: res.data
})
return resolve();
}
})
})
},
bindPickerChange: function (e) {
this.setData({
index: e.detail.value
})
},
/**
* 上传活动照片
*/
uploadPhoto: function () {
var self = this
wx.chooseImage({
success (res) {
const tempFilePaths = res.tempFilePaths
wx.uploadFile({
url: self.data.baseUrl + 'app/file/uploadimage',
filePath: tempFilePaths[0],
name: 'image',
header: {
'token': self.data.token
},
formData: {
'image': tempFilePaths[0]
},
success (res){
var data = res.data.substr(9, res.data.length);
data = data.substr(0, data.length - 2);
self.setData({
photo: data
})
},
fail: function(res) {
console.log(res)
}
})
}
})
},
cityChange: function(e) {
var self = this;
self.setData({
teamCityIndex: e.detail.value,
areaShowStatus: true,
teamArea: {},
teamAreaArray: []
})
this.getDataFromDict(self.data.teamCity[self.data.teamCityIndex].dictionaryId, 2).then(result => {
if(self.data.tempObj.length > 0) {
self.setData({
teamCounty: self.data.tempObj,
teamCountyArray: self.data.tempArray,
countyShowStatus: false,
tempObj: {},
tempArray: []
})
}else {
self.setData({
teamCounty: {},
teamCountyArray: [],
countyShowStatus: true,
tempObj: {},
tempArray: []
})
}
});
},
countyChange: function(e) {
var self = this;
self.setData({
teamCountyIndex: e.detail.value
})
this.getDataFromDict(self.data.teamCounty[self.data.teamCountyIndex].dictionaryId, 2).then(result => {
if(self.data.tempObj.length > 0) {
self.setData({
teamArea: self.data.tempObj,
teamAreaArray: self.data.tempArray,
areaShowStatus: false,
tempObj: {},
tempArray: []
})
}else {
self.setData({
teamArea: {},
teamAreaArray: [],
areaShowStatus: true,
tempObj: {},
tempArray: []
})
}
})
},
changeAgree: function (e) {
if(e.detail.value == ''){
this.setData({
isAgree: false
})
}else{
this.setData({
isAgree: true
})
}
},
submitRegister: function () {
var self = this;
if(!self.data.isAgree) {
wx.showToast({
title: '请阅读并同意《团队注册服务协议》',
icon: 'none',
duration: 1500
})
return false;
}
var teamVO = {
photo: self.data.photo,
teamName: self.data.teamName,
count:self.data.count,
teamWatchword: self.data.teamWatchword,
content: self.data.content,
agree: self.data.isAgree,
teamCity: self.data.teamCity[self.data.teamCityIndex] != ''
&& self.data.teamCity[self.data.teamCityIndex] != null
&& self.data.teamCity[self.data.teamCityIndex] != 'undefined' ?
self.data.teamCity[self.data.teamCityIndex].dictionaryId :
'',
teamCounty: self.data.teamCounty[self.data.teamCountyIndex] != ''
&& self.data.teamCounty[self.data.teamCountyIndex] != null
&& self.data.teamCounty[self.data.teamCountyIndex] != 'undefined' ?
self.data.teamCounty[self.data.teamCountyIndex].dictionaryId :
'',
teamArea: self.data.teamArea[self.data.teamAreaIndex] != ''
&& self.data.teamArea[self.data.teamAreaIndex] != null
&& self.data.teamArea[self.data.teamAreaIndex] != 'undefined' ?
self.data.teamArea[self.data.teamAreaIndex].dictionaryId :
'',
};
wx.request({
url: self.data.baseUrl + 'wxminiapp/team/saveteam',
method: 'POST',
header: {
'token': self.data.token
},
data: teamVO,
success(res) {
if(res.statusCode == 200) {
wx.showToast({
title: '注册成功!',
icon: 'none',
duration: 1500
})
wx.navigateTo({
url: '../volunteer/volunteer',
})
}else {
console.log('登陆失败!' + res.errMsg);
}
}
})
},
/**
*从字典表拉取数据
*/
getDataFromDict: function(dictId, type) {
var self = this;
return new Promise(resolve => {
wx.request({
url: self.data.baseUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId,
header: {
'token': self.data.token
},
success: function(res) {
if('200' == res.statusCode) {
if(res.data || type === 2) {
var array = [];
for(var item of res.data) {
delete item.dictionaryParentId;
delete item.dictionaryParentName;
delete item.dictionarySummary;
delete item.dictionaryCode;
delete item.dictionarySort;
delete item.subDictionary;
delete item.parent;
array.push(item.dictionaryName);
}
self.setData({
tempArray: array
})
}
self.setData({
tempObj: res.data
})
}
return resolve();
}
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var self = this;
this.getToken().then(result => {
this.getDataFromDict('4a03e904-81e2-48e9-9006-e15ea4a6bc69', 2).then(result => {
self.setData({
teamCity: self.data.tempObj,
teamCityArray: self.data.tempArray,
tempObj: {},
tempArray: []
})
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,75 @@
<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>-->
<image src="{{photo}}" class="row-img"></image>
</view>
</view>
<view class="row">
<view class="row-title">团队名称:</view>
<view class="row-text">
<input placeholder="请输入团队名称" model:value="{{teamName}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">人数限制:</view>
<view class="row-text">
<input placeholder="请输入人数限制" model:value="{{count}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">团队口号:</view>
<view class="row-text">
<input placeholder="请输入团队口号" model:value="{{teamWatchword}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">市:</view>
<view class="row-text">
<picker bindchange="cityChange" value="{{teamCityIndex}}" range="{{teamCityArray}}">
<view class="picker">
{{teamCityArray[teamCityIndex]}}
</view>
</picker>
</view>
</view>
<view class="row" hidden="{{countyShowStatus}}">
<view class="row-title">旗县区:</view>
<view class="row-text">
<picker bindchange="countyChange" value="{{teamCountyIndex}}" range="{{teamCountyArray}}">
<view class="picker">
{{teamCountyArray[teamCountyIndex]}}
</view>
</picker>
</view>
</view>
<view class="row" hidden="{{areaShowStatus}}">
<view class="row-title">乡镇村:</view>
<view class="row-text">
<picker bindchange="countyChange" value="{{teamAreaIndex}}" range="{{teamAreaArray}}">
<view class="picker">
{{teamAreaArray[teamAreaIndex]}}
</view>
</picker>
</view>
</view>
<view class="row intro">
<view class="row-title">团队介绍:</view>
<view class="row-text">
<textarea placeholder="请输入团队介绍" model:value="{{content}}"></textarea>
</view>
</view>
</view>
<view class="create">
<view class="agree">
<checkbox-group bindchange="changeAgree">
<label>
<checkbox value="{{isAgree}}" checked="{{isAgree}}" color="#9F1512" class="agree-checkbox"/>我已阅读并同意<text class="agreement">《团队注册服务协议》</text>
</label>
</checkbox-group>
</view>
<view class="create-btn" bindtap="submitRegister">
立即注册
</view>
</view>

View File

@ -0,0 +1,76 @@
.new-team{
padding: 0 30rpx;
}
.row{
display: flex;
justify-content: space-between;
height: 90rpx;
}
.row-title{
line-height: 90rpx;
color: #242424;
font-size: 32rpx;
width: 24%;
}
.row-text{
width: 75%;
display: flex;
align-items: center;
border-bottom: 1px solid #EBEBEB;
}
.row-text input{
width: 100%;
height: 100%;
}
picker{
width: 100%;
height: 100%;
line-height: 90rpx;
}
laebl{
margin-right: 30rpx;
}
.intro, .intro textarea{
height: 230rpx;
}
.intro textarea{
padding: 26rpx 0;
box-sizing: border-box;
font-size: 32rpx;
}
.create{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 0 30rpx 30rpx;
background: #fff;
}
.agree{
display: flex;
align-items: center;
font-size: 30rpx;
padding-top: 5rpx;
}
.agree-checkbox{
transform: scale(0.8,0.8);
}
.create-btn{
background: #9F1512;
height: 80rpx;
border-radius: 10rpx;
color: #fff;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 15rpx;
}
label{
margin-right: 30rpx;
}
.info-text{
width: 77%;
font-size: 26rpx;
height: 55rpx;
}

View File

@ -0,0 +1,246 @@
// pages/newVolunteerActivity/newVolunteerActivity.js
var util = require('../../utils/util.js');
Page({
/**
* 页面的初始数据
*/
data: {
baseUrl: 'http://192.168.0.111:8888/volunteer/',
token: '',
startDate: '',
endDate: '',
serviceName: '', // 名称
serviceContent: '', // 活动内容
address: '', // 活动地址
serviceReward: '', // 服务奖补
linkMan: '', // 联系人
linkTel: '', // 联系人联系方式
count: '', // 志愿者数量
introduce: '', // 活动介绍
voluntaryType: 1, // 类型
tempFilePaths: '', // 宣传图片
photo: '', // 宣传图片
serviceRequirement: '', // 服务要求
},
getToken: function() {
var self = this;
return new Promise(resolve =>{
wx.getStorage({
key: 'token',
success(res) {
self.setData({
token: res.data
})
return resolve();
}
})
})
},
bindDateChange: function(e) {
console.log('picker发送选择改变携带值为', e.detail.value)
this.setData({
date: e.detail.value
})
},
dateDafault: function() {
// 设置日期选择框为当前日期
var self = this;
var TIME = util.formatDate(new Date());
self.setData({
startDate: TIME,
endDate: TIME
})
},
/**
* 选择志愿者或者团队类型
*/
changeType: function(e) {
if(e.detail.value == 1){
this.setData({
voluntaryType : 1
})
}else{
this.setData({
voluntaryType : 2
})
}
},
/**
* 上传活动照片
*/
uploadPhoto: function () {
var self = this
wx.chooseImage({
success (res) {
const tempFilePaths = res.tempFilePaths
wx.uploadFile({
url: self.data.baseUrl + 'app/file/uploadimage',
filePath: tempFilePaths[0],
name: 'image',
header: {
'token': self.data.token
},
formData: {
'image': tempFilePaths[0]
},
success (res){
var data = res.data.substr(9, res.data.length);
data = data.substr(0, data.length - 2);
self.setData({
photo: data
})
},
fail: function(res) {
console.log(res)
}
})
}
})
},
submitRegister: function () {
var self = this;
if(!self.data.serviceName) {
wx.showToast({
title: '活动名称不能为空',
icon: 'none',
duration: 1500
})
return false;
}
if(!self.data.serviceContent) {
wx.showToast({
title: '活动内容不能为空',
icon: 'none',
duration: 1500
})
return false;
}
if(!self.data.address) {
wx.showToast({
title: '活动地址不能为空',
icon: 'none',
duration: 1500
})
return false;
}
if(!self.data.linkMan) {
wx.showToast({
title: '活动联系人不能为空',
icon: 'none',
duration: 1500
})
return false;
}
if(!self.data.address) {
wx.showToast({
title: '联系方式不能为空',
icon: 'none',
duration: 1500
})
return false;
}
if(!self.data.count) {
wx.showToast({
title: '数量不能为空',
icon: 'none',
duration: 1500
})
return false;
}
console.log(self.data.startDate)
var volunteerServiceVO = {
serviceName: self.data.serviceName,
serviceContent: self.data.serviceContent,
address: self.data.address,
serviceReward: self.data.serviceReward,
linkMan: self.data.linkMan,
linkTel: self.data.linkTel,
voluntaryType: self.data.voluntaryType,
count: self.data.count,
introduce: self.data.introduce,
startTime: self.data.startDate,
endTime: self.data.endDate,
photo: self.data.photo,
serviceRequirement: self.data.serviceRequirement
};
wx.request({
url: self.data.baseUrl + 'wxminiapp/volunteerservice/savevolunteerservice',
method: 'POST',
header: {
'token': self.data.token
},
data: volunteerServiceVO,
success(res) {
if(res.statusCode == 200) {
wx.showToast({
title: '活动发布成功!',
icon: 'none',
duration: 1500
})
wx.navigateTo({
url: '../volunteer/volunteer',
})
}else {
console.log('登陆失败!' + res.errMsg);
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.dateDafault();
this.getToken();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,98 @@
<view class="new-team">
<view class="row">
<view class="row-title">活动名称:</view>
<view class="row-text">
<input placeholder="请输入活动名称" model:value="{{serviceName}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">活动内容:</view>
<view class="row-text">
<input placeholder="请输入活动内容" model:value="{{serviceContent}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">活动地址:</view>
<view class="row-text">
<input placeholder="请输入活动地址" model:value="{{address}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">服务奖补:</view>
<view class="row-text">
<input placeholder="请输入服务奖补" model:value="{{serviceReward}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">服务要求:</view>
<view class="row-text">
<input placeholder="请输入服务奖补" model:value="{{serviceRequirement}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">联系人:</view>
<view class="row-text">
<input placeholder="请输入活动联系人" model:value="{{linkMan}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">联系方式:</view>
<view class="row-text">
<input placeholder="请输入联系方式" model:value="{{linkTel}}"></input>
</view>
</view>
<view class="row">
<view class="row-title">类型:</view>
<view class="row-text">
<radio-group class="radio-group" bindchange="changeType">
<label class="radio">
<radio value="1" checked="checked"/>志愿者
<radio value="2"/>团队
</label>
</radio-group>
</view>
</view>
<view class="row">
<view class="row-title">数量:</view>
<view class="row-text">
<input placeholder="请输入志愿者(团队)数量" type="number" model:value="{{count}}"></input>
</view>
</view>
<view class="row intro">
<view class="row-title">活动简介:</view>
<view class="row-text">
<textarea placeholder="请输入活动简介" model:value="{{introduce}}"></textarea>
</view>
</view>
<view class="row">
<view class="row-title">开始时间:</view>
<view class="row-text">
<picker mode="date" value="{{startDate}}" bindchange="bindDateChange">
<view class="picker">
{{startDate}}
</view>
</picker>
</view>
</view>
<view class="row">
<view class="row-title">结束时间:</view>
<view class="row-text">
<picker mode="date" value="{{endDate}}" bindchange="bindDateChange">
<view class="picker">
{{endDate}}
</view>
</picker>
</view>
</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>
</view>
</view>
<view class="create">
<view class="create-btn" bindtap="submitRegister">
立即发起
</view>
</view>

View File

@ -0,0 +1,75 @@
.new-team{
padding: 0 30rpx;
margin-bottom: 140rpx;
}
.row{
display: flex;
justify-content: space-between;
height: 90rpx;
}
.row-title{
line-height: 90rpx;
color: #242424;
font-size: 32rpx;
width: 24%;
}
.row-text{
width: 75%;
display: flex;
align-items: center;
border-bottom: 1px solid #EBEBEB;
}
.row-text input{
width: 100%;
height: 100%;
}
picker{
width: 100%;
height: 100%;
line-height: 90rpx;
}
.intro, .intro textarea{
height: 230rpx;
}
.intro textarea{
padding: 26rpx 0;
box-sizing: border-box;
font-size: 32rpx;
}
.create{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 15rpx 30rpx;
background: #fff;
box-shadow:0 0 17rpx 0 rgba(0,0,0,0.1);
}
.create-btn{
background: #9F1512;
height: 80rpx;
border-radius: 10rpx;
color: #fff;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.img-row{
height: auto;
}
.img-row .row-text{
padding-top: 20rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.row-img{
width: 240rpx;
height: 130rpx;
margin-right: 20rpx;
margin-bottom: 20rpx;
}
.row-img:nth-child(even){
margin-right: 0;
}

View File

@ -0,0 +1,66 @@
// pages/newsDetail/newsDetail.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,93 @@
<view class="news-title">
<view class="title">银保监会印发《关于加快推进意外险改革的意见》</view>
<view class="news-info">
<text>来源</text>
<text>2020-02-02</text>
</view>
</view>
<view class="news-content">
大量的小号被封杀,基于小号和社群建立起来的粉丝用户体系,一朝回到解放前。
微信这番操作,也是告诉大家,没有私域流量,只能按照我的路子来。要么公众号,要么企业微信。
今天早上和业务团队聊了一下,感觉企业微信还是任重而道远,由于企业微信的能力开放有限,想大规模的玩起来,还需要一点时间积累。
现在,在企业微信能力开放之前,最好的粉丝载体,还是要回到微信公众号。
但微信公众号的限制,也是非常严格的,完全无法通过阅读情况,判断用户的喜好和特定,那产品经理该如何提供策略工具,为搭建公众号下的用户分层体系呢?
</view>
<view class="comment">
<view class="commnet-box">
<view class="commnet-avatar">
<image src="../../images/avatar.png"></image>
</view>
<view class="comment-right">
<view class="comment-people">
<view>王耿</view>
<view>200 <image src="../../images/good.png"></image></view>
</view>
<view class="comment-content">
评论内容评论内容评论内容评论内容评论内容评论内容评论内容
</view>
<view class="date-reply">
<text class="date">1天前</text>
<text class="reply">回复</text>
</view>
</view>
</view>
<view class="commnet-box">
<view class="commnet-avatar">
<image src="../../images/avatar.png"></image>
</view>
<view class="comment-right">
<view class="comment-people">
<view>王耿</view>
<view>200 <image src="../../images/good.png"></image></view>
</view>
<view class="comment-content">
评论内容评论内容评论内容评论内容评论内容评论内容评论内容
</view>
<view class="date-reply">
<text class="date">1天前</text>
<text class="reply">回复</text>
</view>
<view class="reply-box">
<view class="reply-content">
<text class="reply-people">王耿:</text>
回复内容回复内容回复内容回复内容回复内容回复内容回复内容回复内容
</view>
</view>
</view>
</view>
<view class="commnet-box">
<view class="commnet-avatar">
<image src="../../images/avatar.png"></image>
</view>
<view class="comment-right">
<view class="comment-people">
<view>王耿</view>
<view>200 <image src="../../images/good.png"></image></view>
</view>
<view class="comment-content">
评论内容评论内容评论内容评论内容评论内容评论内容评论内容
<view class="comment-img">
<image src="../../images/big-news.png"></image>
<image src="../../images/big-news.png"></image>
</view>
</view>
<view class="date-reply">
<text class="date">1天前</text>
<text class="reply">回复</text>
</view>
</view>
</view>
</view>
<view class="page-bottom">
<view class="do-comment">
请填写你的评论
</view>
<view class="btn-box">
<view class="collect">
<image src="../../images/collect.png"></image>
</view>
<view class="share">
<image src="../../images/share.png"></image>
</view>
</view>
</view>

View File

@ -0,0 +1,127 @@
/* page{
background: #d2e0f6;
} */
.news-title{
padding: 20rpx 30rpx;
}
.title{
font-size: 34rpx;
font-weight: bold;
color: #242424;
text-align: center;
}
.news-info{
font-size: 28rpx;
color: #949494;
}
.news-info text{
margin-right: 30rpx;
}
.news-content{
padding: 0 30rpx 10rpx;
font-size: 32rpx;
color: #242424;
line-height: 50rpx;
border-bottom: 5px solid #d2e0f6;
}
.comment{
padding: 30rpx;
margin-bottom: 95rpx;
}
.commnet-box{
display: flex;
justify-content: space-between;
margin-bottom: 10rpx;
}
.commnet-box view{
flex-shrink: 0;
}
.commnet-avatar, .commnet-avatar image{
width: 50rpx;
height: 50rpx;
}
.comment-right{
width: 620rpx;
padding-bottom: 20rpx;
border-bottom: 1px solid #EBEBEB;
}
.comment-people{
display: flex;
font-size: 22rpx;
color: #B1B1B1;
justify-content: space-between;
vertical-align: middle;
line-height: 40rpx;
}
.comment-people image{
width: 40rpx;
height: 40rpx;
vertical-align: top;
}
.comment-content{
font-size: 30rpx;
color: #242424;
line-height: 40rpx;
margin: 10rpx 0;
}
.date-reply{
font-size: 24rpx;
}
.date{
color: #949494;
margin-right: 20rpx;
}
.reply{
color: #242424;
}
.reply-box{
padding: 20rpx;
background: #EDEDED;
font-size: 24rpx;
margin-top: 10rpx;
line-height: 40rpx;
}
.reply-people{
color: #242424;
}
.comment-img{
margin: 10rpx 0;
}
.comment-img image{
width: 30%;
height: 150rpx;
margin-right: 15rpx;
}
.page-bottom{
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 10rpx 30rpx;
height: 90rpx;
box-sizing: border-box;
background: #fff;
box-shadow:0px 0px 17px 0px rgba(0,0,0,0.1);
display: flex;
justify-content: space-between;
}
.do-comment{
width: 500rpx;
padding: 0 20rpx;
height: 100%;
background: #EDEDED;
flex-shrink: 0;
display: flex;
align-items: center;
color: #B1B1B1;
font-size: 26rpx;
}
.btn-box{
width: 150rpx;
display: flex;
justify-content: space-between;
}
.collect, .share, .collect image, .share image{
width: 70rpx;
height: 100%;
}

View File

@ -0,0 +1,66 @@
// pages/register/register.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

Some files were not shown because too many files have changed in this diff Show More