正在显示
35 个修改的文件
包含
1760 行增加
和
887 行删除
zhiyuanzhe/.idea/misc.xml
已删除
100644 → 0
zhiyuanzhe/.idea/modules.xml
已删除
100644 → 0
zhiyuanzhe/.idea/workspace.xml
已删除
100644 → 0
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<project version="4"> | ||
3 | - <component name="ChangeListManager"> | ||
4 | - <list default="true" id="f6bf484e-3695-4425-9f8d-0483a0eb1752" name="Default" comment="" /> | ||
5 | - <ignored path="$PROJECT_DIR$/.tmp/" /> | ||
6 | - <ignored path="$PROJECT_DIR$/temp/" /> | ||
7 | - <ignored path="$PROJECT_DIR$/tmp/" /> | ||
8 | - <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> | ||
9 | - <option name="TRACKING_ENABLED" value="true" /> | ||
10 | - <option name="SHOW_DIALOG" value="false" /> | ||
11 | - <option name="HIGHLIGHT_CONFLICTS" value="true" /> | ||
12 | - <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> | ||
13 | - <option name="LAST_RESOLUTION" value="IGNORE" /> | ||
14 | - </component> | ||
15 | - <component name="FindInProjectRecents"> | ||
16 | - <findStrings> | ||
17 | - <find>http://volunteer.w.bronet.cn</find> | ||
18 | - </findStrings> | ||
19 | - <replaceStrings> | ||
20 | - <replace /> | ||
21 | - <replace>https://volunteer.cnpu.org</replace> | ||
22 | - </replaceStrings> | ||
23 | - <dirStrings> | ||
24 | - <dir>E:\wxproject\03志愿者小程序效果图\volunteer\zhiyuanzhe\pages</dir> | ||
25 | - </dirStrings> | ||
26 | - </component> | ||
27 | - <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" /> | ||
28 | - <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" /> | ||
29 | - <component name="JsGulpfileManager"> | ||
30 | - <detection-done>true</detection-done> | ||
31 | - <sorting>DEFINITION_ORDER</sorting> | ||
32 | - </component> | ||
33 | - <component name="NodePackageJsonFileManager"> | ||
34 | - <packageJsonPaths /> | ||
35 | - </component> | ||
36 | - <component name="ProjectFrameBounds" extendedState="6"> | ||
37 | - <option name="x" value="121" /> | ||
38 | - <option name="y" value="19" /> | ||
39 | - <option name="width" value="1400" /> | ||
40 | - <option name="height" value="1000" /> | ||
41 | - </component> | ||
42 | - <component name="ProjectView"> | ||
43 | - <navigator proportions="" version="1"> | ||
44 | - <foldersAlwaysOnTop value="true" /> | ||
45 | - </navigator> | ||
46 | - <panes> | ||
47 | - <pane id="ProjectPane"> | ||
48 | - <subPane> | ||
49 | - <expand> | ||
50 | - <path> | ||
51 | - <item name="zhiyuanzhe" type="b2602c69:ProjectViewProjectNode" /> | ||
52 | - <item name="zhiyuanzhe" type="462c0819:PsiDirectoryNode" /> | ||
53 | - </path> | ||
54 | - <path> | ||
55 | - <item name="zhiyuanzhe" type="b2602c69:ProjectViewProjectNode" /> | ||
56 | - <item name="zhiyuanzhe" type="462c0819:PsiDirectoryNode" /> | ||
57 | - <item name="pages" type="462c0819:PsiDirectoryNode" /> | ||
58 | - </path> | ||
59 | - </expand> | ||
60 | - <select /> | ||
61 | - </subPane> | ||
62 | - </pane> | ||
63 | - <pane id="Scope" /> | ||
64 | - </panes> | ||
65 | - </component> | ||
66 | - <component name="PropertiesComponent"> | ||
67 | - <property name="WebServerToolWindowFactoryState" value="false" /> | ||
68 | - <property name="last_opened_file_path" value="$PROJECT_DIR$" /> | ||
69 | - <property name="node.js.detected.package.prettier" value="true" /> | ||
70 | - <property name="node.js.path.for.package.prettier" value="project" /> | ||
71 | - <property name="node.js.selected.package.prettier" value="" /> | ||
72 | - <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> | ||
73 | - <property name="nodejs_npm_path_reset_for_default_project" value="true" /> | ||
74 | - <property name="settings.editor.selected.configurable" value="configurable.group.appearance" /> | ||
75 | - </component> | ||
76 | - <component name="RunDashboard"> | ||
77 | - <option name="ruleStates"> | ||
78 | - <list> | ||
79 | - <RuleState> | ||
80 | - <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> | ||
81 | - </RuleState> | ||
82 | - <RuleState> | ||
83 | - <option name="name" value="StatusDashboardGroupingRule" /> | ||
84 | - </RuleState> | ||
85 | - </list> | ||
86 | - </option> | ||
87 | - </component> | ||
88 | - <component name="SvnConfiguration"> | ||
89 | - <configuration /> | ||
90 | - </component> | ||
91 | - <component name="TaskManager"> | ||
92 | - <task active="true" id="Default" summary="Default task"> | ||
93 | - <changelist id="f6bf484e-3695-4425-9f8d-0483a0eb1752" name="Default" comment="" /> | ||
94 | - <created>1546648168340</created> | ||
95 | - <option name="number" value="Default" /> | ||
96 | - <option name="presentableId" value="Default" /> | ||
97 | - <updated>1546648168340</updated> | ||
98 | - <workItem from="1546648170160" duration="644000" /> | ||
99 | - <workItem from="1547097879598" duration="899000" /> | ||
100 | - <workItem from="1547268145045" duration="628000" /> | ||
101 | - </task> | ||
102 | - <servers /> | ||
103 | - </component> | ||
104 | - <component name="TimeTrackingManager"> | ||
105 | - <option name="totallyTimeSpent" value="2171000" /> | ||
106 | - </component> | ||
107 | - <component name="ToolWindowManager"> | ||
108 | - <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> | ||
109 | - <layout> | ||
110 | - <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24973656" /> | ||
111 | - <window_info anchor="bottom" id="TODO" order="6" /> | ||
112 | - <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" /> | ||
113 | - <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" /> | ||
114 | - <window_info anchor="bottom" id="Find" order="1" /> | ||
115 | - <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" /> | ||
116 | - <window_info anchor="bottom" id="Run" order="2" /> | ||
117 | - <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> | ||
118 | - <window_info anchor="bottom" id="Terminal" order="7" /> | ||
119 | - <window_info id="Favorites" order="2" side_tool="true" /> | ||
120 | - <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> | ||
121 | - <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> | ||
122 | - <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> | ||
123 | - <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> | ||
124 | - <window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> | ||
125 | - <window_info anchor="bottom" id="Message" order="0" /> | ||
126 | - <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> | ||
127 | - </layout> | ||
128 | - </component> | ||
129 | - <component name="TypeScriptGeneratedFilesManager"> | ||
130 | - <option name="version" value="1" /> | ||
131 | - </component> | ||
132 | - <component name="VcsContentAnnotationSettings"> | ||
133 | - <option name="myLimit" value="2678400000" /> | ||
134 | - </component> | ||
135 | -</project> |
zhiyuanzhe/.idea/zhiyuanzhe.iml
已删除
100644 → 0
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<module type="WEB_MODULE" version="4"> | ||
3 | - <component name="NewModuleRootManager"> | ||
4 | - <content url="file://$MODULE_DIR$"> | ||
5 | - <excludeFolder url="file://$MODULE_DIR$/.tmp" /> | ||
6 | - <excludeFolder url="file://$MODULE_DIR$/temp" /> | ||
7 | - <excludeFolder url="file://$MODULE_DIR$/tmp" /> | ||
8 | - </content> | ||
9 | - <orderEntry type="inheritedJdk" /> | ||
10 | - <orderEntry type="sourceFolder" forTests="false" /> | ||
11 | - </component> | ||
12 | -</module> |
1 | //app.js | 1 | //app.js |
2 | App({ | 2 | App({ |
3 | onLaunch: function () { | 3 | onLaunch: function () { |
4 | - | 4 | + //自动更新版本 |
5 | + const updateManager = wx.getUpdateManager() | ||
6 | + updateManager.onCheckForUpdate(function (res) { | ||
7 | + // 请求完新版本信息的回调 | ||
8 | + }) | ||
9 | + | ||
10 | + updateManager.onUpdateReady(function () { | ||
11 | + wx.showModal({ | ||
12 | + title: '更新提示', | ||
13 | + content: '新版本已经准备好,是否重启应用?', | ||
14 | + success: function (res) { | ||
15 | + if (res.confirm) { | ||
16 | + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 | ||
17 | + updateManager.applyUpdate() | ||
18 | + } | ||
19 | + } | ||
20 | + }) | ||
21 | + | ||
22 | + }) | ||
23 | + | ||
24 | + updateManager.onUpdateFailed(function () { | ||
25 | + // 新的版本下载失败 | ||
26 | + wx.showModal({ | ||
27 | + title: '更新提示', | ||
28 | + content: '新版本下载失败', | ||
29 | + showCancel: false | ||
30 | + }) | ||
31 | + }) | ||
5 | }, | 32 | }, |
6 | /** | 33 | /** |
7 | * 自定义post函数,返回Promise | 34 | * 自定义post函数,返回Promise |
@@ -67,7 +94,7 @@ App({ | @@ -67,7 +94,7 @@ App({ | ||
67 | url: '/pages/start/start' | 94 | url: '/pages/start/start' |
68 | }) | 95 | }) |
69 | } else if (res.cancel) { | 96 | } else if (res.cancel) { |
70 | - console.log('用户点击取消') | 97 | + // console.log('用户点击取消') |
71 | } | 98 | } |
72 | } | 99 | } |
73 | }) | 100 | }) |
@@ -85,7 +112,6 @@ App({ | @@ -85,7 +112,6 @@ App({ | ||
85 | wx.hideNavigationBarLoading() | 112 | wx.hideNavigationBarLoading() |
86 | }, | 113 | }, |
87 | fail: function (e) { | 114 | fail: function (e) { |
88 | - console.log(e) | ||
89 | reject('网络出错'); | 115 | reject('网络出错'); |
90 | // wx.hideLoading() | 116 | // wx.hideLoading() |
91 | wx.hideNavigationBarLoading() | 117 | wx.hideNavigationBarLoading() |
1 | { | 1 | { |
2 | - "pages": [ | ||
3 | - "pages/index/index", | ||
4 | - "pages/start/start", | ||
5 | - "pages/my/my", | ||
6 | - "pages/more/more", | ||
7 | - "pages/admin/admin", | ||
8 | - "pages/apply/apply", | ||
9 | - "pages/img_txt/img_txt", | ||
10 | - "pages/result/result", | ||
11 | - "pages/close_apply/close_apply" | ||
12 | - ], | ||
13 | - "window": { | ||
14 | - "backgroundTextStyle": "light", | ||
15 | - "navigationBarBackgroundColor": "#21AE59", | ||
16 | - "navigationBarTitleText": "志愿者小程序", | ||
17 | - "navigationBarTextStyle": "white" | ||
18 | - }, | ||
19 | - "tabBar": { | ||
20 | - "color": "#fff", | ||
21 | - "selectedColor": "#fff", | ||
22 | - "backgroundColor": "#EBEBEB", | ||
23 | - "list": [ | ||
24 | - { | ||
25 | - "pagePath": "pages/index/index", | ||
26 | - "text": "", | ||
27 | - "iconPath": "imgs/shouye_02@2x.png", | ||
28 | - "selectedIconPath": "imgs/shouye_01@2x.png" | ||
29 | - }, | ||
30 | - { | ||
31 | - "pagePath": "pages/my/my", | ||
32 | - "text": "", | ||
33 | - "iconPath": "imgs/wode_01@2x.png", | ||
34 | - "selectedIconPath": "imgs/wode_02@2x.png" | ||
35 | - } | ||
36 | - ] | ||
37 | - } | 2 | + "pages": [ |
3 | + "pages/index/index", | ||
4 | + "pages/start/start", | ||
5 | + "pages/my/my", | ||
6 | + "pages/more/more", | ||
7 | + "pages/admin/admin", | ||
8 | + "pages/apply/apply", | ||
9 | + "pages/img_txt/img_txt", | ||
10 | + "pages/result/result", | ||
11 | + "pages/close_apply/close_apply", | ||
12 | + "pages/my/my_active/my_active", | ||
13 | + "pages/index/active/active" | ||
14 | + | ||
15 | + ], | ||
16 | + "window": { | ||
17 | + "backgroundTextStyle": "light", | ||
18 | + "navigationBarBackgroundColor": "#21AE59", | ||
19 | + "navigationBarTitleText": "志愿者小程序", | ||
20 | + "navigationBarTextStyle": "white" | ||
21 | + }, | ||
22 | + "tabBar": { | ||
23 | + "color": "#fff", | ||
24 | + "selectedColor": "#fff", | ||
25 | + "backgroundColor": "#EBEBEB", | ||
26 | + "list": [ | ||
27 | + { | ||
28 | + "pagePath": "pages/index/index", | ||
29 | + "text": "", | ||
30 | + "iconPath": "imgs/shouye_02@2x.png", | ||
31 | + "selectedIconPath": "imgs/shouye_01@2x.png" | ||
32 | + }, | ||
33 | + { | ||
34 | + "pagePath": "pages/my/my", | ||
35 | + "text": "", | ||
36 | + "iconPath": "imgs/wode_01@2x.png", | ||
37 | + "selectedIconPath": "imgs/wode_02@2x.png" | ||
38 | + } | ||
39 | + ] | ||
40 | + } | ||
38 | } | 41 | } |
zhiyuanzhe/imgs/activity-close-open@2x.png
0 → 100644
1.5 KB
zhiyuanzhe/imgs/bicon_06@2x.png
0 → 100644
1.2 KB
zhiyuanzhe/imgs/dizhi@2x.png
0 → 100644
1.5 KB
1.3 KB
1.3 KB
@@ -29,14 +29,12 @@ getdatalist(){ | @@ -29,14 +29,12 @@ getdatalist(){ | ||
29 | page: res.page | 29 | page: res.page |
30 | }) | 30 | }) |
31 | }).catch((err)=>{ | 31 | }).catch((err)=>{ |
32 | - console.log(err) | ||
33 | }) | 32 | }) |
34 | 33 | ||
35 | }, | 34 | }, |
36 | update_status(e){ | 35 | update_status(e){ |
37 | let that=this; | 36 | let that=this; |
38 | let index = e.currentTarget.dataset.index; | 37 | let index = e.currentTarget.dataset.index; |
39 | - console.log('index', index); | ||
40 | let url ='index/member_center/update_status'; | 38 | let url ='index/member_center/update_status'; |
41 | let head = { | 39 | let head = { |
42 | 'XX-Token': wx.getStorageSync('token') | 40 | 'XX-Token': wx.getStorageSync('token') |
@@ -53,13 +51,11 @@ getdatalist(){ | @@ -53,13 +51,11 @@ getdatalist(){ | ||
53 | }) | 51 | }) |
54 | let datalist = that.data.datalist; | 52 | let datalist = that.data.datalist; |
55 | datalist[index].status = e.currentTarget.dataset.status; | 53 | datalist[index].status = e.currentTarget.dataset.status; |
56 | - console.log('e.currentTarget.dataset.status', e.currentTarget.dataset.status); | ||
57 | that.setData({ | 54 | that.setData({ |
58 | datalist: datalist | 55 | datalist: datalist |
59 | }) | 56 | }) |
60 | 57 | ||
61 | }).catch((err)=>{ | 58 | }).catch((err)=>{ |
62 | - console.log(err) | ||
63 | }) | 59 | }) |
64 | }, | 60 | }, |
65 | /** | 61 | /** |
@@ -164,7 +164,6 @@ Page({ | @@ -164,7 +164,6 @@ Page({ | ||
164 | }) | 164 | }) |
165 | }, | 165 | }, |
166 | bindtypeChange(e) { | 166 | bindtypeChange(e) { |
167 | - console.log(e) | ||
168 | let typearr = this.data.typearr; | 167 | let typearr = this.data.typearr; |
169 | this.setData({ | 168 | this.setData({ |
170 | type: parseInt(e.detail.value) +1 | 169 | type: parseInt(e.detail.value) +1 |
@@ -185,7 +184,7 @@ Page({ | @@ -185,7 +184,7 @@ Page({ | ||
185 | app.post(url, param).then((res) => { | 184 | app.post(url, param).then((res) => { |
186 | that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv,tem); | 185 | that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv,tem); |
187 | }).catch((errMsg) => { | 186 | }).catch((errMsg) => { |
188 | - console.log(errMsg); | 187 | + |
189 | }) | 188 | }) |
190 | } | 189 | } |
191 | } | 190 | } |
@@ -207,7 +206,7 @@ Page({ | @@ -207,7 +206,7 @@ Page({ | ||
207 | }) | 206 | }) |
208 | that.uploadImage(tem); | 207 | that.uploadImage(tem); |
209 | }).catch((errMsg) => { | 208 | }).catch((errMsg) => { |
210 | - console.log(errMsg); | 209 | + |
211 | }) | 210 | }) |
212 | }, | 211 | }, |
213 | 212 | ||
@@ -243,7 +242,7 @@ Page({ | @@ -243,7 +242,7 @@ Page({ | ||
243 | } | 242 | } |
244 | 243 | ||
245 | }).catch((err)=>{ | 244 | }).catch((err)=>{ |
246 | - console.log(err) | 245 | + |
247 | }) | 246 | }) |
248 | }, | 247 | }, |
249 | //切换省份获取市和区/县 | 248 | //切换省份获取市和区/县 |
@@ -254,7 +253,6 @@ Page({ | @@ -254,7 +253,6 @@ Page({ | ||
254 | 'province_id': province_id | 253 | 'province_id': province_id |
255 | } | 254 | } |
256 | app.post(url, params).then((res)=>{ | 255 | app.post(url, params).then((res)=>{ |
257 | - console.log('切换省份获取市和区/县',res); | ||
258 | let country = res.country; | 256 | let country = res.country; |
259 | let tem = { | 257 | let tem = { |
260 | id: 0, | 258 | id: 0, |
@@ -269,7 +267,7 @@ Page({ | @@ -269,7 +267,7 @@ Page({ | ||
269 | countryarr: temcountry | 267 | countryarr: temcountry |
270 | }) | 268 | }) |
271 | }).catch((err)=>{ | 269 | }).catch((err)=>{ |
272 | - console.log(err) | 270 | + |
273 | }) | 271 | }) |
274 | }, | 272 | }, |
275 | //切换市获取区/县 | 273 | //切换市获取区/县 |
@@ -280,7 +278,6 @@ Page({ | @@ -280,7 +278,6 @@ Page({ | ||
280 | 'city_id': city_id | 278 | 'city_id': city_id |
281 | } | 279 | } |
282 | app.post(url, params).then((res) => { | 280 | app.post(url, params).then((res) => { |
283 | - console.log('切换市获取区/县', res); | ||
284 | let country = res.country; | 281 | let country = res.country; |
285 | let tem={ | 282 | let tem={ |
286 | id:0, | 283 | id:0, |
@@ -294,7 +291,7 @@ Page({ | @@ -294,7 +291,7 @@ Page({ | ||
294 | countryarr: temcountry | 291 | countryarr: temcountry |
295 | }) | 292 | }) |
296 | }).catch((err) => { | 293 | }).catch((err) => { |
297 | - console.log(err) | 294 | + |
298 | }) | 295 | }) |
299 | }, | 296 | }, |
300 | bindChange: function (e) { | 297 | bindChange: function (e) { |
@@ -371,7 +368,6 @@ Page({ | @@ -371,7 +368,6 @@ Page({ | ||
371 | }, | 368 | }, |
372 | bindRegionChange(e){ | 369 | bindRegionChange(e){ |
373 | let that=this; | 370 | let that=this; |
374 | - console.log(e); | ||
375 | this.setData({ | 371 | this.setData({ |
376 | region: e.detail.value, | 372 | region: e.detail.value, |
377 | province: e.detail.value[0], | 373 | province: e.detail.value[0], |
@@ -461,7 +457,6 @@ Page({ | @@ -461,7 +457,6 @@ Page({ | ||
461 | formData: {}, | 457 | formData: {}, |
462 | success: function(res) { | 458 | success: function(res) { |
463 | let temdata = JSON.parse(res.data); | 459 | let temdata = JSON.parse(res.data); |
464 | - console.log('上传图temdata', temdata); | ||
465 | if (temdata.code == 20000) { | 460 | if (temdata.code == 20000) { |
466 | if (tem == '1') { | 461 | if (tem == '1') { |
467 | that.setData({ | 462 | that.setData({ |
@@ -624,7 +619,6 @@ Page({ | @@ -624,7 +619,6 @@ Page({ | ||
624 | }) | 619 | }) |
625 | },1000) | 620 | },1000) |
626 | }).catch((err) => { | 621 | }).catch((err) => { |
627 | - console.log(err) | ||
628 | }) | 622 | }) |
629 | }else{ | 623 | }else{ |
630 | wx.showToast({ | 624 | wx.showToast({ |
@@ -693,7 +687,7 @@ Page({ | @@ -693,7 +687,7 @@ Page({ | ||
693 | type: res.type | 687 | type: res.type |
694 | }) | 688 | }) |
695 | }).catch((err)=>{ | 689 | }).catch((err)=>{ |
696 | - console.log(err) | 690 | + |
697 | }) | 691 | }) |
698 | }, | 692 | }, |
699 | /** | 693 | /** |
1 | -// pages/img_txt/img_txt.js | ||
2 | -const app=getApp(); | 1 | + |
2 | +const app = getApp(); | ||
3 | var wxParse = require('../../wxParse/wxParse.js'); | 3 | var wxParse = require('../../wxParse/wxParse.js'); |
4 | 4 | ||
5 | Page({ | 5 | Page({ |
6 | 6 | ||
7 | - /** | ||
8 | - * 页面的初始数据 | ||
9 | - */ | ||
10 | - data: { | ||
11 | - id:'', | ||
12 | - status:'' | ||
13 | - }, | ||
14 | - getdatalist(){ | ||
15 | - let that=this; | ||
16 | - let head = { | ||
17 | - 'XX-Token': wx.getStorageSync('token') | ||
18 | - } | ||
19 | - let url=''; | ||
20 | - let params='' | ||
21 | - if (that.data.status=='1'){ | ||
22 | - url = 'index/index/activity_info'; | ||
23 | - params = { | ||
24 | - id: that.data.id | ||
25 | - } | ||
26 | - } else if (that.data.status == '2'){ | ||
27 | - url = 'index/member_center/about'; | ||
28 | - params = {}; | ||
29 | - } else if (that.data.status == '3'){ | ||
30 | - url = 'index/member_center/contact'; | ||
31 | - params = {}; | ||
32 | - } | ||
33 | - app.post(url, params,head).then((res)=>{ | ||
34 | - console.log(res.content); | ||
35 | - that.setData({ | ||
36 | - datalist:res | ||
37 | - }) | ||
38 | - wxParse.wxParse('content', 'html', res.content, that, 5); | ||
39 | - }).catch((err)=>{ | ||
40 | - console.log(err) | ||
41 | - }) | ||
42 | - | ||
43 | - }, | ||
44 | - /** | ||
45 | - * 生命周期函数--监听页面加载 | ||
46 | - */ | ||
47 | - onLoad: function (options) { | ||
48 | - let that=this; | ||
49 | - if (options.status=='1'){ | ||
50 | - that.setData({ | ||
51 | - id: options.id, | ||
52 | - status: options.status | ||
53 | - }) | ||
54 | - wx.setNavigationBarTitle({ | ||
55 | - title: '活动详情' | ||
56 | - }) | ||
57 | - that.getdatalist(); | ||
58 | - } else if (options.status == '2'){ | ||
59 | - that.setData({ | ||
60 | - status: options.status | ||
61 | - }) | ||
62 | - wx.setNavigationBarTitle({ | ||
63 | - title: '关于我们' | ||
64 | - }) | ||
65 | - that.getdatalist(); | ||
66 | - } else if (options.status == '3'){ | ||
67 | - that.setData({ | ||
68 | - status: options.status | ||
69 | - }) | ||
70 | - wx.setNavigationBarTitle({ | ||
71 | - title: '联系我们' | ||
72 | - }) | ||
73 | - that.getdatalist(); | ||
74 | - } | ||
75 | - | ||
76 | - | 7 | + /** |
8 | + * 页面的初始数据 | ||
9 | + */ | ||
10 | + data: { | ||
11 | + cover_type: false, | ||
12 | + enroll_arr: ['线上', '线下', '线上加线下'], | ||
13 | + enroll: '请选择报名方式', | ||
14 | + starTime: '请选择开始时间', | ||
15 | + endTime: '请选择结束时间', | ||
16 | + type: 0, | ||
17 | + id: '', | ||
18 | + status: '' | ||
19 | + }, | ||
20 | + // 选择报名方式 | ||
21 | + selectenroll(e) { | ||
22 | + let that = this | ||
23 | + that.setData({ | ||
24 | + enroll: that.data.enroll_arr[e.detail.value], | ||
25 | + enroll_id: Number(e.detail.value) + 1 | ||
26 | + }) | ||
27 | + if (e.detail.value == 0) { | ||
28 | + that.setData({ | ||
29 | + type: 0 | ||
30 | + }) | ||
31 | + } else { | ||
32 | + that.setData({ | ||
33 | + type: 1 | ||
34 | + }) | ||
35 | + } | ||
36 | + }, | ||
37 | + selecte_startTime(e) { | ||
38 | + this.setData({ | ||
39 | + starTime: e.detail.value | ||
40 | + }) | ||
41 | + }, | ||
42 | + selecte_endTime(e) { | ||
43 | + this.setData({ | ||
44 | + endTime: e.detail.value | ||
45 | + }) | ||
46 | + }, | ||
47 | + | ||
48 | + change_cover: function() { | ||
49 | + this.setData({ | ||
50 | + cover_type: false | ||
51 | + }) | ||
52 | + }, | ||
53 | + //报名 | ||
54 | + submit: function() { | ||
55 | + let that = this | ||
56 | + if (that.data.enroll == '请选择报名方式') { | ||
57 | + wx.showToast({ | ||
58 | + title: '请选择报名方式', | ||
59 | + icon: 'none', | ||
60 | + duration: 1000 | ||
61 | + }) | ||
62 | + return false | ||
63 | + } | ||
64 | + if (that.data.enroll_id != 1) { | ||
65 | + if (that.data.starTime == '请选择开始时间') { | ||
66 | + wx.showToast({ | ||
67 | + title: '请选择开始时间', | ||
68 | + icon: 'none', | ||
69 | + duration: 1000 | ||
70 | + }) | ||
71 | + return false | ||
72 | + } | ||
73 | + if (that.data.endTime == '请选择结束时间') { | ||
74 | + wx.showToast({ | ||
75 | + title: '请选择结束时间', | ||
76 | + icon: 'none', | ||
77 | + duration: 1000 | ||
78 | + }) | ||
79 | + return false | ||
80 | + } | ||
81 | + } else { | ||
82 | + } | ||
83 | + let head = { | ||
84 | + 'XX-Token': wx.getStorageSync('token') | ||
85 | + } | ||
86 | + let url = '/index/index/applyJoin'; | ||
87 | + let params = {} | ||
88 | + if (that.data.enroll_id != 1){ | ||
89 | + params = { | ||
90 | + id: that.data.id, | ||
91 | + type: that.data.enroll_id, | ||
92 | + start_time: that.data.starTime, | ||
93 | + end_time: that.data.end_time | ||
94 | + } | ||
95 | + }else{ | ||
96 | + params = { | ||
97 | + id: that.data.id, | ||
98 | + type: that.data.enroll_id, | ||
99 | + start_time: '', | ||
100 | + end_time: '' | ||
101 | + } | ||
102 | + } | ||
103 | + | ||
104 | + app.post(url, params, head).then((res) => { | ||
105 | + wx.showToast({ | ||
106 | + title: '提交成功', | ||
107 | + duration: 1000, | ||
108 | + success: (res) => { | ||
109 | + let t = setInterval((res) => { | ||
110 | + clearInterval(t) | ||
111 | + wx.switchTab({ | ||
112 | + url: '/pages/index/index', | ||
113 | + }) | ||
114 | + }, 1000) | ||
115 | + } | ||
116 | + }) | ||
117 | + | ||
118 | + }).catch((err) => { | ||
119 | + | ||
120 | + }) | ||
77 | 121 | ||
78 | - }, | ||
79 | 122 | ||
80 | - /** | ||
81 | - * 生命周期函数--监听页面初次渲染完成 | ||
82 | - */ | ||
83 | - onReady: function () { | ||
84 | 123 | ||
85 | - }, | 124 | + }, |
125 | + // 展示报名弹窗 | ||
126 | + enroll() { | ||
127 | + this.setData({ | ||
128 | + cover_type: true | ||
129 | + }) | ||
130 | + }, | ||
131 | + /** | ||
132 | + * 获取设备信息 | ||
133 | + */ | ||
134 | + getSystemInfo() { | ||
135 | + let that = this; | ||
136 | + wx.getSystemInfo({ | ||
137 | + success: function(res) { | ||
138 | + that.setData({ | ||
139 | + height: res.windowHeight + 'px' | ||
140 | + }) | ||
141 | + } | ||
142 | + }) | ||
143 | + }, | ||
144 | + //签到 | ||
145 | + sign() { | ||
146 | + let that = this; | ||
147 | + let head = { | ||
148 | + 'XX-Token': wx.getStorageSync('token') | ||
149 | + } | ||
150 | + let url = '/index/index/sginIn'; | ||
151 | + let params = { | ||
152 | + id: that.data.id | ||
153 | + } | ||
154 | + app.post(url, params, head).then((res) => { | ||
155 | + wx.showToast({ | ||
156 | + title: '签到成功', | ||
157 | + duration: 1000, | ||
158 | + success: (res) => { | ||
159 | + let t = setInterval((res) => { | ||
160 | + clearInterval(t) | ||
161 | + wx.switchTab({ | ||
162 | + url: '/pages/index/index', | ||
163 | + }) | ||
164 | + }, 1000) | ||
165 | + } | ||
166 | + }) | ||
86 | 167 | ||
87 | - /** | ||
88 | - * 生命周期函数--监听页面显示 | ||
89 | - */ | ||
90 | - onShow: function () { | 168 | + }).catch((err) => { |
91 | 169 | ||
92 | - }, | 170 | + }) |
171 | + }, | ||
172 | + getdatalist() { | ||
173 | + let that = this; | ||
174 | + let head = { | ||
175 | + 'XX-Token': wx.getStorageSync('token') | ||
176 | + } | ||
177 | + let url = ''; | ||
178 | + let params = '' | ||
179 | + if (that.data.status == '1') { | ||
180 | + url = 'index/index/activity_info'; | ||
181 | + params = { | ||
182 | + id: that.data.id | ||
183 | + } | ||
184 | + } else if (that.data.status == '2') { | ||
185 | + url = 'index/member_center/about'; | ||
186 | + params = {}; | ||
187 | + } else if (that.data.status == '3') { | ||
188 | + url = 'index/member_center/contact'; | ||
189 | + params = {}; | ||
190 | + } | ||
191 | + app.post(url, params, head).then((res) => { | ||
192 | + that.setData({ | ||
193 | + datalist: res | ||
194 | + }) | ||
195 | + wxParse.wxParse('content', 'html', res.content, that, 5); | ||
196 | + }).catch((err) => { | ||
93 | 197 | ||
94 | - /** | ||
95 | - * 生命周期函数--监听页面隐藏 | ||
96 | - */ | ||
97 | - onHide: function () { | 198 | + }) |
98 | 199 | ||
99 | - }, | 200 | + }, |
201 | + /** | ||
202 | + * 生命周期函数--监听页面加载 | ||
203 | + */ | ||
204 | + onLoad: function(options) { | ||
205 | + let that = this; | ||
206 | + if (options.status == '1') { | ||
207 | + that.setData({ | ||
208 | + id: options.id, | ||
209 | + status: options.status | ||
210 | + }) | ||
211 | + wx.setNavigationBarTitle({ | ||
212 | + title: '活动详情' | ||
213 | + }) | ||
214 | + that.getdatalist(); | ||
215 | + } else if (options.status == '2') { | ||
216 | + that.setData({ | ||
217 | + status: options.status | ||
218 | + }) | ||
219 | + wx.setNavigationBarTitle({ | ||
220 | + title: '关于我们' | ||
221 | + }) | ||
222 | + that.getdatalist(); | ||
223 | + } else if (options.status == '3') { | ||
224 | + that.setData({ | ||
225 | + status: options.status | ||
226 | + }) | ||
227 | + wx.setNavigationBarTitle({ | ||
228 | + title: '联系我们' | ||
229 | + }) | ||
230 | + that.getdatalist(); | ||
231 | + } | ||
232 | + that.getSystemInfo() | ||
233 | + }, | ||
100 | 234 | ||
101 | - /** | ||
102 | - * 生命周期函数--监听页面卸载 | ||
103 | - */ | ||
104 | - onUnload: function () { | 235 | + /** |
236 | + * 生命周期函数--监听页面初次渲染完成 | ||
237 | + */ | ||
238 | + onReady: function() { | ||
105 | 239 | ||
106 | - }, | 240 | + }, |
107 | 241 | ||
108 | - /** | ||
109 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
110 | - */ | ||
111 | - onPullDownRefresh: function () { | 242 | + /** |
243 | + * 生命周期函数--监听页面显示 | ||
244 | + */ | ||
245 | + onShow: function() { | ||
112 | 246 | ||
113 | - }, | 247 | + }, |
114 | 248 | ||
115 | - /** | ||
116 | - * 页面上拉触底事件的处理函数 | ||
117 | - */ | ||
118 | - onReachBottom: function () { | 249 | + /** |
250 | + * 生命周期函数--监听页面隐藏 | ||
251 | + */ | ||
252 | + onHide: function() { | ||
119 | 253 | ||
120 | - }, | 254 | + }, |
121 | 255 | ||
122 | - /** | ||
123 | - * 用户点击右上角分享 | ||
124 | - */ | ||
125 | - onShareAppMessage: function () { | 256 | + /** |
257 | + * 生命周期函数--监听页面卸载 | ||
258 | + */ | ||
259 | + onUnload: function() { | ||
126 | 260 | ||
127 | - } | 261 | + }, |
262 | + | ||
263 | + /** | ||
264 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
265 | + */ | ||
266 | + onPullDownRefresh: function() { | ||
267 | + | ||
268 | + }, | ||
269 | + | ||
270 | + /** | ||
271 | + * 页面上拉触底事件的处理函数 | ||
272 | + */ | ||
273 | + onReachBottom: function() { | ||
274 | + | ||
275 | + }, | ||
276 | + | ||
277 | + /** | ||
278 | + * 用户点击右上角分享 | ||
279 | + */ | ||
280 | + onShareAppMessage: function() { | ||
281 | + | ||
282 | + } | ||
128 | }) | 283 | }) |
1 | -<!--pages/img_txt/img_txt.wxml--> | 1 | + |
2 | <view class='main'> | 2 | <view class='main'> |
3 | -<view class='top_img'> | ||
4 | -<image src='{{datalist.thumbnail}}'></image> | ||
5 | -</view> | ||
6 | -<view class='text_title'>{{datalist.activity_name}}</view> | ||
7 | -<view class='text_time' wx:if='{{status=="1"}}'>{{datalist.time}}</view> | ||
8 | -<view class='text_content'> | ||
9 | -<!-- <rich-text nodes="{{datalist.content}}" bindtap="tap"></rich-text> --> | 3 | + <view class='top_img'> |
4 | + <image src='{{datalist.thumbnail}}'></image> | ||
5 | + </view> | ||
6 | + <view class='text_title'>{{datalist.activity_name}}</view> | ||
7 | + <view class='text_time' wx:if='{{status=="1"}}'>{{datalist.time}}</view> | ||
8 | + <view class='text_content'> | ||
9 | + <!-- <rich-text nodes="{{datalist.content}}" bindtap="tap"></rich-text> --> | ||
10 | <import src="../../wxParse/wxParse.wxml" /> | 10 | <import src="../../wxParse/wxParse.wxml" /> |
11 | <template is='wxParse' data='{{wxParseData:content.nodes}}' /> | 11 | <template is='wxParse' data='{{wxParseData:content.nodes}}' /> |
12 | + </view> | ||
13 | + <view class='memberbox' wx:if='{{datalist.join.length>0}}'> | ||
14 | + <view class='title'>已成功报名人员</view> | ||
15 | + <view class='member' wx:for='{{datalist.join}}' wx:key=''> | ||
16 | + <image src='{{item.photo}}'></image> | ||
17 | + <view>{{item.name}}</view> | ||
18 | + </view> | ||
19 | + </view> | ||
12 | </view> | 20 | </view> |
13 | -</view> | 21 | +<view class='foot' bindtap='enroll' wx:if='{{datalist.button_status == 1}}'>报名</view> |
22 | +<view class='foot' wx:if='{{datalist.button_status == 2}}'>待审核</view> | ||
23 | +<view class='foot' bindtap='sign' wx:if='{{datalist.button_status == 3}}'>签到</view> | ||
24 | +<view class='foot' wx:if='{{datalist.button_status == 4}}'>已签到</view> | ||
25 | +<view class='foot' wx:if='{{datalist.button_status == 5}}'>已结束</view> | ||
26 | +<navigator url='/pages/result/result' class='foot' wx:if='{{datalist.button_status == 6}}'>成为志愿者</navigator> | ||
27 | +<view class='cover' style='width:100%;height:{{height}};' wx:if='{{cover_type}}'> | ||
28 | + <view class='toast_box'> | ||
29 | + <view class='cover_box' catchtap=''> | ||
30 | + <view class='title'>报名方式</view> | ||
31 | + <image src='/imgs/del.png' class='close' bindtap='change_cover'></image> | ||
32 | + <picker range='{{enroll_arr}}' bindchange='selectenroll'> | ||
33 | + <view class="enroll "> | ||
34 | + {{enroll}} | ||
35 | + </view> | ||
36 | + </picker> | ||
37 | + | ||
38 | + <picker mode='date' bindchange='selecte_startTime' wx:if='{{type}}'> | ||
39 | + <view class='time'> | ||
40 | + {{starTime}} | ||
41 | + </view> | ||
42 | + </picker> | ||
14 | 43 | ||
44 | + <picker mode='date' bindchange='selecte_endTime' wx:if='{{type}}'> | ||
45 | + <view class='time'> | ||
46 | + {{endTime}} | ||
47 | + </view> | ||
48 | + </picker> | ||
49 | + <view class='sub_bnt' bindtap='submit'>确定</view> | ||
50 | + </view> | ||
51 | + </view> | ||
15 | 52 | ||
53 | +</view> |
1 | -/* pages/img_txt/img_txt.wxss */ | ||
2 | -.main{ | ||
3 | - margin: 24rpx 32rpx ; | ||
4 | -} | ||
5 | -.top_img{ | ||
6 | - height:450rpx; | ||
7 | - overflow: hidden; | ||
8 | -} | ||
9 | -.top_img image{ | ||
10 | - width:100%; | ||
11 | - height: 100%; | ||
12 | - display: block; | ||
13 | -} | ||
14 | -.text_title{ | ||
15 | - text-align: center; | ||
16 | - color:#292929; | ||
17 | - font-size:32rpx; | ||
18 | - font-weight: bold; | ||
19 | - padding:24rpx 0 10rpx 0; | ||
20 | -} | ||
21 | -.text_content{ | ||
22 | - /* text-indent: 50rpx; */ | ||
23 | - /* color:#666666; | ||
24 | - font-size:26rpx; */ | ||
25 | - /* line-height: 46rpx; */ | ||
26 | -} | ||
27 | -.text_time{ | ||
28 | - color:#999; | ||
29 | - font-size:26rpx; | ||
30 | - margin: 0 0 10rpx 0; | ||
31 | - text-align: center; | 1 | +page { |
2 | + padding-bottom: 110rpx; | ||
3 | +} | ||
4 | + | ||
5 | +.main { | ||
6 | + margin: 24rpx 32rpx; | ||
7 | +} | ||
8 | + | ||
9 | +.top_img { | ||
10 | + height: 450rpx; | ||
11 | + overflow: hidden; | ||
12 | +} | ||
13 | + | ||
14 | +.top_img image { | ||
15 | + width: 100%; | ||
16 | + height: 100%; | ||
17 | + display: block; | ||
18 | +} | ||
19 | + | ||
20 | +.text_title { | ||
21 | + text-align: center; | ||
22 | + color: #292929; | ||
23 | + font-size: 32rpx; | ||
24 | + font-weight: bold; | ||
25 | + padding: 24rpx 0 10rpx 0; | ||
26 | +} | ||
27 | + | ||
28 | +.text_content { | ||
29 | + /* text-indent: 50rpx; *//* color:#666666; | ||
30 | + font-size:26rpx; *//* line-height: 46rpx; */ | ||
31 | +} | ||
32 | + | ||
33 | +.text_time { | ||
34 | + color: #999; | ||
35 | + font-size: 26rpx; | ||
36 | + margin: 0 0 10rpx 0; | ||
37 | + text-align: center; | ||
38 | +} | ||
39 | + | ||
40 | +.foot { | ||
41 | + width: 100%; | ||
42 | + height: 100rpx; | ||
43 | + background: #21ae59; | ||
44 | + box-shadow: 0rpx 1rpx 54rpx 0rpx rgba(62, 62, 62, 0.1); | ||
45 | + color: #fff; | ||
46 | + font-size: 32rpx; | ||
47 | + text-align: center; | ||
48 | + line-height: 100rpx; | ||
49 | + position: fixed; | ||
50 | + left: 0; | ||
51 | + bottom: 0; | ||
52 | +} | ||
53 | + | ||
54 | +.memberbox { | ||
55 | + width: 100%; | ||
56 | + display: flex; | ||
57 | + flex-wrap: wrap; | ||
58 | + margin-top: 20rpx; | ||
59 | +} | ||
60 | + | ||
61 | +.memberbox .title { | ||
62 | + width: 100%; | ||
63 | + color: #333; | ||
64 | + font-size: 32rpx; | ||
65 | + font-weight: bold; | ||
66 | + margin-bottom: 20rpx; | ||
67 | +} | ||
68 | + | ||
69 | +.member { | ||
70 | + width: 170rpx; | ||
71 | + margin-bottom: 20rpx; | ||
72 | + display: flex; | ||
73 | + flex-wrap: wrap; | ||
74 | + justify-content: center; | ||
75 | +} | ||
76 | + | ||
77 | +.member image { | ||
78 | + width: 120rpx; | ||
79 | + height: 120rpx; | ||
80 | +} | ||
81 | + | ||
82 | +.member view { | ||
83 | + width: 100%; | ||
84 | + padding: 0 10rpx; | ||
85 | + box-sizing: border-box; | ||
86 | + color: #ccc; | ||
87 | + font-size: 26rpx; | ||
88 | + text-align: center; | ||
89 | + overflow: hidden; | ||
90 | + text-overflow: ellipsis; | ||
91 | + white-space: nowrap; | ||
92 | +} | ||
93 | +.cover{ | ||
94 | + position: fixed; | ||
95 | + left: 0; | ||
96 | + top: 0; | ||
97 | + z-index: 2; | ||
98 | + background: rgba(0,0,0,0.6); | ||
99 | +} | ||
100 | +.cover_box{ | ||
101 | + width: 600rpx; | ||
102 | + height: auto; | ||
103 | + border-radius: 10rpx; | ||
104 | + background: #fff; | ||
105 | + padding-bottom: 60rpx; | ||
106 | + padding-top: 20rpx; | ||
107 | + margin: auto; | ||
108 | + position: relative; | ||
109 | +} | ||
110 | +.cover_box .title{ | ||
111 | + width: 500rpx; | ||
112 | + text-align: center; | ||
113 | + color: #333; | ||
114 | + font-size: 30rpx; | ||
115 | + font-weight: bold; | ||
116 | + margin: 50rpx auto 0; | ||
117 | +} | ||
118 | +.enroll,.time{ | ||
119 | + width: 500rpx; | ||
120 | + height: 80rpx; | ||
121 | + border: 2rpx solid #eee; | ||
122 | + color: #999; | ||
123 | + font-size: 30rpx; | ||
124 | + display: flex; | ||
125 | + justify-content: center; | ||
126 | + align-items: center; | ||
127 | + margin: 60rpx auto 20rpx; | ||
128 | + border-radius: 10rpx; | ||
129 | + text-align: left; | ||
130 | +} | ||
131 | +.time{ | ||
132 | + margin-top: 50rpx; | ||
133 | +} | ||
134 | +.active{ | ||
135 | + margin-top: 70rpx ! important; | ||
136 | +} | ||
137 | +.close{ | ||
138 | + width: 50rpx; | ||
139 | + height: 50rpx; | ||
140 | + position: absolute; | ||
141 | + right: 10rpx; | ||
142 | + top: 10rpx; | ||
143 | +} | ||
144 | +.sub_bnt{ | ||
145 | + width: 86%; | ||
146 | + height: 80rpx; | ||
147 | + display: flex; | ||
148 | + align-items: center; | ||
149 | + justify-content: center; | ||
150 | + margin: 0 auto; | ||
151 | + border-radius: 10rpx; | ||
152 | + background: #21ae59; | ||
153 | + color: #FFF; | ||
154 | + margin-top: 80rpx; | ||
155 | + font-size: 32rpx; | ||
156 | +} | ||
157 | +.toast_box{ | ||
158 | + height: 100%; | ||
159 | + width: 100%; | ||
160 | + display: flex; | ||
32 | } | 161 | } |
zhiyuanzhe/pages/index/active/active.js
0 → 100644
1 | +const app = getApp(); | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + clickIndex: true, | ||
9 | + index:0, | ||
10 | + datalist: [], | ||
11 | + activity_page: 0, | ||
12 | + activity: [], | ||
13 | + city_arr: [], | ||
14 | + city_arrid: [], | ||
15 | + class_arr: [], | ||
16 | + class_arrid: [], | ||
17 | + city:'选择城市', | ||
18 | + category: '选择分类', | ||
19 | + }, | ||
20 | + selecteCtiy(e){ | ||
21 | + this.setData({ | ||
22 | + city: this.data.city_arr[e.detail.value], | ||
23 | + city_id: this.data.city_arrid[e.detail.value] | ||
24 | + }) | ||
25 | + this.city_active() | ||
26 | + }, | ||
27 | + selecteClass(e) { | ||
28 | + this.setData({ | ||
29 | + category: this.data.class_arr[e.detail.value], | ||
30 | + type: this.data.class_arrid[e.detail.value] | ||
31 | + }) | ||
32 | + this.type_active() | ||
33 | + }, | ||
34 | + /** | ||
35 | + * 切换 | ||
36 | + */ | ||
37 | + clicktab(e) { | ||
38 | + let that = this | ||
39 | + let id = e.currentTarget.dataset.id | ||
40 | + if (id == '2') { | ||
41 | + that.setData({ | ||
42 | + clickIndexs: true, | ||
43 | + clickIndex: false | ||
44 | + }) | ||
45 | + this.type_active() | ||
46 | + } else if (id == '1') { | ||
47 | + that.setData({ | ||
48 | + clickIndexs: false, | ||
49 | + clickIndex: true | ||
50 | + }) | ||
51 | + this.city_active() | ||
52 | + } | ||
53 | + //调用接口 | ||
54 | + }, | ||
55 | + //获取城市列表 | ||
56 | + get_city(){ | ||
57 | + let that = this; | ||
58 | + let url = '/index/index/cityList'; | ||
59 | + let head = { | ||
60 | + 'XX-Token': wx.getStorageSync('token') | ||
61 | + } | ||
62 | + app.post(url, {}, head).then((res) => { | ||
63 | + | ||
64 | + that.setData({ | ||
65 | + city_arr: res.city, | ||
66 | + city_arrid: res.id | ||
67 | + }) | ||
68 | + }).catch((err) => { | ||
69 | + | ||
70 | + }) | ||
71 | + }, | ||
72 | + //获取分类列表 | ||
73 | + get_class() { | ||
74 | + let that = this; | ||
75 | + let url = '/index/index/activityType'; | ||
76 | + let head = { | ||
77 | + 'XX-Token': wx.getStorageSync('token') | ||
78 | + } | ||
79 | + app.post(url, {}, head).then((res) => { | ||
80 | + | ||
81 | + that.setData({ | ||
82 | + class_arr: res.type_name, | ||
83 | + class_arrid: res.id | ||
84 | + }) | ||
85 | + }).catch((err) => { | ||
86 | + | ||
87 | + }) | ||
88 | + }, | ||
89 | + //获取城市活动 | ||
90 | + city_active(){ | ||
91 | + let that = this; | ||
92 | + let url = '/index/index/cityGetActivity'; | ||
93 | + let head = { | ||
94 | + 'XX-Token': wx.getStorageSync('token') | ||
95 | + } | ||
96 | + let params = { | ||
97 | + city_id: that.data.city_id | ||
98 | + } | ||
99 | + app.post(url, params, head).then((res) => { | ||
100 | + | ||
101 | + that.setData({ | ||
102 | + activity: res | ||
103 | + }) | ||
104 | + }).catch((err) => { | ||
105 | + | ||
106 | + }) | ||
107 | + }, | ||
108 | + | ||
109 | + //获取分类活动 | ||
110 | + type_active() { | ||
111 | + let that = this; | ||
112 | + let url = '/index/index/typeGetActivity'; | ||
113 | + let head = { | ||
114 | + 'XX-Token': wx.getStorageSync('token') | ||
115 | + } | ||
116 | + let params = { | ||
117 | + type: that.data.type | ||
118 | + } | ||
119 | + app.post(url, params, head).then((res) => { | ||
120 | + | ||
121 | + that.setData({ | ||
122 | + activity: res | ||
123 | + }) | ||
124 | + }).catch((err) => { | ||
125 | + | ||
126 | + }) | ||
127 | + }, | ||
128 | + | ||
129 | + | ||
130 | + | ||
131 | + /** | ||
132 | + * 生命周期函数--监听页面加载 | ||
133 | + */ | ||
134 | + onLoad: function (options) { | ||
135 | + let that = this | ||
136 | + that.get_city() | ||
137 | + that.get_class() | ||
138 | + that.city_active() | ||
139 | + }, | ||
140 | + | ||
141 | + /** | ||
142 | + * 生命周期函数--监听页面初次渲染完成 | ||
143 | + */ | ||
144 | + onReady: function () { | ||
145 | + | ||
146 | + }, | ||
147 | + | ||
148 | + /** | ||
149 | + * 生命周期函数--监听页面显示 | ||
150 | + */ | ||
151 | + onShow: function () { | ||
152 | + let that = this; | ||
153 | + | ||
154 | + | ||
155 | + | ||
156 | + }, | ||
157 | + | ||
158 | + /** | ||
159 | + * 生命周期函数--监听页面隐藏 | ||
160 | + */ | ||
161 | + onHide: function () { | ||
162 | + | ||
163 | + }, | ||
164 | + | ||
165 | + /** | ||
166 | + * 生命周期函数--监听页面卸载 | ||
167 | + */ | ||
168 | + onUnload: function () { | ||
169 | + | ||
170 | + }, | ||
171 | + | ||
172 | + /** | ||
173 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
174 | + */ | ||
175 | + onPullDownRefresh: function () { | ||
176 | + | ||
177 | + }, | ||
178 | + | ||
179 | + /** | ||
180 | + * 页面上拉触底事件的处理函数 | ||
181 | + */ | ||
182 | + onReachBottom: function () { | ||
183 | + | ||
184 | + }, | ||
185 | + | ||
186 | + /** | ||
187 | + * 用户点击右上角分享 | ||
188 | + */ | ||
189 | + onShareAppMessage: function () { | ||
190 | + | ||
191 | + } | ||
192 | +}) |
zhiyuanzhe/pages/index/active/active.json
0 → 100644
zhiyuanzhe/pages/index/active/active.wxml
0 → 100644
1 | +<view class='index_newbox'> | ||
2 | + | ||
3 | + <view class='tabbar'> | ||
4 | + <view class='tabbar_item' data-id='1' bindtap='clicktab'> | ||
5 | + <picker range='{{city_arr}}' bindchange='selecteCtiy'> | ||
6 | + <view class="title {{clickIndex?'titleActive':''}}"> | ||
7 | + {{city}} | ||
8 | + </view> | ||
9 | + </picker> | ||
10 | + </view> | ||
11 | + <view class='tabbar_item' data-id='2' bindtap='clicktab'> | ||
12 | + <picker range='{{class_arr}}' bindchange='selecteClass'> | ||
13 | + <view class="title {{clickIndexs?'titleActive':''}}"> | ||
14 | + {{category}} | ||
15 | + </view> | ||
16 | + </picker> | ||
17 | + </view> | ||
18 | + </view> | ||
19 | + <view> | ||
20 | + <view class='new_box'> | ||
21 | + <navigator class='new_cell' wx:for='{{activity}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none"> | ||
22 | + <view class='new_cellmain'> | ||
23 | + <view class='new_img'> | ||
24 | + <image src='{{item.thumbnail}}'> </image> | ||
25 | + </view> | ||
26 | + <view class='new_title'>{{item.activity_name}}</view> | ||
27 | + <view class='title_box'> | ||
28 | + <view> | ||
29 | + <image src='/imgs/dizhi@2x.png' /> | ||
30 | + <text>{{item.province_name}}</text> | ||
31 | + </view> | ||
32 | + <view class='word'>{{item.type_name}}</view> | ||
33 | + </view> | ||
34 | + <view>{{item.time}}</view> | ||
35 | + </view> | ||
36 | + </navigator> | ||
37 | + <view class='empty' wx:if='{{activity.length == 0}}'>暂无数据,请去添加</view> | ||
38 | + </view> | ||
39 | + </view> | ||
40 | +</view> |
zhiyuanzhe/pages/index/active/active.wxss
0 → 100644
1 | +.index_newbox { | ||
2 | + | ||
3 | +} | ||
4 | + | ||
5 | +.new_box { | ||
6 | + display: flex; | ||
7 | + justify-content: space-between; | ||
8 | + align-items: center; | ||
9 | + color: #999; | ||
10 | + padding: 0 32rpx; | ||
11 | + font-size: 24rpx; | ||
12 | + flex-wrap: wrap; | ||
13 | +} | ||
14 | + | ||
15 | +.new_cell { | ||
16 | + width: 48%; | ||
17 | + padding: 29rpx 0rpx; | ||
18 | + /* border-bottom:1rpx solid #E6E6E6; */ | ||
19 | +} | ||
20 | + | ||
21 | +.new_cell:nth-child(2n) { | ||
22 | + margin: 0 0 0 10rpx; | ||
23 | +} | ||
24 | + | ||
25 | +.new_cellmain { | ||
26 | + overflow: hidden; | ||
27 | +} | ||
28 | + | ||
29 | +.new_img { | ||
30 | + width: 336rpx; | ||
31 | + height: 220rpx; | ||
32 | + display: flex; | ||
33 | + align-items: center; | ||
34 | + justify-content: center; | ||
35 | + overflow: hidden; | ||
36 | +} | ||
37 | + | ||
38 | +.new_img image { | ||
39 | + width: 100%; | ||
40 | + height: 100%; | ||
41 | + display: block; | ||
42 | +} | ||
43 | + | ||
44 | +.new_title { | ||
45 | + white-space: nowrap; | ||
46 | + text-overflow: ellipsis; | ||
47 | + overflow: hidden; | ||
48 | + margin: 18rpx 0 13rpx 0; | ||
49 | + color: #292929; | ||
50 | + font-size: 28rpx; | ||
51 | +} | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | +.title_box { | ||
56 | + margin: 18rpx 0 13rpx 0; | ||
57 | + color: #292929; | ||
58 | + font-size: 28rpx; | ||
59 | + display: flex; | ||
60 | + align-items: center; | ||
61 | + justify-content: space-between; | ||
62 | +} | ||
63 | +.title_box image{ | ||
64 | + width: 30rpx; | ||
65 | + height: 30rpx; | ||
66 | + margin-right: 10rpx; | ||
67 | +} | ||
68 | +.title_box .word{ | ||
69 | + color: #666; | ||
70 | + font-size: 24rpx; | ||
71 | +} | ||
72 | +.tabbar { | ||
73 | + width: 100%; | ||
74 | + height: 100rpx; | ||
75 | + display: flex; | ||
76 | + justify-content: space-between; | ||
77 | + border-top: 8rpx solid RGBA(245, 246, 250, 1); | ||
78 | + border-bottom: 2rpx solid RGBA(245, 246, 250, 1); | ||
79 | +} | ||
80 | + | ||
81 | +.tabbar_item { | ||
82 | + width: 50%; | ||
83 | + height: 100%; | ||
84 | +} | ||
85 | + | ||
86 | +.title { | ||
87 | + height: 100%; | ||
88 | + box-sizing: border-box; | ||
89 | + font-size: 32rpx; | ||
90 | + line-height: 100rpx; | ||
91 | + text-align: center; | ||
92 | + font-family: PingFang-SC-Medium; | ||
93 | + margin: 0 auto; | ||
94 | +} | ||
95 | + | ||
96 | +.titleActive { | ||
97 | + color: rgba(152, 97, 225, 1); | ||
98 | + border-bottom: 3rpx solid RGBA(152, 97, 225, 1); | ||
99 | +} | ||
100 | + | ||
101 | +.empty{ | ||
102 | + width: 100%; | ||
103 | + font-size: 32rpx; | ||
104 | + font-family: PingFang-SC-Medium; | ||
105 | + font-weight: 500; | ||
106 | + color: #97a0a8; | ||
107 | + text-align: center; | ||
108 | + margin-top: 50rpx; | ||
109 | +} |
@@ -5,6 +5,7 @@ Page({ | @@ -5,6 +5,7 @@ Page({ | ||
5 | * 页面的初始数据 | 5 | * 页面的初始数据 |
6 | */ | 6 | */ |
7 | data: { | 7 | data: { |
8 | + star_num: 3, | ||
8 | datalist:[], | 9 | datalist:[], |
9 | activity_page:0, | 10 | activity_page:0, |
10 | activity:[] | 11 | activity:[] |
@@ -44,10 +45,11 @@ Page({ | @@ -44,10 +45,11 @@ Page({ | ||
44 | that.setData({ | 45 | that.setData({ |
45 | datalist:res, | 46 | datalist:res, |
46 | activity: temdataactivity, | 47 | activity: temdataactivity, |
47 | - activity_page: res.activity_page | 48 | + activity_page: res.activity_page, |
49 | + begin: res.begin | ||
48 | }) | 50 | }) |
49 | }).catch((err)=>{ | 51 | }).catch((err)=>{ |
50 | - console.log(err) | 52 | + |
51 | }) | 53 | }) |
52 | }, | 54 | }, |
53 | //判断是否登陆 | 55 | //判断是否登陆 |
@@ -82,7 +84,7 @@ let that=this; | @@ -82,7 +84,7 @@ let that=this; | ||
82 | }) | 84 | }) |
83 | } | 85 | } |
84 | }).catch((err)=>{ | 86 | }).catch((err)=>{ |
85 | - console.log(err); | 87 | + |
86 | }) | 88 | }) |
87 | }).catch((errMsg) => { | 89 | }).catch((errMsg) => { |
88 | console.log(errMsg); | 90 | console.log(errMsg); |
1 | <!--index.wxml--> | 1 | <!--index.wxml--> |
2 | <scroll-view scroll-y='true' bindscrolltolower='getdatalist' style='height:{{scroll_height}}rpx'> | 2 | <scroll-view scroll-y='true' bindscrolltolower='getdatalist' style='height:{{scroll_height}}rpx'> |
3 | -<swiper indicator-dots="true" autoplay="true" indicator-color='#8C9194' indicator-active-color='#ffffff' class="slide-image"> | ||
4 | - <navigator wx:for="{{datalist.slide}}" wx:key hover-class="none" url='/pages/img_txt/img_txt?id={{item.activity_id}}&status=1' > | ||
5 | - <swiper-item> | ||
6 | - <image src="{{item.image}}" /> | ||
7 | - </swiper-item> | ||
8 | - </navigator> | ||
9 | -</swiper> | ||
10 | -<view class='vold_line'></view> | ||
11 | -<view class='index_volunteertitle'> | ||
12 | - <view class='title'>志愿者</view> | ||
13 | - <navigator url='/pages/more/more' hover-class="none">更多</navigator> | ||
14 | -</view> | ||
15 | -<view class='volunteerbox'> | ||
16 | - <view class='volunteercell' wx:for='{{datalist.volunteer}}' wx:key id='{{item.id}}'> | ||
17 | - <view class='cell_top'> | ||
18 | - <view class='cellimg'> | ||
19 | - <image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}'></image> | ||
20 | - </view> | ||
21 | - <view>{{item.name}}</view> | 3 | + <swiper indicator-dots="true" autoplay="true" indicator-color='#8C9194' indicator-active-color='#ffffff' class="slide-image"> |
4 | + <navigator wx:for="{{datalist.slide}}" wx:key hover-class="none" url='/pages/img_txt/img_txt?id={{item.activity_id}}&status=1'> | ||
5 | + <swiper-item> | ||
6 | + <image src="{{item.image}}" /> | ||
7 | + </swiper-item> | ||
8 | + </navigator> | ||
9 | + </swiper> | ||
10 | + <view class='vold_line'></view> | ||
11 | + <view class='index_volunteertitle'> | ||
12 | + <view class='title'>志愿者</view> | ||
13 | + <navigator url='/pages/more/more' hover-class="none">更多</navigator> | ||
22 | </view> | 14 | </view> |
23 | - <view>{{item.duty}} | 15 | + <view class='volunteerbox'> |
16 | + <view class='volunteercell' wx:for='{{datalist.volunteer}}' wx:key id='{{item.id}}'> | ||
17 | + <view class='cell_top'> | ||
18 | + <view class='cellimg'> | ||
19 | + <image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}'></image> | ||
20 | + </view> | ||
21 | + <view>{{item.name}}</view> | ||
22 | + </view> | ||
23 | + <view>{{item.duty}}</view> | ||
24 | + <view class='star_box'> | ||
25 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>0}}'></image> | ||
26 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>1}}'></image> | ||
27 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>2}}'></image> | ||
28 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>3}}'></image> | ||
29 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>4}}'></image> | ||
30 | + </view> | ||
31 | + </view> | ||
24 | </view> | 32 | </view> |
25 | - </view> | ||
26 | -</view> | ||
27 | -<view class='vold_line'></view> | ||
28 | -<view class='index_newbox'> | ||
29 | - <view class='title activity_title'>活动快讯</view> | ||
30 | - <view> | ||
31 | - <view class='new_box' wx:for='{{activity}}' wx:key > | ||
32 | - <navigator class='new_cell' wx:for='{{item}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none"> | ||
33 | - <view class='new_cellmain'> | ||
34 | - <view class='new_img'> | ||
35 | - <image src='{{item.thumbnail}}'> </image> | ||
36 | - </view> | ||
37 | - <view class='new_title'>{{item.activity_name}}</view> | ||
38 | - <view>{{item.time}}</view> | 33 | + <view class='vold_line'></view> |
34 | + | ||
35 | + <view class='index_newbox'> | ||
36 | + | ||
37 | + <view class='index_volunteertitle'> | ||
38 | + <view class='title'>即将开始的活动</view> | ||
39 | + <navigator url='/pages/index/active/active' hover-class="none">更多</navigator> | ||
40 | + </view> | ||
41 | + | ||
42 | + <view> | ||
43 | + <view class='new_box'> | ||
44 | + <navigator class='new_cell' wx:for='{{begin}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none"> | ||
45 | + <view class='new_cellmain'> | ||
46 | + <view class='new_img'> | ||
47 | + <image src='{{item.thumbnail}}'> </image> | ||
48 | + </view> | ||
49 | + <view class='new_title'>{{item.activity_name}}</view> | ||
50 | + <view class='title_box'> | ||
51 | + <view> | ||
52 | + <image src='/imgs/dizhi@2x.png' /> | ||
53 | + <text>{{item.province_name}}</text> | ||
54 | + </view> | ||
55 | + <view class='word'>{{item.type_name}}</view> | ||
56 | + </view> | ||
57 | + <view>{{item.time}}</view> | ||
58 | + </view> | ||
59 | + </navigator> | ||
60 | + </view> | ||
61 | + </view> | ||
62 | + </view> | ||
63 | + | ||
64 | + <view class='index_newbox'> | ||
65 | + <view class='title activity_title'>活动快讯</view> | ||
66 | + <view> | ||
67 | + <view class='new_box' wx:for='{{activity}}' wx:key> | ||
68 | + <navigator class='new_cell' wx:for='{{item}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none"> | ||
69 | + <view class='new_cellmain'> | ||
70 | + <view class='new_img'> | ||
71 | + <image src='{{item.thumbnail}}'> </image> | ||
72 | + </view> | ||
73 | + <view class='new_title'>{{item.activity_name}}</view> | ||
74 | + <view>{{item.time}}</view> | ||
75 | + </view> | ||
76 | + </navigator> | ||
77 | + </view> | ||
78 | + </view> | ||
39 | </view> | 79 | </view> |
40 | - </navigator> | ||
41 | - </view> | ||
42 | - </view> | ||
43 | -</view> | ||
44 | </scroll-view> | 80 | </scroll-view> |
1 | /**index.wxss**/ | 1 | /**index.wxss**/ |
2 | -.slide-image{ | ||
3 | - height: 300rpx; | ||
4 | - width:100%; | ||
5 | -} | ||
6 | -.slide-image image{ | ||
7 | - width:100%; | ||
8 | - height: 100%; | ||
9 | -} | ||
10 | -.index_volunteertitle{ | ||
11 | - color:#666666; | ||
12 | - font-size:26rpx; | ||
13 | - display: flex; | ||
14 | - justify-content: space-between; | ||
15 | - align-items: center; | ||
16 | - margin: 32rpx 32rpx 0 32rpx; | ||
17 | -} | ||
18 | -.title{ | ||
19 | - color:#333; | ||
20 | - padding:0 0 0 20rpx; | ||
21 | - font-size:32rpx; | ||
22 | - font-weight: bold; | ||
23 | - position: relative; | ||
24 | -} | ||
25 | -.title::after{ | ||
26 | - position: absolute; | ||
27 | - content: ''; | ||
28 | - top:50%; | ||
29 | - transform: translateY(-50%); | ||
30 | - left:0; | ||
31 | - width:4rpx; | ||
32 | - height: 32rpx; | ||
33 | - background: #21AE59; | ||
34 | -} | ||
35 | -.volunteerbox{ | ||
36 | - margin: 0 32rpx; | ||
37 | - color:#999999; | ||
38 | - font-size: 26rpx; | ||
39 | - display: flex; | ||
40 | - /* justify-content: space-between; */ | ||
41 | - align-items: center; | ||
42 | -} | ||
43 | -.volunteercell{ | ||
44 | - width:33%; | ||
45 | - padding:30rpx 0; | ||
46 | -} | ||
47 | -.cell_top{ | ||
48 | - display: flex; | ||
49 | - align-items: center; | ||
50 | - color:#333; | ||
51 | - font-size: 29rpx; | ||
52 | -} | ||
53 | -.cellimg{ | ||
54 | - display: flex; | ||
55 | - align-items: cneter; | ||
56 | - justify-content: center; | ||
57 | - margin: 0 18rpx 16rpx 0; | ||
58 | - width: 76rpx; | ||
59 | - height: 76rpx; | ||
60 | - border-radius: 50%; | ||
61 | - overflow: hidden; | ||
62 | -} | ||
63 | -.cellimg image{ | ||
64 | - width:100%; | ||
65 | - height: 100%; | ||
66 | - display: block; | ||
67 | -} | ||
68 | -.index_newbox{ | ||
69 | - margin: 32rpx 0rpx 0 0rpx; | ||
70 | -} | ||
71 | -.new_box{ | ||
72 | - display: flex; | ||
73 | - justify-content: space-between; | ||
74 | - align-items: center; | ||
75 | - color:#999; | ||
76 | -padding:0 32rpx; | ||
77 | - font-size:24rpx; | ||
78 | - flex-wrap: wrap; | ||
79 | - border-bottom: 1rpx solid #E6E6E6; | ||
80 | -} | ||
81 | -.new_cell{ | ||
82 | - width:48%; | ||
83 | - padding:29rpx 0rpx; | ||
84 | - /* border-bottom:1rpx solid #E6E6E6; */ | ||
85 | -} | ||
86 | -.new_cell:nth-child(2n){ | ||
87 | - margin: 0 0 0 10rpx; | ||
88 | -} | ||
89 | -.new_cellmain{ | ||
90 | - overflow: hidden; | ||
91 | - | ||
92 | -} | ||
93 | -.new_img{ | ||
94 | - width:336rpx; | ||
95 | - height: 220rpx; | ||
96 | - display: flex; | ||
97 | - align-items: center; | ||
98 | - justify-content: center; | ||
99 | - overflow: hidden; | ||
100 | -} | ||
101 | - | ||
102 | -.new_img image{ | ||
103 | - width:100%; | ||
104 | - height: 100%; | ||
105 | - display: block; | ||
106 | -} | ||
107 | -.new_title{ | ||
108 | - white-space: nowrap; | ||
109 | - text-overflow: ellipsis; | ||
110 | - overflow: hidden; | ||
111 | - margin: 18rpx 0 13rpx 0; | ||
112 | - color:#292929; | ||
113 | - font-size:28rpx; | ||
114 | -} | ||
115 | -.activity_title{ | ||
116 | - margin: 0 32rpx; | 2 | + |
3 | +.slide-image { | ||
4 | + height: 300rpx; | ||
5 | + width: 100%; | ||
6 | +} | ||
7 | + | ||
8 | +.slide-image image { | ||
9 | + width: 100%; | ||
10 | + height: 100%; | ||
11 | +} | ||
12 | + | ||
13 | +.index_volunteertitle { | ||
14 | + color: #666; | ||
15 | + font-size: 26rpx; | ||
16 | + display: flex; | ||
17 | + justify-content: space-between; | ||
18 | + align-items: center; | ||
19 | + margin: 32rpx 32rpx 0 32rpx; | ||
20 | +} | ||
21 | + | ||
22 | +.title { | ||
23 | + color: #333; | ||
24 | + padding: 0 0 0 20rpx; | ||
25 | + font-size: 32rpx; | ||
26 | + font-weight: bold; | ||
27 | + position: relative; | ||
28 | +} | ||
29 | + | ||
30 | +.title::after { | ||
31 | + position: absolute; | ||
32 | + content: ''; | ||
33 | + top: 50%; | ||
34 | + transform: translateY(-50%); | ||
35 | + left: 0; | ||
36 | + width: 4rpx; | ||
37 | + height: 32rpx; | ||
38 | + background: #21ae59; | ||
39 | +} | ||
40 | + | ||
41 | +.volunteerbox { | ||
42 | + margin: 0 32rpx; | ||
43 | + color: #999; | ||
44 | + font-size: 26rpx; | ||
45 | + display: flex; | ||
46 | + /* justify-content: space-between; */ | ||
47 | + align-items: center; | ||
48 | +} | ||
49 | + | ||
50 | +.volunteercell { | ||
51 | + width: 33%; | ||
52 | + padding: 30rpx 0; | ||
53 | +} | ||
54 | + | ||
55 | +.cell_top { | ||
56 | + display: flex; | ||
57 | + align-items: center; | ||
58 | + color: #333; | ||
59 | + font-size: 29rpx; | ||
60 | +} | ||
61 | + | ||
62 | +.cellimg { | ||
63 | + display: flex; | ||
64 | + align-items: cneter; | ||
65 | + justify-content: center; | ||
66 | + margin: 0 18rpx 16rpx 0; | ||
67 | + width: 76rpx; | ||
68 | + height: 76rpx; | ||
69 | + border-radius: 50%; | ||
70 | + overflow: hidden; | ||
71 | +} | ||
72 | + | ||
73 | +.cellimg image { | ||
74 | + width: 100%; | ||
75 | + height: 100%; | ||
76 | + display: block; | ||
77 | +} | ||
78 | +/* 22 */ | ||
79 | +.index_newbox { | ||
80 | + margin: 32rpx 0rpx 0 0rpx; | ||
81 | +} | ||
82 | + | ||
83 | +.new_box { | ||
84 | + display: flex; | ||
85 | + justify-content: space-between; | ||
86 | + align-items: center; | ||
87 | + color: #999; | ||
88 | + padding: 0 32rpx; | ||
89 | + font-size: 24rpx; | ||
90 | + flex-wrap: wrap; | ||
91 | + border-bottom: 1rpx solid #e6e6e6; | ||
92 | +} | ||
93 | + | ||
94 | +.new_cell { | ||
95 | + width: 48%; | ||
96 | + padding: 29rpx 0rpx; | ||
97 | + /* border-bottom:1rpx solid #E6E6E6; */ | ||
98 | +} | ||
99 | + | ||
100 | +.new_cell:nth-child(2n) { | ||
101 | + margin: 0 0 0 10rpx; | ||
102 | +} | ||
103 | + | ||
104 | +.new_cellmain { | ||
105 | + overflow: hidden; | ||
106 | +} | ||
107 | + | ||
108 | +.new_img { | ||
109 | + width: 336rpx; | ||
110 | + height: 220rpx; | ||
111 | + display: flex; | ||
112 | + align-items: center; | ||
113 | + justify-content: center; | ||
114 | + overflow: hidden; | ||
115 | +} | ||
116 | + | ||
117 | +.new_img image { | ||
118 | + width: 100%; | ||
119 | + height: 100%; | ||
120 | + display: block; | ||
121 | +} | ||
122 | + | ||
123 | +.new_title { | ||
124 | + white-space: nowrap; | ||
125 | + text-overflow: ellipsis; | ||
126 | + overflow: hidden; | ||
127 | + margin: 18rpx 0 13rpx 0; | ||
128 | + color: #292929; | ||
129 | + font-size: 28rpx; | ||
130 | +} | ||
131 | + | ||
132 | +.activity_title { | ||
133 | + margin: 0 32rpx; | ||
134 | + display: flex; | ||
135 | + justify-content: space-between; | ||
136 | + align-items: center; | ||
137 | +} | ||
138 | + | ||
139 | +.title_box { | ||
140 | + margin: 18rpx 0 13rpx 0; | ||
141 | + color: #292929; | ||
142 | + font-size: 28rpx; | ||
143 | + display: flex; | ||
144 | + align-items: center; | ||
145 | + justify-content: space-between; | ||
146 | +} | ||
147 | +.title_box image{ | ||
148 | + width: 30rpx; | ||
149 | + height: 30rpx; | ||
150 | + margin-right: 10rpx; | ||
151 | +} | ||
152 | +.title_box .word{ | ||
153 | + color: #666; | ||
154 | + font-size: 24rpx; | ||
155 | +} | ||
156 | +.star_box { | ||
157 | + width: auto; | ||
158 | + height: auto; | ||
159 | + margin-top: 16rpx; | ||
160 | + | ||
161 | +} | ||
162 | +.star_box image { | ||
163 | + width: 28rpx; | ||
164 | + height: 26rpx; | ||
165 | + padding-left: 5rpx; | ||
166 | + padding-right: 5rpx; | ||
167 | +} | ||
168 | +.star_box image:first-child{ | ||
169 | + padding-left: 0; | ||
170 | +} | ||
171 | +.star_box image:last-child{ | ||
172 | + padding-right: 0; | ||
117 | } | 173 | } |
1 | // pages/more/more.js | 1 | // pages/more/more.js |
2 | -const app=getApp(); | 2 | +const app = getApp(); |
3 | Page({ | 3 | Page({ |
4 | 4 | ||
5 | - /** | ||
6 | - * 页面的初始数据 | ||
7 | - */ | ||
8 | - data: { | ||
9 | - page:0, | ||
10 | - pageNum:24, | ||
11 | - volunteer:'' | ||
12 | - }, | ||
13 | - getdatalist(){ | ||
14 | - let that=this; | ||
15 | - let head = { | ||
16 | - 'XX-Token': wx.getStorageSync('token') | ||
17 | - } | ||
18 | - let url ='index/index/volunteer'; | ||
19 | - let params={ | ||
20 | - page: that.data.page, | ||
21 | - pageNum: that.data.pageNum | 5 | + /** |
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + star_num: 3, | ||
10 | + page: 0, | ||
11 | + pageNum: 24, | ||
12 | + volunteer: '' | ||
13 | + }, | ||
14 | + getdatalist() { | ||
15 | + let that = this; | ||
16 | + let head = { | ||
17 | + 'XX-Token': wx.getStorageSync('token') | ||
18 | + } | ||
19 | + let url = 'index/index/volunteer'; | ||
20 | + let params = { | ||
21 | + page: that.data.page, | ||
22 | + pageNum: that.data.pageNum | ||
23 | + } | ||
24 | + app.post(url, params, head).then((res) => { | ||
25 | + let volunteer = res.volunteer; | ||
26 | + let datavolunteer = this.data.volunteer; | ||
27 | + let tem = []; | ||
28 | + let temvolunteer = []; | ||
29 | + for (let i = 0; i < volunteer.length; i++) { | ||
30 | + tem.push(volunteer[i]); | ||
31 | + if ((i + 1) != volunteer.length) { | ||
32 | + if ((i + 1) % 3 == 0) { | ||
33 | + temvolunteer.push(tem); | ||
34 | + tem = []; | ||
35 | + } | ||
36 | + } else { | ||
37 | + temvolunteer.push(tem); | ||
38 | + tem = []; | ||
39 | + } | ||
40 | + } | ||
41 | + let setvolunteer = datavolunteer.concat(temvolunteer); | ||
42 | + that.setData({ | ||
43 | + volunteer: setvolunteer, | ||
44 | + page: res.page | ||
45 | + }) | ||
46 | + }).catch((err) => { | ||
47 | + | ||
48 | + }) | ||
49 | + }, | ||
50 | + /** | ||
51 | + * 生命周期函数--监听页面加载 | ||
52 | + */ | ||
53 | + onLoad: function(options) { | ||
54 | + let windowHeight = wx.getSystemInfoSync().windowHeight; // 屏幕的高度 | ||
55 | + let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度 | ||
56 | + this.setData({ | ||
57 | + scroll_height: windowHeight * 750 / windowWidth | ||
58 | + }) | ||
59 | + }, | ||
60 | + | ||
61 | + /** | ||
62 | + * 生命周期函数--监听页面初次渲染完成 | ||
63 | + */ | ||
64 | + onReady: function() { | ||
65 | + | ||
66 | + }, | ||
67 | + | ||
68 | + /** | ||
69 | + * 生命周期函数--监听页面显示 | ||
70 | + */ | ||
71 | + onShow: function() { | ||
72 | + let that = this; | ||
73 | + that.setData({ | ||
74 | + volunteer: [], | ||
75 | + page: 0 | ||
76 | + }) | ||
77 | + that.getdatalist(); | ||
78 | + | ||
79 | + }, | ||
80 | + | ||
81 | + /** | ||
82 | + * 生命周期函数--监听页面隐藏 | ||
83 | + */ | ||
84 | + onHide: function() { | ||
85 | + | ||
86 | + }, | ||
87 | + | ||
88 | + /** | ||
89 | + * 生命周期函数--监听页面卸载 | ||
90 | + */ | ||
91 | + onUnload: function() { | ||
92 | + | ||
93 | + }, | ||
94 | + | ||
95 | + /** | ||
96 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
97 | + */ | ||
98 | + onPullDownRefresh: function() { | ||
99 | + | ||
100 | + }, | ||
101 | + | ||
102 | + /** | ||
103 | + * 页面上拉触底事件的处理函数 | ||
104 | + */ | ||
105 | + onReachBottom: function() { | ||
106 | + | ||
107 | + }, | ||
108 | + | ||
109 | + /** | ||
110 | + * 用户点击右上角分享 | ||
111 | + */ | ||
112 | + onShareAppMessage: function() { | ||
113 | + | ||
22 | } | 114 | } |
23 | - app.post(url,params,head).then((res)=>{ | ||
24 | - let volunteer= res.volunteer; | ||
25 | - let datavolunteer = this.data.volunteer; | ||
26 | - let tem=[]; | ||
27 | - let temvolunteer=[]; | ||
28 | - for (let i = 0; i < volunteer.length;i++){ | ||
29 | - tem.push(volunteer[i]); | ||
30 | - if ((i + 1) != volunteer.length){ | ||
31 | - if ((i + 1) % 3 == 0) { | ||
32 | - temvolunteer.push(tem); | ||
33 | - tem = []; | ||
34 | - } | ||
35 | - }else{ | ||
36 | - temvolunteer.push(tem); | ||
37 | - tem = []; | ||
38 | - } | ||
39 | - } | ||
40 | - let setvolunteer = datavolunteer.concat(temvolunteer); | ||
41 | - that.setData({ | ||
42 | - volunteer: setvolunteer, | ||
43 | - page: res.page | ||
44 | - }) | ||
45 | - }).catch((err)=>{ | ||
46 | - console.log(err) | ||
47 | - }) | ||
48 | - }, | ||
49 | - /** | ||
50 | - * 生命周期函数--监听页面加载 | ||
51 | - */ | ||
52 | - onLoad: function (options) { | ||
53 | - let windowHeight = wx.getSystemInfoSync().windowHeight;// 屏幕的高度 | ||
54 | - let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度 | ||
55 | - this.setData({ | ||
56 | - scroll_height: windowHeight * 750 / windowWidth | ||
57 | - }) | ||
58 | - }, | ||
59 | - | ||
60 | - /** | ||
61 | - * 生命周期函数--监听页面初次渲染完成 | ||
62 | - */ | ||
63 | - onReady: function () { | ||
64 | - | ||
65 | - }, | ||
66 | - | ||
67 | - /** | ||
68 | - * 生命周期函数--监听页面显示 | ||
69 | - */ | ||
70 | - onShow: function () { | ||
71 | - let that=this; | ||
72 | - that.setData({ | ||
73 | - volunteer: [], | ||
74 | - page: 0 | ||
75 | - }) | ||
76 | - that.getdatalist(); | ||
77 | - | ||
78 | - }, | ||
79 | - | ||
80 | - /** | ||
81 | - * 生命周期函数--监听页面隐藏 | ||
82 | - */ | ||
83 | - onHide: function () { | ||
84 | - | ||
85 | - }, | ||
86 | - | ||
87 | - /** | ||
88 | - * 生命周期函数--监听页面卸载 | ||
89 | - */ | ||
90 | - onUnload: function () { | ||
91 | - | ||
92 | - }, | ||
93 | - | ||
94 | - /** | ||
95 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
96 | - */ | ||
97 | - onPullDownRefresh: function () { | ||
98 | - | ||
99 | - }, | ||
100 | - | ||
101 | - /** | ||
102 | - * 页面上拉触底事件的处理函数 | ||
103 | - */ | ||
104 | - onReachBottom: function () { | ||
105 | - | ||
106 | - }, | ||
107 | - | ||
108 | - /** | ||
109 | - * 用户点击右上角分享 | ||
110 | - */ | ||
111 | - onShareAppMessage: function () { | ||
112 | - | ||
113 | - } | ||
114 | }) | 115 | }) |
1 | <!--pages/more/more.wxml--> | 1 | <!--pages/more/more.wxml--> |
2 | -<scroll-view scroll-y='true' bindscrolltolower='getdatalist' style='height:{{scroll_height}}rpx' > | ||
3 | -<bolck wx:for='{{volunteer}}' wx:key> | ||
4 | -<view class='volunteerbox'> | ||
5 | - <view class='volunteercell' wx:for='{{item}}' wx:key > | ||
6 | - <view class='cell_top'> | ||
7 | - <view class='cellimg'> | ||
8 | - <image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}'></image> | ||
9 | - </view> | ||
10 | - <view>{{item.name}}</view> | ||
11 | - </view> | ||
12 | - <view>{{item.duty}} | ||
13 | - </view> | ||
14 | - </view> | ||
15 | -</view> | ||
16 | -<view class='vold_line'></view> | ||
17 | -</bolck> | ||
18 | -</scroll-view> | ||
19 | - | ||
20 | - | 2 | +<scroll-view scroll-y='true' bindscrolltolower='getdatalist' style='height:{{scroll_height}}rpx'> |
3 | + <bolck wx:for='{{volunteer}}' wx:key> | ||
4 | + <view class='volunteerbox'> | ||
5 | + <view class='volunteercell' wx:for='{{item}}' wx:key> | ||
6 | + <view class='cell_top'> | ||
7 | + <view class='cellimg'> | ||
8 | + <image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}'></image> | ||
9 | + </view> | ||
10 | + <view>{{item.name}}</view> | ||
11 | + </view> | ||
12 | + <view>{{item.duty}} | ||
13 | + </view> | ||
14 | + <view class='star_box'> | ||
15 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>0}}'></image> | ||
16 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>1}}'></image> | ||
17 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>2}}'></image> | ||
18 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>3}}'></image> | ||
19 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>4}}'></image> | ||
20 | + </view> | ||
21 | + </view> | ||
22 | + </view> | ||
23 | + <view class='vold_line'></view> | ||
24 | + </bolck> | ||
25 | +</scroll-view> |
@@ -9,3 +9,21 @@ | @@ -9,3 +9,21 @@ | ||
9 | width:33.333%; | 9 | width:33.333%; |
10 | padding:30rpx 0rpx; | 10 | padding:30rpx 0rpx; |
11 | } | 11 | } |
12 | +.star_box { | ||
13 | + width: auto; | ||
14 | + height: auto; | ||
15 | + margin-top: 16rpx; | ||
16 | + | ||
17 | +} | ||
18 | +.star_box image { | ||
19 | + width: 28rpx; | ||
20 | + height: 26rpx; | ||
21 | + padding-left: 5rpx; | ||
22 | + padding-right: 5rpx; | ||
23 | +} | ||
24 | +.star_box image:first-child{ | ||
25 | + padding-left: 0; | ||
26 | +} | ||
27 | +.star_box image:last-child{ | ||
28 | + padding-right: 0; | ||
29 | +} |
1 | // pages/my/my.js | 1 | // pages/my/my.js |
2 | -const app=getApp(); | 2 | +const app = getApp(); |
3 | Page({ | 3 | Page({ |
4 | 4 | ||
5 | - /** | ||
6 | - * 页面的初始数据 | ||
7 | - */ | ||
8 | - data: { | ||
9 | - datalist:'', | ||
10 | - }, | ||
11 | - getdatalist(){ | ||
12 | - let that=this; | ||
13 | - let url ='index/member_center/index'; | ||
14 | - let head={ | ||
15 | - 'XX-Token': wx.getStorageSync('token') | 5 | + /** |
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + star_num: 3, | ||
10 | + datalist: '', | ||
11 | + }, | ||
12 | + getdatalist() { | ||
13 | + let that = this; | ||
14 | + let url = 'index/member_center/index'; | ||
15 | + let head = { | ||
16 | + 'XX-Token': wx.getStorageSync('token') | ||
17 | + } | ||
18 | + app.post(url, {}, head).then((res) => { | ||
19 | + that.setData({ | ||
20 | + datalist: res | ||
21 | + }) | ||
22 | + }).catch((err) => { | ||
23 | + console.log(err) | ||
24 | + }) | ||
25 | + }, | ||
26 | + goamdin() { | ||
27 | + let that = this; | ||
28 | + | ||
29 | + wx.navigateTo({ | ||
30 | + url: '/pages/admin/admin' | ||
31 | + }) | ||
32 | + | ||
33 | + }, | ||
34 | + /** | ||
35 | + * 生命周期函数--监听页面加载 | ||
36 | + */ | ||
37 | + onLoad: function(options) { | ||
38 | + | ||
39 | + }, | ||
40 | + | ||
41 | + /** | ||
42 | + * 生命周期函数--监听页面初次渲染完成 | ||
43 | + */ | ||
44 | + onReady: function() { | ||
45 | + | ||
46 | + }, | ||
47 | + | ||
48 | + /** | ||
49 | + * 生命周期函数--监听页面显示 | ||
50 | + */ | ||
51 | + onShow: function() { | ||
52 | + let that = this; | ||
53 | + that.getdatalist(); | ||
54 | + }, | ||
55 | + | ||
56 | + /** | ||
57 | + * 生命周期函数--监听页面隐藏 | ||
58 | + */ | ||
59 | + onHide: function() { | ||
60 | + | ||
61 | + }, | ||
62 | + | ||
63 | + /** | ||
64 | + * 生命周期函数--监听页面卸载 | ||
65 | + */ | ||
66 | + onUnload: function() { | ||
67 | + | ||
68 | + }, | ||
69 | + | ||
70 | + /** | ||
71 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
72 | + */ | ||
73 | + onPullDownRefresh: function() { | ||
74 | + | ||
75 | + }, | ||
76 | + | ||
77 | + /** | ||
78 | + * 页面上拉触底事件的处理函数 | ||
79 | + */ | ||
80 | + onReachBottom: function() { | ||
81 | + | ||
82 | + }, | ||
83 | + | ||
84 | + /** | ||
85 | + * 用户点击右上角分享 | ||
86 | + */ | ||
87 | + onShareAppMessage: function() { | ||
88 | + | ||
16 | } | 89 | } |
17 | - app.post(url, {}, head).then((res)=>{ | ||
18 | - that.setData({ | ||
19 | - datalist:res | ||
20 | - }) | ||
21 | - }).catch((err)=>{ | ||
22 | - console.log(err) | ||
23 | - }) | ||
24 | - }, | ||
25 | - goamdin(){ | ||
26 | - let that=this; | ||
27 | - | ||
28 | - wx.navigateTo({ | ||
29 | - url: '/pages/admin/admin' | ||
30 | - }) | ||
31 | - | ||
32 | - }, | ||
33 | - /** | ||
34 | - * 生命周期函数--监听页面加载 | ||
35 | - */ | ||
36 | - onLoad: function (options) { | ||
37 | - | ||
38 | - }, | ||
39 | - | ||
40 | - /** | ||
41 | - * 生命周期函数--监听页面初次渲染完成 | ||
42 | - */ | ||
43 | - onReady: function () { | ||
44 | - | ||
45 | - }, | ||
46 | - | ||
47 | - /** | ||
48 | - * 生命周期函数--监听页面显示 | ||
49 | - */ | ||
50 | - onShow: function () { | ||
51 | - let that=this; | ||
52 | - that.getdatalist(); | ||
53 | - }, | ||
54 | - | ||
55 | - /** | ||
56 | - * 生命周期函数--监听页面隐藏 | ||
57 | - */ | ||
58 | - onHide: function () { | ||
59 | - | ||
60 | - }, | ||
61 | - | ||
62 | - /** | ||
63 | - * 生命周期函数--监听页面卸载 | ||
64 | - */ | ||
65 | - onUnload: function () { | ||
66 | - | ||
67 | - }, | ||
68 | - | ||
69 | - /** | ||
70 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
71 | - */ | ||
72 | - onPullDownRefresh: function () { | ||
73 | - | ||
74 | - }, | ||
75 | - | ||
76 | - /** | ||
77 | - * 页面上拉触底事件的处理函数 | ||
78 | - */ | ||
79 | - onReachBottom: function () { | ||
80 | - | ||
81 | - }, | ||
82 | - | ||
83 | - /** | ||
84 | - * 用户点击右上角分享 | ||
85 | - */ | ||
86 | - onShareAppMessage: function () { | ||
87 | - | ||
88 | - } | ||
89 | }) | 90 | }) |
1 | <!--pages/my/my.wxml--> | 1 | <!--pages/my/my.wxml--> |
2 | <view class='my_head'> | 2 | <view class='my_head'> |
3 | - <image src='https://volunteer.cnpu.org/imgs/gerenzhongxin_bg@2x.png'></image> | ||
4 | - <view class='my_headitem'> | ||
5 | - <view class='my_headitemimg'> | ||
6 | - <image src='{{datalist.avatar}}'></image> | 3 | + <image src='https://volunteer.cnpu.org/imgs/gerenzhongxin_bg@2x.png'></image> |
4 | + <view class='my_headitem'> | ||
5 | + <view class='my_headitemimg'> | ||
6 | + <image src='{{datalist.avatar}}'></image> | ||
7 | + </view> | ||
8 | + <view class='word'>{{datalist.user_nickname}}</view> | ||
9 | + <view class='word'>已完成的工时: {{datalist.work_time}}h</view> | ||
10 | + <view class='star_box'> | ||
11 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>0}}'></image> | ||
12 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>1}}'></image> | ||
13 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>2}}'></image> | ||
14 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>3}}'></image> | ||
15 | + <image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>4}}'></image> | ||
16 | + </view> | ||
7 | </view> | 17 | </view> |
8 | - <view>{{datalist.user_nickname}}</view> | ||
9 | - </view> | ||
10 | </view> | 18 | </view> |
11 | <view class='my_itembox'> | 19 | <view class='my_itembox'> |
12 | - <navigator class='my_item' url='/pages/apply/apply?id={{datalist.id}}&is_submit={{datalist.is_submit}}' hover-class="none" > | ||
13 | - <view class='my_itemletf'> | ||
14 | - <view class='iconfont icon-aixin'></view>成为志愿者 | ||
15 | - </view> | ||
16 | - <view class='iconfont icon-xiangyou'></view> | ||
17 | - </navigator> | ||
18 | - <navigator class='my_item' url='/pages/result/result' hover-class="none"> | ||
19 | - <view class='my_itemletf'> | ||
20 | - <view class='iconfont icon-chakanshenqing'></view>查看审核状态 | ||
21 | - </view> | ||
22 | - <view class='iconfont icon-xiangyou'></view> | ||
23 | - </navigator> | 20 | + <navigator class='my_item' url='/pages/apply/apply?id={{datalist.id}}&is_submit={{datalist.is_submit}}' hover-class="none"> |
21 | + <view class='my_itemletf'> | ||
22 | + <view class='iconfont icon-aixin'></view>成为志愿者 | ||
23 | + </view> | ||
24 | + <view class='iconfont icon-xiangyou'></view> | ||
25 | + </navigator> | ||
26 | + <navigator class='my_item' url='/pages/result/result' hover-class="none"> | ||
27 | + <view class='my_itemletf'> | ||
28 | + <view class='iconfont icon-chakanshenqing'></view>查看审核状态 | ||
29 | + </view> | ||
30 | + <view class='iconfont icon-xiangyou'></view> | ||
31 | + </navigator> | ||
24 | <navigator class='my_item' url='/pages/img_txt/img_txt' hover-class="none" url='/pages/img_txt/img_txt?status=3'> | 32 | <navigator class='my_item' url='/pages/img_txt/img_txt' hover-class="none" url='/pages/img_txt/img_txt?status=3'> |
25 | - <view class='my_itemletf'> | ||
26 | - <view class='iconfont icon-lianximaijia'></view>联系我们 | ||
27 | - </view> | ||
28 | - <view class='iconfont icon-xiangyou'></view> | ||
29 | - </navigator> | ||
30 | - <navigator class='my_item' url='/pages/img_txt/img_txt' hover-class="none" url='/pages/img_txt/img_txt?status=2'> | ||
31 | - <view class='my_itemletf'> | ||
32 | - <view class='iconfont icon-renyuanxiaozu'></view>关于我们 | ||
33 | - </view> | ||
34 | - <view class='iconfont icon-xiangyou'></view> | ||
35 | - </navigator> | ||
36 | - <view class='my_item' bindtap='goamdin' wx:if='{{datalist.type=="2"}}'> | ||
37 | - <view class='my_itemletf'> | ||
38 | - <view class='iconfont icon-gongzhang'></view>管理员审核 | 33 | + <view class='my_itemletf'> |
34 | + <view class='iconfont icon-lianximaijia'></view>联系我们 | ||
35 | + </view> | ||
36 | + <view class='iconfont icon-xiangyou'></view> | ||
37 | + </navigator> | ||
38 | + <navigator class='my_item' url='/pages/img_txt/img_txt' hover-class="none" url='/pages/img_txt/img_txt?status=2'> | ||
39 | + <view class='my_itemletf'> | ||
40 | + <view class='iconfont icon-renyuanxiaozu'></view>关于我们 | ||
41 | + </view> | ||
42 | + <view class='iconfont icon-xiangyou'></view> | ||
43 | + </navigator> | ||
44 | + <navigator class='my_item' url='/pages/my/my_active/my_active' hover-class="none"> | ||
45 | + <view class='my_itemletf'> | ||
46 | + <image src='/imgs/activity-close-open@2x.png' mode='widthFix'></image>参与过的活动 | ||
47 | + </view> | ||
48 | + <view class='iconfont icon-xiangyou'></view> | ||
49 | + </navigator> | ||
50 | + <view class='my_item' bindtap='goamdin' wx:if='{{datalist.type=="2"}}'> | ||
51 | + <view class='my_itemletf'> | ||
52 | + <view class='iconfont icon-gongzhang'></view>管理员审核 | ||
53 | + </view> | ||
54 | + <view class='iconfont icon-xiangyou'></view> | ||
39 | </view> | 55 | </view> |
40 | - <view class='iconfont icon-xiangyou'></view> | ||
41 | - </view> | ||
42 | </view> | 56 | </view> |
1 | /* pages/my/my.wxss */ | 1 | /* pages/my/my.wxss */ |
2 | -.my_head{ | ||
3 | - position: relative; | ||
4 | - height: 268rpx; | ||
5 | - width:750rpx; | ||
6 | -} | ||
7 | -.my_head image{ | ||
8 | - width:100%; | ||
9 | - height: 100%; | ||
10 | - display: block; | ||
11 | -} | ||
12 | -.my_headitem{ | ||
13 | - position: absolute; | ||
14 | - left:50%; | ||
15 | - bottom:-93rpx; | ||
16 | - transform: translateX(-50%); | ||
17 | - color:#5E6661; | ||
18 | - font-weight: bold; | ||
19 | - font-size:32rpx; | ||
20 | -} | ||
21 | -.my_headitemimg{ | ||
22 | - margin: 0 0 32rpx 0; | ||
23 | - width:132rpx; | ||
24 | - height: 132rpx; | ||
25 | - border-radius: 50%; | ||
26 | - overflow: hidden; | ||
27 | - display: flex; | ||
28 | - justify-content: center; | ||
29 | - align-items: center; | ||
30 | -} | ||
31 | -.my_headitemimg image{ | ||
32 | - width:100%; | ||
33 | - height: 100%; | ||
34 | - display: block; | ||
35 | -} | ||
36 | -.my_itembox{ | ||
37 | - margin: 210rpx 0 0 0; | ||
38 | -} | ||
39 | -.my_item{ | ||
40 | - display: flex; | ||
41 | - align-items: center; | ||
42 | - justify-content: space-between; | ||
43 | - | ||
44 | - color:#333; | ||
45 | - font-size:32rpx; | ||
46 | - padding:30rpx 32rpx; | ||
47 | - border-bottom: 1px solid #e6e6e6; | ||
48 | 2 | ||
3 | +.my_head { | ||
4 | + position: relative; | ||
5 | + height: 268rpx; | ||
6 | + width: 750rpx; | ||
49 | } | 7 | } |
50 | -.my_item .iconfont{ | ||
51 | - color:#ccc; | ||
52 | - font-size:32rpx; | 8 | + |
9 | +.my_head image { | ||
10 | + width: 100%; | ||
11 | + height: 100%; | ||
12 | + display: block; | ||
13 | +} | ||
14 | + | ||
15 | +.my_headitem { | ||
16 | + position: absolute; | ||
17 | + left: 50%; | ||
18 | + bottom: -93rpx; | ||
19 | + transform: translateX(-50%); | ||
20 | + color: #5e6661; | ||
21 | + font-weight: bold; | ||
22 | + font-size: 32rpx; | ||
23 | + display: flex; | ||
24 | + flex-wrap: wrap; | ||
25 | + justify-content: center; | ||
26 | + align-items: center; | ||
27 | +} | ||
28 | + | ||
29 | +.my_headitemimg { | ||
30 | + width: 100%; | ||
31 | + display: flex; | ||
32 | + justify-content: center; | ||
33 | + align-items: center; | ||
34 | +} | ||
35 | + | ||
36 | +.my_headitemimg image { | ||
37 | + width: 132rpx; | ||
38 | + height: 132rpx; | ||
39 | + border-radius: 50%; | ||
40 | + display: block; | ||
41 | +} | ||
42 | + | ||
43 | +.my_headitem .word { | ||
44 | + width: 100%; | ||
45 | + text-align: center; | ||
46 | + margin-top: 10rpx; | ||
47 | +} | ||
48 | + | ||
49 | +.my_itembox { | ||
50 | + margin: 210rpx 0 0 0; | ||
53 | } | 51 | } |
54 | -.my_itemletf{ | ||
55 | - display: flex; | ||
56 | - align-items: center; | ||
57 | - justify-content: center; | ||
58 | - color:#333; | ||
59 | - font-size: 32rpx; | 52 | + |
53 | +.my_item { | ||
54 | + display: flex; | ||
55 | + align-items: center; | ||
56 | + justify-content: space-between; | ||
57 | + color: #333; | ||
58 | + font-size: 32rpx; | ||
59 | + padding: 30rpx 32rpx; | ||
60 | + border-bottom: 1px solid #e6e6e6; | ||
61 | +} | ||
62 | + | ||
63 | +.my_item .iconfont { | ||
64 | + color: #ccc; | ||
65 | + font-size: 32rpx; | ||
66 | +} | ||
67 | + | ||
68 | +.my_itemletf { | ||
69 | + display: flex; | ||
70 | + align-items: center; | ||
71 | + justify-content: center; | ||
72 | + color: #333; | ||
73 | + font-size: 32rpx; | ||
74 | +} | ||
75 | +.my_itemletf image{ | ||
76 | + width: 64rpx; | ||
77 | + height: 64rpx; | ||
78 | + margin-right: 5rpx; | ||
79 | + position: relative; | ||
80 | + left: -10rpx; | ||
81 | + top: 0; | ||
60 | } | 82 | } |
61 | -.my_itemletf .iconfont{ | ||
62 | - font-size:40rpx; | ||
63 | - color:#FA8286; | ||
64 | - margin: 0 32rpx 0 0; | 83 | +.my_itemletf .iconfont { |
84 | + font-size: 40rpx; | ||
85 | + color: #fa8286; | ||
86 | + margin: 0 32rpx 0 0; | ||
65 | } | 87 | } |
66 | -.my_itemletf .icon-chakanshenqing{ | ||
67 | - color:#68A6FF; | 88 | + |
89 | +.my_itemletf .icon-chakanshenqing { | ||
90 | + color: #68a6ff; | ||
91 | +} | ||
92 | + | ||
93 | +.my_itemletf .icon-renyuanxiaozu { | ||
94 | + color: #f9a949; | ||
95 | +} | ||
96 | + | ||
97 | +.my_itemletf .icon-gongzhang { | ||
98 | + color: #44cbee; | ||
68 | } | 99 | } |
69 | -.my_itemletf .icon-renyuanxiaozu{ | ||
70 | - color:#F9A949; | 100 | +.star_box { |
101 | + width: auto; | ||
102 | + height: auto; | ||
103 | + margin-top: 16rpx; | ||
104 | + display: flex; | ||
105 | + justify-content: space-between; | ||
71 | } | 106 | } |
72 | -.my_itemletf .icon-gongzhang{ | ||
73 | - color:#44CBEE; | 107 | +.star_box image { |
108 | + width: 28rpx; | ||
109 | + height: 26rpx; | ||
110 | + padding-left: 10rpx; | ||
111 | + padding-right: 10rpx; | ||
74 | } | 112 | } |
zhiyuanzhe/pages/my/my_active/my_active.js
0 → 100644
1 | +const app = getApp(); | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + getdatalist() { | ||
11 | + let that = this; | ||
12 | + let url = '/index/member_center/joined'; | ||
13 | + let head = { | ||
14 | + 'XX-Token': wx.getStorageSync('token') | ||
15 | + } | ||
16 | + let params = {} | ||
17 | + app.post(url, params, head).then((res) => { | ||
18 | + console.log(res) | ||
19 | + that.setData({ | ||
20 | + activity: res | ||
21 | + }) | ||
22 | + // let activity = res.activity; | ||
23 | + // let tem = []; | ||
24 | + // let temactivity = []; | ||
25 | + // for (let i = 0; i < activity.length; i++) { | ||
26 | + // tem.push(activity[i]) | ||
27 | + // if ((i + 1) != activity.length) { | ||
28 | + // if ((i + 1) % 2 == 0) { | ||
29 | + // temactivity.push(tem); | ||
30 | + // tem = []; | ||
31 | + // } | ||
32 | + // } else { | ||
33 | + // temactivity.push(tem); | ||
34 | + // tem = []; | ||
35 | + // } | ||
36 | + | ||
37 | + | ||
38 | + // } | ||
39 | + // let dataactivity = that.data.activity; | ||
40 | + // let temdataactivity = dataactivity.concat(temactivity); | ||
41 | + // that.setData({ | ||
42 | + // datalist: res, | ||
43 | + // activity: temdataactivity, | ||
44 | + // activity_page: res.activity_page | ||
45 | + // }) | ||
46 | + }).catch((err) => { | ||
47 | + console.log(err) | ||
48 | + }) | ||
49 | + }, | ||
50 | + | ||
51 | + /** | ||
52 | + * 生命周期函数--监听页面加载 | ||
53 | + */ | ||
54 | + onLoad: function (options) { | ||
55 | + | ||
56 | + }, | ||
57 | + | ||
58 | + /** | ||
59 | + * 生命周期函数--监听页面初次渲染完成 | ||
60 | + */ | ||
61 | + onReady: function () { | ||
62 | + | ||
63 | + }, | ||
64 | + | ||
65 | + /** | ||
66 | + * 生命周期函数--监听页面显示 | ||
67 | + */ | ||
68 | + onShow: function () { | ||
69 | + let that = this; | ||
70 | + | ||
71 | + that.getdatalist(); | ||
72 | + | ||
73 | + }, | ||
74 | + | ||
75 | + /** | ||
76 | + * 生命周期函数--监听页面隐藏 | ||
77 | + */ | ||
78 | + onHide: function () { | ||
79 | + | ||
80 | + }, | ||
81 | + | ||
82 | + /** | ||
83 | + * 生命周期函数--监听页面卸载 | ||
84 | + */ | ||
85 | + onUnload: function () { | ||
86 | + | ||
87 | + }, | ||
88 | + | ||
89 | + /** | ||
90 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
91 | + */ | ||
92 | + onPullDownRefresh: function () { | ||
93 | + | ||
94 | + }, | ||
95 | + | ||
96 | + /** | ||
97 | + * 页面上拉触底事件的处理函数 | ||
98 | + */ | ||
99 | + onReachBottom: function () { | ||
100 | + | ||
101 | + }, | ||
102 | + | ||
103 | + /** | ||
104 | + * 用户点击右上角分享 | ||
105 | + */ | ||
106 | + onShareAppMessage: function () { | ||
107 | + | ||
108 | + } | ||
109 | +}) |
zhiyuanzhe/pages/my/my_active/my_active.json
0 → 100644
zhiyuanzhe/pages/my/my_active/my_active.wxml
0 → 100644
1 | +<view class='index_newbox'> | ||
2 | + <view> | ||
3 | + <view class='new_box' wx:key> | ||
4 | + <navigator class='new_cell' wx:for='{{activity}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none"> | ||
5 | + <view class='new_cellmain'> | ||
6 | + <view class='new_img'> | ||
7 | + <image src='{{item.thumbnail}}'> </image> | ||
8 | + </view> | ||
9 | + <view class='new_title'>{{item.activity_name}}</view> | ||
10 | + <view class='title_box'> | ||
11 | + <view> | ||
12 | + <image src='/imgs/dizhi@2x.png' /> | ||
13 | + <text>北京</text> | ||
14 | + </view> | ||
15 | + <view class='word'>{{item.type_name}}</view> | ||
16 | + </view> | ||
17 | + <view>{{item.create_time}}</view> | ||
18 | + </view> | ||
19 | + </navigator> | ||
20 | + </view> | ||
21 | + </view> | ||
22 | + </view> | ||
23 | + <view class='empty' wx:if='{{activity.length == 0}}'>暂无数据</view> |
zhiyuanzhe/pages/my/my_active/my_active.wxss
0 → 100644
1 | +.index_newbox { | ||
2 | + margin: 32rpx 0rpx 0 0rpx; | ||
3 | +} | ||
4 | + | ||
5 | +.new_box { | ||
6 | + display: flex; | ||
7 | + justify-content: space-between; | ||
8 | + align-items: center; | ||
9 | + color: #999; | ||
10 | + padding: 0 32rpx; | ||
11 | + font-size: 24rpx; | ||
12 | + flex-wrap: wrap; | ||
13 | +} | ||
14 | + | ||
15 | +.new_cell { | ||
16 | + width: 48%; | ||
17 | + padding: 29rpx 0rpx; | ||
18 | + /* border-bottom:1rpx solid #E6E6E6; */ | ||
19 | +} | ||
20 | + | ||
21 | +.new_cell:nth-child(2n) { | ||
22 | + margin: 0 0 0 10rpx; | ||
23 | +} | ||
24 | + | ||
25 | +.new_cellmain { | ||
26 | + overflow: hidden; | ||
27 | +} | ||
28 | + | ||
29 | +.new_img { | ||
30 | + width: 336rpx; | ||
31 | + height: 220rpx; | ||
32 | + display: flex; | ||
33 | + align-items: center; | ||
34 | + justify-content: center; | ||
35 | + overflow: hidden; | ||
36 | +} | ||
37 | + | ||
38 | +.new_img image { | ||
39 | + width: 100%; | ||
40 | + height: 100%; | ||
41 | + display: block; | ||
42 | +} | ||
43 | + | ||
44 | +.new_title { | ||
45 | + white-space: nowrap; | ||
46 | + text-overflow: ellipsis; | ||
47 | + overflow: hidden; | ||
48 | + margin: 18rpx 0 13rpx 0; | ||
49 | + color: #292929; | ||
50 | + font-size: 28rpx; | ||
51 | +} | ||
52 | + | ||
53 | +.activity_title { | ||
54 | + margin: 0 32rpx; | ||
55 | + display: flex; | ||
56 | + justify-content: space-between; | ||
57 | + align-items: center; | ||
58 | +} | ||
59 | +.activity_title .more{ | ||
60 | + display: inline-block; | ||
61 | + color: #999; | ||
62 | + padding: 5rpx 10rpx; | ||
63 | + border: 2rpx solid #999; | ||
64 | + font-size: 28rpx; | ||
65 | +} | ||
66 | +.title_box { | ||
67 | + margin: 18rpx 0 13rpx 0; | ||
68 | + color: #292929; | ||
69 | + font-size: 28rpx; | ||
70 | + display: flex; | ||
71 | + align-items: center; | ||
72 | + justify-content: space-between; | ||
73 | +} | ||
74 | +.title_box image{ | ||
75 | + width: 30rpx; | ||
76 | + height: 30rpx; | ||
77 | + margin-right: 10rpx; | ||
78 | +} | ||
79 | +.title_box .word{ | ||
80 | + color: #666; | ||
81 | + font-size: 24rpx; | ||
82 | +} | ||
83 | +.empty{ | ||
84 | + width: 100%; | ||
85 | + font-size: 32rpx; | ||
86 | + font-family: PingFang-SC-Medium; | ||
87 | + font-weight: 500; | ||
88 | + color: #97a0a8; | ||
89 | + text-align: center; | ||
90 | + margin-top: 50rpx; | ||
91 | +} |
@@ -4,16 +4,17 @@ | @@ -4,16 +4,17 @@ | ||
4 | "ignore": [] | 4 | "ignore": [] |
5 | }, | 5 | }, |
6 | "setting": { | 6 | "setting": { |
7 | - "urlCheck": true, | 7 | + "urlCheck": false, |
8 | "es6": true, | 8 | "es6": true, |
9 | "postcss": true, | 9 | "postcss": true, |
10 | "minified": true, | 10 | "minified": true, |
11 | - "newFeature": true | 11 | + "newFeature": true, |
12 | + "autoAudits": false | ||
12 | }, | 13 | }, |
13 | "compileType": "miniprogram", | 14 | "compileType": "miniprogram", |
14 | - "libVersion": "2.4.3", | 15 | + "libVersion": "2.6.0", |
15 | "appid": "wx7a3bf4e0796c070a", | 16 | "appid": "wx7a3bf4e0796c070a", |
16 | - "projectname": "zhiyuanzhe1", | 17 | + "projectname": "zhiyuanzhe", |
17 | "debugOptions": { | 18 | "debugOptions": { |
18 | "hidedInDevtools": [] | 19 | "hidedInDevtools": [] |
19 | }, | 20 | }, |
@@ -36,57 +37,8 @@ | @@ -36,57 +37,8 @@ | ||
36 | "list": [] | 37 | "list": [] |
37 | }, | 38 | }, |
38 | "miniprogram": { | 39 | "miniprogram": { |
39 | - "current": 2, | ||
40 | - "list": [ | ||
41 | - { | ||
42 | - "id": -1, | ||
43 | - "name": "index", | ||
44 | - "pathName": "pages/index/index", | ||
45 | - "query": "" | ||
46 | - }, | ||
47 | - { | ||
48 | - "id": 1, | ||
49 | - "name": "index", | ||
50 | - "pathName": "pages/img_txt/img_txt", | ||
51 | - "query": "" | ||
52 | - }, | ||
53 | - { | ||
54 | - "id": 2, | ||
55 | - "name": "apply", | ||
56 | - "pathName": "pages/apply/apply", | ||
57 | - "query": "" | ||
58 | - }, | ||
59 | - { | ||
60 | - "id": -1, | ||
61 | - "name": "index", | ||
62 | - "pathName": "pages/close_apply/close_apply", | ||
63 | - "query": "id=2" | ||
64 | - }, | ||
65 | - { | ||
66 | - "id": -1, | ||
67 | - "name": "mao", | ||
68 | - "pathName": "pages/mao/mao", | ||
69 | - "query": "" | ||
70 | - }, | ||
71 | - { | ||
72 | - "id": -1, | ||
73 | - "name": "start", | ||
74 | - "pathName": "pages/start/start", | ||
75 | - "query": "" | ||
76 | - }, | ||
77 | - { | ||
78 | - "id": -1, | ||
79 | - "name": "my", | ||
80 | - "pathName": "pages/my/my", | ||
81 | - "query": "" | ||
82 | - }, | ||
83 | - { | ||
84 | - "id": -1, | ||
85 | - "name": "o_my", | ||
86 | - "pathName": "pages/start/start", | ||
87 | - "query": "" | ||
88 | - } | ||
89 | - ] | 40 | + "current": -1, |
41 | + "list": [] | ||
90 | } | 42 | } |
91 | } | 43 | } |
92 | } | 44 | } |
-
请 注册 或 登录 后发表评论