This commit is contained in:
wans 2020-07-07 16:02:52 +08:00
commit 22e26ccbc5
17 changed files with 305 additions and 75 deletions

1
app.js
View File

@ -12,6 +12,7 @@ App({
volunteerUrl: 'http://192.168.0.111:8888/volunteer',
liveUrl: 'http://192.168.0.113:8084/live',
liveRecordUrl: 'http://192.168.0.113:8085',
socialUrl: 'http://192.168.0.113:7002/social',
restAjax: restAjax,
dialog: dialog,
onLaunch: function () {

View File

@ -6,7 +6,6 @@
"pages/broadcastList/broadcastList",
"pages/orderDetail/orderDetail",
"pages/myVenueOrder/myVenueOrder",
"pages/book/book",
"pages/broadcast/broadcast",
"pages/activityDialog/activityDialog",
"pages/teamDetail/teamDetail",
@ -15,6 +14,7 @@
"pages/heritage/heritage",
"pages/broadcastDetail/broadcastDetail",
"pages/venueDetail/venueDetail",
"pages/book/book",
"pages/register/register",
"pages/login/login",
"pages/newVolunteerActivity/newVolunteerActivity",

View File

@ -13,7 +13,8 @@ Page({
autoplay: true,
current: 0
},
library: null
library: null,
libraryPersonList: []
},
prevImg: function () {
var swiper = this.data.swiper;
@ -24,7 +25,6 @@ Page({
})
},
nextImg: function() {
console.log(2);
var swiper = this.data.swiper;
var current = swiper.current;
swiper.current = current < (swiper.imgUrl.length - 1) ? current + 1 : 0;
@ -44,7 +44,7 @@ Page({
self.setData({
library: data,
'swiper.imgUrl': imageArray
})
});
}, function(code, data) {
app.dialog.msg(data.msg);
}, function() {
@ -52,11 +52,25 @@ Page({
wx.hideLoading();
})
},
doGetLibraryPerson: function(libraryId) {
var self = this;
app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibraryperson/listintangiblelibrarypersonrelease', [self.data.libraryUrl]), {
id: libraryId
}, null, function(code, data) {
self.setData({
libraryPersonList: data
})
}, function(code, data) {
app.dialog.msg(data.msg);
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.doGetLibrary(options.libraryId);
var libraryId = options.libraryId
this.doGetLibrary(libraryId);
this.doGetLibraryPerson(libraryId)
},
/**

View File

@ -65,30 +65,32 @@
</view>
<view class="part">
<view class="part-title">相关传承人</view>
<view class="row">
<view class="info">
<text>编  号:</text>
{{library.libraryNumber}}
<view class="library-person" wx:for="{{libraryPersonList}}" wx:for-item="item" wx:for-index="index" wx:key="libraryPersonList">
<view class="row">
<view class="info">
<text>编  号:</text>
{{item.libraryPersonNumber}}
</view>
<view class="info">
<text>姓  名:</text>
{{item.libraryPersonName}}
</view>
</view>
<view class="info">
<text>姓  名:</text>
{{library.libraryAuthor}}
<view class="row">
<view class="info">
<text>性  别:</text>
{{item.libraryPersonSex == 1 ? '男' : '女'}}
</view>
<view class="info">
<text>出生日期:</text>
{{item.libraryPersonBirthday }}
</view>
</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 class="row">
<view class="info">
<text>民  族:</text>
{{item.libraryPersonNationDictionaryName}}
</view>
</view>
</view>
</view>

View File

@ -44,7 +44,6 @@
right: 0;
border-radius:31rpx 31rpx 0px 0px;
background: #fff;
margin-bottom: 120rpx;
}
.culture-title{
padding: 30rpx;
@ -108,4 +107,10 @@
align-items: center;
font-size: 30rpx;
color: #fff;
}
.library-person {
border-bottom: 1px solid #FBFBFB;
}
.library-person:last-child {
border-bottom: none;
}

View File

@ -1,18 +1,63 @@
// pages/friendCircle/friendCircle.js
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
usercenterUrl: app.usercenterUrl,
socialUrl: app.socialUrl,
momentsList: [],
currentPage: 1,
rows: 20
},
doGetMomentsList: function(page) {
var self = this;
app.dialog.loading('正在加载');
app.restAjax.get(app.restAjax.path('{socialUrl}/app/moments/listpagemomentsofpublicrelease', [self.data.socialUrl]), {
page: page,
rows: self.data.rows
}, null, function(code, data) {
if(data.rows.length == 0) {
app.dialog.msg('暂无数据');
return;
}
for(var i = 0, item; item = data.rows[i++];) {
if(item.type === 'photo') {
var photos = item.photos.split(',');
var photoArray = [];
for(var j = 0, jItem; jItem = photos[j++];) {
if(jItem.length != 0) {
photoArray.push(jItem);
}
}
item.photoArray = photoArray;
}
}
var momentsArray;
if(page <= 1) {
momentsArray = data.rows;
} else {
momentsArray = self.data.news.newsList;
momentsArray = momentsArray.concat(data.rows);
}
self.setData({
currentPage: page,
momentsList: momentsArray
})
}, function(code, data) {
app.dialog.msg(data.msg);
}, function() {
wx.stopPullDownRefresh();
wx.hideLoading();
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.doGetMomentsList(1);
},
/**
@ -47,14 +92,14 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.doGetMomentsList(1);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.doGetMomentsList(this.data.currentPage + 1);
},
/**

View File

@ -1,3 +1,6 @@
{
"usingComponents": {}
"usingComponents": {},
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark",
"onReachBottomDistance": 50
}

View File

@ -1,59 +1,51 @@
<view class="friend-circle">
<view class="friend-circle-box">
<view class="friend-circle" wx:for="{{momentsList}}" wx:for-item="item" wx:for-index="index" wx:key="momentsList">
<view class="friend-circle-box" wx:if="{{item.type === 'text'}}">
<view class="avatar">
<image src="../../images/avatar.png"></image>
<image src="{{usercenterUrl}}/app/user/downloadavatar/{{item.creator}}"></image>
</view>
<view class="content">
<view class="name">张三</view>
<view class="text">内容内容内容内容内容</view>
<view class="date">2020-01-01 00:00:00</view>
<view class="name">{{item.creatorName}}</view>
<view class="text">{{item.content}}</view>
<view class="date">{{item.gmtCreate}}</view>
</view>
</view>
<view class="friend-circle-box">
<view class="friend-circle-box" wx:if="{{item.type === 'photo' && item.photoArray.length === 1}}">
<view class="avatar">
<image src="../../images/avatar.png"></image>
<image src="{{usercenterUrl}}/app/user/downloadavatar/{{item.creator}}"></image>
</view>
<view class="content">
<view class="name">张三</view>
<view class="text">内容内容内容内容内容</view>
<view class="name">{{item.creatorName}}</view>
<view class="text">{{item.content}}</view>
<view class="photo-one">
<image src="../../images/center-bg.png"></image>
<image src="{{socialUrl}}/route/file/downloadfile/true/{{item.photoArray[0]}}"></image>
</view>
<view class="date">2020-01-01 00:00:00</view>
<view class="date">{{item.gmtCreate}}</view>
</view>
</view>
<view class="friend-circle-box">
<view class="friend-circle-box" wx:if="{{item.type === 'photo' && item.photoArray.length > 1}}">
<view class="avatar">
<image src="../../images/avatar.png"></image>
<image src="{{usercenterUrl}}/app/user/downloadavatar/{{item.creator}}"></image>
</view>
<view class="content">
<view class="name">张三</view>
<view class="text">内容内容内容内容内容</view>
<view class="name">{{item.creatorName}}</view>
<view class="text">{{item.content}}</view>
<view class="photo-more">
<image src="../../images/center-bg.png"></image>
<image src="../../images/center-bg.png"></image>
<image src="../../images/center-bg.png"></image>
<image src="../../images/center-bg.png"></image>
<image src="../../images/center-bg.png"></image>
<image src="../../images/center-bg.png"></image>
<image src="../../images/center-bg.png"></image>
<image src="../../images/center-bg.png"></image>
<image src="../../images/center-bg.png"></image>
<image src="{{socialUrl}}/route/file/downloadfile/true/{{photo}}" wx:for="{{item.photoArray}}" wx:for-item="photo" wx:for-index="photoIndex" wx:key="photoArray"></image>
</view>
<view class="date">2020-01-01 00:00:00</view>
<view class="date">{{item.gmtCreate}}</view>
</view>
</view>
<view class="friend-circle-box">
<view class="friend-circle-box" wx:if="{{item.type === 'video'}}">
<view class="avatar">
<image src="../../images/avatar.png"></image>
<image src="{{usercenterUrl}}/app/user/downloadavatar/{{item.creator}}"></image>
</view>
<view class="content">
<view class="name">张三</view>
<view class="text">内容内容内容内容内容</view>
<view class="name">{{item.creatorName}}</view>
<view class="text">{{item.content}}</view>
<view class="video">
<video src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"></video>
<video src="{{socialUrl}}/route/file/downloadfile/true/{{item.video}}"></video>
</view>
<view class="date">2020-01-01 00:00:00</view>
<view class="date">{{item.gmtCreate}}</view>
</view>
</view>
</view>

View File

@ -1,19 +1,23 @@
.friend-circle{
padding: 30rpx;
padding: 15rpx 30rpx;
border-bottom: 1px solid #DEDEDE;
}
.friend-circle:last-child {
border-bottom: none;
}
.friend-circle-box{
margin-bottom: 20rpx;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #DEDEDE;
padding-bottom: 10rpx;
}
.avatar{
width: 8%;
}
.avatar image{
width: 100%;
height: 50rpx;
border-radius: 50rpx;
}
.content{
width: 90%;
@ -32,7 +36,7 @@
color: #949494;
}
.photo-one image{
width: 80%;
width: 100%;
}
.photo-more image{
width: 32%;
@ -44,5 +48,5 @@
margin-right: 0;
}
.video video{
width: 80%;
width: 100%;
}

View File

@ -15,6 +15,16 @@ Page({
url: '../cultureDetail/cultureDetail?libraryId='+ event.currentTarget.dataset.libraryId,
})
},
goLive: function() {
wx.navigateTo({
url: '../broadcast/broadcast',
})
},
goFriendCircle: function() {
wx.navigateTo({
url: '../friendCircle/friendCircle',
})
},
doGetLibraryList: function(page) {
var self = this;
app.dialog.loading('正在加载');

View File

@ -3,11 +3,11 @@
<image src="../../images/select-tab.png"></image>
<view class="select-title">非物质文化遗产数据库</view>
</view>
<view class="select-box">
<view class="select-box" bindtap="goLive">
<image src="../../images/select-tab.png"></image>
<view class="select-title">文化直播</view>
</view>
<view class="select-box">
<view class="select-box" bindtap="goFriendCircle">
<image src="../../images/select-tab.png"></image>
<view class="select-title">文化分享</view>
</view>

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

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

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

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

30
pages/order/order.wxml Normal file
View File

@ -0,0 +1,30 @@
<view class="order">
<view class="order-box">
<view class="order-img">
<image src="../../images/center-bg.png"></image>
</view>
<view class="order-info">
<view class="venue-project">
<view class="venue">场馆场馆场馆场馆</view>
<view class="project">篮球</view>
</view>
<view class="order-text">订单编号01010101</view>
<view class="order-text">下单时间2020-01-01</view>
<view class="price">¥15元</view>
</view>
</view>
<view class="order-box">
<view class="order-img">
<image src="../../images/center-bg.png"></image>
</view>
<view class="order-info">
<view class="venue-project">
<view class="venue">场馆场馆场馆场馆</view>
<view class="project">篮球</view>
</view>
<view class="order-text">订单编号01010101</view>
<view class="order-text">下单时间2020-01-01</view>
<view class="price">¥15元</view>
</view>
</view>
</view>

48
pages/order/order.wxss Normal file
View File

@ -0,0 +1,48 @@
.order{
padding: 30rpx;
}
.order-box{
border: 1px solid #DEDEDE;
border-radius: 10rpx;
overflow: hidden;
display: flex;
justify-content: space-between;
height: 200rpx;
margin-bottom: 20rpx;
}
.order-img{
width: 35%;
}
.order-img image{
width: 100%;
height: 200rpx;
}
.order-info{
width: 63%;
}
.venue-project{
font-size: 32rpx;
display: flex;
justify-content: space-between;
padding: 10rpx;
}
.venue{
width: 65%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.project{
background:rgba(159,21,18,.1);
color: #9F1512;
padding: 0 10rpx;
}
.order-text{
font-size: 30rpx;
color: #BBBBBB;
margin-bottom: 10rpx;
}
.price{
font-size: 32rpx;
color:#9F1512;
}

View File

@ -37,7 +37,7 @@
<view class="bottom">
<view>场地1</view>
<view>15元</view>
<view class="cancel">取消预定</view>
<view class="time-out">已过期</view>
</view>
</view>
<view class="order-box">
@ -48,7 +48,7 @@
<view class="bottom">
<view>场地1</view>
<view>15元</view>
<view class="cancel">取消预定</view>
<view class="time-out">已取消</view>
</view>
</view>
<view class="order-box">

View File

@ -82,4 +82,11 @@
background: #9F1512;
color: #fff;
font-size: 32rpx;
}
.time-out{
width: 70%;
margin: 0 auto 10rpx;
background: rgba(159,21,18,.1);
color: #BBBBBB;
border-radius: 10rpx;
}