This commit is contained in:
dong_bo0602 2020-11-30 16:55:13 +08:00
parent 0a4c85b2a0
commit db41a5b392
18 changed files with 182 additions and 325 deletions

View File

@ -9,7 +9,6 @@
"pages/order/order", "pages/order/order",
"pages/venue/venue", "pages/venue/venue",
"pages/center/center", "pages/center/center",
"pages/newFriendCircle/newFriendCircle",
"pages/myFriendCircle/myFriendCircle", "pages/myFriendCircle/myFriendCircle",
"pages/friendCircle/friendCircle", "pages/friendCircle/friendCircle",
"pages/orderDetail/orderDetail", "pages/orderDetail/orderDetail",

BIN
images/loading.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
images/play.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

View File

@ -123,11 +123,7 @@ Page({
return false; return false;
} }
app.restAjax.get(app.restAjax.path('{venueUrl}/app/booking/listgrouninfoanditemrelease/{venuesProjectId}', app.restAjax.get(app.restAjax.path('{venueUrl}/app/booking/listgrouninfoanditemrelease/{venuesProjectId}',
<<<<<<< HEAD
[app.venueUrl,self.data.selectVenuesProject]), null, {headers : {token:self.data.token}}, [app.venueUrl,self.data.selectVenuesProject]), null, {headers : {token:self.data.token}},
=======
[app.venueUrl,self.data.selectVenuesProject]), null, {headers : {token:self.data.token}} ,
>>>>>>> f1eff69198504079759bf289a71907006b988a79
function(code,data){ function(code,data){
if(data.data.length > 0 ){ if(data.data.length > 0 ){
self.setData({ self.setData({

View File

@ -17,7 +17,8 @@ Page({
usercenterUrl: app.usercenterUrl, usercenterUrl: app.usercenterUrl,
sourcePath: '/route/file/downloadfile/true/', sourcePath: '/route/file/downloadfile/true/',
phone: '', phone: '',
code: '' code: '',
isLoading: false
}, },
// 选择头像来源 // 选择头像来源
changeAvatar: function () { changeAvatar: function () {
@ -76,21 +77,6 @@ Page({
console.log(data) console.log(data)
}) })
}, },
// 获取用户信息
getUserInfo: function () {
var self = this
app.restAjax.get(app.restAjax.path('{usercenterUrl}/app/user/getappuser', [app.usercenterUrl]), {}, {
headers: {
token: self.data.token
}
}, function (code, data) {
self.setData({
userInfo: data
})
}, function (code, data) {
console.log(data)
})
},
// 获取token // 获取token
getToken: function () { getToken: function () {
var self = this var self = this
@ -179,36 +165,6 @@ Page({
}) })
} }
}, },
// 获取验证码
getCode: function () {
var self = this;
self.setData({
gotCode: true
})
self.data.timer = setInterval(function () {
var cur = self.data.restTime - 1
if (cur == 0) {
clearInterval(self.data.timer)
self.setData({
restTime: 120,
gotCode: false
})
} else {
self.setData({
restTime: cur
})
}
}, 1000)
app.restAjax.get(app.restAjax.path('{usercenterUrl}/api/sms/getverificationcode/' + self.data.phone, [app.usercenterUrl]), {}, null,
function (code, data) {},
function (code, data) {
wx.showToast({
title: data.msg,
icon: 'none',
duration: 1500
})
})
},
// 提交绑定手机 // 提交绑定手机
submitPhone: function () { submitPhone: function () {
var self = this; var self = this;
@ -216,8 +172,7 @@ Page({
isConfirm: true isConfirm: true
}) })
app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateminiappdefaultusername', [app.usercenterUrl]), { app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateminiappdefaultusername', [app.usercenterUrl]), {
phone: self.data.phone, phone: self.data.phone
verificationCode: self.data.code
}, { }, {
headers: { headers: {
token: self.data.token token: self.data.token
@ -238,11 +193,47 @@ Page({
}) })
}) })
}, },
// 验证码 // // 验证码
inputCode: function (e) { // inputCode: function (e) {
this.setData({ // this.setData({
code: e.detail.value // code: e.detail.value
// })
// },
getPhoneNumber: function (e) {
var self = this
self.setData({
isLoading: true
}) })
console.log(e)
if (e.detail.errMsg == 'getPhoneNumber:ok') {
var info = {
encryptedData: e.detail.encryptedData,
iv: e.detail.iv
}
// app.dialog.loading('正在加载');
app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/miniuser/updatedefaultusernamebydata', [app.usercenterUrl]), info, {
headers: {
token: self.data.token
}
}, function (code, data) {
// wx.hideLoading();
self.setData({
isLoading: false
})
wx.setStorageSync('token', data.data);
wx.setStorageSync('isRandomUsername', '0');
self.setData({
randomName: false,
token: data.data
})
self.getUserInfo()
app.dialog.msg('绑定成功');
})
} else {
self.setData({
isLoading: false
})
}
}, },
// 判断用户是否为随机名称 // 判断用户是否为随机名称
isRandomName: function () { isRandomName: function () {
@ -251,7 +242,6 @@ Page({
key: 'isRandomUsername', key: 'isRandomUsername',
success: function (res) { success: function (res) {
if (res.data == 1) { if (res.data == 1) {
wx.hideTabBar()
self.setData({ self.setData({
randomName: true randomName: true
}) })
@ -263,32 +253,33 @@ Page({
} }
}) })
}, },
// 获取用户信息 // 获取用户信息
getUserInfo: function () { getUserInfo: function () {
var self = this var self = this
app.restAjax.get(app.restAjax.path('{usercenterUrl}/app/user/getappuser', [app.usercenterUrl]), {}, { app.restAjax.get(app.restAjax.path('{usercenterUrl}/app/user/getappuser', [app.usercenterUrl]), {}, {
headers: { headers: {
token: self.data.token token: self.data.token
} }
}, function (code, data) { }, function (code, data) {
self.setData({ self.setData({
userInfo: data userInfo: data
})
}, function (code, data) {
app.dialog.msg(data.msg);
}) })
}, }, function (code, data) {
app.dialog.msg(data.msg);
})
},
cancelPhone: function () { cancelPhone: function () {
this.setData({ this.setData({
showPhone: false showPhone: false
}) })
wx.showTabBar()
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.isRandomName(); this.isRandomName();
this.getToken() this.getToken();
}, },
/** /**

View File

@ -7,6 +7,8 @@
<image src="{{usercenterUrl}}{{sourcePath}}{{userInfo.avatar}}"></image> <image src="{{usercenterUrl}}{{sourcePath}}{{userInfo.avatar}}"></image>
</view> </view>
<view class="user-name">{{userInfo.name}}</view> <view class="user-name">{{userInfo.name}}</view>
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="getphone" wx:if="{{randomName}}">绑定手机号</button>
<view class="tips" wx:if="{{randomName}}">绑定手机号后账号信息即可与APP共享</view>
</view> </view>
<view class="main"> <view class="main">
<view class="main-title">常用功能</view> <view class="main-title">常用功能</view>
@ -39,10 +41,10 @@
<image src="../../images/team.png"></image> <image src="../../images/team.png"></image>
<view class="title">我的志愿活动</view> <view class="title">我的志愿活动</view>
</view> </view>
<view class="main-box"> <!-- <view class="main-box">
<image src="../../images/share.png"></image> <image src="../../images/share.png"></image>
<view class="title">我的分享</view> <view class="title">我的分享</view>
</view> </view> -->
<!-- <view class="main-box"> <!-- <view class="main-box">
<image src="../../images/setting.png"></image> <image src="../../images/setting.png"></image>
<view class="title">设置</view> <view class="title">设置</view>
@ -50,7 +52,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="set-phone" wx:if="{{randomName && showPhone}}"> <!-- <view class="set-phone" wx:if="{{randomName && showPhone}}">
<view class="set-phone-box"> <view class="set-phone-box">
<view class="tips">您还没有绑定手机号,请先绑定手机号</view> <view class="tips">您还没有绑定手机号,请先绑定手机号</view>
<view class="phone-input"> <view class="phone-input">
@ -66,4 +68,7 @@
<view class="set-phone-btn" bindtap="cancelPhone">取消</view> <view class="set-phone-btn" bindtap="cancelPhone">取消</view>
</view> </view>
</view> </view>
</view> -->
<view class="loading" wx:if="{{isLoading}}">
<image src="../../images/loading.gif"></image>
</view> </view>

View File

@ -143,4 +143,25 @@
color: #fff; color: #fff;
background: #9F1512; background: #9F1512;
border-radius: 10rpx; border-radius: 10rpx;
}
.tips{
font-size: 30rpx;
text-align: center;
margin-top: 15rpx;
}
.loading{
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, .2);
}
.loading image{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 150rpx;
height: 150rpx;
} }

View File

@ -53,11 +53,11 @@ Page({
wx.hideLoading(); wx.hideLoading();
}); });
}, },
newFriendCircle: function () { // newFriendCircle: function () {
wx.navigateTo({ // wx.navigateTo({
url: '../newFriendCircle/newFriendCircle', // url: '../newFriendCircle/newFriendCircle',
}) // })
}, // },
toMyFriendCircle: function () { toMyFriendCircle: function () {
wx.navigateTo({ wx.navigateTo({
url: '../myFriendCircle/myFriendCircle', url: '../myFriendCircle/myFriendCircle',

View File

@ -9,7 +9,7 @@
<view class="select-title">文化直播</view> <view class="select-title">文化直播</view>
</view> </view>
--> -->
<!-- <view class="select-box" bindtap="goFriendCircle"> <!-- <view class="select-box">
<image src="../../images/select-tab.png"></image> <image src="../../images/select-tab.png"></image>
<view class="select-title">文化分享</view> <view class="select-title">文化分享</view>
</view> --> </view> -->

View File

@ -124,6 +124,25 @@
<text>{{item.newsContentPublishTime}}</text> <text>{{item.newsContentPublishTime}}</text>
</view> </view>
</view> </view>
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_6'}}">
<view class="news-title">{{item.newsContentTitle}}</view>
<view class="news-big-pic">
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
<image src="../../images/play.png" class="play-btn"></image>
</view>
<view class="news-info">
<text>来源:{{item.newsContentResource}}</text>
<text>{{item.newsContentPublishTime}}</text>
</view>
</view>
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_7'}}">
<view class="news-title">{{item.newsContentTitle}}</view>
<view class="news-info voice-box">
<text>来源:{{item.newsContentResource}}</text>
<text>{{item.newsContentPublishTime}}</text>
<image src="../../images/play.png"></image>
</view>
</view>
</view> </view>
</view> </view>
<view class="broadcast"> <view class="broadcast">

View File

@ -238,4 +238,26 @@
color: #fff; color: #fff;
background: #9F1512; background: #9F1512;
border-radius: 10rpx; border-radius: 10rpx;
}
.voice-box{
padding-right: 30px;
position: relative;
}
.voice-box iamge{
position: absolute;
top: 0;
right: 0;
width:25rpx;
height: 25rpx;
}
.news-big-pic{
position: relative;
}
.news-big-pic image.play-btn{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80rpx;
height: 80rpx;
} }

View File

@ -1,130 +0,0 @@
// pages/newFriendCircle/newFriendCircle.js
Page({
/**
* 页面的初始数据
*/
data: {
showAdd: true,
selectedType: '',
selectedList: [],
isPublic: '' //朋友圈是否公开
},
changepublic: function (e) {
this.setData({
isPublic: e.detail.value
})
},
selectContent: function () {
var self = this
wx.chooseMedia({
count: 9 - self.data.selectedList.length,
mediaType: ['image','video'],
sourceType: ['album', 'camera'],
success: function (res) {
console.log(res)
if (res.type == 'image') {
self.setData({
selectedType: res.type,
selectedList: self.data.selectedList.concat(res.tempFiles)
})
} else {
self.setData({
selectedType: res.type,
selectedList: self.data.selectedList.concat(res.tempFiles)
})
}
self.isShowAdd()
console.log(self.data.selectedList)
}
})
},
deletePhoto: function (e) {
var self = this
var now = e.currentTarget.dataset.idx
var result = self.data.selectedList
result.splice(now, 1)
this.setData({
selectedList: result
})
self.isShowAdd('delete')
},
isShowAdd: function (from) {
if (this.data.selectedType == 'image') {
if (this.data.selectedList.length < 9) {
this.setData({
showAdd: true
})
} else {
this.setData({
showAdd: false
})
}
} else {
if (from) {
this.setData({
showAdd: true
})
} else {
this.setData({
showAdd: false
})
}
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

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

View File

@ -1,30 +0,0 @@
<view class="new-friend-circle">
<view class="text">
<textarea placeholder="请输入内容"></textarea>
</view>
<view class="select">
<view class="photo" wx:for="{{selectedList}}" wx:key="index" wx:if="{{selectedList.length > 0}}">
<view class="type-box" wx:if="{{selectedType == 'image'}}">
<image src="{{item.tempFilePath}}"></image>
<image src="../../images/delete-photo.png" class="delete" bindtap="deletePhoto" data-idx="{{index}}"></image>
</view>
<view class="type-box" wx:else>
<video src="{{item.tempFilePath}}"></video>
<image src="../../images/delete-photo.png" class="delete" bindtap="deletePhoto" data-idx="{{index}}"></image>
</view>
</view>
<view class="add" bindtap="selectContent" wx:if="{{showAdd}}">
<image src="../../images/new.png"></image>
</view>
</view>
<view class="is-public">
是否公开:
<radio-group bindchange="changepublic">
<radio value="true" color="#9F1512">公开</radio>
<radio value="false" color="#9F1512">不公开</radio>
</radio-group>
</view>
</view>
<view class="submit">
发布
</view>

View File

@ -1,79 +0,0 @@
.new-friend-circle{
padding: 30rpx;
margin-bottom: 100rpx;
}
.text{
width: 100%;
height: 250rpx;
margin-bottom: 30rpx;
}
.text textarea{
width: 100%;
height: 100%;
border: 1px solid #DEDEDE;
padding: 15rpx;
box-sizing: border-box;
font-size: 32rpx;
}
.add{
width: 32%;
height: 200rpx;
background: #DEDEDE;
display: inline-flex;
justify-content: center;
align-items: center;
vertical-align: top;
}
.add image{
width: 100rpx;
height: 100rpx;
}
.is-public{
margin-top: 20rpx;
font-size: 30rpx;
}
.is-public radio-group{
display: inline-block;
}
.is-public radio-group radio{
margin-right: 20rpx;
}
.photo{
display: inline-block;
width: 32%;
height: 200rpx;
margin-right: 2%;
position: relative;
margin-bottom: 20rpx;
}
.photo:nth-child(3n){
margin-right: 0;
}
.photo image{
width: 100%;
height: 100%;
}
.photo image.delete{
width: 30rpx;
height: 30rpx;
position: absolute;
top: -15rpx;
right: -15rpx;
}
.type-box, .type-box video{
width: 100%;
height: 100%;
}
.submit{
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: #9F1512;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 32rpx;
}

View File

@ -32,6 +32,7 @@ Page({
}, },
doClickDictionaries: function(event) { doClickDictionaries: function(event) {
var self = this; var self = this;
console.log(event.currentTarget.dataset.newsDirectoriesId)
self.setData({ self.setData({
currentNewsDictionariesId: event.currentTarget.dataset.newsDirectoriesId currentNewsDictionariesId: event.currentTarget.dataset.newsDirectoriesId
}); });
@ -47,6 +48,7 @@ Page({
doGetNewsList: function(page, lv) { doGetNewsList: function(page, lv) {
var self = this; var self = this;
app.dialog.loading('正在加载'); app.dialog.loading('正在加载');
console.log(self.data.currentNewsDictionariesId)
var info = { var info = {
newsDirectoriesParentId: self.data.directoriesParentId, newsDirectoriesParentId: self.data.directoriesParentId,
newsDirectoriesId: self.data.currentNewsDictionariesId ? self.data.currentNewsDictionariesId : '', newsDirectoriesId: self.data.currentNewsDictionariesId ? self.data.currentNewsDictionariesId : '',
@ -69,6 +71,7 @@ Page({
currentPage: page, currentPage: page,
'news.newsList': newsArray 'news.newsList': newsArray
}) })
console.log(self.data.news.newsList)
if(data.rows.length == 0) { if(data.rows.length == 0) {
app.dialog.msg('暂无数据'); app.dialog.msg('暂无数据');
return; return;

View File

@ -25,7 +25,7 @@
</view> </view>
</view> </view>
<view class="news"> <view class="news">
<view wx:for="{{news.newsList}}" wx:for-index="idx" wx:for-item="item" wx:key="newsList"> <view wx:for="{{news.newsList}}" wx:for-index="idx" wx:for-item="item" wx:key="idx">
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_1'}}"> <view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_1'}}">
<view class="news-title">{{item.newsContentTitle}}</view> <view class="news-title">{{item.newsContentTitle}}</view>
<view class="news-small-pic"> <view class="news-small-pic">
@ -77,5 +77,24 @@
<text>{{item.newsContentPublishTime}}</text> <text>{{item.newsContentPublishTime}}</text>
</view> </view>
</view> </view>
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_6'}}">
<view class="news-title">{{item.newsContentTitle}}</view>
<view class="news-big-pic">
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" wx:key="coverItem"></image>
<image src="../../images/play.png" class="play-btn"></image>
</view>
<view class="news-info">
<text>来源:{{item.newsContentResource}}</text>
<text>{{item.newsContentPublishTime}}</text>
</view>
</view>
<view class="news-box" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:if="{{item.typesettingCode == 'key_7'}}">
<view class="news-title">{{item.newsContentTitle}}</view>
<view class="news-info voice-box">
<text>来源:{{item.newsContentResource}}</text>
<text>{{item.newsContentPublishTime}}</text>
<image src="../../images/play.png"></image>
</view>
</view>
</view> </view>
</view> </view>

View File

@ -5,6 +5,7 @@
right: 0; right: 0;
background: #fff; background: #fff;
overflow-x: auto; overflow-x: auto;
z-index: 100;
} }
.type{ .type{
display: flex; display: flex;
@ -41,6 +42,7 @@
right: 20rpx; right: 20rpx;
} }
.area{ .area{
z-index: 100;
overflow-x: auto; overflow-x: auto;
white-space: nowrap; white-space: nowrap;
position: fixed; position: fixed;
@ -110,12 +112,34 @@
.news-info text{ .news-info text{
margin-right: 20rpx; margin-right: 20rpx;
} }
.voice-box{
padding-right: 30px;
position: relative;
}
.voice-box iamge{
position: absolute;
top: 0;
right: 0;
width:25rpx;
height: 25rpx;
}
.news-big-pic, .news-small-pic{ .news-big-pic, .news-small-pic{
margin-top: 10rpx; margin-top: 10rpx;
} }
.news-big-pic{
position: relative;
}
.news-big-pic image{ .news-big-pic image{
width: 100%; width: 100%;
} }
.news-big-pic image.play-btn{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80rpx;
height: 80rpx;
}
.news-small-pic image{ .news-small-pic image{
width: 30%; width: 30%;
height: 150rpx; height: 150rpx;