作者 王智

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);
@@ -9,8 +9,8 @@ @@ -9,8 +9,8 @@
9 <radio value="{{second+','+index+','+idx}}" checked=''>{{second}}</radio> 9 <radio value="{{second+','+index+','+idx}}" checked=''>{{second}}</radio>
10 <block wx:if="{{showAnswer}}"> 10 <block wx:if="{{showAnswer}}">
11 {{answer[index]}} 11 {{answer[index]}}
12 - <image src="/imgs/zhengque-5.png" wx:if="{{item.answer==idx}}"></image>  
13 - <image src="/imgs/cuowu-3.png" wx:if='{{item.choose==idx}}'></image> 12 + <image src="/imgs/zhengque-5@2x.png" wx:if="{{item.answer==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 16
@@ -41,6 +41,3 @@ @@ -41,6 +41,3 @@
41 41
42 </view> 42 </view>
43 </view> --> 43 </view> -->
44 -<view class="shengqin">  
45 - <button bindtap="getcomfirm">确认</button>  
46 -</view>  
@@ -87,7 +87,6 @@ radio .wx-radio-input.wx-radio-input-checked::before { @@ -87,7 +87,6 @@ radio .wx-radio-input.wx-radio-input-checked::before {
87 -webkit-transform: translate(-50%, -50%) scale(1); 87 -webkit-transform: translate(-50%, -50%) scale(1);
88 } 88 }
89 89
90 -  
91 /* */ 90 /* */
92 .shengqin { 91 .shengqin {
93 height: 122rpx; 92 height: 122rpx;
@@ -41,23 +41,76 @@ Page({ @@ -41,23 +41,76 @@ Page({
41 }, 41 },
42 // 我的活动 42 // 我的活动
43 getMyactive() { 43 getMyactive() {
44 - wx.navigateTo({  
45 - url: '/pages/myactivity/myactivity',  
46 - })  
47 44
  45 + let that = this;
  46 + let url = '/index/second/checkTranStatus';
  47 + let head = {
  48 + 'XX-Token': wx.getStorageSync('token')
  49 + }
  50 +
  51 + app.post(url, {}, head).then((res) => {
  52 + console.log(res)
  53 + if (res.code == 40000) {
  54 + wx.showModal({
  55 + title: '提示',
  56 + content: '请先成为志愿者'
  57 +
  58 + })
  59 + } else {
  60 + wx.navigateTo({
  61 + url: '/pages/myactivity/myactivity',
  62 + })
  63 + }
  64 + }).catch((err) => {})
48 }, 65 },
49 //我的团队 66 //我的团队
50 getMyteam() { 67 getMyteam() {
51 - wx.navigateTo({  
52 - url: '/pages/myteam/myteam',  
53 - })  
54 68
  69 + let that = this;
  70 + let url = '/index/second/checkTranStatus';
  71 + let head = {
  72 + 'XX-Token': wx.getStorageSync('token')
  73 + }
  74 +
  75 + app.post(url, {}, head).then((res) => {
  76 + console.log(res)
  77 + if (res.code == 40000) {
  78 + wx.showModal({
  79 + title: '提示',
  80 + content: '请先成为志愿者'
  81 +
  82 + })
  83 + } else {
  84 + wx.navigateTo({
  85 + url: '/pages/myteam/myteam',
  86 + })
  87 + }
  88 + }).catch((err) => {})
55 }, 89 },
56 // 我的培训 90 // 我的培训
57 getMytrain() { 91 getMytrain() {
58 - wx.navigateTo({  
59 - url: '/pages/mytrain/mytrain',  
60 - }) 92 +
  93 + let that = this;
  94 + let url = '/index/second/checkTranStatus';
  95 + let head = {
  96 + 'XX-Token': wx.getStorageSync('token')
  97 + }
  98 +
  99 + app.post(url, {}, head).then((res) => {
  100 + console.log(res)
  101 + if (res.code == 40000) {
  102 + wx.showModal({
  103 + title: '提示',
  104 + content: '请先成为志愿者'
  105 +
  106 + })
  107 + } else {
  108 + wx.navigateTo({
  109 + url: '/pages/mytrain/mytrain',
  110 + })
  111 +
  112 + }
  113 + }).catch((err) => {})
61 114
62 }, 115 },
63 // 志愿回馈 116 // 志愿回馈
@@ -86,13 +139,6 @@ Page({ @@ -86,13 +139,6 @@ Page({
86 }).catch((err) => { 139 }).catch((err) => {
87 140
88 }) 141 })
89 -  
90 -  
91 -  
92 -  
93 -  
94 -  
95 -  
96 }, 142 },
97 143
98 // 成为志愿者 144 // 成为志愿者
@@ -105,9 +151,32 @@ Page({ @@ -105,9 +151,32 @@ Page({
105 }, 151 },
106 // 电子证件 152 // 电子证件
107 getCertificate() { 153 getCertificate() {
108 - wx.navigateTo({  
109 - url: '/pages/mycertificate/mycertificate', 154 +
  155 + let that = this;
  156 + let url = '/index/second/checkTranStatus';
  157 + let head = {
  158 + 'XX-Token': wx.getStorageSync('token')
  159 + }
  160 + app.post(url, {}, head).then((res) => {
  161 + console.log(res)
  162 + if (res.code == 40000) {
  163 + wx.showModal({
  164 + title: '提示',
  165 + content: '请先成为志愿者'
  166 +
  167 + })
  168 +
  169 + } else {
  170 + wx.navigateTo({
  171 + url: '/pages/mycertificate/mycertificate',
  172 + })
  173 + }
  174 +
  175 +
  176 + }).catch((err) => {
  177 +
110 }) 178 })
  179 +
111 }, 180 },
112 181
113 // 我的地址 182 // 我的地址
  1 +
  2 +
1 <view class="myteamBox" wx:for="{{list}}" bindtap="getdetail" data-id="{{item.id}}" > 3 <view class="myteamBox" wx:for="{{list}}" bindtap="getdetail" data-id="{{item.id}}" >
2 <view class="teamtop"> 4 <view class="teamtop">
3 <image src="/imgs/ac14.png"></image> 5 <image src="/imgs/ac14.png"></image>
@@ -8,8 +8,9 @@ Page({ @@ -8,8 +8,9 @@ Page({
8 data: { 8 data: {
9 star_num: 3, 9 star_num: 3,
10 datalist: '', 10 datalist: '',
  11 + list:''
11 }, 12 },
12 - 13 +
13 getdatalist() { 14 getdatalist() {
14 let that = this; 15 let that = this;
15 let url = 'index/member_center/index'; 16 let url = 'index/member_center/index';
@@ -26,13 +27,30 @@ Page({ @@ -26,13 +27,30 @@ Page({
26 27
27 }) 28 })
28 }, 29 },
  30 + // 列表
  31 + getdatalists() {
  32 + let that = this;
  33 + let url = '/index/second/myTrain';
  34 + let head = {
  35 + 'XX-Token': wx.getStorageSync('token')
  36 + }
  37 + app.post(url, {}, head).then((res) => {
  38 + console.log(res);
  39 + that.setData({
  40 + list: res
  41 + })
  42 + }).catch((err) => {
  43 +
  44 + })
  45 + },
29 46
30 /** 47 /**
31 * 生命周期函数--监听页面加载 48 * 生命周期函数--监听页面加载
32 */ 49 */
33 onLoad: function (options) { 50 onLoad: function (options) {
34 let that = this; 51 let that = this;
35 - this.getdatalist(); 52 + that.getdatalist();
  53 + that.getdatalists();
36 54
37 }, 55 },
38 56
@@ -10,20 +10,25 @@ @@ -10,20 +10,25 @@
10 <view class="word1">{{datalist.status}}<image src="/imgs/more_gray.png"></image> 10 <view class="word1">{{datalist.status}}<image src="/imgs/more_gray.png"></image>
11 </view> 11 </view>
12 <view class='star_box'> 12 <view class='star_box'>
13 - <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>0}}'> 13 + <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
  14 + wx:if='{{datalist.level>0}}'>
14 </image> 15 </image>
15 - <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>1}}'> 16 + <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
  17 + wx:if='{{datalist.level>1}}'>
16 </image> 18 </image>
17 - <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>2}}'> 19 + <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
  20 + wx:if='{{datalist.level>2}}'>
18 </image> 21 </image>
19 - <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>3}}'> 22 + <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
  23 + wx:if='{{datalist.level>3}}'>
20 </image> 24 </image>
21 - <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>4}}'> 25 + <image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
  26 + wx:if='{{datalist.level>4}}'>
22 </image> 27 </image>
23 </view> 28 </view>
24 </view> 29 </view>
25 <view class="mystudytime"> 30 <view class="mystudytime">
26 - <view class="time">{{datalist.work_time}}小时</view> 31 + <view class="time">{{datalist.work_time}}</view>
27 <view class="mytime"> 32 <view class="mytime">
28 <image src="/imgs/clock.png"></image> 33 <image src="/imgs/clock.png"></image>
29 我的学时 34 我的学时
@@ -54,26 +59,22 @@ @@ -54,26 +59,22 @@
54 答题 59 答题
55 </view> 60 </view>
56 61
57 - <view class="myanswer">  
58 -  
59 - <image src="/imgs/active1.png"></image> 62 + <view class="myanswer" wx:for="{{list.data}}" wx:if="{{item.user_status==1}}">
  63 + <image src="{{item.pic}}"></image>
60 <view class="myanswer_right"> 64 <view class="myanswer_right">
61 <view class="myanswer_name"> 65 <view class="myanswer_name">
62 - 如何做一个志愿者,如何做一个负责人心的志愿者 66 + {{item.title}}
63 </view> 67 </view>
64 -  
65 <view class="myanswer_num"> 68 <view class="myanswer_num">
66 <view> 69 <view>
67 - 10道题 70 + {{item.num}}道题
68 </view> 71 </view>
69 <view class="myanswer_end"> 72 <view class="myanswer_end">
70 完成答题 73 完成答题
71 <image src="/imgs/more.png"></image> 74 <image src="/imgs/more.png"></image>
72 </view> 75 </view>
73 </view> 76 </view>
74 -  
75 </view> 77 </view>
76 -  
77 </view> 78 </view>
78 79
79 80
@@ -69,8 +69,9 @@ page { @@ -69,8 +69,9 @@ page {
69 } 69 }
70 70
71 .word1 image { 71 .word1 image {
72 - width: 12rpx; 72 + width: 14rpx;
73 height: 20rpx; 73 height: 20rpx;
  74 + margin-left: 9rpx;
74 } 75 }
75 76
76 .mystudytime { 77 .mystudytime {
@@ -115,6 +116,7 @@ page { @@ -115,6 +116,7 @@ page {
115 .rule { 116 .rule {
116 font-size: 28rpx; 117 font-size: 28rpx;
117 color: #323233; 118 color: #323233;
  119 + font-weight: 400;
118 } 120 }
119 121
120 .rule_box { 122 .rule_box {
@@ -126,7 +128,11 @@ page { @@ -126,7 +128,11 @@ page {
126 font-size: 32rpx; 128 font-size: 32rpx;
127 129
128 } 130 }
  131 +.rule{
129 132
  133 +line-height:48rpx ;
  134 +
  135 +}
130 .rule_line { 136 .rule_line {
131 width: 6rpx; 137 width: 6rpx;
132 height: 28rpx; 138 height: 28rpx;