From 2335a730de947a5ca9d69b5e0695d61e23c74c02 Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Wed, 17 Jun 2020 15:19:42 +0800 Subject: [PATCH] 0617 --- src/common/components/Header.vue | 11 +- src/pages/ArtTrain/ArtTrain.vue | 8 +- src/pages/Broadcast/Broadcast.vue | 4 +- src/pages/CultureActivity/CultureActivity.vue | 13 +- .../CultureActivityDetail.vue | 139 +++++++++- src/pages/CultureDynamics/CultureDynamics.vue | 133 +++++----- src/pages/Exhibition/Exhibition.vue | 4 +- .../Index/components/DigitalResource.vue | 2 +- src/pages/Index/components/IndexService.vue | 11 +- src/pages/Index/components/IndexVideo.vue | 9 +- .../IntangibleHeritage/IntangibleHeritage.vue | 28 +- src/pages/PersonCenter/PersonCenter.vue | 250 ++++++++++++++---- src/pages/Resource/Resource.vue | 11 +- src/pages/Volunteer/Volunteer.vue | 9 +- 14 files changed, 469 insertions(+), 163 deletions(-) diff --git a/src/common/components/Header.vue b/src/common/components/Header.vue index 02abf52..9034749 100644 --- a/src/common/components/Header.vue +++ b/src/common/components/Header.vue @@ -145,8 +145,15 @@ export default { } }, doLogout: function () { - localStorage.clear() - this.checkLogin() + var self = this + this.$layer.open({ + content: '确认退出登录吗?', + yes: function () { + sessionStorage.clear() + self.checkLogin() + self.$layer.closeAll() + } + }) } }, mounted: function () { diff --git a/src/pages/ArtTrain/ArtTrain.vue b/src/pages/ArtTrain/ArtTrain.vue index d94757c..81dfda8 100644 --- a/src/pages/ArtTrain/ArtTrain.vue +++ b/src/pages/ArtTrain/ArtTrain.vue @@ -19,7 +19,7 @@
-
-
- -
diff --git a/src/pages/Broadcast/Broadcast.vue b/src/pages/Broadcast/Broadcast.vue index 3385279..4b12983 100644 --- a/src/pages/Broadcast/Broadcast.vue +++ b/src/pages/Broadcast/Broadcast.vue @@ -177,7 +177,9 @@ export default { margin-right 20px margin-bottom 20px cursor pointer - border solid 1px #dedede + box-shadow:0px 0px 10px 0px rgba(176,176,176,0.3); + &:hover + box-shadow:0px 0px 20px 0px rgba(176,176,176,0.9); .broadcast-img width 100% height 185px diff --git a/src/pages/CultureActivity/CultureActivity.vue b/src/pages/CultureActivity/CultureActivity.vue index 74c4b17..49e990e 100644 --- a/src/pages/CultureActivity/CultureActivity.vue +++ b/src/pages/CultureActivity/CultureActivity.vue @@ -9,7 +9,7 @@
- 活动类别> + 活动类别>
@@ -175,6 +175,8 @@ export default { font-size 14px span color #565656 + display inline-block + margin-right 5px button width 80px height 30px @@ -197,19 +199,22 @@ export default { margin 25px auto min-height 400px .service-container - overflow hidden + &:after + content: '' + display block + clear both .service-list float left width 280px box-sizing border-box - border 1px solid #a8a8a8 + box-shadow:0px 0px 10px 0px rgba(176,176,176,0.3); margin-right 26px cursor pointer margin-bottom 26px &:nth-child(4n) margin-right 0 &:hover - background #eee + box-shadow:0px 0px 20px 0px rgba(176,176,176,0.9); .service-img-box width 100% height 185px diff --git a/src/pages/CultureActivityDetail/CultureActivityDetail.vue b/src/pages/CultureActivityDetail/CultureActivityDetail.vue index 5dd8c90..8ad9dbe 100644 --- a/src/pages/CultureActivityDetail/CultureActivityDetail.vue +++ b/src/pages/CultureActivityDetail/CultureActivityDetail.vue @@ -24,8 +24,24 @@

报名时间:{{activityDetail.activityApplyStartTime}}至{{activityDetail.activityApplyEndTime}}

活动规模: 总数: {{activityDetail.activityUserNum}} 已报名: {{activityDetail.enrollCount}}

活动地址:{{activityDetail.activityAddress}}

- - +
+
+
+ 姓 名: +
+
+ 身份证: +
+
+ 手机号: + 验证码: + + +
+ +
+ +
@@ -79,17 +95,28 @@ export default { }, data () { return { + token: sessionStorage.getItem('token'), swiperOptions: { // pagination: '.swiper-pagination', loop: true, autoplay: 3000 }, - activityDetail: {} + activityDetail: {}, + restTime: 0, + signInfo: { + userPhone: '', + userName: '', + userIdCard: '', + activityId: '', + code: '' + } } }, computed: { signState: function () { - if (this.activityDetail.activityState === '3') { + if (this.activityDetail.activityState === '2') { + return '已发布 ' + } else if (this.activityDetail.activityState === '3') { return '报名中' } else if (this.activityDetail.activityState === '4') { return '报名人数已满' @@ -106,22 +133,81 @@ export default { getActivityDetail: function () { var self = this axios.get('http://192.168.0.111:8080/culturalactivity/app/activitylibrary/getactivitylibrarybyidrelease/' + self.$route.params.id).then(function (res) { - if (res.data.activityImage.indexOf(',') !== -1) { - res.data.activityImage = res.data.activityImage.split(',') - } else { - res.data.activityImage = [res.data.activityImage] - } + res.data.activityImage = res.data.activityImage.split(',') self.activityDetail = res.data + console.log(self.activityDetail) }) + }, + getActivityDetailToken: function () { + var self = this + axios.get('http://192.168.0.111:8080/culturalactivity/app/activitylibrary/getactivitylibrarybyid/' + self.$route.params.id, { + headers: { + token: self.token + } + }).then(function (res) { + console.log(res) + res.data.activityImage = res.data.activityImage.split(',') + self.activityDetail = res.data + console.log(self.activityDetail) + }) + }, + signActivity: function () { + var self = this + if (self.token) { + self.signInfo.activityId = self.activityDetail.activityLibraryId + console.log(self.signInfo) + axios.post('http://192.168.0.111:8080/culturalactivity/app/activityuserapply/saveactivityuserapplyrelease', self.signInfo, { + headers: { + token: self.token + } + }).then(function (res) { + console.log(res) + if (res.status === 200) { + self.$layer.msg('报名成功!') + setTimeout(function () { + location.reload() + }, 1500) + } + }) + } else { + self.$layer.msg('请先登录!') + setTimeout(function () { + self.$router.push('/login') + }, 1500) + } + }, + getCode: function () { + var self = this + if (self.signInfo.userPhone) { + axios.get('http://192.168.0.111:8080/culturalactivity/app/activityuserapply/saveSmsCoderelease/' + self.signInfo.userPhone).then(function (res) { + console.log(res) + if (res.status === 200) { + self.restTime = 120 + var timer = setInterval(function () { + self.restTime-- + if (self.restTime === 0) { + clearInterval(timer) + } + }, 1000) + } + }) + } else { + self.$layer.msg('请先输入手机号') + } } }, mounted () { - this.getActivityDetail() + if (this.token) { + this.getActivityDetailToken() + } else { + this.getActivityDetail() + } } } diff --git a/src/pages/CultureDynamics/CultureDynamics.vue b/src/pages/CultureDynamics/CultureDynamics.vue index b57d466..438d857 100644 --- a/src/pages/CultureDynamics/CultureDynamics.vue +++ b/src/pages/CultureDynamics/CultureDynamics.vue @@ -17,9 +17,9 @@
-
- 文化动态 -
+ + +
  • @@ -29,7 +29,7 @@

    {{list.newsContentTitle}}

    {{list.newsContentPublishTime}} - +
@@ -204,71 +204,68 @@ export default { width 1200px margin 20px auto overflow hidden - .dynamics-title - line-height 50px - border-bottom 1px solid #dcdcdc - span - display inline-block - border-bottom 2px solid $main-color - font-size 18px - color $main-color - .dynamics-left - float left - width 730px - .dynamics-list - min-height 500px - ul - li - padding 20px 0 - overflow hidden - cursor pointer - border-bottom solid 1px rgba(63, 63, 63, 0.17) - .dynamics-list-left - float left - width 240px - margin-right 10px - img - width 240px - height 160px - .dynamics-list-right - float right - width 480px - h3 - font-size 18px - color #565656 - white-space nowrap + .dynamics-list + min-height 500px + ul + li + width: 280px; + box-shadow: 0px 0px 10px 0px rgba(176,176,176,0.3); + box-sizing: border-box; + float: left; + margin-right: 25px; + margin-bottom: 25px; + cursor: pointer; + &:nth-child(4n) + margin-right 0 + &:hover + box-shadow 0px 0px 20px 0px rgba(176,176,176,0.9) + .dynamics-list-left + width 100% + height 185px + img + width 100% + height 100% + .dynamics-list-right + padding 10px 20px + text-align center + h3 + font-size 18px + color #565656 + white-space nowrap + overflow hidden + text-overflow: ellipsis + p + font-size 14px + color #565656 + line-height 25px + &.desc + height 50px overflow hidden - text-overflow: ellipsis - margin-bottom 10px - p - font-size 14px - color #565656 - line-height 25px - &.desc - height 50px - overflow hidden - span - display block - font-size 14px - color #a8a8a8 - line-height 25px - margin 10px 0 - button - width 70px - height: 25px - text-align center - line-height 25px - border none - outline none - background $main-color - color #fff - font-size 12px - border-radius 4px - .no-data - padding 80px 0 - text-align center - img - width 200px + span + display block + font-size 14px + color #a8a8a8 + line-height 25px + button + width 70px + height: 25px + text-align center + line-height 25px + border none + outline none + background $main-color + color #fff + font-size 12px + border-radius 4px + &:after + content '' + display block + clear both + .no-data + padding 80px 0 + text-align center + img + width 200px .pager width 1200px margin 20px auto diff --git a/src/pages/Exhibition/Exhibition.vue b/src/pages/Exhibition/Exhibition.vue index 8846720..e5e0d3d 100644 --- a/src/pages/Exhibition/Exhibition.vue +++ b/src/pages/Exhibition/Exhibition.vue @@ -167,7 +167,7 @@ export default { overflow hidden li width 280px - border 1px solid #a8a8a8 + box-shadow 0px 0px 10px 0px rgba(176,176,176,0.3) box-sizing border-box float left margin-right 25px @@ -175,6 +175,8 @@ export default { cursor pointer &:nth-child(4n) margin-right 0 + &:hover + box-shadow 0px 0px 20px 0px rgba(176,176,176,0.9) .exhibition-img width 100% height 185px diff --git a/src/pages/Index/components/DigitalResource.vue b/src/pages/Index/components/DigitalResource.vue index 04b42bf..e6356f9 100644 --- a/src/pages/Index/components/DigitalResource.vue +++ b/src/pages/Index/components/DigitalResource.vue @@ -3,7 +3,7 @@
民间文学 Folk Literature - MORE>> + MORE>>
diff --git a/src/pages/Index/components/IndexService.vue b/src/pages/Index/components/IndexService.vue index 4cbe758..0210455 100644 --- a/src/pages/Index/components/IndexService.vue +++ b/src/pages/Index/components/IndexService.vue @@ -3,7 +3,7 @@
文化活动 Cultural Activity - MORE>> + MORE>>
    @@ -70,19 +70,22 @@ export default { .service-content margin-top 15px .service-container - overflow hidden + &:after + display block + content: '' + clear both .service-list float left width 280px box-sizing border-box - border 1px solid #a8a8a8 + box-shadow:0px 0px 10px 0px rgba(176,176,176,0.3); margin-right 26px cursor pointer margin-bottom 26px &:nth-child(4n) margin-right 0 &:hover - background #eee + box-shadow:0px 0px 20px 0px rgba(176,176,176,0.9); .service-img-box width 100% height 0 diff --git a/src/pages/Index/components/IndexVideo.vue b/src/pages/Index/components/IndexVideo.vue index 97e5c51..55c58af 100644 --- a/src/pages/Index/components/IndexVideo.vue +++ b/src/pages/Index/components/IndexVideo.vue @@ -64,15 +64,20 @@ export default { width 1200px margin 20px auto ul - overflow hidden + &:after + content: '' + display block + clear both li width 280px - border 1px solid #a8a8a8 + box-shadow:0px 0px 10px 0px rgba(176,176,176,0.3); box-sizing border-box float left margin-right 25px margin-bottom 25px cursor pointer + &:hover + box-shadow:0px 0px 20px 0px rgba(176,176,176,0.9); &:nth-child(4n) margin-right 0 .exhibition-img diff --git a/src/pages/IntangibleHeritage/IntangibleHeritage.vue b/src/pages/IntangibleHeritage/IntangibleHeritage.vue index 83ef66b..d7232c2 100644 --- a/src/pages/IntangibleHeritage/IntangibleHeritage.vue +++ b/src/pages/IntangibleHeritage/IntangibleHeritage.vue @@ -22,10 +22,11 @@ 序号 编号 名称 - 公布时间 + 公布时间 类型 - 申报地区或单位 + 申报地区或单位 保护单位 + 操作 @@ -37,13 +38,14 @@ {{list.libraryTypeValue}} {{list.libraryArea}} {{list.libraryAuthor}} + 查看详情
- 首页 - 上一页 + 首页 + 上一页
  • {{cpage}} @@ -60,11 +62,11 @@ {{page.currentPage - (3 - cpage)}}
- 下一页 - 尾页 - - /{{page.totalPage}}页 - + 下一页 + 尾页 + + +
@@ -165,6 +167,12 @@ export default { overflow hidden text-overflow ellipsis padding 0 5px + .go-detail + display inline-block + padding 5px + background $main-color + color #fff + border-radius 3px .pager width 1200px margin 20px auto @@ -216,7 +224,7 @@ export default { button border none outline none - background #4792C2 + background $main-color width 50px height 25px vertical-align middle diff --git a/src/pages/PersonCenter/PersonCenter.vue b/src/pages/PersonCenter/PersonCenter.vue index 66e2a29..7ba1141 100644 --- a/src/pages/PersonCenter/PersonCenter.vue +++ b/src/pages/PersonCenter/PersonCenter.vue @@ -11,6 +11,7 @@
  • 团队注册
  • 我的团队
  • 其他团队
  • +
  • 我的活动
  • @@ -453,6 +454,54 @@
    +
    +
    + 我的活动 +
    +
    + + + + + + + + + + + + + + + +
    序号活动名称活动开始时间活动结束时间操作
    {{idx+1}}{{list.activityTitle}}{{list.startTime}}{{list.endTime}} + 查看详情 + +
    +
    + 首页 + 上一页 +
      +
    • + {{cpage}} +
    • +
    +
      +
    • + {{cpage}} +
    • +
    • + {{page.totalPage - 5 + cpage}} +
    • +
    • + {{page.page - (3 - cpage)}} +
    • +
    + 下一页 + 尾页 +
    +
    +
    @@ -518,7 +567,8 @@ export default { memberList: [], otherTeam: [], checkOtherTeam: false, - otherTeamDetail: [] + otherTeamDetail: [], + signedActivity: [] } }, computed: { @@ -537,6 +587,8 @@ export default { this.getTeamMember() } else if (this.tab === 6) { this.getOtherTeamList() + } else if (this.tab === 7) { + this.initSignedActivity() } }, // 切换选项卡 @@ -556,7 +608,11 @@ export default { } else if (tab === 4) { this.getVolunteerArea() } else if (tab === 6) { + this.page.rows = 10 this.getOtherTeamList() + } else if (tab === 7) { + this.page.rows = 10 + this.initSignedActivity() } }, // 获取场馆,按门票 @@ -582,14 +638,20 @@ export default { // 取消预约 cancelBook: function (id) { var self = this - axios.delete('http://192.168.0.109:8082/venuebooking/app/booking/removemyticket/' + id, { - headers: { - token: self.token - } - }).then(function (res) { - if (res.status === 200) { - self.$layer.msg('取消成功') - self.getVenueTicket() + self.$layer.open({ + content: '确认要取消该订单吗?', + yes: function () { + axios.delete('http://192.168.0.109:8082/venuebooking/app/booking/removemyticket/' + id, { + headers: { + token: self.token + } + }).then(function (res) { + if (res.status === 200) { + self.$layer.closeAll() + self.$layer.msg('取消成功') + self.getVenueTicket() + } + }) } }) }, @@ -822,14 +884,20 @@ export default { // 修改志愿者信息 updateVolunteer: function () { var self = this - axios.put('http://192.168.0.111:8888/volunteer/app/volunteer/updatevolunteer/' + self.volunteerId, self.volunteerRegisterInfo, { - headers: { - token: self.token - } - }).then(function (res) { - if (res.status === 200) { - self.$layer.msg('修改成功!') - self.getVolunteerInfo() + self.$layer.open({ + content: '确认修改?', + yes: function () { + axios.put('http://192.168.0.111:8888/volunteer/app/volunteer/updatevolunteer/' + self.volunteerId, self.volunteerRegisterInfo, { + headers: { + token: self.token + } + }).then(function (res) { + if (res.status === 200) { + self.getVolunteerInfo() + self.$layer.closeAll() + self.$layer.msg('修改成功!') + } + }) } }) }, @@ -879,15 +947,21 @@ export default { // 解散团队 dissolveTeam: function (id) { var self = this - axios.put('http://192.168.0.111:8888/volunteer/app/team/updateteam/' + id, { - status: 0 - }, { - headers: { - token: self.token + self.$layer.open({ + content: '确认要解散该团队?', + yes: function () { + axios.put('http://192.168.0.111:8888/volunteer/app/team/updateteam/' + id, { + status: 0 + }, { + headers: { + token: self.token + } + }).then(function (res) { + self.$layer.closeAll() + self.$layer.msg('解散成功!') + self.getMyTeam() + }) } - }).then(function (res) { - self.$layer.msg('解散成功!') - self.getMyTeam() }) }, // 查看团队详情 @@ -957,17 +1031,23 @@ export default { // 申请加入团队 applyJoin: function (id) { var self = this - axios.post('http://192.168.0.111:8888/volunteer/app/teammember/saveteammember', { - teamId: id - }, { - headers: { - token: self.token - } - }).then(function (res) { - console.log(res) - if (res.status === 200) { - self.$layer.msg('申请成功!') - self.getOtherTeamList() + self.$layer.open({ + content: '确认加入该团队?', + yes: function () { + axios.post('http://192.168.0.111:8888/volunteer/app/teammember/saveteammember', { + teamId: id + }, { + headers: { + token: self.token + } + }).then(function (res) { + console.log(res) + if (res.status === 200) { + self.$layer.closeAll() + self.$layer.msg('申请成功!') + self.getOtherTeamList() + } + }) } }) }, @@ -981,18 +1061,62 @@ export default { // 审批加入/驳回 isAgreeJoin: function (id, type) { var self = this - axios.put('http://192.168.0.111:8888/volunteer/app/teammember/updateteammember/' + id, { - status: type - }, { + var msg = '' + if (type === 1) { + msg = '确认同意此人加入团队?' + } else { + msg = '确认驳回此申请?' + } + self.$layer.open({ + content: msg, + yes: function () { + axios.put('http://192.168.0.111:8888/volunteer/app/teammember/updateteammember/' + id, { + status: type + }, { + headers: { + token: self.token + } + }).then(function (res) { + self.$layer.closeAll() + if (type === 1) { + self.$layer.msg('审核通过!') + } else { + self.$layer.msg('已驳回!') + } + }) + } + }) + }, + // 获取已报名的活动列表 + initSignedActivity: function () { + var self = this + axios.get('http://192.168.0.111:8080/culturalactivity/app/activityuserapply/myjoinactivity', { headers: { token: self.token } }).then(function (res) { console.log(res) - if (type === 1) { - self.$layer.msg('审核通过!') - } else { - self.$layer.msg('已驳回!') + self.signedActivity = res.data.rows + self.totalPage = Math.ceil(res.data.total / self.page.rows) + }) + }, + // 取消报名活动 + cancelActivity: function (id) { + var self = this + self.$layer.open({ + content: '确认要取消此活动的报名吗?', + yes: function () { + axios.get('http://192.168.0.111:8080/culturalactivity/app/activityuserapply/cancelapply/' + id, { + headers: { + token: self.token + } + }).then(function (res) { + console.log(res) + self.$layer.closeAll() + self.$layer.msg('取消报名成功') + self.page.page = 1 + self.initSignedActivity() + }) } }) } @@ -1118,8 +1242,10 @@ export default { border-radius 3px label cursor pointer - .iconfont.active - color $main-color + .iconfont + color #e0e0e0 + &.active + color $main-color .radio-box display inline-block margin-right 30px @@ -1311,6 +1437,9 @@ export default { padding 0 5px text-align center border-bottom 1px solid #DEDEDE + white-space nowrap + overflow hidden + text-overflow ellipsis button background none border none @@ -1387,7 +1516,13 @@ export default { .back-list font-size 20px margin-top 10px - padding-left 20px + width 120px + height 40px + border-radius 3px + background $main-color + color #fff + text-align center + line-height 40px cursor pointer .team-avatar-name margin 20px 0 10px @@ -1457,6 +1592,29 @@ export default { width 48% &.bad background #DEDEDE +.my-activity-box + table + table-layout fixed + width 100% + td + font-size 16px + color #0a0a0a + height 35px + text-align center + border 1px solid #DEDEDE + white-space nowrap + overflow hidden + text-overflow ellipsis + padding 0 5px + button + background $main-color + border none + outline none + font-size 16px + color #fff + border-radius 3px + cursor pointer + height 25px input[type="number"]{ -moz-appearance: textfield; } input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; } diff --git a/src/pages/Resource/Resource.vue b/src/pages/Resource/Resource.vue index f4b51d7..1d1bc9a 100644 --- a/src/pages/Resource/Resource.vue +++ b/src/pages/Resource/Resource.vue @@ -136,6 +136,7 @@ export default {