diff --git a/src/common/components/Header.vue b/src/common/components/Header.vue index 33e85e1..02abf52 100644 --- a/src/common/components/Header.vue +++ b/src/common/components/Header.vue @@ -124,7 +124,7 @@ export default { }, checkLogin: function () { var self = this - var token = localStorage.getItem('token') + var token = window.sessionStorage.getItem('token') if (token) { axios.get('http://192.168.0.113:7001/usercenter/app/user/getappuser', { headers: { diff --git a/src/pages/CultureVenueDetail/CultureVenueDetail.vue b/src/pages/CultureVenueDetail/CultureVenueDetail.vue index c1d6f4f..bfb9912 100644 --- a/src/pages/CultureVenueDetail/CultureVenueDetail.vue +++ b/src/pages/CultureVenueDetail/CultureVenueDetail.vue @@ -153,7 +153,7 @@ export default { changeTab: function (tab) { var self = this if (tab > 1) { - var token = localStorage.getItem('token') + var token = window.sessionStorage.getItem('token') if (token) { this.tab = tab } else { @@ -364,7 +364,7 @@ export default { phoneNumber: this.verificationCodeInfo.phone, smsCode: this.verificationCodeInfo.verificationCode } - var token = localStorage.getItem('token') + var token = window.sessionStorage.getItem('token') axios.post('http://192.168.0.109:8082/venuebooking/app/booking/savebookinginfo', orderInfo, { headers: { 'token': token diff --git a/src/pages/Login/Login.vue b/src/pages/Login/Login.vue index d425c48..42589b8 100644 --- a/src/pages/Login/Login.vue +++ b/src/pages/Login/Login.vue @@ -47,7 +47,7 @@ export default { } }).then(function (res) { if (res.status === 200) { - localStorage.setItem('token', res.data.data) + window.sessionStorage.setItem('token', res.data.data) self.$layer.msg('登录成功') setTimeout(function () { self.$router.go(-1) diff --git a/src/pages/PersonCenter/PersonCenter.vue b/src/pages/PersonCenter/PersonCenter.vue index c9fb58c..66e2a29 100644 --- a/src/pages/PersonCenter/PersonCenter.vue +++ b/src/pages/PersonCenter/PersonCenter.vue @@ -10,6 +10,7 @@
  • 志愿者注册
  • 团队注册
  • 我的团队
  • +
  • 其他团队
  • @@ -120,9 +121,6 @@ 下一页 尾页 - - /{{page.totalPage}}页 -
    @@ -229,7 +227,7 @@ 我的团队
    - +
    @@ -252,7 +250,7 @@
    序号 团队名称
    -
    +
    首页 上一页
      @@ -273,9 +271,6 @@
    下一页 尾页 - - /{{page.totalPage}}页 -
    @@ -297,6 +292,124 @@
    +
    +

    团队成员

    + + + + + + + + + + + + + + +
    序号姓名加入时间成员类型
    {{idx+1}}{{mumber.memberName}}{{mumber.inputTime}} + 成员 + 队长 + + 申请加入 + + +
    +

    暂无成员

    +
    + 首页 + 上一页 +
      +
    • + {{cpage}} +
    • +
    +
      +
    • + {{cpage}} +
    • +
    • + {{page.totalPage - 5 + cpage}} +
    • +
    • + {{page.page - (3 - cpage)}} +
    • +
    + 下一页 + 尾页 +
    +
    +
    + +
    +
    + 其他团队 +
    +
    + + + + + + + + + + + + + + + +
    序号团队名团队口号所属区域操作
    {{idx+1}}{{list.teamName}}{{list.teamWatchword}}{{list.teamAreaDictionaryName}} + + + + +
    +
    + 首页 + 上一页 +
      +
    • + {{cpage}} +
    • +
    +
      +
    • + {{cpage}} +
    • +
    • + {{page.totalPage - 5 + cpage}} +
    • +
    • + {{page.page - (3 - cpage)}} +
    • +
    + 下一页 + 尾页 +
    +
    +
    +
    返回
    +
    + {{teamDetail.teamName}} +
    +
    + + + + + + + + + + + +
    团队口号{{teamDetail.teamWatchword}}所属区域{{teamDetail.teamAreaDictionaryName}}
    团队介绍
    +

    团队成员

    @@ -377,7 +490,7 @@ export default { rows: 3, totalPage: 1 }, - token: localStorage.getItem('token'), + token: window.sessionStorage.getItem('token'), history: [], isVolunteer: false, volunteerArea: [], @@ -402,7 +515,10 @@ export default { myTeam: [], checkTeamDetail: false, teamDetail: {}, - memberList: [] + memberList: [], + otherTeam: [], + checkOtherTeam: false, + otherTeamDetail: [] } }, computed: { @@ -411,10 +527,6 @@ export default { } }, methods: { - doJumpPage: function () { - this.page.page = this.changePage - this.getNews() - }, paging: function (page) { this.page.page = page if (this.tab === 2) { @@ -423,6 +535,8 @@ export default { this.getMyTeam() } else if (this.tab === 5 && this.checkTeamDetail) { this.getTeamMember() + } else if (this.tab === 6) { + this.getOtherTeamList() } }, // 切换选项卡 @@ -441,6 +555,8 @@ export default { this.getMyTeam() } else if (tab === 4) { this.getVolunteerArea() + } else if (tab === 6) { + this.getOtherTeamList() } }, // 获取场馆,按门票 @@ -501,7 +617,7 @@ export default { token: self.token } }).then(function (res) { - localStorage.setItem('token', res.data.data) + window.sessionStorage.setItem('token', res.data.data) self.$layer.msg('保存成功') setTimeout(function () { location.reload() @@ -744,8 +860,13 @@ export default { // 获取我的团队列表 getMyTeam: function () { var self = this + var info = { + page: self.page.page, + rows: self.page.rows, + myTeam: true + } axios.get('http://192.168.0.111:8888/volunteer/app/team/myjointeam', { - params: self.page, + params: info, headers: { token: self.token } @@ -774,7 +895,11 @@ export default { var self = this self.page.page = 1 self.page.rows = 4 - self.checkTeamDetail = true + if (self.tab === 5) { + self.checkTeamDetail = true + } else if (self.tab === 6) { + self.checkOtherTeam = true + } axios.get('http://192.168.0.111:8888/volunteer/app/team/getteambyid/' + id, { headers: { token: self.token @@ -809,6 +934,67 @@ export default { this.page.page = 1 this.page.rows = 7 this.getMyTeam() + }, + // 获取其他团队列表 + getOtherTeamList: function () { + var self = this + var info = { + page: self.page.page, + rows: self.page.rows, + otherTeam: true + } + axios.get('http://192.168.0.111:8888/volunteer/app/team/otherteamm', { + params: info, + headers: { + token: self.token + } + }).then(function (res) { + console.log(res) + self.otherTeam = res.data.rows + self.page.totalPage = Math.ceil(res.data.total / self.page.rows) + }) + }, + // 申请加入团队 + 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() + } + }) + }, + // 返回其他团队列表 + backToOtherTeam: function () { + this.checkOtherTeam = false + this.page.rows = 10 + this.page.page = 1 + this.getOtherTeamList() + }, + // 审批加入/驳回 + isAgreeJoin: function (id, type) { + var self = this + axios.put('http://192.168.0.111:8888/volunteer/app/teammember/updateteammember/' + id, { + status: type + }, { + headers: { + token: self.token + } + }).then(function (res) { + console.log(res) + if (type === 1) { + self.$layer.msg('审核通过!') + } else { + self.$layer.msg('已驳回!') + } + }) } }, mounted: function () { @@ -1235,6 +1421,42 @@ export default { padding 0 5px &:nth-child(odd) text-align center + button + border none + outline none + background $main-color + border-radius 3px + color #ffffff + margin-left 5px + cursor pointer + height 30px + vertical-align middle +.other-team-box + margin-top 20px + table + table-layout fixed + width 100% + td + font-size 16px + color #0a0a0a + border 1px solid #DEDEDE + text-align center + height 40px + padding 0 5px + white-space nowrap + overflow hidden + text-overflow ellipsis + button + background $main-color + color #ffffff + border none + outline none + border-radius 3px + cursor pointer + height 30px + width 48% + &.bad + background #DEDEDE input[type="number"]{ -moz-appearance: textfield; } input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; } diff --git a/src/pages/VolunteerDetail/VolunteerDetail.vue b/src/pages/VolunteerDetail/VolunteerDetail.vue index 8b7c147..4699ea0 100644 --- a/src/pages/VolunteerDetail/VolunteerDetail.vue +++ b/src/pages/VolunteerDetail/VolunteerDetail.vue @@ -154,7 +154,7 @@ export default { }, myTeam: [], showSelectTeam: false, - token: localStorage.getItem('token'), + token: window.sessionStorage.getItem('token'), comment: [], commentText: '' }