作者 王智

bug

@@ -63,14 +63,14 @@ App({ @@ -63,14 +63,14 @@ App({
63 63
64 } else if (res.data.code == '40000') { 64 } else if (res.data.code == '40000') {
65 65
66 - // if (url == '/index/second/checkTranStatus') {  
67 - // wx.showModal({  
68 - // title: '提示',  
69 - // content: '请先申请成为志愿者',  
70 - // showCancel: false,  
71 - // }) 66 + if (url == '/index/second/checkTranStatus') {
  67 + wx.showModal({
  68 + title: '提示',
  69 + content: '请先申请成为志愿者',
  70 + showCancel: false,
  71 + })
72 72
73 - // } else 73 + } else
74 74
75 if (url == '/index/second/commitAnswer') { 75 if (url == '/index/second/commitAnswer') {
76 resolve(res.data); 76 resolve(res.data);
@@ -234,11 +234,12 @@ @@ -234,11 +234,12 @@
234 <view class='apply_bottom' wx:if="{{!page_type}}"> 234 <view class='apply_bottom' wx:if="{{!page_type}}">
235 为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。 235 为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
236 </view> 236 </view>
237 -<view wx:if="{{status==1}}">  
238 - <form wx:if="{{!page_type}}" bindsubmit="submit" report-submit='true' class="apply_btn"> 237 +<view wx:if="{{status!==2}}">
  238 + <form wx:if="{{!page_type}}" bindsubmit="submit" report-submit='true' class="apply_btn">
239 <button class="a_btn" form-type="submit" style="">提交</button> 239 <button class="a_btn" form-type="submit" style="">提交</button>
240 </form> 240 </form>
241 </view> 241 </view>
  242 +
242 <view wx:if="{{status==2}}"> 243 <view wx:if="{{status==2}}">
243 <form wx:if="{{!page_type}}" report-submit='true' class="apply_btn"> 244 <form wx:if="{{!page_type}}" report-submit='true' class="apply_btn">
244 <button class="a_btn gray" form-type="submit" style="">提交</button> 245 <button class="a_btn gray" form-type="submit" style="">提交</button>
@@ -60,6 +60,12 @@ Page({ @@ -60,6 +60,12 @@ Page({
60 finaAnswer: this.data.finaAnswer, 60 finaAnswer: this.data.finaAnswer,
61 list: this.data.list 61 list: this.data.list
62 }) 62 })
  63 +
  64 +
  65 + console.log(this.data.list)
  66 +
  67 +
  68 +
63 }, 69 },
64 70
65 // 确认 71 // 确认
@@ -70,6 +76,9 @@ Page({ @@ -70,6 +76,9 @@ Page({
70 let head = { 76 let head = {
71 'XX-Token': wx.getStorageSync('token') 77 'XX-Token': wx.getStorageSync('token')
72 } 78 }
  79 +
  80 +
  81 +
73 let params = { 82 let params = {
74 class_id: that.data.id, 83 class_id: that.data.id,
75 } 84 }
@@ -118,7 +127,7 @@ Page({ @@ -118,7 +127,7 @@ Page({
118 } else { 127 } else {
119 wx.showModal({ 128 wx.showModal({
120 title: '提示', 129 title: '提示',
121 - content: '恭喜', 130 + content: '恭喜您全部答对了',
122 showCancel: false, 131 showCancel: false,
123 success: function (res) { 132 success: function (res) {
124 133
@@ -127,13 +136,6 @@ Page({ @@ -127,13 +136,6 @@ Page({
127 } 136 }
128 } 137 }
129 138
130 -  
131 -  
132 -  
133 -  
134 -  
135 -  
136 -  
137 }).catch((err) => { 139 }).catch((err) => {
138 console.log(err) 140 console.log(err)
139 }) 141 })
@@ -13,10 +13,8 @@ @@ -13,10 +13,8 @@
13 <image src="/imgs/cuowu-3@2x.png" wx:if='{{item.choose==idx}}'></image> 13 <image src="/imgs/cuowu-3@2x.png" wx:if='{{item.choose==idx}}'></image>
14 </block> 14 </block>
15 </view> 15 </view>
16 -  
17 </view> 16 </view>
18 </radio-group> 17 </radio-group>
19 -  
20 </view> 18 </view>
21 </view> 19 </view>
22 <view class="shengqin"> 20 <view class="shengqin">
@@ -7,7 +7,8 @@ Page({ @@ -7,7 +7,8 @@ Page({
7 data: { 7 data: {
8 nav: 1, 8 nav: 1,
9 navs: 1, 9 navs: 1,
10 - list:'' 10 + list:'',
  11 + datalist:''
11 }, 12 },
12 onLoad: function (options) { 13 onLoad: function (options) {
13 }, 14 },
@@ -18,7 +19,7 @@ Page({ @@ -18,7 +19,7 @@ Page({
18 let that = this; 19 let that = this;
19 that.getList(); 20 that.getList();
20 }, 21 },
21 - // 列表 22 + //活动列表
22 getList() { 23 getList() {
23 24
24 let that = this; 25 let that = this;
@@ -39,6 +40,29 @@ Page({ @@ -39,6 +40,29 @@ Page({
39 40
40 }) 41 })
41 }, 42 },
  43 + //完成列表
  44 + getListend() {
  45 +
  46 + let that = this;
  47 + let url = '/index/second/commitList';
  48 + let head = {
  49 + 'XX-Token': wx.getStorageSync('token')
  50 + }
  51 + let d = {
  52 + status:that.data.nav-1
  53 + }
  54 +
  55 + console.log(d)
  56 + app.post(url, d, head).then((res) => {
  57 + console.log(res)
  58 + that.setData({
  59 + datalist: res
  60 + })
  61 +
  62 + }).catch((err) => {
  63 +
  64 + })
  65 + },
42 66
43 67
44 68
@@ -50,6 +74,7 @@ Page({ @@ -50,6 +74,7 @@ Page({
50 nav 74 nav
51 }) 75 })
52 this.getList(); 76 this.getList();
  77 + this.getListend()
53 }, 78 },
54 // 导航 79 // 导航
55 bindtype(e) { 80 bindtype(e) {
@@ -59,13 +59,13 @@ @@ -59,13 +59,13 @@
59 </view> 59 </view>
60 <!--待提交报告 --> 60 <!--待提交报告 -->
61 <view wx:elif="{{nav==2}}"> 61 <view wx:elif="{{nav==2}}">
62 - <view class="myactive_wrap" wx:for="{{list}}"> 62 + <view class="myactive_wrap" wx:for="{{datalist}}">
63 <view class="myactive_time"> 63 <view class="myactive_time">
64 - <image src="/imgs/shijian-19.png"></image>{{item.date}} 64 + <image src="/imgs/shijian-19.png"></image>{{item.start_time}}
65 {{ item.start_clock_time}}-{{item.end_clock_time}} 65 {{ item.start_clock_time}}-{{item.end_clock_time}}
66 </view> 66 </view>
67 <view class="myactive_list"> 67 <view class="myactive_list">
68 - <image src="{{item.activity.thumbnail}}"></image> 68 + <image src="{{item.thumbnail}}"></image>
69 <view class="myactive_name"> 69 <view class="myactive_name">
70 <view>{{item.activity_name}}</view> 70 <view>{{item.activity_name}}</view>
71 <view class="myactive_gps"> 71 <view class="myactive_gps">
@@ -79,14 +79,14 @@ @@ -79,14 +79,14 @@
79 79
80 <!-- 完成的活动 --> 80 <!-- 完成的活动 -->
81 <view wx:elif="{{nav==3}}"> 81 <view wx:elif="{{nav==3}}">
82 - <view class="myactive_wrap" wx:for="{{list}}"> 82 + <view class="myactive_wrap" wx:for="{{datalist}}">
83 <view class="myactive_time"> 83 <view class="myactive_time">
84 - <image src="/imgs/shijian-19.png"></image>{{item.date}} 84 + <image src="/imgs/shijian-19.png"></image>{{item.start_time}}
85 {{ item.start_clock_time}}-{{item.end_clock_time}} 85 {{ item.start_clock_time}}-{{item.end_clock_time}}
86 86
87 </view> 87 </view>
88 <view class="myactive_list"> 88 <view class="myactive_list">
89 - <image src="{{item.activity.thumbnail}}"></image> 89 + <image src="{{item.thumbnail}}"></image>
90 <view class="myactive_name"> 90 <view class="myactive_name">
91 <view>{{item.activity_name}}</view> 91 <view>{{item.activity_name}}</view>
92 <view class="myactive_gps"> 92 <view class="myactive_gps">
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 </view> 7 </view>
8 <view class="my_headitemname"> 8 <view class="my_headitemname">
9 <view class='word'>{{datalist.user.name}}</view> 9 <view class='word'>{{datalist.user.name}}</view>
10 - <view class="word1">{{datalist.user.status}}(待学习)<image src="/imgs/more_gray.png"></image> 10 + <view class="word1 ">{{datalist.user.status}}<image src="/imgs/more_gray.png"></image>
11 </view> 11 </view>
12 <!-- <view class='word'>工时: {{datalist.work_time}}h</view> --> 12 <!-- <view class='word'>工时: {{datalist.work_time}}h</view> -->
13 <view class='star_box'> 13 <view class='star_box'>
@@ -40,7 +40,18 @@ Page({ @@ -40,7 +40,18 @@ Page({
40 }, 40 },
41 41
42 42
  43 + // 提示
  44 + click: function (e) {
  45 + this.setData({
  46 + hiddenName: !this.data.hiddenName
  47 + })
  48 + },
  49 + getcomfirm() {
  50 + wx.navigateTo({
  51 + url: '/pages/apply/apply',
  52 + })
43 53
  54 + },
44 55
45 goindex() { 56 goindex() {
46 wx.switchTab({ 57 wx.switchTab({
1 -<!-- <view wx:if='{{datalist==""}}'> 1 +<view wx:if='{{datalist==""}}'>
2 <view class='resultimg'> 2 <view class='resultimg'>
3 <image src='https://volunteer.cnpu.org/imgs/dengdaishenhe@2x.png'></image> 3 <image src='https://volunteer.cnpu.org/imgs/dengdaishenhe@2x.png'></image>
4 </view> 4 </view>
@@ -6,101 +6,107 @@ @@ -6,101 +6,107 @@
6 <navigator class='start_btn' url='/pages/apply/apply' hover-class="none">成为志愿者</navigator> 6 <navigator class='start_btn' url='/pages/apply/apply' hover-class="none">成为志愿者</navigator>
7 </view> 7 </view>
8 <view wx:else> 8 <view wx:else>
9 - <view wx:if='{{datalist.status=="3"}}'>  
10 - <view class='resultimg'>  
11 - <image src='https://volunteer.cnpu.org/imgs/kulian@2x.png'></image> 9 +
  10 + <view class="result_wrap" wx:if='{{datalist.status=="2"}}'>
  11 + <view class="result">
  12 + <view></view>
  13 + 审核通过
12 </view> 14 </view>
13 - <view class='result_txt'>审核未通过</view>  
14 - </view>  
15 - <view wx:elif='{{datalist.status=="2"}}'>  
16 - <view class='resultimg'>  
17 - <image src='https://volunteer.cnpu.org/imgs/tongguo@2x.png'></image> 15 + <view class="result_list_wrap">
  16 + <view class="result_left" wx:if="{{list.code==2}}">
  17 + <view class="circle"></view>
  18 + <view class="circle_s"></view>
  19 + <view class="circle_line"></view>
  20 + </view>
  21 + <view class="result_left_red" wx:else>
  22 + <view class="circle_red"></view>
  23 + <view class="circle_s_red"></view>
  24 + <view class="circle_line_red"></view>
  25 + </view>
  26 + <view class="result_list ">
  27 + <view class="">待学习</view>
  28 + <view class="">请在“在线培训”页面完成大于5小时的在线学习</view>
  29 +
  30 + </view>
18 </view> 31 </view>
19 - <view class='result_txt'>审核已通过</view>  
20 - </view>  
21 - <view wx:else>  
22 - <view class='resultimg'>  
23 - <image src='https://volunteer.cnpu.org/imgs/dengdaishenhe@2x.png'></image> 32 + <view class="result_list_wrap">
  33 + <view class="result_left" wx:if="">
  34 + <view class="circle"></view>
  35 + <view class="circle_s"></view>
  36 + <view class="circle_line"></view>
  37 + </view>
  38 + <view class="result_left_red">
  39 + <view class="circle_red"></view>
  40 + <view class="circle_s_red"></view>
  41 + <view class="circle_line_red"></view>
  42 + </view>
  43 + <view class="result_list ">
  44 + <view class="">实习志愿者</view>
  45 + <view class="">请参与志愿者活动,获得10小时工时</view>
  46 + </view>
24 </view> 47 </view>
25 - <view class='result_txt'>待审核</view>  
26 - </view>  
27 - <view class='start_btn' bindtap='goindex'>返回首页</view>  
28 -</view> -->  
29 -  
30 - 48 + <view class="result_list_wrap">
  49 + <view class="result_left" wx:if="">
  50 + <view class="circle"></view>
  51 + <view class="circle_s"></view>
31 52
  53 + </view>
  54 + <view class="result_left_red">
  55 + <view class="circle_red"></view>
  56 + <view class="circle_s_red"></view>
  57 + </view>
  58 + <view class="result_list ">
  59 + <view class="">正式志愿者</view>
  60 + <view class="">正式成为白求恩志愿者</view>
  61 + </view>
32 62
33 -<view class="result_wrap" wx:if='{{datalist.status=="2"}}'>  
34 - <view class="result">  
35 - <view></view>  
36 - 审核通过  
37 - </view>  
38 - <view class="result_list_wrap">  
39 - <view class="result_left" wx:if="{{list.code==2}}">  
40 - <view class="circle"></view>  
41 - <view class="circle_s"></view>  
42 - <view class="circle_line"></view>  
43 - </view>  
44 - <view class="result_left_red" wx:else>  
45 - <view class="circle_red"></view>  
46 - <view class="circle_s_red"></view>  
47 - <view class="circle_line_red"></view>  
48 </view> 63 </view>
49 - <view class="result_list ">  
50 - <view class="">{{list.remark}}</view>  
51 - <view class="">请在“在线培训”页面完成大于5小时的在线学习</view>  
52 64
  65 + <!-- 提示 -->
  66 + <view class="tishi_wrap" hidden="{{hiddenName}}">
  67 + <view class="tishi">
  68 + <view>
  69 + <image src="/imgs/hi@2x.png"></image>
  70 + 欢迎您加入白求恩志愿者队伍!
  71 + </view>
  72 + <image bindtap="click" style="width:20rpx;height:20rpx;" src="/imgs/tishiclear.png"></image>
  73 + </view>
  74 + <view class="tishi_text">接下来,您可以在小程序中在线培训学习,也可以 去了解来自全国各地的白求恩志愿者团队和公益活 动!</view>
53 </view> 75 </view>
  76 +
  77 +
  78 +
  79 +
54 </view> 80 </view>
55 - <view class="result_list_wrap">  
56 - <view class="result_left" wx:if="">  
57 - <view class="circle"></view>  
58 - <view class="circle_s"></view>  
59 - <view class="circle_line"></view>  
60 - </view>  
61 - <view class="result_left_red">  
62 - <view class="circle_red"></view>  
63 - <view class="circle_s_red"></view>  
64 - <view class="circle_line_red"></view>  
65 - </view>  
66 - <view class="result_list ">  
67 - <view class="">实习志愿者</view>  
68 - <view class="">请参与志愿者活动,获得10小时工时</view>  
69 - </view>  
70 - </view>  
71 - <view class="result_list_wrap">  
72 - <view class="result_left" wx:if="">  
73 - <view class="circle"></view>  
74 - <view class="circle_s"></view>  
75 81
  82 + <view class="result_wrap" wx:elif='{{datalist.status=="3"}}'>
  83 + <view class="result">
  84 + <view></view>
  85 + 审核未通过
76 </view> 86 </view>
77 - <view class="result_left_red">  
78 - <view class="circle_red"></view>  
79 - <view class="circle_s_red"></view> 87 + <view class="result_list_wrap">
  88 +
  89 + <view class="result_left_red">
  90 + <view class="circle_red"></view>
  91 + <view class="circle_s_red"></view>
  92 + </view>
  93 + <view class="result_list ">
  94 + <view class="">审核未通过</view>
  95 + <view class="">按要求填写实际信息后重新提交审核</view>
  96 + </view>
80 </view> 97 </view>
81 - <view class="result_list ">  
82 - <view class="">正式志愿者</view>  
83 - <view class="">正式成为白求恩志愿者</view> 98 + </view>
  99 + <view wx:else>
  100 + <view class='resultimg'>
  101 + <image src='https://volunteer.cnpu.org/imgs/dengdaishenhe@2x.png'></image>
84 </view> 102 </view>
  103 + <view class='result_txt'>待审核</view>
  104 + <view class='start_btn' bindtap='goindex'>返回首页</view>
85 105
86 </view> 106 </view>
87 -  
88 </view> 107 </view>
89 108
90 -<view class="result_wrap" wx:if='{{datalist.status=="1"}}'>  
91 - <view class="result">  
92 - <view></view>  
93 - 审核未通过  
94 - </view>  
95 - <view class="result_list_wrap">  
96 109
97 - <view class="result_left_red">  
98 - <view class="circle_red"></view>  
99 - <view class="circle_s_red"></view>  
100 - </view>  
101 - <view class="result_list ">  
102 - <view class="">审核未通过</view>  
103 - <view class="">按要求填写实际信息后重新提交审核</view>  
104 - </view>  
105 - </view> 110 +<view class="shengqin" wx:if='{{datalist.status=="3"}}' >
  111 + <button bindtap="getcomfirm">重新提交志愿者申请</button>
106 </view> 112 </view>
@@ -169,4 +169,57 @@ page { @@ -169,4 +169,57 @@ page {
169 color: #7d7e80; 169 color: #7d7e80;
170 line-height: 40rpx; 170 line-height: 40rpx;
171 171
  172 +}
  173 +/* 提示 */
  174 +.tishi_wrap {
  175 + padding: 24rpx 36rpx;
  176 + margin: 0 32rpx;
  177 + margin-top: 40rpx;
  178 + margin-bottom: 154rpx;
  179 + border-radius: 8px;
  180 + background-color: #ffffff;
  181 +}
  182 +
  183 +.tishi {
  184 + display: flex;
  185 + align-items: center;
  186 + justify-content: space-between;
  187 + color:#14ac20 ;
  188 + font-size: 30rpx;
  189 +}
  190 +
  191 +.tishi image {
  192 + width: 28rpx;
  193 + height: 28rpx;
  194 + margin-right: 8rpx;
  195 +}
  196 +
  197 +.tishi_text {
  198 + margin-top: 16rpx;
  199 + font-size: 28rpx;
  200 + color: #7D7E80;
  201 +
  202 +}
  203 +
  204 +/* */
  205 +.shengqin {
  206 + height: 122rpx;
  207 + background-color: #ffffff;
  208 + font-size: 32rpx;
  209 + position: fixed;
  210 + left: 0;
  211 + right: 0;
  212 + bottom: 0;
  213 + display: flex;
  214 + align-items: center;
  215 +}
  216 +
  217 +.shengqin button {
  218 + width: 622rpx;
  219 + height: 88rpx;
  220 + color: #ffffff;
  221 + border-radius: 22px;
  222 + background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
  223 + box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
  224 +
172 } 225 }