作者 吴孟雨

登录注册,绑定手机号,获取验证码,轮播图,本周实验,往期实验,立即预约,实验详情

要显示太多修改。

为保证性能只显示 25 of 25+ 个文件。

1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4"> 2 <project version="4">
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 - <list default="true" id="632eecf6-91e3-4185-aea4-06d243e51935" name="Default" comment="上传到远程wumengyu"> 4 + <list default="true" id="632eecf6-91e3-4185-aea4-06d243e51935" name="Default" comment="合并master">
  5 + <change afterPath="$PROJECT_DIR$/utils/qqmap-wx-jssdk.min.js" afterDir="false" />
  6 + <change afterPath="$PROJECT_DIR$/wxParse/html2json.js" afterDir="false" />
  7 + <change afterPath="$PROJECT_DIR$/wxParse/htmlparser.js" afterDir="false" />
  8 + <change afterPath="$PROJECT_DIR$/wxParse/showdown.js" afterDir="false" />
  9 + <change afterPath="$PROJECT_DIR$/wxParse/wxDiscode.js" afterDir="false" />
  10 + <change afterPath="$PROJECT_DIR$/wxParse/wxParse.js" afterDir="false" />
  11 + <change afterPath="$PROJECT_DIR$/wxParse/wxParse.wxml" afterDir="false" />
  12 + <change afterPath="$PROJECT_DIR$/wxParse/wxParse.wxss" afterDir="false" />
5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> 13 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6 <change beforePath="$PROJECT_DIR$/app.js" beforeDir="false" afterPath="$PROJECT_DIR$/app.js" afterDir="false" /> 14 <change beforePath="$PROJECT_DIR$/app.js" beforeDir="false" afterPath="$PROJECT_DIR$/app.js" afterDir="false" />
7 - <change beforePath="$PROJECT_DIR$/app.json" beforeDir="false" afterPath="$PROJECT_DIR$/app.json" afterDir="false" /> 15 + <change beforePath="$PROJECT_DIR$/pages/clock/clock.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/clock/clock.js" afterDir="false" />
  16 + <change beforePath="$PROJECT_DIR$/pages/clock/clock.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/clock/clock.wxml" afterDir="false" />
  17 + <change beforePath="$PROJECT_DIR$/pages/clock/clock.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/pages/clock/clock.wxss" afterDir="false" />
8 <change beforePath="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js" afterDir="false" /> 18 <change beforePath="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js" afterDir="false" />
9 <change beforePath="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.wxml" afterDir="false" /> 19 <change beforePath="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.wxml" afterDir="false" />
  20 + <change beforePath="$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.js" afterDir="false" />
  21 + <change beforePath="$PROJECT_DIR$/pages/index/go-appointment/go-appointment.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/go-appointment/go-appointment.js" afterDir="false" />
  22 + <change beforePath="$PROJECT_DIR$/pages/index/go-appointment/go-appointment.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/go-appointment/go-appointment.wxml" afterDir="false" />
10 <change beforePath="$PROJECT_DIR$/pages/index/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.js" afterDir="false" /> 23 <change beforePath="$PROJECT_DIR$/pages/index/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.js" afterDir="false" />
11 <change beforePath="$PROJECT_DIR$/pages/index/index.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.wxml" afterDir="false" /> 24 <change beforePath="$PROJECT_DIR$/pages/index/index.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.wxml" afterDir="false" />
  25 + <change beforePath="$PROJECT_DIR$/pages/index/phone-code/phone-code.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/phone-code/phone-code.js" afterDir="false" />
  26 + <change beforePath="$PROJECT_DIR$/pages/index/phone-code/phone-code.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/phone-code/phone-code.wxml" afterDir="false" />
  27 + <change beforePath="$PROJECT_DIR$/pages/my/my.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/my/my.js" afterDir="false" />
  28 + <change beforePath="$PROJECT_DIR$/pages/my/my.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/my/my.wxml" afterDir="false" />
  29 + <change beforePath="$PROJECT_DIR$/pages/my/my.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/pages/my/my.wxss" afterDir="false" />
  30 + <change beforePath="$PROJECT_DIR$/pages/my/protocol/protocol.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/my/protocol/protocol.js" afterDir="false" />
  31 + <change beforePath="$PROJECT_DIR$/pages/my/protocol/protocol.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/my/protocol/protocol.wxml" afterDir="false" />
12 <change beforePath="$PROJECT_DIR$/pages/start/start.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/start/start.js" afterDir="false" /> 32 <change beforePath="$PROJECT_DIR$/pages/start/start.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/start/start.js" afterDir="false" />
13 <change beforePath="$PROJECT_DIR$/project.config.json" beforeDir="false" afterPath="$PROJECT_DIR$/project.config.json" afterDir="false" /> 33 <change beforePath="$PROJECT_DIR$/project.config.json" beforeDir="false" afterPath="$PROJECT_DIR$/project.config.json" afterDir="false" />
14 - <change beforePath="$PROJECT_DIR$/templates/templates.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/templates/templates.wxml" afterDir="false" /> 34 + <change beforePath="$PROJECT_DIR$/utils/util.js" beforeDir="false" afterPath="$PROJECT_DIR$/utils/util.js" afterDir="false" />
15 </list> 35 </list>
16 <ignored path="$PROJECT_DIR$/.tmp/" /> 36 <ignored path="$PROJECT_DIR$/.tmp/" />
17 <ignored path="$PROJECT_DIR$/temp/" /> 37 <ignored path="$PROJECT_DIR$/temp/" />
@@ -26,44 +46,49 @@ @@ -26,44 +46,49 @@
26 <session id="-381596063"> 46 <session id="-381596063">
27 <usages-collector id="statistics.lifecycle.project"> 47 <usages-collector id="statistics.lifecycle.project">
28 <counts> 48 <counts>
29 - <entry key="project.closed" value="3" /> 49 + <entry key="project.closed" value="5" />
30 <entry key="project.open.time.0" value="3" /> 50 <entry key="project.open.time.0" value="3" />
31 - <entry key="project.open.time.1" value="1" />  
32 - <entry key="project.opened" value="4" /> 51 + <entry key="project.open.time.1" value="3" />
  52 + <entry key="project.opened" value="6" />
33 </counts> 53 </counts>
34 </usages-collector> 54 </usages-collector>
35 <usages-collector id="statistics.file.extensions.open"> 55 <usages-collector id="statistics.file.extensions.open">
36 <counts> 56 <counts>
37 - <entry key="js" value="6" />  
38 - <entry key="json" value="4" />  
39 - <entry key="wxml" value="9" />  
40 - <entry key="wxss" value="5" /> 57 + <entry key="js" value="25" />
  58 + <entry key="json" value="11" />
  59 + <entry key="wxml" value="21" />
  60 + <entry key="wxss" value="10" />
41 </counts> 61 </counts>
42 </usages-collector> 62 </usages-collector>
43 <usages-collector id="statistics.file.types.open"> 63 <usages-collector id="statistics.file.types.open">
44 <counts> 64 <counts>
45 - <entry key="CSS" value="5" />  
46 - <entry key="HTML" value="9" />  
47 - <entry key="JSON" value="4" />  
48 - <entry key="JavaScript" value="6" /> 65 + <entry key="CSS" value="10" />
  66 + <entry key="HTML" value="21" />
  67 + <entry key="JSON" value="11" />
  68 + <entry key="JavaScript" value="25" />
49 </counts> 69 </counts>
50 </usages-collector> 70 </usages-collector>
51 <usages-collector id="statistics.file.extensions.edit"> 71 <usages-collector id="statistics.file.extensions.edit">
52 <counts> 72 <counts>
53 - <entry key="js" value="564" />  
54 - <entry key="json" value="27" />  
55 - <entry key="txt" value="36" />  
56 - <entry key="wxml" value="244" />  
57 - <entry key="wxss" value="21" /> 73 + <entry key="js" value="3215" />
  74 + <entry key="json" value="34" />
  75 + <entry key="txt" value="63" />
  76 + <entry key="wxml" value="748" />
  77 + <entry key="wxss" value="23" />
58 </counts> 78 </counts>
59 </usages-collector> 79 </usages-collector>
60 <usages-collector id="statistics.file.types.edit"> 80 <usages-collector id="statistics.file.types.edit">
61 <counts> 81 <counts>
62 - <entry key="CSS" value="21" />  
63 - <entry key="HTML" value="244" />  
64 - <entry key="JSON" value="27" />  
65 - <entry key="JavaScript" value="564" />  
66 - <entry key="PLAIN_TEXT" value="36" /> 82 + <entry key="CSS" value="23" />
  83 + <entry key="HTML" value="748" />
  84 + <entry key="JSON" value="34" />
  85 + <entry key="JavaScript" value="3215" />
  86 + <entry key="PLAIN_TEXT" value="63" />
  87 + </counts>
  88 + </usages-collector>
  89 + <usages-collector id="statistics.vcs.git.usages">
  90 + <counts>
  91 + <entry key="git.branch.merge" value="1" />
67 </counts> 92 </counts>
68 </usages-collector> 93 </usages-collector>
69 </session> 94 </session>
@@ -71,100 +96,104 @@ @@ -71,100 +96,104 @@
71 <component name="FileEditorManager"> 96 <component name="FileEditorManager">
72 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> 97 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
73 <file pinned="false" current-in-tab="false"> 98 <file pinned="false" current-in-tab="false">
74 - <entry file="file://$PROJECT_DIR$/pages/index/index.wxml"> 99 + <entry file="file://$PROJECT_DIR$/pages/index/index.js">
75 <provider selected="true" editor-type-id="text-editor"> 100 <provider selected="true" editor-type-id="text-editor">
76 - <state relative-caret-position="880">  
77 - <caret line="40" lean-forward="true" selection-start-line="40" selection-end-line="40" /> 101 + <state relative-caret-position="-418">
  102 + <caret line="8" column="23" selection-start-line="8" selection-start-column="23" selection-end-line="8" selection-end-column="23" />
  103 + <folding>
  104 + <element signature="n#!!doc" expanded="true" />
  105 + </folding>
78 </state> 106 </state>
79 </provider> 107 </provider>
80 </entry> 108 </entry>
81 </file> 109 </file>
82 <file pinned="false" current-in-tab="false"> 110 <file pinned="false" current-in-tab="false">
83 - <entry file="file://$PROJECT_DIR$/pages/index/index.wxss"> 111 + <entry file="file://$PROJECT_DIR$/pages/start/start.js">
84 <provider selected="true" editor-type-id="text-editor"> 112 <provider selected="true" editor-type-id="text-editor">
85 - <state relative-caret-position="154">  
86 - <caret line="7" column="21" lean-forward="true" selection-start-line="7" selection-start-column="21" selection-end-line="7" selection-end-column="21" /> 113 + <state relative-caret-position="676">
  114 + <caret line="37" column="25" lean-forward="true" selection-start-line="37" selection-start-column="25" selection-end-line="37" selection-end-column="25" />
87 </state> 115 </state>
88 </provider> 116 </provider>
89 </entry> 117 </entry>
90 </file> 118 </file>
91 <file pinned="false" current-in-tab="false"> 119 <file pinned="false" current-in-tab="false">
92 - <entry file="file://$PROJECT_DIR$/pages/index/index.js"> 120 + <entry file="file://$PROJECT_DIR$/app.js">
93 <provider selected="true" editor-type-id="text-editor"> 121 <provider selected="true" editor-type-id="text-editor">
94 - <state relative-caret-position="506">  
95 - <caret line="98" column="64" selection-start-line="98" selection-start-column="64" selection-end-line="98" selection-end-column="64" /> 122 + <state relative-caret-position="344">
  123 + <caret line="140" column="12" selection-start-line="140" selection-start-column="4" selection-end-line="140" selection-end-column="12" />
96 <folding> 124 <folding>
97 <element signature="n#!!doc" expanded="true" /> 125 <element signature="n#!!doc" expanded="true" />
98 - <element signature="e#1018#1103#0" />  
99 - <element signature="e#1121#1191#0" />  
100 - <element signature="e#1219#1288#0" />  
101 - <element signature="e#1321#1468#0" />  
102 - <element signature="e#1499#1619#0" />  
103 - <element signature="e#1750#1766#0" />  
104 </folding> 126 </folding>
105 </state> 127 </state>
106 </provider> 128 </provider>
107 </entry> 129 </entry>
108 </file> 130 </file>
109 <file pinned="false" current-in-tab="false"> 131 <file pinned="false" current-in-tab="false">
110 - <entry file="file://$PROJECT_DIR$/templates/templates.wxml"> 132 + <entry file="file://$PROJECT_DIR$/utils/util.js">
111 <provider selected="true" editor-type-id="text-editor"> 133 <provider selected="true" editor-type-id="text-editor">
112 - <state relative-caret-position="374">  
113 - <caret line="29" column="65" selection-start-line="29" selection-start-column="65" selection-end-line="29" selection-end-column="65" /> 134 + <state relative-caret-position="946">
  135 + <caret line="43" column="15" selection-start-line="43" selection-start-column="2" selection-end-line="43" selection-end-column="15" />
114 </state> 136 </state>
115 </provider> 137 </provider>
116 </entry> 138 </entry>
117 </file> 139 </file>
118 - <file pinned="false" current-in-tab="true">  
119 - <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.wxml"> 140 + <file pinned="false" current-in-tab="false">
  141 + <entry file="file://$PROJECT_DIR$/pages/index/go-appointment/go-appointment.wxml">
120 <provider selected="true" editor-type-id="text-editor"> 142 <provider selected="true" editor-type-id="text-editor">
121 - <state relative-caret-position="198">  
122 - <caret line="9" column="35" selection-start-line="9" selection-start-column="35" selection-end-line="9" selection-end-column="35" /> 143 + <state relative-caret-position="638">
  144 + <caret line="41" column="90" selection-start-line="41" selection-start-column="72" selection-end-line="41" selection-end-column="90" />
123 </state> 145 </state>
124 </provider> 146 </provider>
125 </entry> 147 </entry>
126 </file> 148 </file>
127 <file pinned="false" current-in-tab="false"> 149 <file pinned="false" current-in-tab="false">
128 - <entry file="file://$PROJECT_DIR$/pages/start/start.wxml"> 150 + <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js">
129 <provider selected="true" editor-type-id="text-editor"> 151 <provider selected="true" editor-type-id="text-editor">
130 - <state relative-caret-position="132">  
131 - <caret line="6" column="15" lean-forward="true" selection-start-line="6" selection-start-column="15" selection-end-line="6" selection-end-column="15" /> 152 + <state relative-caret-position="374">
  153 + <caret line="29" column="44" lean-forward="true" selection-start-line="29" selection-start-column="44" selection-end-line="29" selection-end-column="44" />
132 </state> 154 </state>
133 </provider> 155 </provider>
134 </entry> 156 </entry>
135 </file> 157 </file>
136 - <file pinned="false" current-in-tab="false">  
137 - <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.json">  
138 - <provider selected="true" editor-type-id="text-editor" />  
139 - </entry>  
140 - </file>  
141 - <file pinned="false" current-in-tab="false">  
142 - <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js"> 158 + <file pinned="false" current-in-tab="true">
  159 + <entry file="file://$PROJECT_DIR$/pages/index/go-appointment/go-appointment.js">
143 <provider selected="true" editor-type-id="text-editor"> 160 <provider selected="true" editor-type-id="text-editor">
144 - <state relative-caret-position="550">  
145 - <caret line="25" column="32" selection-start-line="25" selection-start-column="32" selection-end-line="25" selection-end-column="32" /> 161 + <state relative-caret-position="198">
  162 + <caret line="125" column="20" lean-forward="true" selection-start-line="125" selection-start-column="20" selection-end-line="125" selection-end-column="20" />
  163 + <folding>
  164 + <element signature="e#243#454#0" />
  165 + <element signature="e#462#673#0" />
  166 + <element signature="e#681#893#0" />
  167 + <element signature="e#901#1114#0" />
  168 + <element signature="e#1177#2298#0" />
  169 + </folding>
146 </state> 170 </state>
147 </provider> 171 </provider>
148 </entry> 172 </entry>
149 </file> 173 </file>
150 <file pinned="false" current-in-tab="false"> 174 <file pinned="false" current-in-tab="false">
151 - <entry file="file://$PROJECT_DIR$/pages/start/start.js"> 175 + <entry file="file://$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.js">
152 <provider selected="true" editor-type-id="text-editor"> 176 <provider selected="true" editor-type-id="text-editor">
153 - <state relative-caret-position="374">  
154 - <caret line="29" column="49" lean-forward="true" selection-start-line="29" selection-start-column="12" selection-end-line="29" selection-end-column="49" /> 177 + <state relative-caret-position="302">
  178 + <caret line="44" column="20" lean-forward="true" selection-start-line="44" selection-start-column="20" selection-end-line="44" selection-end-column="20" />
155 </state> 179 </state>
156 </provider> 180 </provider>
157 </entry> 181 </entry>
158 </file> 182 </file>
159 <file pinned="false" current-in-tab="false"> 183 <file pinned="false" current-in-tab="false">
160 - <entry file="file://$PROJECT_DIR$/app.json"> 184 + <entry file="file://$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.wxml">
161 <provider selected="true" editor-type-id="text-editor"> 185 <provider selected="true" editor-type-id="text-editor">
162 - <state relative-caret-position="440">  
163 - <caret line="20" column="38" selection-start-line="20" selection-start-column="38" selection-end-line="20" selection-end-column="38" /> 186 + <state relative-caret-position="852">
  187 + <caret line="50" column="42" selection-start-line="50" selection-start-column="42" selection-end-line="50" selection-end-column="42" />
164 </state> 188 </state>
165 </provider> 189 </provider>
166 </entry> 190 </entry>
167 </file> 191 </file>
  192 + <file pinned="false" current-in-tab="false">
  193 + <entry file="file://$PROJECT_DIR$/pages/index/go-appointment/go-appointment.json">
  194 + <provider selected="true" editor-type-id="text-editor" />
  195 + </entry>
  196 + </file>
168 </leaf> 197 </leaf>
169 </component> 198 </component>
170 <component name="FindInProjectRecents"> 199 <component name="FindInProjectRecents">
@@ -172,6 +201,21 @@ @@ -172,6 +201,21 @@
172 <find>chooseYes</find> 201 <find>chooseYes</find>
173 <find>baseUrl</find> 202 <find>baseUrl</find>
174 <find>getUserInfo</find> 203 <find>getUserInfo</find>
  204 + <find>协议</find>
  205 + <find>serviceProtocol</find>
  206 + <find>goTestDetail</find>
  207 + <find>modal</find>
  208 + <find>goPhoneCode</find>
  209 + <find>QQMapWX</find>
  210 + <find>XX</find>
  211 + <find>showM</find>
  212 + <find>goAppointment</find>
  213 + <find>bindPickerChange</find>
  214 + <find>show_submit_btn</find>
  215 + <find>submit</find>
  216 + <find>current_test_id</find>
  217 + <find>current_session_id</find>
  218 + <find>currentId</find>
175 </findStrings> 219 </findStrings>
176 </component> 220 </component>
177 <component name="Git.Settings"> 221 <component name="Git.Settings">
@@ -182,16 +226,30 @@ @@ -182,16 +226,30 @@
182 <list> 226 <list>
183 <option value="$PROJECT_DIR$/templates/templates.wxss" /> 227 <option value="$PROJECT_DIR$/templates/templates.wxss" />
184 <option value="$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.wxss" /> 228 <option value="$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.wxss" />
185 - <option value="$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.js" />  
186 <option value="$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.wxml" /> 229 <option value="$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.wxml" />
187 - <option value="$PROJECT_DIR$/app.js" />  
188 - <option value="$PROJECT_DIR$/pages/start/start.js" />  
189 - <option value="$PROJECT_DIR$/pages/index/index.wxml" />  
190 <option value="$PROJECT_DIR$/templates/templates.wxml" /> 230 <option value="$PROJECT_DIR$/templates/templates.wxml" />
191 - <option value="$PROJECT_DIR$/pages/index/index.js" /> 231 + <option value="$PROJECT_DIR$/pages/my/protocol/protocol.wxml" />
  232 + <option value="$PROJECT_DIR$/pages/my/protocol/protocol.js" />
  233 + <option value="$PROJECT_DIR$/project.config.json" />
  234 + <option value="$PROJECT_DIR$/pages/start/start.js" />
  235 + <option value="$PROJECT_DIR$/pages/clock/clock.wxml" />
  236 + <option value="$PROJECT_DIR$/pages/my/my.wxml" />
  237 + <option value="$PROJECT_DIR$/pages/clock/clock.wxss" />
  238 + <option value="$PROJECT_DIR$/pages/my/my.wxss" />
  239 + <option value="$PROJECT_DIR$/pages/my/my.js" />
  240 + <option value="$PROJECT_DIR$/pages/clock/clock.js" />
192 <option value="$PROJECT_DIR$/app.json" /> 241 <option value="$PROJECT_DIR$/app.json" />
193 - <option value="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js" /> 242 + <option value="$PROJECT_DIR$/pages/index/phone-code/phone-code.wxml" />
  243 + <option value="$PROJECT_DIR$/pages/index/phone-code/phone-code.js" />
  244 + <option value="$PROJECT_DIR$/pages/index/index.js" />
  245 + <option value="$PROJECT_DIR$/pages/index/index.wxml" />
194 <option value="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.wxml" /> 246 <option value="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.wxml" />
  247 + <option value="$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js" />
  248 + <option value="$PROJECT_DIR$/app.js" />
  249 + <option value="$PROJECT_DIR$/utils/util.js" />
  250 + <option value="$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.js" />
  251 + <option value="$PROJECT_DIR$/pages/index/go-appointment/go-appointment.wxml" />
  252 + <option value="$PROJECT_DIR$/pages/index/go-appointment/go-appointment.js" />
195 </list> 253 </list>
196 </option> 254 </option>
197 </component> 255 </component>
@@ -243,7 +301,14 @@ @@ -243,7 +301,14 @@
243 <item name="ScienceCaptain" type="462c0819:PsiDirectoryNode" /> 301 <item name="ScienceCaptain" type="462c0819:PsiDirectoryNode" />
244 <item name="pages" type="462c0819:PsiDirectoryNode" /> 302 <item name="pages" type="462c0819:PsiDirectoryNode" />
245 <item name="index" type="462c0819:PsiDirectoryNode" /> 303 <item name="index" type="462c0819:PsiDirectoryNode" />
246 - <item name="phone-code" type="462c0819:PsiDirectoryNode" /> 304 + <item name="confirm-appointment-info" type="462c0819:PsiDirectoryNode" />
  305 + </path>
  306 + <path>
  307 + <item name="ScienceCaptain" type="b2602c69:ProjectViewProjectNode" />
  308 + <item name="ScienceCaptain" type="462c0819:PsiDirectoryNode" />
  309 + <item name="pages" type="462c0819:PsiDirectoryNode" />
  310 + <item name="index" type="462c0819:PsiDirectoryNode" />
  311 + <item name="go-appointment" type="462c0819:PsiDirectoryNode" />
247 </path> 312 </path>
248 <path> 313 <path>
249 <item name="ScienceCaptain" type="b2602c69:ProjectViewProjectNode" /> 314 <item name="ScienceCaptain" type="b2602c69:ProjectViewProjectNode" />
@@ -254,7 +319,7 @@ @@ -254,7 +319,7 @@
254 <path> 319 <path>
255 <item name="ScienceCaptain" type="b2602c69:ProjectViewProjectNode" /> 320 <item name="ScienceCaptain" type="b2602c69:ProjectViewProjectNode" />
256 <item name="ScienceCaptain" type="462c0819:PsiDirectoryNode" /> 321 <item name="ScienceCaptain" type="462c0819:PsiDirectoryNode" />
257 - <item name="templates" type="462c0819:PsiDirectoryNode" /> 322 + <item name="utils" type="462c0819:PsiDirectoryNode" />
258 </path> 323 </path>
259 </expand> 324 </expand>
260 <select /> 325 <select />
@@ -264,11 +329,17 @@ @@ -264,11 +329,17 @@
264 </component> 329 </component>
265 <component name="PropertiesComponent"> 330 <component name="PropertiesComponent">
266 <property name="WebServerToolWindowFactoryState" value="false" /> 331 <property name="WebServerToolWindowFactoryState" value="false" />
267 - <property name="last_opened_file_path" value="D:/project/life" /> 332 + <property name="last_opened_file_path" value="D:/info/informationPlatform" />
268 <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> 333 <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
269 <property name="nodejs_npm_path_reset_for_default_project" value="true" /> 334 <property name="nodejs_npm_path_reset_for_default_project" value="true" />
270 <property name="settings.editor.selected.configurable" value="project.propDebugger" /> 335 <property name="settings.editor.selected.configurable" value="project.propDebugger" />
271 </component> 336 </component>
  337 + <component name="RecentsManager">
  338 + <key name="CopyFile.RECENT_KEYS">
  339 + <recent name="D:\小程序\scienceCaptain\ScienceCaptain" />
  340 + <recent name="D:\小程序\scienceCaptain\ScienceCaptain\utils" />
  341 + </key>
  342 + </component>
272 <component name="RunDashboard"> 343 <component name="RunDashboard">
273 <option name="ruleStates"> 344 <option name="ruleStates">
274 <list> 345 <list>
@@ -295,7 +366,9 @@ @@ -295,7 +366,9 @@
295 <workItem from="1542249556873" duration="6568000" /> 366 <workItem from="1542249556873" duration="6568000" />
296 <workItem from="1542594514355" duration="2482000" /> 367 <workItem from="1542594514355" duration="2482000" />
297 <workItem from="1542676616270" duration="2495000" /> 368 <workItem from="1542676616270" duration="2495000" />
298 - <workItem from="1543297125303" duration="4846000" /> 369 + <workItem from="1543297125303" duration="6704000" />
  370 + <workItem from="1543303923342" duration="8358000" />
  371 + <workItem from="1543367358458" duration="25214000" />
299 </task> 372 </task>
300 <task id="LOCAL-00001" summary="modal 模板"> 373 <task id="LOCAL-00001" summary="modal 模板">
301 <created>1542274356914</created> 374 <created>1542274356914</created>
@@ -311,11 +384,25 @@ @@ -311,11 +384,25 @@
311 <option name="project" value="LOCAL" /> 384 <option name="project" value="LOCAL" />
312 <updated>1542275805566</updated> 385 <updated>1542275805566</updated>
313 </task> 386 </task>
314 - <option name="localTasksCounter" value="3" /> 387 + <task id="LOCAL-00003" summary="对接本周实验,往期实验,登录接口">
  388 + <created>1543302198978</created>
  389 + <option name="number" value="00003" />
  390 + <option name="presentableId" value="LOCAL-00003" />
  391 + <option name="project" value="LOCAL" />
  392 + <updated>1543302198978</updated>
  393 + </task>
  394 + <task id="LOCAL-00004" summary="合并master">
  395 + <created>1543303397807</created>
  396 + <option name="number" value="00004" />
  397 + <option name="presentableId" value="LOCAL-00004" />
  398 + <option name="project" value="LOCAL" />
  399 + <updated>1543303397807</updated>
  400 + </task>
  401 + <option name="localTasksCounter" value="5" />
315 <servers /> 402 <servers />
316 </component> 403 </component>
317 <component name="TimeTrackingManager"> 404 <component name="TimeTrackingManager">
318 - <option name="totallyTimeSpent" value="16627000" /> 405 + <option name="totallyTimeSpent" value="52057000" />
319 </component> 406 </component>
320 <component name="ToolWindowManager"> 407 <component name="ToolWindowManager">
321 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> 408 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
@@ -375,7 +462,9 @@ @@ -375,7 +462,9 @@
375 <component name="VcsManagerConfiguration"> 462 <component name="VcsManagerConfiguration">
376 <MESSAGE value="modal 模板" /> 463 <MESSAGE value="modal 模板" />
377 <MESSAGE value="上传到远程wumengyu" /> 464 <MESSAGE value="上传到远程wumengyu" />
378 - <option name="LAST_COMMIT_MESSAGE" value="上传到远程wumengyu" /> 465 + <MESSAGE value="对接本周实验,往期实验,登录接口" />
  466 + <MESSAGE value="合并master" />
  467 + <option name="LAST_COMMIT_MESSAGE" value="合并master" />
379 </component> 468 </component>
380 <component name="editorHistoryManager"> 469 <component name="editorHistoryManager">
381 <entry file="file://$PROJECT_DIR$/pages/myProfile/myProfile.json" /> 470 <entry file="file://$PROJECT_DIR$/pages/myProfile/myProfile.json" />
@@ -390,160 +479,255 @@ @@ -390,160 +479,255 @@
390 <entry file="file://$PROJECT_DIR$/pages/my/all-appointment/all-appointment.wxml"> 479 <entry file="file://$PROJECT_DIR$/pages/my/all-appointment/all-appointment.wxml">
391 <provider selected="true" editor-type-id="text-editor" /> 480 <provider selected="true" editor-type-id="text-editor" />
392 </entry> 481 </entry>
393 - <entry file="file://$PROJECT_DIR$/pages/my/protocol/protocol.wxml"> 482 + <entry file="file://$PROJECT_DIR$/templates/templates.wxss">
  483 + <provider selected="true" editor-type-id="text-editor">
  484 + <state>
  485 + <caret column="34" selection-start-column="34" selection-end-column="34" />
  486 + </state>
  487 + </provider>
  488 + </entry>
  489 + <entry file="file://$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.wxss">
  490 + <provider selected="true" editor-type-id="text-editor">
  491 + <state relative-caret-position="462">
  492 + <caret line="21" column="6" selection-start-line="21" selection-start-column="6" selection-end-line="21" selection-end-column="6" />
  493 + </state>
  494 + </provider>
  495 + </entry>
  496 + <entry file="file://$PROJECT_DIR$/pages/my/myCard/myCard.wxml">
394 <provider selected="true" editor-type-id="text-editor" /> 497 <provider selected="true" editor-type-id="text-editor" />
395 </entry> 498 </entry>
396 - <entry file="file://$PROJECT_DIR$/project.config.json"> 499 + <entry file="file://$PROJECT_DIR$/pages/start/start.wxml">
397 <provider selected="true" editor-type-id="text-editor"> 500 <provider selected="true" editor-type-id="text-editor">
398 - <state relative-caret-position="352">  
399 - <caret line="16" column="21" selection-start-line="16" selection-start-column="21" selection-end-line="16" selection-end-column="21" /> 501 + <state relative-caret-position="132">
  502 + <caret line="6" column="15" selection-start-line="6" selection-start-column="15" selection-end-line="6" selection-end-column="15" />
400 </state> 503 </state>
401 </provider> 504 </provider>
402 </entry> 505 </entry>
403 - <entry file="file://$PROJECT_DIR$/templates/templates.wxss"> 506 + <entry file="file://$PROJECT_DIR$/templates/templates.wxml">
404 <provider selected="true" editor-type-id="text-editor"> 507 <provider selected="true" editor-type-id="text-editor">
405 - <state>  
406 - <caret column="34" selection-start-column="34" selection-end-column="34" /> 508 + <state relative-caret-position="242">
  509 + <caret line="11" column="57" selection-start-line="11" selection-start-column="32" selection-end-line="11" selection-end-column="57" />
407 </state> 510 </state>
408 </provider> 511 </provider>
409 </entry> 512 </entry>
410 - <entry file="file://$PROJECT_DIR$/pages/index/phone-code/phone-code.js"> 513 + <entry file="file://$PROJECT_DIR$/pages/my/groupBuy/groupBuy.wxml">
411 <provider selected="true" editor-type-id="text-editor"> 514 <provider selected="true" editor-type-id="text-editor">
412 - <state relative-caret-position="550">  
413 - <caret line="25" column="28" selection-start-line="25" selection-start-column="28" selection-end-line="25" selection-end-column="28" /> 515 + <state relative-caret-position="2684">
  516 + <caret line="122" column="59" selection-start-line="122" selection-start-column="44" selection-end-line="122" selection-end-column="59" />
414 </state> 517 </state>
415 </provider> 518 </provider>
416 </entry> 519 </entry>
417 - <entry file="file://$PROJECT_DIR$/pages/index/phone-code/phone-code.wxml"> 520 + <entry file="file://$PROJECT_DIR$/pages/my/groupBuy/groupBuy.js">
418 <provider selected="true" editor-type-id="text-editor"> 521 <provider selected="true" editor-type-id="text-editor">
419 - <state relative-caret-position="220">  
420 - <caret line="10" selection-start-line="10" selection-end-line="12" selection-end-column="21" /> 522 + <state relative-caret-position="528">
  523 + <caret line="24" selection-start-line="24" selection-end-line="29" selection-end-column="4" />
  524 + </state>
  525 + </provider>
  526 + </entry>
  527 + <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.json">
  528 + <provider selected="true" editor-type-id="text-editor" />
  529 + </entry>
  530 + <entry file="file://$PROJECT_DIR$/pages/my/protocol/protocol.wxml">
  531 + <provider selected="true" editor-type-id="text-editor">
  532 + <state relative-caret-position="66">
  533 + <caret line="3" column="27" selection-start-line="3" selection-start-column="27" selection-end-line="3" selection-end-column="27" />
421 </state> 534 </state>
422 </provider> 535 </provider>
423 </entry> 536 </entry>
424 <entry file="file://$PROJECT_DIR$/pages/index/phone-code/phone-code.wxss"> 537 <entry file="file://$PROJECT_DIR$/pages/index/phone-code/phone-code.wxss">
425 <provider selected="true" editor-type-id="text-editor"> 538 <provider selected="true" editor-type-id="text-editor">
426 - <state relative-caret-position="924"> 539 + <state relative-caret-position="828">
427 <caret line="42" selection-start-line="42" selection-end-line="59" selection-end-column="1" /> 540 <caret line="42" selection-start-line="42" selection-end-line="59" selection-end-column="1" />
428 </state> 541 </state>
429 </provider> 542 </provider>
430 </entry> 543 </entry>
431 - <entry file="file://$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.wxss"> 544 + <entry file="file://$PROJECT_DIR$/pages/index/phone-code/phone-code.json">
432 <provider selected="true" editor-type-id="text-editor"> 545 <provider selected="true" editor-type-id="text-editor">
433 - <state relative-caret-position="462">  
434 - <caret line="21" column="6" selection-start-line="21" selection-start-column="6" selection-end-line="21" selection-end-column="6" /> 546 + <state relative-caret-position="44">
  547 + <caret line="2" column="1" selection-start-line="2" selection-start-column="1" selection-end-line="2" selection-end-column="1" />
435 </state> 548 </state>
436 </provider> 549 </provider>
437 </entry> 550 </entry>
438 - <entry file="file://$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.wxml"> 551 + <entry file="file://$PROJECT_DIR$/pages/my/protocol/protocol.js">
439 <provider selected="true" editor-type-id="text-editor"> 552 <provider selected="true" editor-type-id="text-editor">
440 - <state relative-caret-position="1100">  
441 - <caret line="50" column="42" selection-start-line="50" selection-start-column="42" selection-end-line="50" selection-end-column="42" /> 553 + <state relative-caret-position="418">
  554 + <caret line="19" column="7" lean-forward="true" selection-start-line="19" selection-start-column="7" selection-end-line="19" selection-end-column="7" />
442 </state> 555 </state>
443 </provider> 556 </provider>
444 </entry> 557 </entry>
445 - <entry file="file://$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.js"> 558 + <entry file="file://$PROJECT_DIR$/pages/my/my.wxml">
446 <provider selected="true" editor-type-id="text-editor"> 559 <provider selected="true" editor-type-id="text-editor">
447 - <state relative-caret-position="924">  
448 - <caret line="42" column="10" lean-forward="true" selection-start-line="42" selection-start-column="10" selection-end-line="42" selection-end-column="10" /> 560 + <state relative-caret-position="66">
  561 + <caret line="3" column="2" selection-start-line="3" selection-start-column="2" selection-end-line="3" selection-end-column="2" />
449 </state> 562 </state>
450 </provider> 563 </provider>
451 </entry> 564 </entry>
452 - <entry file="file://$PROJECT_DIR$/pages/my/protocol/protocol.js"> 565 + <entry file="file://$PROJECT_DIR$/pages/index/index.wxss">
  566 + <provider selected="true" editor-type-id="text-editor">
  567 + <state relative-caret-position="198">
  568 + <caret line="9" selection-start-line="9" selection-end-line="18" selection-end-column="1" />
  569 + </state>
  570 + </provider>
  571 + </entry>
  572 + <entry file="file://$PROJECT_DIR$/pages/clock/clock.wxss">
  573 + <provider selected="true" editor-type-id="text-editor">
  574 + <state relative-caret-position="330">
  575 + <caret line="15" column="1" selection-start-line="15" selection-start-column="1" selection-end-line="15" selection-end-column="1" />
  576 + </state>
  577 + </provider>
  578 + </entry>
  579 + <entry file="file://$PROJECT_DIR$/pages/my/my.wxss">
  580 + <provider selected="true" editor-type-id="text-editor">
  581 + <state relative-caret-position="330">
  582 + <caret line="15" column="19" lean-forward="true" selection-start-line="15" selection-start-column="19" selection-end-line="15" selection-end-column="19" />
  583 + </state>
  584 + </provider>
  585 + </entry>
  586 + <entry file="file://$PROJECT_DIR$/pages/clock/clock.wxml">
  587 + <provider selected="true" editor-type-id="text-editor">
  588 + <state relative-caret-position="66">
  589 + <caret line="3" column="40" selection-start-line="3" selection-start-column="32" selection-end-line="3" selection-end-column="40" />
  590 + </state>
  591 + </provider>
  592 + </entry>
  593 + <entry file="file://$PROJECT_DIR$/pages/clock/clock.js">
  594 + <provider selected="true" editor-type-id="text-editor">
  595 + <state relative-caret-position="814">
  596 + <caret line="37" selection-start-line="37" selection-end-line="37" />
  597 + </state>
  598 + </provider>
  599 + </entry>
  600 + <entry file="file://$PROJECT_DIR$/utils/qqmap-wx-jssdk.min.js">
453 <provider selected="true" editor-type-id="text-editor" /> 601 <provider selected="true" editor-type-id="text-editor" />
454 </entry> 602 </entry>
455 - <entry file="file://$PROJECT_DIR$/pages/my/myCard/myCard.wxml"> 603 + <entry file="file://$PROJECT_DIR$/pages/my/my.js">
  604 + <provider selected="true" editor-type-id="text-editor">
  605 + <state relative-caret-position="154">
  606 + <caret line="7" column="22" selection-start-line="7" selection-start-column="22" selection-end-line="7" selection-end-column="22" />
  607 + </state>
  608 + </provider>
  609 + </entry>
  610 + <entry file="file://$PROJECT_DIR$/app.wxss">
456 <provider selected="true" editor-type-id="text-editor" /> 611 <provider selected="true" editor-type-id="text-editor" />
457 </entry> 612 </entry>
458 - <entry file="file://$PROJECT_DIR$/pages/index/phone-code/phone-code.json"> 613 + <entry file="file://$PROJECT_DIR$/project.config.json">
459 <provider selected="true" editor-type-id="text-editor"> 614 <provider selected="true" editor-type-id="text-editor">
460 - <state relative-caret-position="44">  
461 - <caret line="2" column="1" selection-start-line="2" selection-start-column="1" selection-end-line="2" selection-end-column="1" /> 615 + <state relative-caret-position="308">
  616 + <caret line="14" column="32" selection-start-line="14" selection-start-column="14" selection-end-line="14" selection-end-column="32" />
462 </state> 617 </state>
463 </provider> 618 </provider>
464 </entry> 619 </entry>
465 - <entry file="file://$PROJECT_DIR$/app.js"> 620 + <entry file="file://$PROJECT_DIR$/app.json">
466 <provider selected="true" editor-type-id="text-editor"> 621 <provider selected="true" editor-type-id="text-editor">
467 - <state relative-caret-position="47">  
468 - <caret line="58" column="67" lean-forward="true" selection-start-line="58" selection-start-column="67" selection-end-line="58" selection-end-column="67" />  
469 - <folding>  
470 - <element signature="n#!!doc" expanded="true" />  
471 - </folding> 622 + <state relative-caret-position="44">
  623 + <caret line="2" column="24" selection-start-line="2" selection-start-column="24" selection-end-line="2" selection-end-column="24" />
472 </state> 624 </state>
473 </provider> 625 </provider>
474 </entry> 626 </entry>
475 - <entry file="file://$PROJECT_DIR$/pages/index/index.wxss"> 627 + <entry file="file://$PROJECT_DIR$/pages/index/phone-code/phone-code.wxml">
476 <provider selected="true" editor-type-id="text-editor"> 628 <provider selected="true" editor-type-id="text-editor">
477 - <state relative-caret-position="154">  
478 - <caret line="7" column="21" lean-forward="true" selection-start-line="7" selection-start-column="21" selection-end-line="7" selection-end-column="21" /> 629 + <state relative-caret-position="264">
  630 + <caret line="12" column="68" selection-start-line="12" selection-start-column="68" selection-end-line="12" selection-end-column="68" />
479 </state> 631 </state>
480 </provider> 632 </provider>
481 </entry> 633 </entry>
482 - <entry file="file://$PROJECT_DIR$/pages/start/start.js"> 634 + <entry file="file://$PROJECT_DIR$/pages/index/phone-code/phone-code.js">
483 <provider selected="true" editor-type-id="text-editor"> 635 <provider selected="true" editor-type-id="text-editor">
484 - <state relative-caret-position="374">  
485 - <caret line="29" column="49" lean-forward="true" selection-start-line="29" selection-start-column="12" selection-end-line="29" selection-end-column="49" /> 636 + <state relative-caret-position="1870">
  637 + <caret line="85" column="40" selection-start-line="85" selection-start-column="40" selection-end-line="85" selection-end-column="40" />
486 </state> 638 </state>
487 </provider> 639 </provider>
488 </entry> 640 </entry>
489 <entry file="file://$PROJECT_DIR$/pages/index/index.wxml"> 641 <entry file="file://$PROJECT_DIR$/pages/index/index.wxml">
490 <provider selected="true" editor-type-id="text-editor"> 642 <provider selected="true" editor-type-id="text-editor">
491 - <state relative-caret-position="880">  
492 - <caret line="40" lean-forward="true" selection-start-line="40" selection-end-line="40" /> 643 + <state relative-caret-position="542">
  644 + <caret line="74" column="70" selection-start-line="74" selection-start-column="70" selection-end-line="74" selection-end-column="70" />
493 </state> 645 </state>
494 </provider> 646 </provider>
495 </entry> 647 </entry>
496 - <entry file="file://$PROJECT_DIR$/templates/templates.wxml"> 648 + <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.wxml">
497 <provider selected="true" editor-type-id="text-editor"> 649 <provider selected="true" editor-type-id="text-editor">
498 - <state relative-caret-position="374">  
499 - <caret line="29" column="65" selection-start-line="29" selection-start-column="65" selection-end-line="29" selection-end-column="65" /> 650 + <state relative-caret-position="220">
  651 + <caret line="10" column="68" lean-forward="true" selection-start-line="10" selection-start-column="68" selection-end-line="10" selection-end-column="68" />
500 </state> 652 </state>
501 </provider> 653 </provider>
502 </entry> 654 </entry>
503 <entry file="file://$PROJECT_DIR$/pages/index/index.js"> 655 <entry file="file://$PROJECT_DIR$/pages/index/index.js">
504 <provider selected="true" editor-type-id="text-editor"> 656 <provider selected="true" editor-type-id="text-editor">
505 - <state relative-caret-position="506">  
506 - <caret line="98" column="64" selection-start-line="98" selection-start-column="64" selection-end-line="98" selection-end-column="64" /> 657 + <state relative-caret-position="-418">
  658 + <caret line="8" column="23" selection-start-line="8" selection-start-column="23" selection-end-line="8" selection-end-column="23" />
507 <folding> 659 <folding>
508 <element signature="n#!!doc" expanded="true" /> 660 <element signature="n#!!doc" expanded="true" />
509 - <element signature="e#1018#1103#0" />  
510 - <element signature="e#1121#1191#0" />  
511 - <element signature="e#1219#1288#0" />  
512 - <element signature="e#1321#1468#0" />  
513 - <element signature="e#1499#1619#0" />  
514 - <element signature="e#1750#1766#0" />  
515 </folding> 661 </folding>
516 </state> 662 </state>
517 </provider> 663 </provider>
518 </entry> 664 </entry>
519 - <entry file="file://$PROJECT_DIR$/app.json"> 665 + <entry file="file://$PROJECT_DIR$/pages/index/go-appointment/go-appointment.json">
  666 + <provider selected="true" editor-type-id="text-editor" />
  667 + </entry>
  668 + <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js">
520 <provider selected="true" editor-type-id="text-editor"> 669 <provider selected="true" editor-type-id="text-editor">
521 - <state relative-caret-position="440">  
522 - <caret line="20" column="38" selection-start-line="20" selection-start-column="38" selection-end-line="20" selection-end-column="38" /> 670 + <state relative-caret-position="374">
  671 + <caret line="29" column="44" lean-forward="true" selection-start-line="29" selection-start-column="44" selection-end-line="29" selection-end-column="44" />
523 </state> 672 </state>
524 </provider> 673 </provider>
525 </entry> 674 </entry>
526 - <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.json">  
527 - <provider selected="true" editor-type-id="text-editor" /> 675 + <entry file="file://$PROJECT_DIR$/pages/start/start.js">
  676 + <provider selected="true" editor-type-id="text-editor">
  677 + <state relative-caret-position="676">
  678 + <caret line="37" column="25" lean-forward="true" selection-start-line="37" selection-start-column="25" selection-end-line="37" selection-end-column="25" />
  679 + </state>
  680 + </provider>
528 </entry> 681 </entry>
529 - <entry file="file://$PROJECT_DIR$/pages/start/start.wxml"> 682 + <entry file="file://$PROJECT_DIR$/app.js">
530 <provider selected="true" editor-type-id="text-editor"> 683 <provider selected="true" editor-type-id="text-editor">
531 - <state relative-caret-position="132">  
532 - <caret line="6" column="15" lean-forward="true" selection-start-line="6" selection-start-column="15" selection-end-line="6" selection-end-column="15" /> 684 + <state relative-caret-position="344">
  685 + <caret line="140" column="12" selection-start-line="140" selection-start-column="4" selection-end-line="140" selection-end-column="12" />
  686 + <folding>
  687 + <element signature="n#!!doc" expanded="true" />
  688 + </folding>
533 </state> 689 </state>
534 </provider> 690 </provider>
535 </entry> 691 </entry>
536 - <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.js"> 692 + <entry file="file://$PROJECT_DIR$/utils/util.js">
537 <provider selected="true" editor-type-id="text-editor"> 693 <provider selected="true" editor-type-id="text-editor">
538 - <state relative-caret-position="550">  
539 - <caret line="25" column="32" selection-start-line="25" selection-start-column="32" selection-end-line="25" selection-end-column="32" /> 694 + <state relative-caret-position="946">
  695 + <caret line="43" column="15" selection-start-line="43" selection-start-column="2" selection-end-line="43" selection-end-column="15" />
540 </state> 696 </state>
541 </provider> 697 </provider>
542 </entry> 698 </entry>
543 - <entry file="file://$PROJECT_DIR$/pages/index/activity-detail/activity-detail.wxml"> 699 + <entry file="file://$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.wxml">
  700 + <provider selected="true" editor-type-id="text-editor">
  701 + <state relative-caret-position="852">
  702 + <caret line="50" column="42" selection-start-line="50" selection-start-column="42" selection-end-line="50" selection-end-column="42" />
  703 + </state>
  704 + </provider>
  705 + </entry>
  706 + <entry file="file://$PROJECT_DIR$/pages/index/confirm-appointment-info/confirm-appointment-info.js">
  707 + <provider selected="true" editor-type-id="text-editor">
  708 + <state relative-caret-position="302">
  709 + <caret line="44" column="20" lean-forward="true" selection-start-line="44" selection-start-column="20" selection-end-line="44" selection-end-column="20" />
  710 + </state>
  711 + </provider>
  712 + </entry>
  713 + <entry file="file://$PROJECT_DIR$/pages/index/go-appointment/go-appointment.wxml">
  714 + <provider selected="true" editor-type-id="text-editor">
  715 + <state relative-caret-position="638">
  716 + <caret line="41" column="90" selection-start-line="41" selection-start-column="72" selection-end-line="41" selection-end-column="90" />
  717 + </state>
  718 + </provider>
  719 + </entry>
  720 + <entry file="file://$PROJECT_DIR$/pages/index/go-appointment/go-appointment.js">
544 <provider selected="true" editor-type-id="text-editor"> 721 <provider selected="true" editor-type-id="text-editor">
545 <state relative-caret-position="198"> 722 <state relative-caret-position="198">
546 - <caret line="9" column="35" selection-start-line="9" selection-start-column="35" selection-end-line="9" selection-end-column="35" /> 723 + <caret line="125" column="20" lean-forward="true" selection-start-line="125" selection-start-column="20" selection-end-line="125" selection-end-column="20" />
  724 + <folding>
  725 + <element signature="e#243#454#0" />
  726 + <element signature="e#462#673#0" />
  727 + <element signature="e#681#893#0" />
  728 + <element signature="e#901#1114#0" />
  729 + <element signature="e#1177#2298#0" />
  730 + </folding>
547 </state> 731 </state>
548 </provider> 732 </provider>
549 </entry> 733 </entry>
@@ -89,6 +89,7 @@ App({ @@ -89,6 +89,7 @@ App({
89 success: function (res) { } 89 success: function (res) { }
90 }) 90 })
91 } else { 91 } else {
  92 + console.log(res.data);
92 wx.showModal({ 93 wx.showModal({
93 title: '提示', 94 title: '提示',
94 content: res.data.msg, 95 content: res.data.msg,
@@ -123,6 +124,7 @@ App({ @@ -123,6 +124,7 @@ App({
123 124
124 }) 125 })
125 }, 126 },
  127 + //获取当前时间
126 nowDate() { 128 nowDate() {
127 let date = new Date(); 129 let date = new Date();
128 let month = date.getMonth() + 1; 130 let month = date.getMonth() + 1;
@@ -6,7 +6,12 @@ Page({ @@ -6,7 +6,12 @@ Page({
6 */ 6 */
7 data: { 7 data: {
8 punchState: true, 8 punchState: true,
9 - address: '' 9 + address: '',
  10 + hasPhone: true,
  11 + },
  12 + //首次登录小程序,跳转到认证手机页面
  13 + goPhoneCode() {
  14 + wx.navigateTo({url: '/pages/index/phone-code/phone-code'})
10 }, 15 },
11 //打卡申诉 16 //打卡申诉
12 punchApply() { 17 punchApply() {
@@ -30,6 +35,7 @@ Page({ @@ -30,6 +35,7 @@ Page({
30 }) 35 })
31 }, 36 },
32 }) 37 })
  38 +
33 // wx.chooseLocation({ 39 // wx.chooseLocation({
34 // success: function(res) { 40 // success: function(res) {
35 // console.log(res) 41 // console.log(res)
1 <!--pages/clock/clock.wxml--> 1 <!--pages/clock/clock.wxml-->
2 <view class='content_box'> 2 <view class='content_box'>
  3 + <!--蒙层-->
  4 + <view class="modal" wx:if="{{!hasPhone}}" bindtap="goPhoneCode"></view>
3 <view class='circle_large'> 5 <view class='circle_large'>
4 <view class='circle_middle'> 6 <view class='circle_middle'>
5 <view class='circle_small'> 7 <view class='circle_small'>
@@ -13,7 +13,16 @@ @@ -13,7 +13,16 @@
13 align-items: center; 13 align-items: center;
14 padding-top: 115rpx; 14 padding-top: 115rpx;
15 } 15 }
16 - 16 +.modal {
  17 + width: 100%;
  18 + height: 100%;
  19 + position: absolute;
  20 + left: 0;
  21 + top: 0;
  22 + background-color: #000000;
  23 + opacity: 0.8;
  24 + z-index: 10;
  25 +}
17 .circle_large, .circle_middle, .circle_small { 26 .circle_large, .circle_middle, .circle_small {
18 width: 327rpx; 27 width: 327rpx;
19 height: 327rpx; 28 height: 327rpx;
1 // pages/index/activity-detail/activity-detail.js 1 // pages/index/activity-detail/activity-detail.js
  2 +var WxParse = require('../../../wxParse/wxParse.js');
2 const app = getApp(); 3 const app = getApp();
3 Page({ 4 Page({
4 5
@@ -18,21 +19,39 @@ Page({ @@ -18,21 +19,39 @@ Page({
18 let params = { 19 let params = {
19 id: this.data.test_id,//当前实验的id 20 id: this.data.test_id,//当前实验的id
20 }; 21 };
21 - let headers= { 22 + let header = {
22 "XX-token": wx.getStorageSync('token') 23 "XX-token": wx.getStorageSync('token')
23 }; 24 };
24 - app.post(url, params,headers).then((res) => { 25 + app.post(url, params,header).then((res) => {
25 console.log(res); 26 console.log(res);
26 - this.setData({detail: res}) 27 + if(res.code === 0) {
  28 + wx.navigateTo({url: '/pages/index/phone-code/phone-code'})
  29 + }else {
  30 + this.setData({detail: res});
  31 + var article = res.content;
  32 + WxParse.wxParse('article', 'html', article, this, 5);
  33 + }
27 // console.log(this.data.this_week_test_info); 34 // console.log(this.data.this_week_test_info);
28 }) 35 })
29 }, 36 },
  37 + //服务协议
  38 + goServiceProtocol() {
  39 + wx.navigateTo({
  40 + url: '/pages/my/protocol/protocol',
  41 + })
  42 + },
  43 + goAppointment() {
  44 + wx.navigateTo({url: '/pages/index/go-appointment/go-appointment?experiment_id=' + this.data.detail.id})
  45 + },
30 /** 46 /**
31 * 生命周期函数--监听页面加载 47 * 生命周期函数--监听页面加载
32 */ 48 */
33 onLoad: function (options) { 49 onLoad: function (options) {
34 console.log(options); 50 console.log(options);
35 - this.setData({test_id: +options.id}); 51 + this.setData({
  52 + test_id: +options.id,
  53 + is_the_week: options.is_the_week
  54 + });
36 this.getDetail() 55 this.getDetail()
37 }, 56 },
38 57
@@ -2,24 +2,27 @@ @@ -2,24 +2,27 @@
2 <view class="content"> 2 <view class="content">
3 <view class="head"> 3 <view class="head">
4 <view class="img_box"> 4 <view class="img_box">
5 - <image src="../../../images/test_img.jpg" class="activity_img"></image> 5 + <image src="{{detail.thumb}}" class="activity_img" mode="aspectFill"></image>
6 </view> 6 </view>
7 <view class="title"> 7 <view class="title">
8 <view class="line"></view> 8 <view class="line"></view>
9 <view class="test_detail"> 9 <view class="test_detail">
10 - <text>{{detail.name}}科学队长实验室:雷电的产生!</text>  
11 - <view class="describe">云和云摩擦碰撞发出的声音是雷声产生火花是闪电。</view> 10 + <text>{{detail.name}}</text>
  11 + <view class="describe">{{detail.description}}</view>
12 </view> 12 </view>
13 </view> 13 </view>
14 </view> 14 </view>
15 15
16 - <view class="jiexi">解析长图</view>  
17 - <view class="footer" wx:if="{{is_the_week}}">  
18 - <view class="service" bindtap="clickAgreeBtn" bindtap='serviceProtocol'> 16 + <view class="jiexi">解析长图
  17 + <import src="/wxParse/wxParse.wxml"/>
  18 + <template is="wxParse" data="{{wxParseData:article.nodes}}"/>
  19 + </view>
  20 + <view class="footer" wx:if="{{detail.allow_res}}">
  21 + <view class="service" bindtap="clickAgreeBtn">
19 <view class="agree_box"> 22 <view class="agree_box">
20 <view class="agree_btn" wx:if="{{is_agree}}"></view> 23 <view class="agree_btn" wx:if="{{is_agree}}"></view>
21 </view> 24 </view>
22 - <text>服务协议</text> 25 + <text catchtap="goServiceProtocol">服务协议</text>
23 </view> 26 </view>
24 <view class="order_btn" bindtap='goAppointment'>去预约</view> 27 <view class="order_btn" bindtap='goAppointment'>去预约</view>
25 </view> 28 </view>
@@ -49,12 +49,15 @@ Page({ @@ -49,12 +49,15 @@ Page({
49 addStudent() { 49 addStudent() {
50 wx.navigateTo({url: './add-student/add-student'}) 50 wx.navigateTo({url: './add-student/add-student'})
51 }, 51 },
  52 + getAppointmentInfo() {
  53 +
  54 + },
52 /** 55 /**
53 * 生命周期函数--监听页面加载 56 * 生命周期函数--监听页面加载
54 */ 57 */
55 onLoad: function (options) { 58 onLoad: function (options) {
56 -  
57 - }, 59 + console.log(options);
  60 + },
58 61
59 /** 62 /**
60 * 生命周期函数--监听页面初次渲染完成 63 * 生命周期函数--监听页面初次渲染完成
1 // pages/index/go-appointment/go-appointment.js 1 // pages/index/go-appointment/go-appointment.js
  2 +const util = require('../../../utils/util.js');
  3 +const app = getApp();
2 Page({ 4 Page({
3 5
4 /** 6 /**
5 * 页面的初始数据 7 * 页面的初始数据
6 */ 8 */
7 data: { 9 data: {
8 - array: ['北京市', '天津市', '上海市', '河北省'], 10 + cityList: [],
  11 + // city_index: 0,
9 currentCity: '北京市', 12 currentCity: '北京市',
  13 + current_test_id: '',
10 is_change: false, 14 is_change: false,
  15 + is_choose: false,
  16 + description: '',
  17 + session_list: {},
11 show_submit_btn: false, 18 show_submit_btn: false,
12 areaTest: [{ 19 areaTest: [{
13 area: '朝阳区', 20 area: '朝阳区',
@@ -104,28 +111,49 @@ Page({ @@ -104,28 +111,49 @@ Page({
104 bindPickerChange: function(e) { 111 bindPickerChange: function(e) {
105 console.log('picker发送选择改变,携带值为', e.detail.value) 112 console.log('picker发送选择改变,携带值为', e.detail.value)
106 this.setData({ 113 this.setData({
107 - index: e.detail.value, 114 + city_index: e.detail.value,
108 is_change: true, 115 is_change: true,
109 - }) 116 + });
  117 + this.getChooseSession(this.data.cityList[e.detail.value])
110 }, 118 },
111 -  
112 //选择实验室 119 //选择实验室
113 chooseTest(e) { 120 chooseTest(e) {
114 - console.log(e.currentTarget.dataset.index); 121 + // console.log(e);
  122 + // console.log('实验',e.currentTarget.dataset.index);
115 const current = e.currentTarget.dataset.index; 123 const current = e.currentTarget.dataset.index;
116 const current_id = e.currentTarget.dataset.id; 124 const current_id = e.currentTarget.dataset.id;
117 - this.setData({ 125 + // console.log(this.data.areaTest[0].lab_list[0].session_list[0].id);
  126 + this.setData({
118 currentTest: current, 127 currentTest: current,
119 - currentId: current_id  
120 - }) 128 + current_test_id: current_id,
  129 + is_choose: false,//恢复默认值
  130 + // current_session_id: this.data.areaTest[current].lab_list ? this.data.areaTest[current].lab_list[0].session_list[0].id : '',
  131 + // description: this.data.areaTest[current].lab_list[current].description
  132 + });
  133 + // console.log(util.formatTimeTwo(1543375800,'h:m'),'1543375800');
  134 + return this.data.areaTest.forEach((item,index) => {
  135 + if(item.lab_list[current].id === current_id) {
  136 + // console.log(current_id, item.lab_list[current].id,item.lab_list[current].description);
  137 + this.setData({
  138 + description: item.lab_list[current].description ? item.lab_list[current].description : '',
  139 + session_list: item.lab_list[current].session_list ? item.lab_list[current].session_list: '',
  140 + });
  141 + // return
  142 + }
  143 + });
  144 + // console.log(a);
  145 + // console.log(this.data.areaTest[current].lab_list[current].description);
121 }, 146 },
122 147
123 - //选择时段 148 + //选择场次
124 chooseTime(e) { 149 chooseTime(e) {
125 console.log(e.currentTarget.dataset.index); 150 console.log(e.currentTarget.dataset.index);
126 const current = e.currentTarget.dataset.index; 151 const current = e.currentTarget.dataset.index;
  152 + const current_id = e.currentTarget.dataset.id;
127 this.setData({ 153 this.setData({
128 - currentTime: current 154 + currentTime: current,
  155 + current_session_id: current_id,
  156 + is_choose: true,
129 }) 157 })
130 }, 158 },
131 159
@@ -135,7 +163,7 @@ Page({ @@ -135,7 +163,7 @@ Page({
135 // show_submit_btn: true 163 // show_submit_btn: true
136 // }) 164 // })
137 wx.navigateTo({ 165 wx.navigateTo({
138 - url: '/pages/index/confirm-appointment-info/confirm-appointment-info' 166 + url: '/pages/index/confirm-appointment-info/confirm-appointment-info?num=' + 1
139 }) 167 })
140 }, 168 },
141 169
@@ -145,20 +173,93 @@ Page({ @@ -145,20 +173,93 @@ Page({
145 // show_submit_btn: true 173 // show_submit_btn: true
146 // }) 174 // })
147 wx.navigateTo({ 175 wx.navigateTo({
148 - url: '/pages/index/confirm-appointment-info/confirm-appointment-info' 176 + url: '/pages/index/confirm-appointment-info/confirm-appointment-info?num=' + 2
149 }) 177 })
150 }, 178 },
151 179
152 submit() { 180 submit() {
153 - wx.navigateTo({  
154 - url: '/pages/index/confirm-appointment-info/confirm-appointment-info'  
155 - }) 181 + if(this.data.is_choose) {
  182 + wx.navigateTo({
  183 + url: '/pages/index/confirm-appointment-info/confirm-appointment-info?experiment_id=' + this.data.current_test_id
  184 + + '&session_id=' + this.data.current_session_id
  185 + })
  186 + }else {
  187 + wx.showToast({title: '请选择场次!',icon: 'none'})
  188 + }
  189 + },
  190 + //获取城市列表
  191 + getCity() {
  192 + let url = '/portal/Experiment/cityList';
  193 + let header = {
  194 + "XX-token": wx.getStorageSync('token')
  195 + };
  196 + app.post(url, {},header).then((res) => {
  197 + console.log(res);
  198 + var city_list = [];
  199 + res.forEach((item,index) => {
  200 + city_list.push(item.city)
  201 + });
  202 + console.log(city_list,res);
  203 + this.setData({
  204 + cityList: city_list,
  205 + // description: res.list[0].lab_list[0].description,//默认显示第一个实验室的描述
  206 + // session_list: res.list[0].lab_list[0].session_list//默认显示第一个实验室的实验时间
  207 +
  208 + })
  209 + // console.log(this.data.this_week_test_info);
  210 + })
156 }, 211 },
  212 + //获取预约城市、区、实验室、场次
  213 + getChooseSession(city) {
  214 + let url = '/portal/Experiment/choose_session';
  215 + let params = {
  216 + experiment_id: this.data.experiment_id,
  217 + city: city,
  218 + };
  219 + let header = {
  220 + "XX-token": wx.getStorageSync('token')
  221 + };
  222 + app.post(url, params,header).then((res) => {
  223 + console.log(res,res.list);
  224 + res.list.forEach((item,index) => {
  225 + if(item.lab_list) {
  226 + item.lab_list.forEach((i,k) => {
  227 + if(i.session_list) {
  228 + i.session_list.forEach((j,b) => {
  229 + j.start_time = util.formatTimeTwo(j.start_time, 'h:m');
  230 + j.end_time = util.formatTimeTwo(j.end_time, 'h:m');
  231 + })
  232 + }
  233 + })
  234 + }
  235 + });
  236 + console.log(res,res.list);
  237 + // console.log(res.list[0].lab_list[0].id);
  238 + this.setData({
  239 + areaTest: res.list,
  240 + // current_test_id: res.list[0].lab_list ? res.list[0].lab_list[0].id : '',//默认实验室id
  241 + // current_session_id: res.list[0].lab_list ? res.list[0].lab_list[0].session_list[0].id : '',//默认场次id
  242 + description: res.list[0].lab_list ? res.list[0].lab_list[0].description : '',//默认显示第一个实验室的描述
  243 + session_list: res.list[0].lab_list ? res.list[0].lab_list[0].session_list :''//默认显示第一个实验室的实验时间
157 244
  245 + })
  246 + // console.log(this.data.this_week_test_info);
  247 + })
  248 + },
158 /** 249 /**
159 * 生命周期函数--监听页面加载 250 * 生命周期函数--监听页面加载
160 */ 251 */
161 onLoad: function(options) { 252 onLoad: function(options) {
  253 + const self = this;
  254 + self.setData({experiment_id: +options.experiment_id});
  255 + if(wx.getStorageSync('city')) {
  256 + const city = wx.getStorageSync('city');
  257 + self.getChooseSession(city);
  258 + }else {
  259 + const city = '北京市';
  260 + self.getChooseSession(city);
  261 + }
  262 + self.getCity();
162 this.data.areaTest.forEach((v, i) => { 263 this.data.areaTest.forEach((v, i) => {
163 Object.keys(v).forEach(v => { 264 Object.keys(v).forEach(v => {
164 console.log(v) //取到了key 265 console.log(v) //取到了key
1 <!--pages/index/go-appointment/go-appointment.wxml--> 1 <!--pages/index/go-appointment/go-appointment.wxml-->
2 <view class="content"> 2 <view class="content">
3 <view class="city_box"> 3 <view class="city_box">
4 - <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}"> 4 + <picker bindchange="bindPickerChange" value="{{city_index}}" range="{{cityList}}">
5 <view class="select"> 5 <view class="select">
6 <view class="picker" wx:if="{{is_change}}"> 6 <view class="picker" wx:if="{{is_change}}">
7 - {{array[index]}} 7 + {{cityList[city_index]}}
8 </view> 8 </view>
9 <view wx:else>北京市</view> 9 <view wx:else>北京市</view>
10 <view class="iconfont icon-daosanjiao"></view> 10 <view class="iconfont icon-daosanjiao"></view>
@@ -15,16 +15,16 @@ @@ -15,16 +15,16 @@
15 <view class="section"> 15 <view class="section">
16 <scroll-view class="area_box" scroll-y> 16 <scroll-view class="area_box" scroll-y>
17 <block wx:for="{{areaTest}}" wx:key="index"> 17 <block wx:for="{{areaTest}}" wx:key="index">
18 - <view class="area-test">  
19 - <view class="area">{{item.area}}</view> 18 + <view class="area-test" data-index="{{index}}" wx:for-index="{{idx}}">
  19 + <view class="area">{{item.name}}</view>
20 <view class="test-list"> 20 <view class="test-list">
21 <view class="list-item-box"> 21 <view class="list-item-box">
22 - <block wx:for="{{item.list}}" wx:key="index"> 22 + <block wx:for="{{item.lab_list}}" wx:key="index">
23 <view class="list-item" bindtap="chooseTest" data-index="{{index}}" 23 <view class="list-item" bindtap="chooseTest" data-index="{{index}}"
24 data-id="{{item.id}}"> 24 data-id="{{item.id}}">
25 - <image src="../../../images/blue_line.png" wx:if="{{currentId === item.id}}" 25 + <image src="../../../images/blue_line.png" wx:if="{{current_test_id === item.id}}"
26 class="blue-line"></image> 26 class="blue-line"></image>
27 - <view class="test {{currentId === item.id?'change-color':''}}">{{item.name}}</view> 27 + <view class="test {{current_test_id === item.id?'change-color':''}}">{{item.name}}</view>
28 </view> 28 </view>
29 </block> 29 </block>
30 </view> 30 </view>
@@ -35,17 +35,17 @@ @@ -35,17 +35,17 @@
35 35
36 <view class="test_box"> 36 <view class="test_box">
37 <scroll-view scroll-y class="test_describe"> 37 <scroll-view scroll-y class="test_describe">
38 - {{test.title}} 38 + {{description}}
39 </scroll-view> 39 </scroll-view>
40 <scroll-view class="time-list-box" scroll-y> 40 <scroll-view class="time-list-box" scroll-y>
41 - <view wx:for="{{test.list}}" wx:key="index" class="time-list" bindtap="chooseTime" data-index="{{index}}">  
42 - <image src="../../../images/blue_line.png" wx:if="{{currentTime === index && item.rest !== 0}}" 41 + <view wx:for="{{session_list}}" wx:key="index" class="time-list" bindtap="chooseTime" data-index="{{index}}" data-id="{{item.id}}">
  42 + <image src="../../../images/blue_line.png" wx:if="{{current_session_id === item.id}}"
43 class="blue-line"></image> 43 class="blue-line"></image>
44 <view class="right-content {{item.rest === 0? 'change-gray':''}}"> 44 <view class="right-content {{item.rest === 0? 'change-gray':''}}">
45 - <view class="{{currentTime === index && item.rest !== 0? 'change-color':''}}">{{item.week}} {{item.date}}</view> 45 + <view class="{{current_session_id === item.id? 'change-color':''}}">{{item.weekday}} {{item.date}}</view>
46 <view class="bottom-time-box"> 46 <view class="bottom-time-box">
47 - <text class="time {{currentTime === index && item.rest !== 0? 'change-color':''}}">{{item.time}}</text>  
48 - <text class="rest {{item.rest === 0? 'change-gray':''}}">剩余: {{item.rest}}</text> 47 + <text class="time {{current_session_id === item.id? 'change-color':''}}">{{item.time}}</text>
  48 + <text class="rest {{item.rest === 0? 'change-gray':''}}">剩余: {{item.surplus_num}}</text>
49 </view> 49 </view>
50 </view> 50 </view>
51 </view> 51 </view>
@@ -54,13 +54,14 @@ @@ -54,13 +54,14 @@
54 </view> 54 </view>
55 55
56 <view class="footer"> 56 <view class="footer">
57 - <view class="confirm_btn" bindtap="submit" wx:if="{{show_submit_btn}}"> 57 + <!--<view class="confirm_btn" bindtap="submit" wx:if="{{show_submit_btn}}">-->
  58 + <view class="confirm_btn" bindtap="submit">
58 <text>提 交</text> 59 <text>提 交</text>
59 </view> 60 </view>
60 - <view class="appointment-box" wx:else>  
61 - <text class="single" bindtap="singleAppointment">单人预约</text>  
62 - <text class="double" bindtap="doubleAppointment">双人预约</text>  
63 - </view> 61 + <!--<view class="appointment-box" wx:else>-->
  62 + <!--<text class="single" bindtap="singleAppointment">单人预约</text>-->
  63 + <!--<text class="double" bindtap="doubleAppointment">双人预约</text>-->
  64 + <!--</view>-->
64 <!--<view>提 交</view>--> 65 <!--<view>提 交</view>-->
65 </view> 66 </view>
66 </view> 67 </view>
1 //index.js 1 //index.js
2 //获取应用实例 2 //获取应用实例
3 -const app = getApp() 3 +const app = getApp();
  4 +// 引入SDK核心类
  5 +var QQMapWX = require('../../utils/qqmap-wx-jssdk.min.js');
4 6
5 Page({ 7 Page({
6 data: { 8 data: {
7 - hasPhone: true, 9 + hasPhone: false,
8 imgUrls: [ 10 imgUrls: [
9 {'url': '../../images/banner.jpg'}, 11 {'url': '../../images/banner.jpg'},
10 {'url': '../../images/banner.jpg'}, 12 {'url': '../../images/banner.jpg'},
@@ -28,6 +30,21 @@ Page({ @@ -28,6 +30,21 @@ Page({
28 is_past: true, 30 is_past: true,
29 }, 31 },
30 }, 32 },
  33 + //判断手机号是否绑定
  34 + checkMobile() {
  35 + let url = '/portal/Index/check_mobile';
  36 + let header = {
  37 + "XX-token": wx.getStorageSync('token')
  38 + };
  39 + app.post(url, {},header).then((res) => {
  40 + console.log(res);
  41 + if(res.is_binding) {
  42 + this.setData({hasPhone: true})
  43 + }else {
  44 + this.setData({hasPhone: false})
  45 + }
  46 + })
  47 + },
31 swiperChange: function (e) { //切换轮播图 48 swiperChange: function (e) { //切换轮播图
32 this.setData({ 49 this.setData({
33 currentSwiper: e.detail.current 50 currentSwiper: e.detail.current
@@ -44,13 +61,17 @@ Page({ @@ -44,13 +61,17 @@ Page({
44 //点击进入活动详情 61 //点击进入活动详情
45 goTestDetail(e) { 62 goTestDetail(e) {
46 // console.log(e); 63 // console.log(e);
47 - const current = e.currentTarget.dataset.index;  
48 - wx.navigateTo({url: './activity-detail/activity-detail'}) 64 + const is_the_week = e.currentTarget.dataset.is_the_week;
  65 + const id = e.currentTarget.dataset.id;
  66 + wx.navigateTo({
  67 + url: './activity-detail/activity-detail?is_the_week=' + is_the_week +
  68 + '&id=' + id
  69 + })
49 }, 70 },
50 //前往预约 71 //前往预约
51 goAppointment(e) { 72 goAppointment(e) {
52 - const current = e.currentTarget.dataset.index;  
53 - wx.navigateTo({url: './go-appointment/go-appointment'}) 73 + const id = e.currentTarget.dataset.id;
  74 + wx.navigateTo({url: './go-appointment/go-appointment?experiment_id=' + id})
54 }, 75 },
55 //获取轮播图 76 //获取轮播图
56 getSlideImage() { 77 getSlideImage() {
@@ -58,15 +79,9 @@ Page({ @@ -58,15 +79,9 @@ Page({
58 let params = { 79 let params = {
59 city: this.data.city, 80 city: this.data.city,
60 }; 81 };
61 - app.post(url, params).then((ret) => {  
62 - wx.setStorageSync('token', ret.token)  
63 - app.globalData.userInfo = ret.user_type  
64 - // console.log('userInfo',app.globalData.userInfo,ret);  
65 - if (ret.user_type == 2) {  
66 - wx.switchTab({  
67 - url: '/pages/index/index',  
68 - })  
69 - } 82 + app.post(url, params).then((res) => {
  83 + console.log(res);
  84 + this.setData({imgUrls: res.list})
70 }) 85 })
71 }, 86 },
72 //获取本周实验 87 //获取本周实验
@@ -99,22 +114,52 @@ Page({ @@ -99,22 +114,52 @@ Page({
99 const id = e.currentTarget.dataset.id; 114 const id = e.currentTarget.dataset.id;
100 wx.navigateTo({url: '/pages/index/activity-detail/activity-detail?test_id=' + id}) 115 wx.navigateTo({url: '/pages/index/activity-detail/activity-detail?test_id=' + id})
101 }, 116 },
  117 + getUser() {
  118 + let url = '/user/Profile/getUserInfo';
  119 + let header = {
  120 + "XX-token": wx.getStorageSync('token')
  121 + };
  122 + app.post(url, {},header).then((res) => {
  123 + console.log('个人信息结果',res);
  124 + // self.setData({past_test_info: res})
  125 + // console.log(self.data.this_week_test_info);
  126 + });
  127 + },
102 onLoad: function () { 128 onLoad: function () {
103 - this.getTheWeekTest();  
104 - this.getPastWeekTest(); 129 + const self = this;
  130 + self.getTheWeekTest();
  131 + self.getPastWeekTest();
  132 + self.getUser();
  133 + self.checkMobile();
  134 + //获取当前城市
105 wx.getLocation({ 135 wx.getLocation({
106 type: 'wgs84', 136 type: 'wgs84',
107 success: function(res) { 137 success: function(res) {
108 console.log(res); 138 console.log(res);
109 - let url = '/public/getAddressInfoByCoordinate';  
110 - let params = {  
111 - latitude: res.latitude,//纬度  
112 - longitude: res.longitude//经度  
113 - };  
114 - // app.post(url,params).then((res) => {  
115 - // // console.log('获取城市',res);  
116 - // self.setData({city: res.city})  
117 - // }) 139 + // 实例化API核心类
  140 + var demo = new QQMapWX({
  141 + key: 'CLVBZ-KHZKP-KWLDW-VDJTA-QVUST-XOBVO' // 必填
  142 + });
  143 +
  144 + // 调用接口
  145 + demo.reverseGeocoder({
  146 + location: {
  147 + latitude: res.latitude,//纬度
  148 + longitude: res.longitude//经度
  149 + },
  150 + success: function (res) {
  151 + console.log(res);
  152 + self.setData({city: res.result.address_component.city});
  153 + wx.setStorageSync('city', res.result.address_component.city);
  154 + self.getSlideImage();
  155 + },
  156 + fail: function (res) {
  157 + console.log(res);
  158 + },
  159 + complete: function (res) {
  160 + // console.log(res);
  161 + }
  162 + });
118 } 163 }
119 }); 164 });
120 }, 165 },
1 <!--index.wxml--> 1 <!--index.wxml-->
2 <view class="container"> 2 <view class="container">
3 - <!--蒙层-->  
4 - <view class="modal" wx:if="{{!hasPhone}}" bindtap="goPhoneCode"></view> 3 + <!--蒙层-->
  4 + <view class="modal" wx:if="{{!hasPhone}}" bindtap="goPhoneCode"></view>
5 5
6 - <!--轮播图-->  
7 - <view class="wrap">  
8 - <swiper autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="true" bindchange="swiperChange">  
9 - <block wx:for="{{imgUrls}}" wx:key="index">  
10 - <swiper-item>  
11 - <navigator url="{{item.url}}" hover-class="navigator-hover">  
12 - <view class="index_top">  
13 - <image src="{{item.url}}" class="slide-image" mode="aspectFill" />  
14 - </view>  
15 - </navigator>  
16 - </swiper-item>  
17 - </block>  
18 - </swiper>  
19 - <view class="dots">  
20 - <block wx:for="{{ imgUrls}}" wx:key>  
21 - <view class="dot{{index == currentSwiper ? ' active' : ''}}"></view>  
22 - </block> 6 + <!--轮播图-->
  7 + <view class="wrap">
  8 + <swiper autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="true"
  9 + bindchange="swiperChange">
  10 + <block wx:for="{{imgUrls}}" wx:key="index">
  11 + <swiper-item>
  12 + <navigator url="{{item.url}}" hover-class="navigator-hover">
  13 + <view class="index_top">
  14 + <image src="{{item.image}}" class="slide-image" mode="aspectFill"/>
  15 + </view>
  16 + </navigator>
  17 + </swiper-item>
  18 + </block>
  19 + </swiper>
  20 + <view class="dots">
  21 + <block wx:for="{{ imgUrls}}" wx:key>
  22 + <view class="dot{{index == currentSwiper ? ' active' : ''}}"></view>
  23 + </block>
  24 + </view>
23 </view> 25 </view>
24 - </view>  
25 26
26 - <!--购买-->  
27 - <view class="btn-box" bindtap="goBuyCard">  
28 - <view class="buy-btn">  
29 - <text>点击图片可跳转到购买页</text> 27 + <!--购买-->
  28 + <view class="btn-box" bindtap="goBuyCard">
  29 + <view class="buy-btn">
  30 + <text>点击图片可跳转到购买页</text>
  31 + </view>
30 </view> 32 </view>
31 - </view>  
32 33
33 - <!--实验列表-->  
34 - <!--<import src="/templates/templates.wxml" />--> 34 + <!--实验列表-->
  35 + <!--<import src="/templates/templates.wxml"/>-->
35 <!--<view class="past_template">--> 36 <!--<view class="past_template">-->
36 - <!--<template is="experiment" data="{{...this_week_test_info}}"></template>-->  
37 - <!--<template is="experiment" data="{{...past_test_info}}"></template>--> 37 + <!--<template is="experiment" data="{{this_week_test_info}}"></template>-->
  38 + <!--<template is="experiment" data="{{...past_test_info}}"></template>-->
38 <!--</view>--> 39 <!--</view>-->
39 - <!-- <import src="/templates/templates.wxml" /> -->  
40 - <view class="past_template">  
41 - <!-- <template is="experiment" data="{{...this_week_test_info}}"></template>  
42 - <template is="experiment" data="{{...past_test_info}}"></template> -->  
43 - <view class='experiment_box'>  
44 - <view class="title_box">  
45 - <view class="line"></view>  
46 - <text>本周实验</text>  
47 - <!-- <text>往期实验</text> -->  
48 - </view>  
49 - <view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail" data-is_the_week='{{true}}'>  
50 - <view class="test_box">  
51 - <view class="time">{{item.time}}</view>  
52 - <view class="img_box">  
53 - <image src="{{item.url}}"></image>  
54 - </view>  
55 - </view>  
56 - <view class="order_box">  
57 - <text catchtap="goAppointment" data-index="{{index}}">前往预约</text> 40 + <!-- <import src="/templates/templates.wxml" /> -->
  41 + <view class="past_template">
  42 + <!-- <template is="experiment" data="{{...this_week_test_info}}"></template>
  43 + <template is="experiment" data="{{...past_test_info}}"></template> -->
  44 + <view class='experiment_box'>
  45 + <view class="title_box">
  46 + <view class="line"></view>
  47 + <text>本周实验</text>
  48 + <!-- <text>往期实验</text> -->
  49 + </view>
  50 + <view bindtap="goTestDetail"
  51 + data-is_the_week='{{true}}' data-id="{{this_week_test_info.id}}">
  52 + <view class="test_box">
  53 + <view class="time">{{this_week_test_info.start_time}} - {{this_week_test_info.end_time}}</view>
  54 + <view class="img_box">
  55 + <image src="{{this_week_test_info.thumb}}" mode="aspectFill"></image>
  56 + </view>
  57 + </view>
  58 + <view class="order_box">
  59 + <text catchtap="goAppointment" data-index="{{index}}" data-id="{{this_week_test_info.id}}">前往预约</text>
  60 + </view>
  61 + </view>
58 </view> 62 </view>
59 - </view>  
60 - </view>  
61 63
62 64
63 - <view class='experiment_box'>  
64 - <view class="title_box" bindtap="goTestDetail" data-is_the_week='{{false}}'>  
65 - <view class="line"></view>  
66 - <text>往期实验</text>  
67 - </view>  
68 - <view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail" data-is_the_week='{{false}}'>  
69 - <view class="test_box">  
70 - <view class="time">{{item.time}}</view>  
71 - <view class="img_box">  
72 - <image src="{{item.url}}"></image>  
73 - </view>  
74 - </view>  
75 - <view class="order_box">  
76 - <text>查看</text> 65 + <view class='experiment_box'>
  66 + <view class="title_box" bindtap="goTestDetail" data-is_the_week='{{false}}'>
  67 + <view class="line"></view>
  68 + <text>往期实验</text>
  69 + </view>
  70 + <view wx:for="{{past_test_info.list}}" wx:key="index" data-index="{{index}}" data-id="{{item.id}}" bindtap="goTestDetail"
  71 + data-is_the_week='{{false}}'>
  72 + <view class="test_box">
  73 + <view class="time">{{item.start_time}} - {{item.end_time}}</view>
  74 + <view class="img_box">
  75 + <image src="{{item.thumb}}" mode="aspectFill"></image>
  76 + </view>
  77 + </view>
  78 + <view class="order_box">
  79 + <text>查看</text>
  80 + </view>
  81 + </view>
77 </view> 82 </view>
78 - </view>  
79 </view> 83 </view>
80 - </view>  
81 </view> 84 </view>
1 // pages/index/phone-code/phone-code.js 1 // pages/index/phone-code/phone-code.js
  2 +const app = getApp();
2 var interval = null //倒计时函数 3 var interval = null //倒计时函数
3 Page({ 4 Page({
4 5
5 - /**  
6 - * 页面的初始数据  
7 - */  
8 - data: {  
9 - fun_id: 2,  
10 - time: '获取验证码', //倒计时  
11 - currentTime: 61  
12 - },  
13 - getCode: function(options) {  
14 - var that = this;  
15 - var currentTime = that.data.currentTime;  
16 - interval = setInterval(function() {  
17 - currentTime--;  
18 - that.setData({  
19 - time: currentTime + '秒'  
20 - })  
21 - if (currentTime <= 0) {  
22 - clearInterval(interval);  
23 - that.setData({  
24 - time: '重新发送',  
25 - currentTime: 61,  
26 - disabled: false 6 + /**
  7 + * 页面的初始数据
  8 + */
  9 + data: {
  10 + fun_id: 2,
  11 + time: '获取验证码', //倒计时
  12 + currentTime: 61,
  13 + phone_number: '',
  14 + verification_code: '',
  15 + },
  16 + phoneInput(e) {
  17 + this.setData({phone_number: e.detail.value})
  18 + },
  19 + codeInput(e) {
  20 + this.setData({verification_code: e.detail.value})
  21 + },
  22 + getCode: function (options) {
  23 + var that = this;
  24 + var currentTime = that.data.currentTime;
  25 + interval = setInterval(function () {
  26 + currentTime--;
  27 + that.setData({
  28 + time: currentTime + '秒'
  29 + })
  30 + if (currentTime <= 0) {
  31 + clearInterval(interval);
  32 + that.setData({
  33 + time: '重新发送',
  34 + currentTime: 61,
  35 + disabled: false
  36 + })
  37 + }
  38 + }, 1000);
  39 + let url = '/user/Profile/getCode';
  40 + let params = {
  41 + mobile: that.data.phone_number,
  42 + };
  43 + let header = {
  44 + "XX-token": wx.getStorageSync('token')
  45 + };
  46 + app.post(url, params,header).then((res) => {
  47 + console.log(res);
  48 + that.setData({verification_code: res.code})
  49 + // console.log(this.data.this_week_test_info);
27 }) 50 })
28 - }  
29 - }, 1000)  
30 - },  
31 - getVerificationCode() {  
32 - this.getCode();  
33 - var that = this;  
34 - that.setData({  
35 - disabled: true  
36 - })  
37 - },  
38 - //确认  
39 - confirm() {  
40 - wx.switchTab({  
41 - url: '../../index/index'  
42 - })  
43 - },  
44 - /**  
45 - * 生命周期函数--监听页面加载  
46 - */  
47 - onLoad: function(options) {  
48 -  
49 - },  
50 -  
51 - /**  
52 - * 生命周期函数--监听页面初次渲染完成  
53 - */  
54 - onReady: function() {  
55 -  
56 - },  
57 -  
58 - /**  
59 - * 生命周期函数--监听页面显示  
60 - */  
61 - onShow: function() {  
62 -  
63 - },  
64 -  
65 - /**  
66 - * 生命周期函数--监听页面隐藏  
67 - */  
68 - onHide: function() {  
69 -  
70 - },  
71 -  
72 - /**  
73 - * 生命周期函数--监听页面卸载  
74 - */  
75 - onUnload: function() {  
76 -  
77 - },  
78 -  
79 - /**  
80 - * 页面相关事件处理函数--监听用户下拉动作  
81 - */  
82 - onPullDownRefresh: function() {  
83 -  
84 - },  
85 -  
86 - /**  
87 - * 页面上拉触底事件的处理函数  
88 - */  
89 - onReachBottom: function() {  
90 -  
91 - },  
92 -  
93 - /**  
94 - * 用户点击右上角分享  
95 - */  
96 - onShareAppMessage: function() {  
97 -  
98 - } 51 + },
  52 + getVerificationCode() {
  53 + var that = this;
  54 + if(that.data.phone_number !== '') {
  55 + that.getCode();
  56 + that.setData({
  57 + disabled: true
  58 + })
  59 + }else {
  60 + that.setData({
  61 + disabled: false
  62 + });
  63 + wx.showToast({title: '请输入手机号!',icon: 'none'})
  64 + }
  65 + },
  66 + //确认绑定
  67 + formSubmit(e) {
  68 + console.log(e.detail);
  69 + const self = this;
  70 + if(self.data.phone_number === '') {
  71 + wx.showToast({title: '请输入手机号!',icon: 'none'})
  72 + }else if(self.data.verification_code === '') {
  73 + wx.showToast({title: '请输入验证码!',icon: 'none'})
  74 + }else {
  75 + let url = '/user/Profile/bindingMobile';
  76 + let params = {
  77 + _type: 1,
  78 + formId: e.detail.formId,
  79 + mobile: e.detail.value.phone_number,
  80 + verification_code: e.detail.value.verification_code,
  81 + };
  82 + let header = {
  83 + "XX-token": wx.getStorageSync('token')
  84 + };
  85 + app.post(url, params,header).then((res) => {
  86 + console.log('绑定结果',res);
  87 + // self.setData({past_test_info: res})
  88 + // console.log(self.data.this_week_test_info);
  89 + });
  90 + wx.switchTab({
  91 + url: '../../index/index'
  92 + })
  93 + }
  94 + },
  95 +
  96 + /**
  97 + * 生命周期函数--监听页面加载
  98 + */
  99 + onLoad: function (options) {
  100 + },
  101 +
  102 + /**
  103 + * 生命周期函数--监听页面初次渲染完成
  104 + */
  105 + onReady: function () {
  106 +
  107 + },
  108 +
  109 + /**
  110 + * 生命周期函数--监听页面显示
  111 + */
  112 + onShow: function () {
  113 +
  114 + },
  115 +
  116 + /**
  117 + * 生命周期函数--监听页面隐藏
  118 + */
  119 + onHide: function () {
  120 +
  121 + },
  122 +
  123 + /**
  124 + * 生命周期函数--监听页面卸载
  125 + */
  126 + onUnload: function () {
  127 +
  128 + },
  129 +
  130 + /**
  131 + * 页面相关事件处理函数--监听用户下拉动作
  132 + */
  133 + onPullDownRefresh: function () {
  134 +
  135 + },
  136 +
  137 + /**
  138 + * 页面上拉触底事件的处理函数
  139 + */
  140 + onReachBottom: function () {
  141 +
  142 + },
  143 +
  144 + /**
  145 + * 用户点击右上角分享
  146 + */
  147 + onShareAppMessage: function () {
  148 +
  149 + }
99 }) 150 })
@@ -4,19 +4,23 @@ @@ -4,19 +4,23 @@
4 <image src="../../../images/logo.png"></image> 4 <image src="../../../images/logo.png"></image>
5 </view> 5 </view>
6 6
7 - <view class="phone_box">  
8 - <input type="number" placeholder="请输入您的手机号" placeholder-class="placeholder" class="phone_num"/>  
9 - <view class="code_box">  
10 - <input type="number" placeholder="输入验证码" placeholder-class="placeholder"/>  
11 - <button class="button" disabled="{{disabled}}" data-id="2" bindtap="getVerificationCode" >  
12 - {{time}}  
13 - </button> 7 + <form bindsubmit="formSubmit" bindreset="formReset" report-submit="true">
  8 + <view class="phone_box">
  9 + <input type="number" placeholder="请输入您的手机号" placeholder-class="placeholder" class="phone_num"
  10 + value="{{phone_number}}" bindinput="phoneInput" name="phone_number"/>
  11 + <view class="code_box">
  12 + <input type="number" placeholder="输入验证码" placeholder-class="placeholder" value="{{verification_code}}"
  13 + bindinput="codeInput" name="verification_code"/>
  14 + <button class="button" disabled="{{disabled}}" data-id="2" bindtap="getVerificationCode">
  15 + {{time}}
  16 + </button>
  17 + </view>
14 </view> 18 </view>
15 - </view>  
16 19
17 - <view class="confirm_box">  
18 - <view class="confirm_btn" bindtap='confirm'>  
19 - <text>确 定</text> 20 + <view class="confirm_box">
  21 + <button class="confirm_btn" form-type="submit">
  22 + <text>确 定</text>
  23 + </button>
20 </view> 24 </view>
21 - </view> 25 + </form>
22 </view> 26 </view>
@@ -5,7 +5,11 @@ @@ -5,7 +5,11 @@
5 * 页面的初始数据 5 * 页面的初始数据
6 */ 6 */
7 data: { 7 data: {
8 - 8 + hasPhone: true,
  9 + },
  10 + //首次登录小程序,跳转到认证手机页面
  11 + goPhoneCode() {
  12 + wx.navigateTo({url: '/pages/index/phone-code/phone-code'})
9 }, 13 },
10 //兑换 14 //兑换
11 charge() { 15 charge() {
1 <!--pages/my/my.wxml--> 1 <!--pages/my/my.wxml-->
2 <view class='box'> 2 <view class='box'>
  3 + <!--蒙层-->
  4 + <view class="modal" wx:if="{{!hasPhone}}" bindtap="goPhoneCode"></view>
3 <view class='header_box '> 5 <view class='header_box '>
4 <view class='head_box'> 6 <view class='head_box'>
5 <view class='head_img'> 7 <view class='head_img'>
@@ -15,6 +15,16 @@ @@ -15,6 +15,16 @@
15 padding: 0 24rpx; 15 padding: 0 24rpx;
16 box-sizing: border-box; 16 box-sizing: border-box;
17 } 17 }
  18 +.modal {
  19 + width: 100%;
  20 + height: 100%;
  21 + position: absolute;
  22 + left: 0;
  23 + top: 0;
  24 + background-color: #000000;
  25 + opacity: 0.8;
  26 + z-index: 10;
  27 +}
18 .icon-bianji2{ 28 .icon-bianji2{
19 font-size: 50rpx; 29 font-size: 50rpx;
20 text-align: center; 30 text-align: center;
1 // pages/protocol/protocol.js 1 // pages/protocol/protocol.js
  2 +const app = getApp();
2 Page({ 3 Page({
3 4
4 - /**  
5 - * 页面的初始数据  
6 - */  
7 - data: {  
8 -  
9 - },  
10 -  
11 - /**  
12 - * 生命周期函数--监听页面加载  
13 - */  
14 - onLoad: function (options) {  
15 -  
16 - },  
17 -  
18 - /**  
19 - * 生命周期函数--监听页面初次渲染完成  
20 - */  
21 - onReady: function () {  
22 -  
23 - },  
24 -  
25 - /**  
26 - * 生命周期函数--监听页面显示  
27 - */  
28 - onShow: function () {  
29 -  
30 - },  
31 -  
32 - /**  
33 - * 生命周期函数--监听页面隐藏  
34 - */  
35 - onHide: function () {  
36 -  
37 - },  
38 -  
39 - /**  
40 - * 生命周期函数--监听页面卸载  
41 - */  
42 - onUnload: function () {  
43 -  
44 - },  
45 -  
46 - /**  
47 - * 页面相关事件处理函数--监听用户下拉动作  
48 - */  
49 - onPullDownRefresh: function () {  
50 -  
51 - },  
52 -  
53 - /**  
54 - * 页面上拉触底事件的处理函数  
55 - */  
56 - onReachBottom: function () {  
57 -  
58 - },  
59 -  
60 - /**  
61 - * 用户点击右上角分享  
62 - */  
63 - onShareAppMessage: function () {  
64 -  
65 - } 5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + service_protocol: {},
  10 + },
  11 + getServiceProtocol() {
  12 + let url = '/wxapp/public/arc_service';
  13 + app.post(url, {},{}).then((res) => {
  14 + console.log(res);
  15 + this.setData({service_protocol: res})
  16 + })
  17 + },
  18 + /**
  19 + * 生命周期函数--监听页面加载
  20 + */
  21 + onLoad: function (options) {
  22 + this.getServiceProtocol();
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面初次渲染完成
  27 + */
  28 + onReady: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面显示
  34 + */
  35 + onShow: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面隐藏
  41 + */
  42 + onHide: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 生命周期函数--监听页面卸载
  48 + */
  49 + onUnload: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面相关事件处理函数--监听用户下拉动作
  55 + */
  56 + onPullDownRefresh: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 页面上拉触底事件的处理函数
  62 + */
  63 + onReachBottom: function () {
  64 +
  65 + },
  66 +
  67 + /**
  68 + * 用户点击右上角分享
  69 + */
  70 + onShareAppMessage: function () {
  71 +
  72 + }
66 }) 73 })
1 <!--pages/protocol/protocol.wxml--> 1 <!--pages/protocol/protocol.wxml-->
2 <view class='content_box'> 2 <view class='content_box'>
3 - 还有简短的汉字以内的文字介绍还有简短的汉字以内 的文字介绍还有简短的汉字以内的文字介绍还有简短 的汉字以 还有简短的汉字以内的文字介绍还有简短的汉字以内 的文字介绍还有简短的汉字以内的文字介绍还有简短 的汉字以 3 + <view>{{service_protocol.title}}</view>
  4 + <view>{{service_protocol.description}}</view>
4 </view> 5 </view>
@@ -12,12 +12,7 @@ Page({ @@ -12,12 +12,7 @@ Page({
12 // 获取用户信息 12 // 获取用户信息
13 start(e) { 13 start(e) {
14 let that = this; 14 let that = this;
15 - console.log('点击');  
16 - // wx.redirectTo({  
17 - // url: '/pages/index/index',  
18 - // })  
19 let url = '/wxapp/public/login'; 15 let url = '/wxapp/public/login';
20 - // console.log(that.data.openid)  
21 let params = { 16 let params = {
22 encrypted_data: e.detail.encryptedData, 17 encrypted_data: e.detail.encryptedData,
23 iv: e.detail.iv, 18 iv: e.detail.iv,
@@ -30,11 +25,9 @@ Page({ @@ -30,11 +25,9 @@ Page({
30 wx.setStorageSync('token', ret.token) 25 wx.setStorageSync('token', ret.token)
31 app.globalData.userInfo = ret.user_type 26 app.globalData.userInfo = ret.user_type
32 // console.log('userInfo',app.globalData.userInfo,ret); 27 // console.log('userInfo',app.globalData.userInfo,ret);
33 - if (ret.user_type == 2) {  
34 wx.switchTab({ 28 wx.switchTab({
35 url: '/pages/index/index', 29 url: '/pages/index/index',
36 }) 30 })
37 - }  
38 }) 31 })
39 }, 32 },
40 example() { 33 example() {
@@ -55,11 +48,10 @@ Page({ @@ -55,11 +48,10 @@ Page({
55 let url = '/wxapp/public/getSessionKey' 48 let url = '/wxapp/public/getSessionKey'
56 wx.login({ 49 wx.login({
57 success: function (res) { 50 success: function (res) {
58 - console.log(res) 51 + // console.log(res)
59 app.post(url, { 52 app.post(url, {
60 code: res.code 53 code: res.code
61 }, {}).then((ret) => { 54 }, {}).then((ret) => {
62 - console.log('res',ret);  
63 that.setData({ 55 that.setData({
64 openid: ret.openid, 56 openid: ret.openid,
65 session_key: ret.session_key 57 session_key: ret.session_key
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 }, 12 },
13 "compileType": "miniprogram", 13 "compileType": "miniprogram",
14 "libVersion": "2.4.0", 14 "libVersion": "2.4.0",
15 - "appid": "wxaab44bbcfc0e5bc5", 15 + "appid": "wx9053b434e50ee2dd",
16 "projectname": "science", 16 "projectname": "science",
17 "debugOptions": { 17 "debugOptions": {
18 "hidedInDevtools": [] 18 "hidedInDevtools": []
  1 +var _createClass=function(){function a(e,c){for(var b=0;b<c.length;b++){var d=c[b];d.enumerable=d.enumerable||false;d.configurable=true;if("value" in d){d.writable=true}Object.defineProperty(e,d.key,d)}}return function(d,b,c){if(b){a(d.prototype,b)}if(c){a(d,c)}return d}}();function _classCallCheck(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}var ERROR_CONF={KEY_ERR:311,KEY_ERR_MSG:"key格式错误",PARAM_ERR:310,PARAM_ERR_MSG:"请求参数信息有误",SYSTEM_ERR:600,SYSTEM_ERR_MSG:"系统错误",WX_ERR_CODE:1000,WX_OK_CODE:200};var BASE_URL="https://apis.map.qq.com/ws/";var URL_SEARCH=BASE_URL+"place/v1/search";var URL_SUGGESTION=BASE_URL+"place/v1/suggestion";var URL_GET_GEOCODER=BASE_URL+"geocoder/v1/";var URL_CITY_LIST=BASE_URL+"district/v1/list";var URL_AREA_LIST=BASE_URL+"district/v1/getchildren";var URL_DISTANCE=BASE_URL+"distance/v1/";var Utils={location2query:function location2query(c){if(typeof c=="string"){return c}var b="";for(var a=0;a<c.length;a++){var e=c[a];if(!!b){b+=";"}if(e.location){b=b+e.location.lat+","+e.location.lng}if(e.latitude&&e.longitude){b=b+e.latitude+","+e.longitude}}return b},getWXLocation:function getWXLocation(c,b,a){wx.getLocation({type:"gcj02",success:c,fail:b,complete:a})},getLocationParam:function getLocationParam(b){if(typeof b=="string"){var a=b.split(",");if(a.length===2){b={latitude:b.split(",")[0],longitude:b.split(",")[1]}}else{b={}}}return b},polyfillParam:function polyfillParam(a){a.success=a.success||function(){};a.fail=a.fail||function(){};a.complete=a.complete||function(){}},checkParamKeyEmpty:function checkParamKeyEmpty(c,b){if(!c[b]){var a=this.buildErrorConfig(ERROR_CONF.PARAM_ERR,ERROR_CONF.PARAM_ERR_MSG+b+"参数格式有误");c.fail(a);c.complete(a);return true}return false},checkKeyword:function checkKeyword(a){return !this.checkParamKeyEmpty(a,"keyword")},checkLocation:function checkLocation(c){var a=this.getLocationParam(c.location);if(!a||!a.latitude||!a.longitude){var b=this.buildErrorConfig(ERROR_CONF.PARAM_ERR,ERROR_CONF.PARAM_ERR_MSG+" location参数格式有误");c.fail(b);c.complete(b);return false}return true},buildErrorConfig:function buildErrorConfig(a,b){return{status:a,message:b}},buildWxRequestConfig:function buildWxRequestConfig(c,a){var b=this;a.header={"content-type":"application/json"};a.method="GET";a.success=function(d){var e=d.data;if(e.status===0){c.success(e)}else{c.fail(e)}};a.fail=function(d){d.statusCode=ERROR_CONF.WX_ERR_CODE;c.fail(b.buildErrorConfig(ERROR_CONF.WX_ERR_CODE,result.errMsg))};a.complete=function(d){var e=+d.statusCode;switch(e){case ERROR_CONF.WX_ERR_CODE:c.complete(b.buildErrorConfig(ERROR_CONF.WX_ERR_CODE,d.errMsg));break;case ERROR_CONF.WX_OK_CODE:var f=d.data;if(f.status===0){c.complete(f)}else{c.complete(b.buildErrorConfig(f.status,f.message))}break;default:c.complete(b.buildErrorConfig(ERROR_CONF.SYSTEM_ERR,ERROR_CONF.SYSTEM_ERR_MSG))}};return a},locationProcess:function locationProcess(f,e,c,a){var d=this;c=c||function(g){g.statusCode=ERROR_CONF.WX_ERR_CODE;f.fail(d.buildErrorConfig(ERROR_CONF.WX_ERR_CODE,g.errMsg))};a=a||function(g){if(g.statusCode==ERROR_CONF.WX_ERR_CODE){f.complete(d.buildErrorConfig(ERROR_CONF.WX_ERR_CODE,g.errMsg))}};if(!f.location){d.getWXLocation(e,c,a)}else{if(d.checkLocation(f)){var b=Utils.getLocationParam(f.location);e(b)}}}};var QQMapWX=function(){function b(i){_classCallCheck(this,b);if(!i.key){throw Error("key值不能为空")}this.key=i.key}_createClass(b,[{key:"search",value:function f(i){var l=this;i=i||{};Utils.polyfillParam(i);if(!Utils.checkKeyword(i)){return}var k={keyword:i.keyword,orderby:i.orderby||"_distance",page_size:i.page_size||10,page_index:i.page_index||1,output:"json",key:l.key};if(i.address_format){k.address_format=i.address_format}if(i.filter){k.filter=i.filter}var n=i.distance||"1000";var j=i.auto_extend||1;var m=function m(o){k.boundary="nearby("+o.latitude+","+o.longitude+","+n+","+j+")";wx.request(Utils.buildWxRequestConfig(i,{url:URL_SEARCH,data:k}))};Utils.locationProcess(i,m)}},{key:"getSuggestion",value:function h(i){var k=this;i=i||{};Utils.polyfillParam(i);if(!Utils.checkKeyword(i)){return}var j={keyword:i.keyword,region:i.region||"全国",region_fix:i.region_fix||0,policy:i.policy||0,output:"json",key:k.key};wx.request(Utils.buildWxRequestConfig(i,{url:URL_SUGGESTION,data:j}))}},{key:"reverseGeocoder",value:function a(i){var k=this;i=i||{};Utils.polyfillParam(i);var j={coord_type:i.coord_type||5,get_poi:i.get_poi||0,output:"json",key:k.key};if(i.poi_options){j.poi_options=i.poi_options}var l=function l(m){j.location=m.latitude+","+m.longitude;wx.request(Utils.buildWxRequestConfig(i,{url:URL_GET_GEOCODER,data:j}))};Utils.locationProcess(i,l)}},{key:"geocoder",value:function g(i){var k=this;i=i||{};Utils.polyfillParam(i);if(Utils.checkParamKeyEmpty(i,"address")){return}var j={address:i.address,output:"json",key:k.key};wx.request(Utils.buildWxRequestConfig(i,{url:URL_GET_GEOCODER,data:j}))}},{key:"getCityList",value:function c(i){var k=this;i=i||{};Utils.polyfillParam(i);var j={output:"json",key:k.key};
  2 +wx.request(Utils.buildWxRequestConfig(i,{url:URL_CITY_LIST,data:j}))}},{key:"getDistrictByCityId",value:function d(i){var k=this;i=i||{};Utils.polyfillParam(i);if(Utils.checkParamKeyEmpty(i,"id")){return}var j={id:i.id||"",output:"json",key:k.key};wx.request(Utils.buildWxRequestConfig(i,{url:URL_AREA_LIST,data:j}))}},{key:"calculateDistance",value:function e(i){var k=this;i=i||{};Utils.polyfillParam(i);if(Utils.checkParamKeyEmpty(i,"to")){return}var j={mode:i.mode||"walking",to:Utils.location2query(i.to),output:"json",key:k.key};var l=function l(m){j.from=m.latitude+","+m.longitude;wx.request(Utils.buildWxRequestConfig(i,{url:URL_DISTANCE,data:j}))};if(i.from){i.location=i.from}Utils.locationProcess(i,l)}}]);return b}();module.exports=QQMapWX;
@@ -14,6 +14,32 @@ const formatNumber = n => { @@ -14,6 +14,32 @@ const formatNumber = n => {
14 return n[1] ? n : '0' + n 14 return n[1] ? n : '0' + n
15 } 15 }
16 16
  17 +/**
  18 + * 时间戳转化为年 月 日 时 分 秒
  19 + * number: 传入时间戳
  20 + * format:返回格式,支持自定义,但参数必须与formateArr里保持一致
  21 + */
  22 +function formatTimeTwo(number, format) {
  23 +
  24 + var formateArr = ['Y', 'M', 'D', 'h', 'm', 's'];
  25 + var returnArr = [];
  26 +
  27 + var date = new Date(number * 1000);
  28 + returnArr.push(date.getFullYear());
  29 + returnArr.push(formatNumber(date.getMonth() + 1));
  30 + returnArr.push(formatNumber(date.getDate()));
  31 +
  32 + returnArr.push(formatNumber(date.getHours()));
  33 + returnArr.push(formatNumber(date.getMinutes()));
  34 + returnArr.push(formatNumber(date.getSeconds()));
  35 +
  36 + for (var i in returnArr) {
  37 + format = format.replace(formateArr[i], returnArr[i]);
  38 + }
  39 + return format;
  40 +}
  41 +
17 module.exports = { 42 module.exports = {
18 - formatTime: formatTime 43 + formatTime: formatTime,
  44 + formatTimeTwo: formatTimeTwo
19 } 45 }
  1 +/**
  2 + * html2Json 改造来自: https://github.com/Jxck/html2json
  3 + *
  4 + *
  5 + * author: Di (微信小程序开发工程师)
  6 + * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
  7 + * 垂直微信小程序开发交流社区
  8 + *
  9 + * github地址: https://github.com/icindy/wxParse
  10 + *
  11 + * for: 微信小程序富文本解析
  12 + * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
  13 + */
  14 +
  15 +var __placeImgeUrlHttps = "https";
  16 +var __emojisReg = '';
  17 +var __emojisBaseSrc = '';
  18 +var __emojis = {};
  19 +var wxDiscode = require('./wxDiscode.js');
  20 +var HTMLParser = require('./htmlparser.js');
  21 +// Empty Elements - HTML 5
  22 +var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
  23 +// Block Elements - HTML 5
  24 +var block = makeMap("br,a,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video");
  25 +
  26 +// Inline Elements - HTML 5
  27 +var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
  28 +
  29 +// Elements that you can, intentionally, leave open
  30 +// (and which close themselves)
  31 +var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
  32 +
  33 +// Attributes that have their values filled in disabled="disabled"
  34 +var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
  35 +
  36 +// Special Elements (can contain anything)
  37 +var special = makeMap("wxxxcode-style,script,style,view,scroll-view,block");
  38 +function makeMap(str) {
  39 + var obj = {}, items = str.split(",");
  40 + for (var i = 0; i < items.length; i++)
  41 + obj[items[i]] = true;
  42 + return obj;
  43 +}
  44 +
  45 +function q(v) {
  46 + return '"' + v + '"';
  47 +}
  48 +
  49 +function removeDOCTYPE(html) {
  50 + return html
  51 + .replace(/<\?xml.*\?>\n/, '')
  52 + .replace(/<.*!doctype.*\>\n/, '')
  53 + .replace(/<.*!DOCTYPE.*\>\n/, '');
  54 +}
  55 +
  56 +function trimHtml(html) {
  57 + return html
  58 + .replace(/\r?\n+/g, '')
  59 + .replace(/<!--.*?-->/ig, '')
  60 + .replace(/\/\*.*?\*\//ig, '')
  61 + .replace(/[ ]+</ig, '<')
  62 +}
  63 +
  64 +
  65 +function html2json(html, bindName) {
  66 + //处理字符串
  67 + html = removeDOCTYPE(html);
  68 + html = trimHtml(html);
  69 + html = wxDiscode.strDiscode(html);
  70 + //生成node节点
  71 + var bufArray = [];
  72 + var results = {
  73 + node: bindName,
  74 + nodes: [],
  75 + images:[],
  76 + imageUrls:[]
  77 + };
  78 + var index = 0;
  79 + HTMLParser(html, {
  80 + start: function (tag, attrs, unary) {
  81 + //debug(tag, attrs, unary);
  82 + // node for this element
  83 + var node = {
  84 + node: 'element',
  85 + tag: tag,
  86 + };
  87 +
  88 + if (bufArray.length === 0) {
  89 + node.index = index.toString()
  90 + index += 1
  91 + } else {
  92 + var parent = bufArray[0];
  93 + if (parent.nodes === undefined) {
  94 + parent.nodes = [];
  95 + }
  96 + node.index = parent.index + '.' + parent.nodes.length
  97 + }
  98 +
  99 + if (block[tag]) {
  100 + node.tagType = "block";
  101 + } else if (inline[tag]) {
  102 + node.tagType = "inline";
  103 + } else if (closeSelf[tag]) {
  104 + node.tagType = "closeSelf";
  105 + }
  106 +
  107 + if (attrs.length !== 0) {
  108 + node.attr = attrs.reduce(function (pre, attr) {
  109 + var name = attr.name;
  110 + var value = attr.value;
  111 + if (name == 'class') {
  112 + // console.dir(value);
  113 + // value = value.join("")
  114 + node.classStr = value;
  115 + }
  116 + // has multi attibutes
  117 + // make it array of attribute
  118 + if (name == 'style') {
  119 + console.dir(value);
  120 + // value = value.join("")
  121 + node.styleStr = value;
  122 + }
  123 + if (value.match(/ /)) {
  124 + value = value.split(' ');
  125 + }
  126 +
  127 +
  128 + // if attr already exists
  129 + // merge it
  130 + if (pre[name]) {
  131 + if (Array.isArray(pre[name])) {
  132 + // already array, push to last
  133 + pre[name].push(value);
  134 + } else {
  135 + // single value, make it array
  136 + pre[name] = [pre[name], value];
  137 + }
  138 + } else {
  139 + // not exist, put it
  140 + pre[name] = value;
  141 + }
  142 +
  143 + return pre;
  144 + }, {});
  145 + }
  146 +
  147 + //对img添加额外数据
  148 + if (node.tag === 'img') {
  149 + node.imgIndex = results.images.length;
  150 + var imgUrl = node.attr.src;
  151 + if (imgUrl[0] == '') {
  152 + imgUrl.splice(0, 1);
  153 + }
  154 + imgUrl = wxDiscode.urlToHttpUrl(imgUrl, __placeImgeUrlHttps);
  155 + node.attr.src = imgUrl;
  156 + node.from = bindName;
  157 + results.images.push(node);
  158 + results.imageUrls.push(imgUrl);
  159 + }
  160 +
  161 + // 处理font标签样式属性
  162 + if (node.tag === 'font') {
  163 + var fontSize = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large'];
  164 + var styleAttrs = {
  165 + 'color': 'color',
  166 + 'face': 'font-family',
  167 + 'size': 'font-size'
  168 + };
  169 + if (!node.attr.style) node.attr.style = [];
  170 + if (!node.styleStr) node.styleStr = '';
  171 + for (var key in styleAttrs) {
  172 + if (node.attr[key]) {
  173 + var value = key === 'size' ? fontSize[node.attr[key]-1] : node.attr[key];
  174 + node.attr.style.push(styleAttrs[key]);
  175 + node.attr.style.push(value);
  176 + node.styleStr += styleAttrs[key] + ': ' + value + ';';
  177 + }
  178 + }
  179 + }
  180 +
  181 + //临时记录source资源
  182 + if(node.tag === 'source'){
  183 + results.source = node.attr.src;
  184 + }
  185 +
  186 + if (unary) {
  187 + // if this tag doesn't have end tag
  188 + // like <img src="hoge.png"/>
  189 + // add to parents
  190 + var parent = bufArray[0] || results;
  191 + if (parent.nodes === undefined) {
  192 + parent.nodes = [];
  193 + }
  194 + parent.nodes.push(node);
  195 + } else {
  196 + bufArray.unshift(node);
  197 + }
  198 + },
  199 + end: function (tag) {
  200 + //debug(tag);
  201 + // merge into parent tag
  202 + var node = bufArray.shift();
  203 + if (node.tag !== tag) console.error('invalid state: mismatch end tag');
  204 +
  205 + //当有缓存source资源时于于video补上src资源
  206 + if(node.tag === 'video' && results.source){
  207 + node.attr.src = results.source;
  208 + delete results.source;
  209 + }
  210 +
  211 + if (bufArray.length === 0) {
  212 + results.nodes.push(node);
  213 + } else {
  214 + var parent = bufArray[0];
  215 + if (parent.nodes === undefined) {
  216 + parent.nodes = [];
  217 + }
  218 + parent.nodes.push(node);
  219 + }
  220 + },
  221 + chars: function (text) {
  222 + //debug(text);
  223 + var node = {
  224 + node: 'text',
  225 + text: text,
  226 + textArray:transEmojiStr(text)
  227 + };
  228 +
  229 + if (bufArray.length === 0) {
  230 + node.index = index.toString()
  231 + index += 1
  232 + results.nodes.push(node);
  233 + } else {
  234 + var parent = bufArray[0];
  235 + if (parent.nodes === undefined) {
  236 + parent.nodes = [];
  237 + }
  238 + node.index = parent.index + '.' + parent.nodes.length
  239 + parent.nodes.push(node);
  240 + }
  241 + },
  242 + comment: function (text) {
  243 + //debug(text);
  244 + // var node = {
  245 + // node: 'comment',
  246 + // text: text,
  247 + // };
  248 + // var parent = bufArray[0];
  249 + // if (parent.nodes === undefined) {
  250 + // parent.nodes = [];
  251 + // }
  252 + // parent.nodes.push(node);
  253 + },
  254 + });
  255 + return results;
  256 +};
  257 +
  258 +function transEmojiStr(str){
  259 + // var eReg = new RegExp("["+__reg+' '+"]");
  260 +// str = str.replace(/\[([^\[\]]+)\]/g,':$1:')
  261 +
  262 + var emojiObjs = [];
  263 + //如果正则表达式为空
  264 + if(__emojisReg.length == 0 || !__emojis){
  265 + var emojiObj = {}
  266 + emojiObj.node = "text";
  267 + emojiObj.text = str;
  268 + array = [emojiObj];
  269 + return array;
  270 + }
  271 + //这个地方需要调整
  272 + str = str.replace(/\[([^\[\]]+)\]/g,':$1:')
  273 + var eReg = new RegExp("[:]");
  274 + var array = str.split(eReg);
  275 + for(var i = 0; i < array.length; i++){
  276 + var ele = array[i];
  277 + var emojiObj = {};
  278 + if(__emojis[ele]){
  279 + emojiObj.node = "element";
  280 + emojiObj.tag = "emoji";
  281 + emojiObj.text = __emojis[ele];
  282 + emojiObj.baseSrc= __emojisBaseSrc;
  283 + }else{
  284 + emojiObj.node = "text";
  285 + emojiObj.text = ele;
  286 + }
  287 + emojiObjs.push(emojiObj);
  288 + }
  289 +
  290 + return emojiObjs;
  291 +}
  292 +
  293 +function emojisInit(reg='',baseSrc="/wxParse/emojis/",emojis){
  294 + __emojisReg = reg;
  295 + __emojisBaseSrc=baseSrc;
  296 + __emojis=emojis;
  297 +}
  298 +
  299 +module.exports = {
  300 + html2json: html2json,
  301 + emojisInit:emojisInit
  302 +};
  303 +
  1 +/**
  2 + *
  3 + * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser
  4 + *
  5 + * author: Di (微信小程序开发工程师)
  6 + * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
  7 + * 垂直微信小程序开发交流社区
  8 + *
  9 + * github地址: https://github.com/icindy/wxParse
  10 + *
  11 + * for: 微信小程序富文本解析
  12 + * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
  13 + */
  14 +// Regular Expressions for parsing tags and attributes
  15 +var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
  16 + endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/,
  17 + attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
  18 +
  19 +// Empty Elements - HTML 5
  20 +var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
  21 +
  22 +// Block Elements - HTML 5
  23 +var block = makeMap("a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video");
  24 +
  25 +// Inline Elements - HTML 5
  26 +var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
  27 +
  28 +// Elements that you can, intentionally, leave open
  29 +// (and which close themselves)
  30 +var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
  31 +
  32 +// Attributes that have their values filled in disabled="disabled"
  33 +var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
  34 +
  35 +// Special Elements (can contain anything)
  36 +var special = makeMap("wxxxcode-style,script,style,view,scroll-view,block");
  37 +
  38 +function HTMLParser(html, handler) {
  39 + var index, chars, match, stack = [], last = html;
  40 + stack.last = function () {
  41 + return this[this.length - 1];
  42 + };
  43 +
  44 + while (html) {
  45 + chars = true;
  46 +
  47 + // Make sure we're not in a script or style element
  48 + if (!stack.last() || !special[stack.last()]) {
  49 +
  50 + // Comment
  51 + if (html.indexOf("<!--") == 0) {
  52 + index = html.indexOf("-->");
  53 +
  54 + if (index >= 0) {
  55 + if (handler.comment)
  56 + handler.comment(html.substring(4, index));
  57 + html = html.substring(index + 3);
  58 + chars = false;
  59 + }
  60 +
  61 + // end tag
  62 + } else if (html.indexOf("</") == 0) {
  63 + match = html.match(endTag);
  64 +
  65 + if (match) {
  66 + html = html.substring(match[0].length);
  67 + match[0].replace(endTag, parseEndTag);
  68 + chars = false;
  69 + }
  70 +
  71 + // start tag
  72 + } else if (html.indexOf("<") == 0) {
  73 + match = html.match(startTag);
  74 +
  75 + if (match) {
  76 + html = html.substring(match[0].length);
  77 + match[0].replace(startTag, parseStartTag);
  78 + chars = false;
  79 + }
  80 + }
  81 +
  82 + if (chars) {
  83 + index = html.indexOf("<");
  84 + var text = ''
  85 + while (index === 0) {
  86 + text += "<";
  87 + html = html.substring(1);
  88 + index = html.indexOf("<");
  89 + }
  90 + text += index < 0 ? html : html.substring(0, index);
  91 + html = index < 0 ? "" : html.substring(index);
  92 +
  93 + if (handler.chars)
  94 + handler.chars(text);
  95 + }
  96 +
  97 + } else {
  98 +
  99 + html = html.replace(new RegExp("([\\s\\S]*?)<\/" + stack.last() + "[^>]*>"), function (all, text) {
  100 + text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, "$1$2");
  101 + if (handler.chars)
  102 + handler.chars(text);
  103 +
  104 + return "";
  105 + });
  106 +
  107 +
  108 + parseEndTag("", stack.last());
  109 + }
  110 +
  111 + if (html == last)
  112 + throw "Parse Error: " + html;
  113 + last = html;
  114 + }
  115 +
  116 + // Clean up any remaining tags
  117 + parseEndTag();
  118 +
  119 + function parseStartTag(tag, tagName, rest, unary) {
  120 + tagName = tagName.toLowerCase();
  121 +
  122 + if (block[tagName]) {
  123 + while (stack.last() && inline[stack.last()]) {
  124 + parseEndTag("", stack.last());
  125 + }
  126 + }
  127 +
  128 + if (closeSelf[tagName] && stack.last() == tagName) {
  129 + parseEndTag("", tagName);
  130 + }
  131 +
  132 + unary = empty[tagName] || !!unary;
  133 +
  134 + if (!unary)
  135 + stack.push(tagName);
  136 +
  137 + if (handler.start) {
  138 + var attrs = [];
  139 +
  140 + rest.replace(attr, function (match, name) {
  141 + var value = arguments[2] ? arguments[2] :
  142 + arguments[3] ? arguments[3] :
  143 + arguments[4] ? arguments[4] :
  144 + fillAttrs[name] ? name : "";
  145 +
  146 + attrs.push({
  147 + name: name,
  148 + value: value,
  149 + escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') //"
  150 + });
  151 + });
  152 +
  153 + if (handler.start) {
  154 + handler.start(tagName, attrs, unary);
  155 + }
  156 +
  157 + }
  158 + }
  159 +
  160 + function parseEndTag(tag, tagName) {
  161 + // If no tag name is provided, clean shop
  162 + if (!tagName)
  163 + var pos = 0;
  164 +
  165 + // Find the closest opened tag of the same type
  166 + else {
  167 + tagName = tagName.toLowerCase();
  168 + for (var pos = stack.length - 1; pos >= 0; pos--)
  169 + if (stack[pos] == tagName)
  170 + break;
  171 + }
  172 + if (pos >= 0) {
  173 + // Close all the open elements, up the stack
  174 + for (var i = stack.length - 1; i >= pos; i--)
  175 + if (handler.end)
  176 + handler.end(stack[i]);
  177 +
  178 + // Remove the open elements from the stack
  179 + stack.length = pos;
  180 + }
  181 + }
  182 +};
  183 +
  184 +
  185 +function makeMap(str) {
  186 + var obj = {}, items = str.split(",");
  187 + for (var i = 0; i < items.length; i++)
  188 + obj[items[i]] = true;
  189 + return obj;
  190 +}
  191 +
  192 +module.exports = HTMLParser;