4 files added
5 files modified
| | |
| | | "pages/publicSnapshot/publicSnapshot", |
| | | "pages/scanEvildoing/scanEvildoing", |
| | | "pages/messageNotification/messageNotification", |
| | | "pages/myTranslate/myTranslate", |
| | | "pages/scanEvildoingInfo/scanEvildoingInfo", |
| | | "pages/complaintAdvice/complaintAdvice", |
| | | "pages/videoPreview/videoPreview", |
| | |
| | | */ |
| | | data: { |
| | | loading: false, |
| | | peopleInfo: {} |
| | | peopleInfo: {}, |
| | | signStatus: '', |
| | | }, |
| | | |
| | | /** |
| | |
| | | var that = this; |
| | | that.setData({ |
| | | id: options.id, |
| | | flag: options.flag, |
| | | signStatus: options.signStatus || '', |
| | | flag: options.flag || '', |
| | | loading: true |
| | | }); |
| | | wx.showLoading({ |
| | |
| | | activity: res.data.data |
| | | }) |
| | | console.log('传过来', options.flag) |
| | | console.log('传过来', options.signStatus) |
| | | // 处理报名状态 |
| | | if (options.signStatus) { |
| | | that.setData({ |
| | | signStatus: options.signStatus |
| | | }) |
| | | } else { |
| | | if (options.flag == 'true') { |
| | | //可报名 |
| | | console.log('可报名') |
| | |
| | | statusWord: '您已报名' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 签到 |
| | | sign: function () { |
| | | // 只允许从相机扫码 |
| | | wx.scanCode({ |
| | | onlyFromCamera: true, |
| | | success(res) { |
| | | console.log(res) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 返回 |
| | | goBack: function () { |
| | | wx.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | }, |
| | | |
| | | // 提交报名 |
| | | submit: function() { |
| | | var peopleInfo = this.data.peopleInfo; |
| | |
| | | </view> |
| | | </view> |
| | | <view class="fzpxInfo-main-group"> |
| | | <view class="fzpxInfo-main-group-title">培训对象</view> |
| | | <view class="fzpxInfo-main-group-title">报名要求</view> |
| | | <view class="fzpxInfo-main-group-around">{{activity.requirement}}</view> |
| | | </view> |
| | | <view class="fzpxInfo-main-group" style="display:block;padding: 10rpx 30rpx;"> |
| | |
| | | </view> |
| | | |
| | | <view class="fzpxInfo-foot margin-top"> |
| | | <view wx:if="{{signStatus}}"> |
| | | <view wx:if="{{signStatus == 2}}"> |
| | | <view class="fzpxInfo-foot-button bg-grey" bindtap='sign'>签到</view> |
| | | </view> |
| | | |
| | | <view wx:else> |
| | | <view class="fzpxInfo-foot-button bg-grey" bindtap='goBack'>返回</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view wx:else> |
| | | <!-- <view class="fzpxInfo-foot-title">报名须知</view> |
| | | <view class="fzpxInfo-foot-txt">请确认所有参赛人员的排列顺序。相关信息会在参赛证件、参赛证明、获取证书等重要比赛文件中提现。</view> |
| | | <view class="fzpxInfo-foot-txt">由于参赛队信息填报原因产生的任何错误,在相关文件完成制作后一律不予修改;</view> --> |
| | |
| | | <view class="fzpxInfo-foot-button bg-grey" wx:else>报名人数已满</view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view> |
| | | |
| | | </view> |
| | |
| | | }) |
| | | }, |
| | | |
| | | myTranslate: function() { |
| | | wx.navigateTo({ |
| | | url: '../myTranslate/myTranslate', |
| | | }) |
| | | }, |
| | | |
| | | onLoad: function() { |
| | | this.notification(); |
| | | }, |
| | |
| | | <image class="me-business-right-icon" src="{{user}}" /> |
| | | </div> |
| | | |
| | | <div class="me-business-nav" bindtap="myTranslate"> |
| | | <image class="me-business-icon" src="{{xxtx}}" /> |
| | | <div class="me-business-title">我的活动</div> |
| | | <block wx:if="{{notRead > 0}}"> |
| | | <div class="me-business-info">{{notRead}}</div> |
| | | </block> |
| | | |
| | | <image class="me-business-right-icon" src="{{user}}" /> |
| | | </div> |
| | | |
| | | <div class="me-business-nav" bindtap="msg"> |
| | | <image class="me-business-icon" src="{{xxtx}}" /> |
| | | <div class="me-business-title">消息提醒</div> |
New file |
| | |
| | | // pages/businessSchedule/businessSchedule.js |
| | | const app = getApp() |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | loading: app.globalData.imgUrl + '/image/loading.svg', |
| | | navbar: ['全部', '未开始', '进行中', '已完成'], |
| | | currentTab: 0, |
| | | size: 10, |
| | | size1: 10, |
| | | size2: 10, |
| | | size3: 10, |
| | | content: '------加载中------', |
| | | hasMoreData: true, |
| | | createTime: '', |
| | | dataSet: [] |
| | | }, |
| | | |
| | | navbarTap: function (e) { |
| | | this.setData({ |
| | | currentTab: e.currentTarget.dataset.idx |
| | | }) |
| | | this.showList(this.data.currentTab) |
| | | |
| | | }, |
| | | |
| | | showList: function (tab) { |
| | | var userinfo = wx.getStorageSync("user"); |
| | | var that = this; |
| | | var id = userinfo.id |
| | | var str; |
| | | var sizeQty; |
| | | switch (tab) { |
| | | case 0: |
| | | str = "&status="; |
| | | sizeQty = 'size'; |
| | | break; |
| | | case 1: |
| | | str = "&status=1"; |
| | | sizeQty = 'size1'; |
| | | break; |
| | | case 2: |
| | | str = "&status=2"; |
| | | sizeQty = 'size2'; |
| | | break; |
| | | case 3: |
| | | str = "&status=3"; |
| | | sizeQty = 'size3'; |
| | | break; |
| | | } |
| | | wx.request({ |
| | | url: app.globalData.url + '/api/activity/myActivities?page=1&size=' + that.data[sizeQty] + '&userId=' + id + str, |
| | | success: function (res) { |
| | | if (res.data.code == 0) { |
| | | (res.data.data.content).forEach(e => { |
| | | (e.createTime) = app.formatDate(e.createTime) |
| | | switch (e.activityType) { |
| | | case 'act_1': |
| | | e.activityType = '南检活动'; |
| | | break; |
| | | case 'act_2': |
| | | e.activityType = '法治培训'; |
| | | break; |
| | | case 'act_3': |
| | | e.activityType = '基地参观'; |
| | | break; |
| | | } |
| | | |
| | | |
| | | }); |
| | | if (res.data.data.totalElements < that.data[sizeQty]) { |
| | | that.setData({ |
| | | dataSet: res.data.data.content, |
| | | hasMoreData: false, |
| | | content: '------我是有底线的------' |
| | | }) |
| | | } else { |
| | | that.setData({ |
| | | dataSet: res.data.data.content, |
| | | hasMoreData: true, |
| | | content: '------加载更多------', |
| | | [sizeQty]: that.data[sizeQty] + 10 |
| | | }) |
| | | } |
| | | } else { |
| | | wx.showModal({ |
| | | title: '提示', |
| | | content: "请求失败!" |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | businessSchedule: function (event) { |
| | | var id = event.currentTarget.id; |
| | | var activityType = this.data.dataSet[id].activityType; |
| | | var signStatus = this.data.dataSet[id].signStatus; |
| | | var id = this.data.dataSet[id].id; |
| | | |
| | | console.log(activityType) |
| | | console.log(signStatus); |
| | | if (activityType == "法治培训") { |
| | | wx.navigateTo({ |
| | | url: '../fzpxInfo/fzpxInfo?id=' + id + '&signStatus=' + signStatus, |
| | | }) |
| | | } else if (activityType == "南检活动") { |
| | | wx.navigateTo({ |
| | | url: '../scanEvildoing/scanEvildoing?id=' + businessId, |
| | | }) |
| | | } else if (activityType == "基地参观") { |
| | | wx.navigateTo({ |
| | | url: '../complaintAdvice/complaintAdvice?id=' + businessId, |
| | | }) |
| | | } else { |
| | | wx.showModal({ |
| | | title: '提示', |
| | | content: "文件错误!" |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | onLoad: function () { |
| | | this.showList(0) |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom: function () { |
| | | if (this.data.hasMoreData) { |
| | | this.showList(this.data.currentTab) |
| | | this.setData({ |
| | | content: '------加载更多------' |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | content: '------我是有底线的------' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "我的活动", |
| | | "backgroundTextStyle": "light", |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black" |
| | | } |
New file |
| | |
| | | <!--pages/myTranslate/myTranslate.wxml--> |
| | | <!--导航条--> |
| | | <view class="navbar"> |
| | | <text wx:for="{{navbar}}" data-idx="{{index}}" class="item {{currentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="navbarTap">{{item}}</text> |
| | | </view> |
| | | |
| | | <!--列表数据--> |
| | | <view style='flex-direction:column;height:94vh;background-color:rgba(80, 119, 170, 0.06)'> |
| | | <div class="businessSchedule" bindtap='businessSchedule' id="{{key}}" wx:for="{{dataSet}}" wx:for-index='key' wx:key="*this"> |
| | | <div class="businessSchedule-top"> |
| | | <div class="businessSchedule-top-img"> |
| | | <image src="{{item.iconSrc}}" class="businessSchedule-top-img"></image> |
| | | </div> |
| | | <div class="businessSchedule-top-title">{{item.activityType}}</div> |
| | | <div class="businessSchedule-top-status backgroundorange-title" wx:if="{{item.signStatus==1}}">未审核</div> |
| | | <div class="businessSchedule-top-status backgroundorange-title" wx:if="{{item.signStatus==2}}">未签到</div> |
| | | <div class="businessSchedule-top-status backgroundorange-title" wx:if="{{item.signStatus==3}}">已签到</div> |
| | | <div class="businessSchedule-top-status backgroundorange-title" wx:if="{{item.signStatus==4}}">不通过</div> |
| | | <div class="businessSchedule-top-status backgroundgreen-title" wx:if="{{item.signStatus==99}}">取消</div> |
| | | </div> |
| | | <div class="businessSchedule-center">{{item.activityDese}}</div> |
| | | <div class="businessSchedule-bottom">于 {{item.createTime}} 提交申请</div> |
| | | </div> |
| | | <div class="businessSchedule-load">------{{content}}------</div> |
| | | </view> |
| | | |
New file |
| | |
| | | /* pages/myTranslate/myTranslate.wxss */ |
| | | view { |
| | | display: flex; |
| | | } |
| | | |
| | | .navbar { |
| | | flex: none; |
| | | display: flex; |
| | | background: #fff; |
| | | font-size: 18px; |
| | | color: #999; |
| | | height: 6vh; |
| | | } |
| | | |
| | | .navbar .item { |
| | | position: relative; |
| | | flex: auto; |
| | | text-align: center; |
| | | line-height: 80rpx; |
| | | } |
| | | |
| | | .navbar .item.active { |
| | | color: #2195ff; |
| | | } |
| | | |
| | | .navbar .item.active:after { |
| | | content: ""; |
| | | display: block; |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | height: 4rpx; |
| | | background: #2195ff; |
| | | } |
| | | |
| | | .businessSchedule { |
| | | font-size: 16px; |
| | | padding: 2vh; |
| | | margin: 2vh; |
| | | background-color: #fff; |
| | | box-shadow: 0px 6px 6px 0 rgba(80, 119, 170, 0.06); |
| | | } |
| | | |
| | | .businessSchedule-top { |
| | | display: flex; |
| | | color: #333; |
| | | align-items: center; |
| | | padding-bottom: 1vh; |
| | | border-bottom: 1px solid #f2f2f2; |
| | | } |
| | | |
| | | .businessSchedule-top-img { |
| | | width: 3vh; |
| | | height: 3vh; |
| | | } |
| | | |
| | | .businessSchedule-top-title { |
| | | padding-left: 1vh; |
| | | } |
| | | |
| | | .businessSchedule-top-status { |
| | | margin-left: auto; |
| | | display: flex; |
| | | justify-content: center; |
| | | box-shadow: 0px 4px 8px 0px rgba(136, 136, 136, 0.11); |
| | | padding: 1vh; |
| | | border-radius: 18px; |
| | | color: #fff; |
| | | } |
| | | |
| | | .businessSchedule-center { |
| | | font-size: 14px; |
| | | display: flex; |
| | | padding: 1vh 0; |
| | | color: #333; |
| | | } |
| | | |
| | | .businessSchedule-bottom { |
| | | display: flex; |
| | | font-size: 14px; |
| | | color: #999; |
| | | } |
| | | |
| | | .loading { |
| | | padding: 10rpx; |
| | | text-align: center; |
| | | } |
| | | |
| | | .loading:before { |
| | | display: inline-block; |
| | | margin-right: 5rpx; |
| | | vertical-align: middle; |
| | | content: ''; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | background-size: contain; |
| | | animation: rotate 1s linear infinite; |
| | | } |
| | | |
| | | .loading.complete:before { |
| | | display: none; |
| | | } |
| | | |
| | | .businessSchedule-load { |
| | | display: flex; |
| | | justify-content: center; |
| | | color: #999; |
| | | font-size: 14px; |
| | | margin-bottom: 4vh; |
| | | } |