合并分支 'Branch_liao' 到 'master'
Branch liao 查看合并请求 !1
正在显示
55 个修改的文件
包含
1518 行增加
和
335 行删除
.idea/misc.xml
0 → 100644
.idea/modules.xml
0 → 100644
.idea/shuhou.iml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<module type="WEB_MODULE" version="4"> | ||
3 | + <component name="NewModuleRootManager"> | ||
4 | + <content url="file://$MODULE_DIR$"> | ||
5 | + <excludeFolder url="file://$MODULE_DIR$/.tmp" /> | ||
6 | + <excludeFolder url="file://$MODULE_DIR$/temp" /> | ||
7 | + <excludeFolder url="file://$MODULE_DIR$/tmp" /> | ||
8 | + </content> | ||
9 | + <orderEntry type="inheritedJdk" /> | ||
10 | + <orderEntry type="sourceFolder" forTests="false" /> | ||
11 | + </component> | ||
12 | +</module> |
.idea/vcs.xml
0 → 100644
.idea/workspace.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project version="4"> | ||
3 | + <component name="ChangeListManager"> | ||
4 | + <list default="true" id="9d7f73d3-be2f-4094-8ffa-838dba3347a4" name="Default" comment=""> | ||
5 | + <change beforePath="$PROJECT_DIR$/app.js" beforeDir="false" afterPath="$PROJECT_DIR$/app.js" afterDir="false" /> | ||
6 | + <change beforePath="$PROJECT_DIR$/app.json" beforeDir="false" afterPath="$PROJECT_DIR$/app.json" afterDir="false" /> | ||
7 | + <change beforePath="$PROJECT_DIR$/app.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/app.wxss" afterDir="false" /> | ||
8 | + <change beforePath="$PROJECT_DIR$/pages/aboutme/aboutme.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/aboutme/aboutme.js" afterDir="false" /> | ||
9 | + <change beforePath="$PROJECT_DIR$/pages/addfile/addfile.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addfile/addfile.js" afterDir="false" /> | ||
10 | + <change beforePath="$PROJECT_DIR$/pages/addfile/addfile.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addfile/addfile.wxml" afterDir="false" /> | ||
11 | + <change beforePath="$PROJECT_DIR$/pages/addrecord/addrecord.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addrecord/addrecord.js" afterDir="false" /> | ||
12 | + <change beforePath="$PROJECT_DIR$/pages/addrecord/addrecord.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addrecord/addrecord.wxml" afterDir="false" /> | ||
13 | + <change beforePath="$PROJECT_DIR$/pages/addrecord/addrecord.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addrecord/addrecord.wxss" afterDir="false" /> | ||
14 | + <change beforePath="$PROJECT_DIR$/pages/agreement/agreement.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/agreement/agreement.js" afterDir="false" /> | ||
15 | + <change beforePath="$PROJECT_DIR$/pages/article/article.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/article/article.js" afterDir="false" /> | ||
16 | + <change beforePath="$PROJECT_DIR$/pages/article_detail/article_detail.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/article_detail/article_detail.js" afterDir="false" /> | ||
17 | + <change beforePath="$PROJECT_DIR$/pages/editfile/editfile.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/editfile/editfile.js" afterDir="false" /> | ||
18 | + <change beforePath="$PROJECT_DIR$/pages/editfile/editfile.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/editfile/editfile.wxml" afterDir="false" /> | ||
19 | + <change beforePath="$PROJECT_DIR$/pages/editrecord/editrecord.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/editrecord/editrecord.js" afterDir="false" /> | ||
20 | + <change beforePath="$PROJECT_DIR$/pages/editrecord/editrecord.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/editrecord/editrecord.wxml" afterDir="false" /> | ||
21 | + <change beforePath="$PROJECT_DIR$/pages/file_choose/file_choose.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/file_choose/file_choose.js" afterDir="false" /> | ||
22 | + <change beforePath="$PROJECT_DIR$/pages/file_manage/file_manage.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/file_manage/file_manage.js" afterDir="false" /> | ||
23 | + <change beforePath="$PROJECT_DIR$/pages/index/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.js" afterDir="false" /> | ||
24 | + <change beforePath="$PROJECT_DIR$/pages/index/index.json" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.json" afterDir="false" /> | ||
25 | + <change beforePath="$PROJECT_DIR$/pages/index/index.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.wxml" afterDir="false" /> | ||
26 | + <change beforePath="$PROJECT_DIR$/pages/introduce/introduce.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/introduce/introduce.js" afterDir="false" /> | ||
27 | + <change beforePath="$PROJECT_DIR$/pages/introduce/introduce.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/introduce/introduce.wxml" afterDir="false" /> | ||
28 | + <change beforePath="$PROJECT_DIR$/pages/map/map.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/map/map.js" afterDir="false" /> | ||
29 | + <change beforePath="$PROJECT_DIR$/pages/mold/mold.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/mold/mold.js" afterDir="false" /> | ||
30 | + <change beforePath="$PROJECT_DIR$/pages/my/my.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/my/my.js" afterDir="false" /> | ||
31 | + <change beforePath="$PROJECT_DIR$/pages/normal/normal.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/normal/normal.js" afterDir="false" /> | ||
32 | + <change beforePath="$PROJECT_DIR$/pages/opinion/opinion.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/opinion/opinion.js" afterDir="false" /> | ||
33 | + <change beforePath="$PROJECT_DIR$/pages/record/record.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/record/record.js" afterDir="false" /> | ||
34 | + <change beforePath="$PROJECT_DIR$/pages/record/record.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/record/record.wxml" afterDir="false" /> | ||
35 | + <change beforePath="$PROJECT_DIR$/pages/record/record.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/pages/record/record.wxss" afterDir="false" /> | ||
36 | + <change beforePath="$PROJECT_DIR$/pages/start/start.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/start/start.js" afterDir="false" /> | ||
37 | + <change beforePath="$PROJECT_DIR$/pages/start/start.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/start/start.wxml" afterDir="false" /> | ||
38 | + <change beforePath="$PROJECT_DIR$/project.config.json" beforeDir="false" afterPath="$PROJECT_DIR$/project.config.json" afterDir="false" /> | ||
39 | + </list> | ||
40 | + <ignored path="$PROJECT_DIR$/.tmp/" /> | ||
41 | + <ignored path="$PROJECT_DIR$/temp/" /> | ||
42 | + <ignored path="$PROJECT_DIR$/tmp/" /> | ||
43 | + <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> | ||
44 | + <option name="TRACKING_ENABLED" value="true" /> | ||
45 | + <option name="SHOW_DIALOG" value="false" /> | ||
46 | + <option name="HIGHLIGHT_CONFLICTS" value="true" /> | ||
47 | + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> | ||
48 | + <option name="LAST_RESOLUTION" value="IGNORE" /> | ||
49 | + </component> | ||
50 | + <component name="FileEditorManager"> | ||
51 | + <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> | ||
52 | + <file leaf-file-name="aboutme.wxml" pinned="false" current-in-tab="false"> | ||
53 | + <entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.wxml"> | ||
54 | + <provider selected="true" editor-type-id="text-editor"> | ||
55 | + <state relative-caret-position="125"> | ||
56 | + <caret line="5" column="7" lean-forward="true" selection-start-line="5" selection-start-column="7" selection-end-line="5" selection-end-column="7" /> | ||
57 | + </state> | ||
58 | + </provider> | ||
59 | + </entry> | ||
60 | + </file> | ||
61 | + <file leaf-file-name="aboutme.js" pinned="false" current-in-tab="true"> | ||
62 | + <entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.js"> | ||
63 | + <provider selected="true" editor-type-id="text-editor"> | ||
64 | + <state relative-caret-position="509"> | ||
65 | + <caret line="97" column="54" lean-forward="true" selection-start-line="97" selection-start-column="54" selection-end-line="97" selection-end-column="54" /> | ||
66 | + <folding> | ||
67 | + <element signature="n#!!doc" expanded="true" /> | ||
68 | + </folding> | ||
69 | + </state> | ||
70 | + </provider> | ||
71 | + </entry> | ||
72 | + </file> | ||
73 | + </leaf> | ||
74 | + </component> | ||
75 | + <component name="FindInProjectRecents"> | ||
76 | + <findStrings> | ||
77 | + <find>术后小程序</find> | ||
78 | + <find>path: '/pages/start/start'</find> | ||
79 | + </findStrings> | ||
80 | + <replaceStrings> | ||
81 | + <replace>健康</replace> | ||
82 | + <replace>健康随访助手</replace> | ||
83 | + <replace>path: '/pages/start/start?doctorid=' + app.globalData.doctorid</replace> | ||
84 | + </replaceStrings> | ||
85 | + <dirStrings> | ||
86 | + <dir>C:\Users\LIAO\Desktop\shuhou</dir> | ||
87 | + </dirStrings> | ||
88 | + </component> | ||
89 | + <component name="Git.Settings"> | ||
90 | + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> | ||
91 | + </component> | ||
92 | + <component name="IdeDocumentHistory"> | ||
93 | + <option name="CHANGED_PATHS"> | ||
94 | + <list> | ||
95 | + <option value="$PROJECT_DIR$/pages/aboutme/aboutme.js" /> | ||
96 | + </list> | ||
97 | + </option> | ||
98 | + </component> | ||
99 | + <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" /> | ||
100 | + <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" /> | ||
101 | + <component name="JsGulpfileManager"> | ||
102 | + <detection-done>true</detection-done> | ||
103 | + <sorting>DEFINITION_ORDER</sorting> | ||
104 | + </component> | ||
105 | + <component name="NodePackageJsonFileManager"> | ||
106 | + <packageJsonPaths /> | ||
107 | + </component> | ||
108 | + <component name="ProjectFrameBounds" extendedState="6"> | ||
109 | + <option name="x" value="1042" /> | ||
110 | + <option name="width" value="660" /> | ||
111 | + <option name="height" value="1000" /> | ||
112 | + </component> | ||
113 | + <component name="ProjectView"> | ||
114 | + <navigator proportions="" version="1"> | ||
115 | + <foldersAlwaysOnTop value="true" /> | ||
116 | + </navigator> | ||
117 | + <panes> | ||
118 | + <pane id="Scope" /> | ||
119 | + <pane id="ProjectPane"> | ||
120 | + <subPane> | ||
121 | + <expand> | ||
122 | + <path> | ||
123 | + <item name="shuhou" type="b2602c69:ProjectViewProjectNode" /> | ||
124 | + <item name="shuhou" type="462c0819:PsiDirectoryNode" /> | ||
125 | + </path> | ||
126 | + <path> | ||
127 | + <item name="shuhou" type="b2602c69:ProjectViewProjectNode" /> | ||
128 | + <item name="shuhou" type="462c0819:PsiDirectoryNode" /> | ||
129 | + <item name="pages" type="462c0819:PsiDirectoryNode" /> | ||
130 | + </path> | ||
131 | + </expand> | ||
132 | + <select /> | ||
133 | + </subPane> | ||
134 | + </pane> | ||
135 | + </panes> | ||
136 | + </component> | ||
137 | + <component name="PropertiesComponent"> | ||
138 | + <property name="WebServerToolWindowFactoryState" value="false" /> | ||
139 | + <property name="last_opened_file_path" value="E:/project/振威网站" /> | ||
140 | + <property name="node.js.detected.package.prettier" value="true" /> | ||
141 | + <property name="node.js.path.for.package.prettier" value="project" /> | ||
142 | + <property name="node.js.selected.package.prettier" value="" /> | ||
143 | + <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> | ||
144 | + <property name="nodejs_npm_path_reset_for_default_project" value="true" /> | ||
145 | + <property name="settings.editor.selected.configurable" value="configurable.group.appearance" /> | ||
146 | + </component> | ||
147 | + <component name="RunDashboard"> | ||
148 | + <option name="ruleStates"> | ||
149 | + <list> | ||
150 | + <RuleState> | ||
151 | + <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> | ||
152 | + </RuleState> | ||
153 | + <RuleState> | ||
154 | + <option name="name" value="StatusDashboardGroupingRule" /> | ||
155 | + </RuleState> | ||
156 | + </list> | ||
157 | + </option> | ||
158 | + </component> | ||
159 | + <component name="SvnConfiguration"> | ||
160 | + <configuration /> | ||
161 | + </component> | ||
162 | + <component name="TaskManager"> | ||
163 | + <task active="true" id="Default" summary="Default task"> | ||
164 | + <changelist id="9d7f73d3-be2f-4094-8ffa-838dba3347a4" name="Default" comment="" /> | ||
165 | + <created>1543310242198</created> | ||
166 | + <option name="number" value="Default" /> | ||
167 | + <option name="presentableId" value="Default" /> | ||
168 | + <updated>1543310242198</updated> | ||
169 | + <workItem from="1543310245658" duration="202000" /> | ||
170 | + <workItem from="1543468663935" duration="392000" /> | ||
171 | + </task> | ||
172 | + <servers /> | ||
173 | + </component> | ||
174 | + <component name="TimeTrackingManager"> | ||
175 | + <option name="totallyTimeSpent" value="594000" /> | ||
176 | + </component> | ||
177 | + <component name="ToolWindowManager"> | ||
178 | + <frame x="-8" y="-8" width="1696" height="1026" extended-state="6" /> | ||
179 | + <editor active="true" /> | ||
180 | + <layout> | ||
181 | + <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24969843" /> | ||
182 | + <window_info anchor="bottom" id="TODO" order="6" /> | ||
183 | + <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" /> | ||
184 | + <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" /> | ||
185 | + <window_info anchor="bottom" id="Find" order="1" /> | ||
186 | + <window_info anchor="bottom" id="Version Control" order="7" /> | ||
187 | + <window_info anchor="bottom" id="Run" order="2" /> | ||
188 | + <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> | ||
189 | + <window_info anchor="bottom" id="Terminal" order="7" /> | ||
190 | + <window_info id="Favorites" order="2" side_tool="true" /> | ||
191 | + <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> | ||
192 | + <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> | ||
193 | + <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> | ||
194 | + <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> | ||
195 | + <window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> | ||
196 | + <window_info anchor="bottom" id="Message" order="0" /> | ||
197 | + <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> | ||
198 | + </layout> | ||
199 | + </component> | ||
200 | + <component name="TypeScriptGeneratedFilesManager"> | ||
201 | + <option name="version" value="1" /> | ||
202 | + </component> | ||
203 | + <component name="VcsContentAnnotationSettings"> | ||
204 | + <option name="myLimit" value="2678400000" /> | ||
205 | + </component> | ||
206 | + <component name="editorHistoryManager"> | ||
207 | + <entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.wxml"> | ||
208 | + <provider selected="true" editor-type-id="text-editor"> | ||
209 | + <state relative-caret-position="125"> | ||
210 | + <caret line="5" column="7" lean-forward="true" selection-start-line="5" selection-start-column="7" selection-end-line="5" selection-end-column="7" /> | ||
211 | + </state> | ||
212 | + </provider> | ||
213 | + </entry> | ||
214 | + <entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.js"> | ||
215 | + <provider selected="true" editor-type-id="text-editor"> | ||
216 | + <state> | ||
217 | + <folding> | ||
218 | + <element signature="n#!!doc" expanded="true" /> | ||
219 | + </folding> | ||
220 | + </state> | ||
221 | + </provider> | ||
222 | + </entry> | ||
223 | + <entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.wxml"> | ||
224 | + <provider selected="true" editor-type-id="text-editor"> | ||
225 | + <state relative-caret-position="125"> | ||
226 | + <caret line="5" column="7" lean-forward="true" selection-start-line="5" selection-start-column="7" selection-end-line="5" selection-end-column="7" /> | ||
227 | + </state> | ||
228 | + </provider> | ||
229 | + </entry> | ||
230 | + <entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.js"> | ||
231 | + <provider selected="true" editor-type-id="text-editor"> | ||
232 | + <state relative-caret-position="509"> | ||
233 | + <caret line="97" column="54" lean-forward="true" selection-start-line="97" selection-start-column="54" selection-end-line="97" selection-end-column="54" /> | ||
234 | + <folding> | ||
235 | + <element signature="n#!!doc" expanded="true" /> | ||
236 | + </folding> | ||
237 | + </state> | ||
238 | + </provider> | ||
239 | + </entry> | ||
240 | + </component> | ||
241 | +</project> |
@@ -17,11 +17,9 @@ App({ | @@ -17,11 +17,9 @@ App({ | ||
17 | wx.setStorageSync('openid', res.openid); | 17 | wx.setStorageSync('openid', res.openid); |
18 | wx.setStorageSync('session_key', res.session_key); | 18 | wx.setStorageSync('session_key', res.session_key); |
19 | //记录小程序打开次数 | 19 | //记录小程序打开次数 |
20 | - that.setStatisticsOpenTimes(res.openid) | 20 | + |
21 | // 调用sendSession方法,将session_key以参数形式传入 | 21 | // 调用sendSession方法,将session_key以参数形式传入 |
22 | - that.aldstat.sendSession(res.session_key); | ||
23 | - // 调用sendOpenid方法,将openid以参数形式传入 | ||
24 | - that.aldstat.sendOpenid(res.openid); | 22 | + |
25 | }).catch((errMsg) => { | 23 | }).catch((errMsg) => { |
26 | console.log(errMsg) | 24 | console.log(errMsg) |
27 | }) | 25 | }) |
@@ -40,14 +38,15 @@ App({ | @@ -40,14 +38,15 @@ App({ | ||
40 | * @return {Promise} promise 返回promise供后续操作 | 38 | * @return {Promise} promise 返回promise供后续操作 |
41 | */ | 39 | */ |
42 | post: function (url, data, headerParams) { | 40 | post: function (url, data, headerParams) { |
43 | - wx.showNavigationBarLoading() | ||
44 | - wx.showLoading({ | ||
45 | - title: '加载中', | ||
46 | - }) | 41 | + // wx.showNavigationBarLoading() |
42 | + // wx.showLoading({ | ||
43 | + // title: '加载中', | ||
44 | + // }) | ||
47 | var promise = new Promise((resolve, reject) => { | 45 | var promise = new Promise((resolve, reject) => { |
48 | let that = this; | 46 | let that = this; |
49 | let postData = data; | 47 | let postData = data; |
50 | let baseUrl = 'https://shuhou.superkangaroo.net/api/wxapp/'; | 48 | let baseUrl = 'https://shuhou.superkangaroo.net/api/wxapp/'; |
49 | + // let baseUrl = 'http://postoperative.w.bronet.cn/api/wxapp/';//测试域名 | ||
51 | //网络请求 | 50 | //网络请求 |
52 | let header = { | 51 | let header = { |
53 | 'content-type': 'application/x-www-form-urlencoded' | 52 | 'content-type': 'application/x-www-form-urlencoded' |
@@ -59,6 +58,7 @@ App({ | @@ -59,6 +58,7 @@ App({ | ||
59 | method: 'POST', | 58 | method: 'POST', |
60 | header: header, | 59 | header: header, |
61 | success: function (res) {//返回取得的数据 | 60 | success: function (res) {//返回取得的数据 |
61 | + console.log(res.data.data) | ||
62 | if (res.data.code == '20000') { | 62 | if (res.data.code == '20000') { |
63 | resolve(res.data.data); | 63 | resolve(res.data.data); |
64 | } else if (res.data.code == '40001') {//返回错误提示信息 | 64 | } else if (res.data.code == '40001') {//返回错误提示信息 |
@@ -86,8 +86,7 @@ App({ | @@ -86,8 +86,7 @@ App({ | ||
86 | 86 | ||
87 | } else if (res.data.code == '40006'){ | 87 | } else if (res.data.code == '40006'){ |
88 | 88 | ||
89 | - } | ||
90 | - else { | 89 | + }else { |
91 | wx.showModal({ | 90 | wx.showModal({ |
92 | title: '提示', | 91 | title: '提示', |
93 | content: res.data.msg, | 92 | content: res.data.msg, |
@@ -95,18 +94,18 @@ App({ | @@ -95,18 +94,18 @@ App({ | ||
95 | }) | 94 | }) |
96 | reject(res.data) | 95 | reject(res.data) |
97 | } | 96 | } |
98 | - setTimeout(function () { | ||
99 | - wx.hideLoading() | ||
100 | - wx.hideNavigationBarLoading() | ||
101 | - }, 500) | 97 | + // wx.hideLoading() |
98 | + // wx.hideNavigationBarLoading() | ||
102 | }, | 99 | }, |
103 | error: function (e) { | 100 | error: function (e) { |
101 | + console.log(e) | ||
104 | reject('网络出错'); | 102 | reject('网络出错'); |
105 | // wx.hideLoading() | 103 | // wx.hideLoading() |
106 | - wx.hideNavigationBarLoading() | 104 | + // wx.hideNavigationBarLoading() |
107 | } | 105 | } |
108 | }) | 106 | }) |
109 | }); | 107 | }); |
108 | + | ||
110 | return promise; | 109 | return promise; |
111 | }, | 110 | }, |
112 | 111 | ||
@@ -154,7 +153,7 @@ App({ | @@ -154,7 +153,7 @@ App({ | ||
154 | that.post(url, params ).then((res) => { | 153 | that.post(url, params ).then((res) => { |
155 | let url = 'index/setStatisticsVisitorLog'; | 154 | let url = 'index/setStatisticsVisitorLog'; |
156 | let params = { | 155 | let params = { |
157 | - 'doctor_id': that.globalData.doctorid, | 156 | + 'doctor_id': that.globalData.doctor_id, |
158 | 'page': page, | 157 | 'page': page, |
159 | 'openid': res.openid | 158 | 'openid': res.openid |
160 | } | 159 | } |
@@ -172,6 +171,8 @@ App({ | @@ -172,6 +171,8 @@ App({ | ||
172 | globalData: { | 171 | globalData: { |
173 | userInfo: '', | 172 | userInfo: '', |
174 | doctorid: 0,//字符串id,用于获取医生详情 | 173 | doctorid: 0,//字符串id,用于获取医生详情 |
175 | - doctor_id: 0//本小程序中使用的id | 174 | + doctor_id: 0,//本小程序中使用的id |
175 | + is_register:0,//是否注册过, | ||
176 | + is_bind_doctor_id:0//是否绑定医生id | ||
176 | } | 177 | } |
177 | }) | 178 | }) |
1 | { | 1 | { |
2 | - "pages": [ | ||
3 | - "pages/start/start", | ||
4 | - "pages/index/index", | ||
5 | - "pages/aboutme/aboutme", | ||
6 | - "pages/addrecord/addrecord", | ||
7 | - "pages/addfile/addfile", | ||
8 | - "pages/introduce/introduce", | ||
9 | - "pages/my/my", | ||
10 | - "pages/opinion/opinion", | ||
11 | - "pages/record/record", | ||
12 | - "pages/normal/normal", | ||
13 | - "pages/file_manage/file_manage", | ||
14 | - "pages/article/article", | ||
15 | - "pages/mold/mold", | ||
16 | - "pages/line/line", | ||
17 | - "pages/article_detail/article_detail", | ||
18 | - "pages/ence_push/ence_push", | ||
19 | - "pages/map/map", | ||
20 | - "pages/editfile/editfile", | ||
21 | - "pages/editrecord/editrecord", | ||
22 | - "pages/agreement/agreement", | ||
23 | - "pages/file_choose/file_choose" | ||
24 | - ], | ||
25 | - "window": { | ||
26 | - "backgroundTextStyle": "light", | ||
27 | - "navigationBarBackgroundColor": "#3AA0EA", | ||
28 | - "navigationBarTitleText": "术后小程序", | ||
29 | - "navigationBarTextStyle": "white", | ||
30 | - "enablePullDownRefresh": false | ||
31 | - }, | ||
32 | - "tabBar": { | ||
33 | - "color": "#A1A1A1", | ||
34 | - "selectedColor": "#1CB9FA", | ||
35 | - "list": [ | ||
36 | - { | ||
37 | - "pagePath": "pages/index/index", | ||
38 | - "text": "血项测评", | ||
39 | - "iconPath": "img/x2.png", | ||
40 | - "selectedIconPath": "img/x1.png" | ||
41 | - }, | ||
42 | - { | ||
43 | - "pagePath": "pages/my/my", | ||
44 | - "text": "我的", | ||
45 | - "iconPath": "img/w2.png", | ||
46 | - "selectedIconPath": "img/w1.png" | ||
47 | - } | ||
48 | - ] | ||
49 | - } | 2 | + "pages": [ |
3 | + "pages/start/start", | ||
4 | + "pages/index/index", | ||
5 | + "pages/aboutme/aboutme", | ||
6 | + "pages/addrecord/addrecord", | ||
7 | + "pages/addfile/addfile", | ||
8 | + "pages/introduce/introduce", | ||
9 | + "pages/my/my", | ||
10 | + "pages/opinion/opinion", | ||
11 | + "pages/record/record", | ||
12 | + "pages/normal/normal", | ||
13 | + "pages/file_manage/file_manage", | ||
14 | + "pages/article/article", | ||
15 | + "pages/mold/mold", | ||
16 | + "pages/line/line", | ||
17 | + "pages/article_detail/article_detail", | ||
18 | + "pages/ence_push/ence_push", | ||
19 | + "pages/map/map", | ||
20 | + "pages/editfile/editfile", | ||
21 | + "pages/editrecord/editrecord", | ||
22 | + "pages/agreement/agreement", | ||
23 | + "pages/file_choose/file_choose", | ||
24 | + "pages/test/test", | ||
25 | + "pages/hint/hint" | ||
26 | + ], | ||
27 | + "window": { | ||
28 | + "backgroundTextStyle": "light", | ||
29 | + "navigationBarBackgroundColor": "#3AA0EA", | ||
30 | + "navigationBarTitleText": "健康随访助手", | ||
31 | + "navigationBarTextStyle": "white", | ||
32 | + "enablePullDownRefresh": false | ||
33 | + }, | ||
34 | + "tabBar": { | ||
35 | + "color": "#A1A1A1", | ||
36 | + "selectedColor": "#1CB9FA", | ||
37 | + "list": [ | ||
38 | + { | ||
39 | + "pagePath": "pages/index/index", | ||
40 | + "text": "记录", | ||
41 | + "iconPath": "img/jl2@2x.png", | ||
42 | + "selectedIconPath": "img/jl1@2x.png" | ||
43 | + }, | ||
44 | + { | ||
45 | + "pagePath": "pages/my/my", | ||
46 | + "text": "我的", | ||
47 | + "iconPath": "img/w2.png", | ||
48 | + "selectedIconPath": "img/w1.png" | ||
49 | + } | ||
50 | + ] | ||
51 | + } | ||
50 | } | 52 | } |
@@ -35,6 +35,9 @@ | @@ -35,6 +35,9 @@ | ||
35 | font-size: 15px; | 35 | font-size: 15px; |
36 | color: #ccc; | 36 | color: #ccc; |
37 | } | 37 | } |
38 | +.other-navigator-hover{ | ||
39 | + background: none; | ||
40 | +} | ||
38 | @font-face {font-family: "iconfont"; | 41 | @font-face {font-family: "iconfont"; |
39 | src: url('//at.alicdn.com/t/font_873289_cq7godatqkt.eot?t=1539597789388'); /* IE9*/ | 42 | src: url('//at.alicdn.com/t/font_873289_cq7godatqkt.eot?t=1539597789388'); /* IE9*/ |
40 | src: url('//at.alicdn.com/t/font_873289_cq7godatqkt.eot?t=1539597789388#iefix') format('embedded-opentype'), /* IE6-IE8 */ | 43 | src: url('//at.alicdn.com/t/font_873289_cq7godatqkt.eot?t=1539597789388#iefix') format('embedded-opentype'), /* IE6-IE8 */ |
img/jl1@2x.png
0 → 100644
3.5 KB
img/jl2@2x.png
0 → 100644
3.2 KB
img/next.png
0 → 100644
3.3 KB
img/plan.png
已删除
100644 → 0
10.6 KB
img/pre.png
0 → 100644
3.2 KB
img/startimg.png
已删除
100644 → 0
97.2 KB
@@ -80,7 +80,35 @@ let that=this; | @@ -80,7 +80,35 @@ let that=this; | ||
80 | /** | 80 | /** |
81 | * 用户点击右上角分享 | 81 | * 用户点击右上角分享 |
82 | */ | 82 | */ |
83 | - onShareAppMessage: function () { | 83 | + onShareAppMessage: function (option) { |
84 | + let that = this; | ||
85 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
86 | + var shareObj = { | ||
87 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
88 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
89 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
90 | + success: function (res) { | ||
91 | + // 转发成功之后的回调 | ||
92 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
93 | + }, | ||
94 | + fail: function () { | ||
95 | + // 转发失败之后的回调 | ||
96 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
97 | + // 用户取消转发 | ||
98 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
99 | + // 转发失败,其中 detail message 为详细失败信息 | ||
100 | + } | ||
101 | + }, | ||
102 | + complete: function () { | ||
103 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
104 | + } | ||
105 | + } // 来自页面内的按钮的转发 | ||
84 | 106 | ||
85 | - } | 107 | + if (option.from == 'button') { |
108 | + // 此处可以修改 shareObj 中的内容 | ||
109 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
110 | + } // 返回shareObj | ||
111 | + | ||
112 | + return shareObj; | ||
113 | + } | ||
86 | }) | 114 | }) |
@@ -246,7 +246,35 @@ Page({ | @@ -246,7 +246,35 @@ Page({ | ||
246 | /** | 246 | /** |
247 | * 用户点击右上角分享 | 247 | * 用户点击右上角分享 |
248 | */ | 248 | */ |
249 | - onShareAppMessage: function () { | 249 | + onShareAppMessage: function (option) { |
250 | + let that = this; | ||
251 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
252 | + var shareObj = { | ||
253 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
254 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
255 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
256 | + success: function (res) { | ||
257 | + // 转发成功之后的回调 | ||
258 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
259 | + }, | ||
260 | + fail: function () { | ||
261 | + // 转发失败之后的回调 | ||
262 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
263 | + // 用户取消转发 | ||
264 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
265 | + // 转发失败,其中 detail message 为详细失败信息 | ||
266 | + } | ||
267 | + }, | ||
268 | + complete: function () { | ||
269 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
270 | + } | ||
271 | + } // 来自页面内的按钮的转发 | ||
250 | 272 | ||
251 | - } | 273 | + if (option.from == 'button') { |
274 | + // 此处可以修改 shareObj 中的内容 | ||
275 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
276 | + } // 返回shareObj | ||
277 | + | ||
278 | + return shareObj; | ||
279 | + } | ||
252 | }) | 280 | }) |
1 | <!--pages/addfile/addfile.wxml--> | 1 | <!--pages/addfile/addfile.wxml--> |
2 | <view class='top_tip'> | 2 | <view class='top_tip'> |
3 | - 为了给您提供更准确的化疗后追踪服务,请务必如实填写以下资料 | 3 | + 为了给您提供更准确的健康随访服务,请务必如实填写以下资料 |
4 | </view> | 4 | </view> |
5 | <view class='record_main addfile_top'> | 5 | <view class='record_main addfile_top'> |
6 | <view class='input_box'> | 6 | <view class='input_box'> |
@@ -80,7 +80,7 @@ | @@ -80,7 +80,7 @@ | ||
80 | </view> | 80 | </view> |
81 | 81 | ||
82 | 82 | ||
83 | - <cover-view class='btn addfile_btn' bindtap='addFiles'>保存 并开始记录</cover-view> | 83 | + <view class='btn addfile_btn' bindtap='addFiles'>保存 并开始记录</view> |
84 | 84 | ||
85 | 85 | ||
86 | </view> | 86 | </view> |
@@ -387,7 +387,35 @@ app.post(url,params,header).then((res)=>{ | @@ -387,7 +387,35 @@ app.post(url,params,header).then((res)=>{ | ||
387 | /** | 387 | /** |
388 | * 用户点击右上角分享 | 388 | * 用户点击右上角分享 |
389 | */ | 389 | */ |
390 | - onShareAppMessage: function () { | 390 | + onShareAppMessage: function (option) { |
391 | + let that = this; | ||
392 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
393 | + var shareObj = { | ||
394 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
395 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
396 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
397 | + success: function (res) { | ||
398 | + // 转发成功之后的回调 | ||
399 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
400 | + }, | ||
401 | + fail: function () { | ||
402 | + // 转发失败之后的回调 | ||
403 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
404 | + // 用户取消转发 | ||
405 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
406 | + // 转发失败,其中 detail message 为详细失败信息 | ||
407 | + } | ||
408 | + }, | ||
409 | + complete: function () { | ||
410 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
411 | + } | ||
412 | + } // 来自页面内的按钮的转发 | ||
391 | 413 | ||
392 | - } | 414 | + if (option.from == 'button') { |
415 | + // 此处可以修改 shareObj 中的内容 | ||
416 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
417 | + } // 返回shareObj | ||
418 | + | ||
419 | + return shareObj; | ||
420 | + } | ||
393 | }) | 421 | }) |
1 | <!--pages/addrecord/addrecord.wxml--> | 1 | <!--pages/addrecord/addrecord.wxml--> |
2 | <view class='top_tip'> | 2 | <view class='top_tip'> |
3 | - 为了给您提供更准确的化疗后血项测评服务,请务必如实填写以下资料 | 3 | + 为了给您提供更准确的健康随访服务,请务必如实填写以下资料 |
4 | </view> | 4 | </view> |
5 | <view class='user_name' bindtap='goaddfile'> | 5 | <view class='user_name' bindtap='goaddfile'> |
6 | 用户:{{patient}} | 6 | 用户:{{patient}} |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | </view> | 14 | </view> |
15 | </view> | 15 | </view> |
16 | 16 | ||
17 | - <picker mode="date" value="{{date}}" end="{{enddate}}" bindchange="bindDateChange"> | 17 | + <picker mode="date" value="{{date}}" bindchange="bindDateChange"> |
18 | <view class='input_box'> | 18 | <view class='input_box'> |
19 | <view>停药日期:</view> | 19 | <view>停药日期:</view> |
20 | <view class="input_cell">{{date}}</view> | 20 | <view class="input_cell">{{date}}</view> |
@@ -57,13 +57,13 @@ | @@ -57,13 +57,13 @@ | ||
57 | </view> | 57 | </view> |
58 | </view> | 58 | </view> |
59 | <view class='upimgbox'> | 59 | <view class='upimgbox'> |
60 | - <view><textarea placeholder='特殊情况请给医生留言并上传照片。' placeholder-style='text_class' bindinput='setremarks'></textarea> </view> | 60 | + <view class='textareabox'><textarea placeholder='特殊情况请给医生留言并上传照片。' placeholder-style='text_class' bindinput='setremarks'></textarea> </view> |
61 | <view class='upitem'> | 61 | <view class='upitem'> |
62 | <view class='upbox' wx:for='{{upimg}}' wx:key> | 62 | <view class='upbox' wx:for='{{upimg}}' wx:key> |
63 | <view class='up_colse' bindtap='del_upimg' data-index='{{index}}'> | 63 | <view class='up_colse' bindtap='del_upimg' data-index='{{index}}'> |
64 | <image src='../../img/colse.png'></image> | 64 | <image src='../../img/colse.png'></image> |
65 | </view> | 65 | </view> |
66 | - <image bindtap="imgYu" data-list="{{upimg}}" src="{{item}}"></image> | 66 | + <image bindtap="imgYu" data-list="{{upimg}}" src='{{item}}' data-src="{{item}}"></image> |
67 | </view> | 67 | </view> |
68 | <view class='upbox' bindtap='uploadImages' wx:if="{{upimg.length<8}}"> | 68 | <view class='upbox' bindtap='uploadImages' wx:if="{{upimg.length<8}}"> |
69 | <image src='../../img/noimg.png'></image> | 69 | <image src='../../img/noimg.png'></image> |
@@ -72,6 +72,6 @@ | @@ -72,6 +72,6 @@ | ||
72 | </view> | 72 | </view> |
73 | </view> | 73 | </view> |
74 | </view> | 74 | </view> |
75 | - <form bindsubmit="formSubmit" report-submit='true' > | ||
76 | - <cover-view class='bt_bg'><button formType="submit" class='btn'> 保 存</button></cover-view> | 75 | + <form bindsubmit="formSubmit" report-submit='true' class='bt_bg'> |
76 | + <button formType="submit" class='btn '> 保 存</button> | ||
77 | </form> | 77 | </form> |
@@ -61,9 +61,9 @@ page{ | @@ -61,9 +61,9 @@ page{ | ||
61 | } | 61 | } |
62 | .upimgbox{ | 62 | .upimgbox{ |
63 | margin: 30rpx 0 20rpx 0; | 63 | margin: 30rpx 0 20rpx 0; |
64 | - border:1rpx solid #e5e5e5; | 64 | + |
65 | border-radius: 5rpx; | 65 | border-radius: 5rpx; |
66 | - padding:30rpx 30rpx 40rpx 30rpx; | 66 | + padding:30rpx 0 40rpx 0; |
67 | color:#999; | 67 | color:#999; |
68 | font-size:34rpx; | 68 | font-size:34rpx; |
69 | } | 69 | } |
@@ -175,3 +175,9 @@ color:#fff; | @@ -175,3 +175,9 @@ color:#fff; | ||
175 | background-color:#3AA0EA; | 175 | background-color:#3AA0EA; |
176 | 176 | ||
177 | } | 177 | } |
178 | +.textareabox{ | ||
179 | +height: 165rpx; | ||
180 | +border: 1rpx solid #D8D8D8; | ||
181 | +border-radius: 8rpx; | ||
182 | +padding:20rpx 24rpx; | ||
183 | +} |
@@ -77,7 +77,35 @@ Page({ | @@ -77,7 +77,35 @@ Page({ | ||
77 | /** | 77 | /** |
78 | * 用户点击右上角分享 | 78 | * 用户点击右上角分享 |
79 | */ | 79 | */ |
80 | - onShareAppMessage: function () { | 80 | + onShareAppMessage: function (option) { |
81 | + let that = this; | ||
82 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
83 | + var shareObj = { | ||
84 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
85 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
86 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
87 | + success: function (res) { | ||
88 | + // 转发成功之后的回调 | ||
89 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
90 | + }, | ||
91 | + fail: function () { | ||
92 | + // 转发失败之后的回调 | ||
93 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
94 | + // 用户取消转发 | ||
95 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
96 | + // 转发失败,其中 detail message 为详细失败信息 | ||
97 | + } | ||
98 | + }, | ||
99 | + complete: function () { | ||
100 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
101 | + } | ||
102 | + } // 来自页面内的按钮的转发 | ||
103 | + | ||
104 | + if (option.from == 'button') { | ||
105 | + // 此处可以修改 shareObj 中的内容 | ||
106 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
107 | + } // 返回shareObj | ||
81 | 108 | ||
109 | + return shareObj; | ||
82 | } | 110 | } |
83 | }) | 111 | }) |
@@ -124,8 +124,36 @@ Page({ | @@ -124,8 +124,36 @@ Page({ | ||
124 | /** | 124 | /** |
125 | * 用户点击右上角分享 | 125 | * 用户点击右上角分享 |
126 | */ | 126 | */ |
127 | - onShareAppMessage: function () { | 127 | + onShareAppMessage: function (option) { |
128 | + let that = this; | ||
129 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
130 | + var shareObj = { | ||
131 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
132 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
133 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
134 | + success: function (res) { | ||
135 | + // 转发成功之后的回调 | ||
136 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
137 | + }, | ||
138 | + fail: function () { | ||
139 | + // 转发失败之后的回调 | ||
140 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
141 | + // 用户取消转发 | ||
142 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
143 | + // 转发失败,其中 detail message 为详细失败信息 | ||
144 | + } | ||
145 | + }, | ||
146 | + complete: function () { | ||
147 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
148 | + } | ||
149 | + } // 来自页面内的按钮的转发 | ||
128 | 150 | ||
129 | - }, | 151 | + if (option.from == 'button') { |
152 | + // 此处可以修改 shareObj 中的内容 | ||
153 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
154 | + } // 返回shareObj | ||
155 | + | ||
156 | + return shareObj; | ||
157 | + } | ||
130 | 158 | ||
131 | }) | 159 | }) |
@@ -4,7 +4,6 @@ const Page = require('../../utils/ald-stat.js').Page; | @@ -4,7 +4,6 @@ const Page = require('../../utils/ald-stat.js').Page; | ||
4 | const app=getApp(); | 4 | const app=getApp(); |
5 | var wxParse = require('../../wxParse/wxParse.js') | 5 | var wxParse = require('../../wxParse/wxParse.js') |
6 | Page({ | 6 | Page({ |
7 | - | ||
8 | /** | 7 | /** |
9 | * 页面的初始数据 | 8 | * 页面的初始数据 |
10 | */ | 9 | */ |
@@ -85,7 +84,35 @@ Page({ | @@ -85,7 +84,35 @@ Page({ | ||
85 | /** | 84 | /** |
86 | * 用户点击右上角分享 | 85 | * 用户点击右上角分享 |
87 | */ | 86 | */ |
88 | - onShareAppMessage: function () { | 87 | + onShareAppMessage: function (option) { |
88 | + let that = this; | ||
89 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
90 | + var shareObj = { | ||
91 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
92 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
93 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
94 | + success: function (res) { | ||
95 | + // 转发成功之后的回调 | ||
96 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
97 | + }, | ||
98 | + fail: function () { | ||
99 | + // 转发失败之后的回调 | ||
100 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
101 | + // 用户取消转发 | ||
102 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
103 | + // 转发失败,其中 detail message 为详细失败信息 | ||
104 | + } | ||
105 | + }, | ||
106 | + complete: function () { | ||
107 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
108 | + } | ||
109 | + } // 来自页面内的按钮的转发 | ||
89 | 110 | ||
90 | - } | 111 | + if (option.from == 'button') { |
112 | + // 此处可以修改 shareObj 中的内容 | ||
113 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
114 | + } // 返回shareObj | ||
115 | + | ||
116 | + return shareObj; | ||
117 | + } | ||
91 | }) | 118 | }) |
@@ -257,7 +257,35 @@ Page({ | @@ -257,7 +257,35 @@ Page({ | ||
257 | /** | 257 | /** |
258 | * 用户点击右上角分享 | 258 | * 用户点击右上角分享 |
259 | */ | 259 | */ |
260 | - onShareAppMessage: function () { | 260 | + onShareAppMessage: function (option) { |
261 | + let that = this; | ||
262 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
263 | + var shareObj = { | ||
264 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
265 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
266 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
267 | + success: function (res) { | ||
268 | + // 转发成功之后的回调 | ||
269 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
270 | + }, | ||
271 | + fail: function () { | ||
272 | + // 转发失败之后的回调 | ||
273 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
274 | + // 用户取消转发 | ||
275 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
276 | + // 转发失败,其中 detail message 为详细失败信息 | ||
277 | + } | ||
278 | + }, | ||
279 | + complete: function () { | ||
280 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
281 | + } | ||
282 | + } // 来自页面内的按钮的转发 | ||
283 | + | ||
284 | + if (option.from == 'button') { | ||
285 | + // 此处可以修改 shareObj 中的内容 | ||
286 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
287 | + } // 返回shareObj | ||
261 | 288 | ||
289 | + return shareObj; | ||
262 | } | 290 | } |
263 | }) | 291 | }) |
1 | <!--pages/editfile/editfile.wxml--> | 1 | <!--pages/editfile/editfile.wxml--> |
2 | <view class='top_tip'> | 2 | <view class='top_tip'> |
3 | - 为了给您提供更准确的化疗后追踪服务,请务必如实填写以下资料 | 3 | + 为了给您提供更准确的健康随访服务,请务必如实填写以下资料 |
4 | </view> | 4 | </view> |
5 | <view class='record_main addfile_top'> | 5 | <view class='record_main addfile_top'> |
6 | <view class='input_box'> | 6 | <view class='input_box'> |
@@ -23,6 +23,7 @@ Page({ | @@ -23,6 +23,7 @@ Page({ | ||
23 | upimg: [] | 23 | upimg: [] |
24 | }, | 24 | }, |
25 | imgYu: function (event) { | 25 | imgYu: function (event) { |
26 | + console.log(event); | ||
26 | var src = event.currentTarget.dataset.src;//获取data-src | 27 | var src = event.currentTarget.dataset.src;//获取data-src |
27 | var imgList = event.currentTarget.dataset.list;//获取data-list | 28 | var imgList = event.currentTarget.dataset.list;//获取data-list |
28 | //图片预览 | 29 | //图片预览 |
@@ -349,7 +350,35 @@ Page({ | @@ -349,7 +350,35 @@ Page({ | ||
349 | /** | 350 | /** |
350 | * 用户点击右上角分享 | 351 | * 用户点击右上角分享 |
351 | */ | 352 | */ |
352 | - onShareAppMessage: function () { | 353 | + onShareAppMessage: function (option) { |
354 | + let that = this; | ||
355 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
356 | + var shareObj = { | ||
357 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
358 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
359 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
360 | + success: function (res) { | ||
361 | + // 转发成功之后的回调 | ||
362 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
363 | + }, | ||
364 | + fail: function () { | ||
365 | + // 转发失败之后的回调 | ||
366 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
367 | + // 用户取消转发 | ||
368 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
369 | + // 转发失败,其中 detail message 为详细失败信息 | ||
370 | + } | ||
371 | + }, | ||
372 | + complete: function () { | ||
373 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
374 | + } | ||
375 | + } // 来自页面内的按钮的转发 | ||
376 | + | ||
377 | + if (option.from == 'button') { | ||
378 | + // 此处可以修改 shareObj 中的内容 | ||
379 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
380 | + } // 返回shareObj | ||
353 | 381 | ||
382 | + return shareObj; | ||
354 | } | 383 | } |
355 | }) | 384 | }) |
1 | <!--pages/editrecord/editrecord.wxml--> | 1 | <!--pages/editrecord/editrecord.wxml--> |
2 | <!--pages/addrecord/addrecord.wxml--> | 2 | <!--pages/addrecord/addrecord.wxml--> |
3 | <view class='top_tip'> | 3 | <view class='top_tip'> |
4 | -为了给您提供更准确的化疗后血项测评服务,请务必如实填写以下资料 | 4 | +为了给您提供更准确的健康随访服务,请务必如实填写以下资料 |
5 | </view> | 5 | </view> |
6 | <view class='user_name' bindtap='goaddfile'> | 6 | <view class='user_name' bindtap='goaddfile'> |
7 | 用户:{{patient}} | 7 | 用户:{{patient}} |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | <input type='text' placeholder='请输入用药' bindinput='setdrug' placeholder-class='drug_input_pla' value='{{drug}}'></input> | 14 | <input type='text' placeholder='请输入用药' bindinput='setdrug' placeholder-class='drug_input_pla' value='{{drug}}'></input> |
15 | </view> | 15 | </view> |
16 | </view> | 16 | </view> |
17 | - <picker mode="date" value="{{date}}" end='{{enddate}}' bindchange="bindDateChange"> | 17 | + <picker mode="date" value="{{date}}" bindchange="bindDateChange"> |
18 | <view class='input_box'> | 18 | <view class='input_box'> |
19 | <view>停药日期:</view> | 19 | <view>停药日期:</view> |
20 | <view class="input_cell">{{date}}</view> | 20 | <view class="input_cell">{{date}}</view> |
@@ -46,13 +46,13 @@ | @@ -46,13 +46,13 @@ | ||
46 | <input placeholder='0-1000' type='digit' placeholder-class='placeholderStyle' bindinput='setplatelet' value='{{platelet}}'></input><div class='cell_txt'>*10⁹/L</div></view> | 46 | <input placeholder='0-1000' type='digit' placeholder-class='placeholderStyle' bindinput='setplatelet' value='{{platelet}}'></input><div class='cell_txt'>*10⁹/L</div></view> |
47 | </view> | 47 | </view> |
48 | <view class='upimgbox'> | 48 | <view class='upimgbox'> |
49 | - <view><textarea placeholder='特殊情况请给医生留言并上传照片。' placeholder-style='text_class' bindinput='setremarks' value='{{remarks}}'></textarea></view> | 49 | + <view class='textareabox'><textarea placeholder='特殊情况请给医生留言并上传照片。' placeholder-style='text_class' bindinput='setremarks' value='{{remarks}}'></textarea></view> |
50 | <view class='upitem' > | 50 | <view class='upitem' > |
51 | <view class='upbox' wx:for='{{upimg}}' wx:key> | 51 | <view class='upbox' wx:for='{{upimg}}' wx:key> |
52 | <view class='up_colse' bindtap='del_upimg' data-index='{{index}}'> | 52 | <view class='up_colse' bindtap='del_upimg' data-index='{{index}}'> |
53 | <image src='../../img/colse.png'></image> | 53 | <image src='../../img/colse.png'></image> |
54 | </view> | 54 | </view> |
55 | - <image bindtap="imgYu" data-list="{{upimg}}" src="{{item}}"></image> | 55 | + <image bindtap="imgYu" data-list="{{upimg}}" src='{{item}}' data-src="{{item}}"></image> |
56 | </view> | 56 | </view> |
57 | <view class='upbox' bindtap='uploadImages' wx:if="{{upimg.length<8}}"> | 57 | <view class='upbox' bindtap='uploadImages' wx:if="{{upimg.length<8}}"> |
58 | <image src='../../img/noimg.png'></image> | 58 | <image src='../../img/noimg.png'></image> |
@@ -61,8 +61,8 @@ | @@ -61,8 +61,8 @@ | ||
61 | </view> | 61 | </view> |
62 | </view> | 62 | </view> |
63 | </view> | 63 | </view> |
64 | - <form bindsubmit="formSubmit" report-submit='true' > | ||
65 | - <cover-view class='bt_bg'><button formType="submit" class='btn'> 保 存</button></cover-view> | 64 | + <form bindsubmit="formSubmit" report-submit='true' class='bt_bg'> |
65 | + <button formType="submit" class='btn'> 保 存</button> | ||
66 | </form> | 66 | </form> |
67 | 67 | ||
68 | 68 |
@@ -176,7 +176,35 @@ Page({ | @@ -176,7 +176,35 @@ Page({ | ||
176 | /** | 176 | /** |
177 | * 用户点击右上角分享 | 177 | * 用户点击右上角分享 |
178 | */ | 178 | */ |
179 | - onShareAppMessage: function () { | ||
180 | - | ||
181 | - } | 179 | + onShareAppMessage: function (option) { |
180 | + let that = this; | ||
181 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
182 | + var shareObj = { | ||
183 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
184 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
185 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
186 | + success: function (res) { | ||
187 | + // 转发成功之后的回调 | ||
188 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
189 | + }, | ||
190 | + fail: function () { | ||
191 | + // 转发失败之后的回调 | ||
192 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
193 | + // 用户取消转发 | ||
194 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
195 | + // 转发失败,其中 detail message 为详细失败信息 | ||
196 | + } | ||
197 | + }, | ||
198 | + complete: function () { | ||
199 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
200 | + } | ||
201 | + } // 来自页面内的按钮的转发 | ||
202 | + | ||
203 | + if (option.from == 'button') { | ||
204 | + // 此处可以修改 shareObj 中的内容 | ||
205 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
206 | + } // 返回shareObj | ||
207 | + | ||
208 | + return shareObj; | ||
209 | + } | ||
182 | }) | 210 | }) |
@@ -167,7 +167,35 @@ Page({ | @@ -167,7 +167,35 @@ Page({ | ||
167 | /** | 167 | /** |
168 | * 用户点击右上角分享 | 168 | * 用户点击右上角分享 |
169 | */ | 169 | */ |
170 | - onShareAppMessage: function () { | 170 | + onShareAppMessage: function (option) { |
171 | + let that = this; | ||
172 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
173 | + var shareObj = { | ||
174 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
175 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
176 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
177 | + success: function (res) { | ||
178 | + // 转发成功之后的回调 | ||
179 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
180 | + }, | ||
181 | + fail: function () { | ||
182 | + // 转发失败之后的回调 | ||
183 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
184 | + // 用户取消转发 | ||
185 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
186 | + // 转发失败,其中 detail message 为详细失败信息 | ||
187 | + } | ||
188 | + }, | ||
189 | + complete: function () { | ||
190 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
191 | + } | ||
192 | + } // 来自页面内的按钮的转发 | ||
171 | 193 | ||
172 | - } | 194 | + if (option.from == 'button') { |
195 | + // 此处可以修改 shareObj 中的内容 | ||
196 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
197 | + } // 返回shareObj | ||
198 | + | ||
199 | + return shareObj; | ||
200 | + } | ||
173 | }) | 201 | }) |
pages/hint/hint.js
0 → 100644
1 | +// pages/hint/hint.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + //点击关注公号 | ||
11 | + handleContact(e) { | ||
12 | + console.log(e.path) | ||
13 | + console.log(e.query) | ||
14 | + }, | ||
15 | + | ||
16 | + /** | ||
17 | + * 生命周期函数--监听页面加载 | ||
18 | + */ | ||
19 | + onLoad: function (options) { | ||
20 | + | ||
21 | + }, | ||
22 | + | ||
23 | + /** | ||
24 | + * 生命周期函数--监听页面初次渲染完成 | ||
25 | + */ | ||
26 | + onReady: function () { | ||
27 | + | ||
28 | + }, | ||
29 | + | ||
30 | + /** | ||
31 | + * 生命周期函数--监听页面显示 | ||
32 | + */ | ||
33 | + onShow: function () { | ||
34 | + | ||
35 | + }, | ||
36 | + | ||
37 | + /** | ||
38 | + * 生命周期函数--监听页面隐藏 | ||
39 | + */ | ||
40 | + onHide: function () { | ||
41 | + | ||
42 | + }, | ||
43 | + | ||
44 | + /** | ||
45 | + * 生命周期函数--监听页面卸载 | ||
46 | + */ | ||
47 | + onUnload: function () { | ||
48 | + | ||
49 | + }, | ||
50 | + | ||
51 | + /** | ||
52 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
53 | + */ | ||
54 | + onPullDownRefresh: function () { | ||
55 | + | ||
56 | + }, | ||
57 | + | ||
58 | + /** | ||
59 | + * 页面上拉触底事件的处理函数 | ||
60 | + */ | ||
61 | + onReachBottom: function () { | ||
62 | + | ||
63 | + }, | ||
64 | + | ||
65 | + /** | ||
66 | + * 用户点击右上角分享 | ||
67 | + */ | ||
68 | + onShareAppMessage: function (option) { | ||
69 | + let that = this; | ||
70 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
71 | + var shareObj = { | ||
72 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
73 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
74 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
75 | + success: function (res) { | ||
76 | + // 转发成功之后的回调 | ||
77 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
78 | + }, | ||
79 | + fail: function () { | ||
80 | + // 转发失败之后的回调 | ||
81 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
82 | + // 用户取消转发 | ||
83 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
84 | + // 转发失败,其中 detail message 为详细失败信息 | ||
85 | + } | ||
86 | + }, | ||
87 | + complete: function () { | ||
88 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
89 | + } | ||
90 | + } // 来自页面内的按钮的转发 | ||
91 | + | ||
92 | + if (option.from == 'button') { | ||
93 | + // 此处可以修改 shareObj 中的内容 | ||
94 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
95 | + } // 返回shareObj | ||
96 | + | ||
97 | + return shareObj; | ||
98 | + } | ||
99 | +}) |
pages/hint/hint.json
0 → 100644
1 | +{} |
pages/hint/hint.wxml
0 → 100644
pages/hint/hint.wxss
0 → 100644
1 | +/* pages/hint/hint.wxss */ | ||
2 | +.hint_txt{ | ||
3 | + color:#333333; | ||
4 | + font-size: 32rpx; | ||
5 | + font-weight: bold; | ||
6 | + text-align: center; | ||
7 | + margin: 170rpx auto 20rpx auto; | ||
8 | +} | ||
9 | +.blue{ | ||
10 | + color:#4FA1EB; | ||
11 | +} | ||
12 | +.hint_subtxt{ | ||
13 | + color:#333; | ||
14 | + font-size:28rpx; | ||
15 | + text-align:center; | ||
16 | + font-weight: bold; | ||
17 | + margin: 0 auto 137rpx auto; | ||
18 | +} | ||
19 | +.numbox{ | ||
20 | + display: inline-block; | ||
21 | + background: #4FA1EB; | ||
22 | + width:56rpx; | ||
23 | + height: 56rpx; | ||
24 | + border-radius: 50%; | ||
25 | + margin: 0 18rpx; | ||
26 | + color:#fff; | ||
27 | + font-size:44rpx; | ||
28 | + font-weight: bold; | ||
29 | + text-align: center; | ||
30 | + line-height: 56rpx; | ||
31 | +} | ||
32 | +.btn{ | ||
33 | + display: flex; | ||
34 | + align-items: center; | ||
35 | + justify-content: center; | ||
36 | + background: #4FA1EB; | ||
37 | + border-radius: 4rpx; | ||
38 | + width:560rpx; | ||
39 | + height: 90rpx; | ||
40 | + font-size:28rpx; | ||
41 | + font-weight: bold; | ||
42 | + color:#fff; | ||
43 | +} | ||
44 | +.btn:active{ | ||
45 | + opacity: 0.7; | ||
46 | +} |
@@ -13,10 +13,11 @@ Page({ | @@ -13,10 +13,11 @@ Page({ | ||
13 | showfilesLog: false, //是否显示最新记录(没有记录不显示) | 13 | showfilesLog: false, //是否显示最新记录(没有记录不显示) |
14 | showdoc_adv:true, | 14 | showdoc_adv:true, |
15 | articlelist:[], | 15 | articlelist:[], |
16 | + newdate:'',//当前年月日 | ||
16 | filesLogdata: '', //档案数量 | 17 | filesLogdata: '', //档案数量 |
17 | doctorinfo: [], //医生信息 | 18 | doctorinfo: [], //医生信息 |
18 | fileslog: {}, //最新记录 | 19 | fileslog: {}, //最新记录 |
19 | - hasToken: false | 20 | + hasToken: false |
20 | }, | 21 | }, |
21 | goaddrecord(files_id, patient) { | 22 | goaddrecord(files_id, patient) { |
22 | wx.navigateTo({ | 23 | wx.navigateTo({ |
@@ -66,7 +67,30 @@ Page({ | @@ -66,7 +67,30 @@ Page({ | ||
66 | } | 67 | } |
67 | }, | 68 | }, |
68 | addrecord(e){ | 69 | addrecord(e){ |
69 | - this.goaddrecord(e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient); | 70 | + let that=this; |
71 | + if (that.data.newdate == that.data.fileslog.create_time){ | ||
72 | + wx.showModal({ | ||
73 | + title: '提示', | ||
74 | + content: '您已提交今日的检查纪录,如提交有误可进行修改', | ||
75 | + showCancel: true, | ||
76 | + cancelText: '取消', | ||
77 | + confirmText: '查看记录', | ||
78 | + success: function(res) { | ||
79 | + if (res.confirm) { | ||
80 | + wx.navigateTo({ | ||
81 | + url: '/pages/record/record?showrecord=2&files_id=' + | ||
82 | + that.data.fileslog.files_id, | ||
83 | + }) | ||
84 | + } else if (res.cancel) { | ||
85 | + console.log('用户点击取消') | ||
86 | + } | ||
87 | + }, | ||
88 | + fail: function(res) {}, | ||
89 | + complete: function(res) {}, | ||
90 | + }) | ||
91 | + }else{ | ||
92 | + that.goaddrecord(e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient); | ||
93 | + } | ||
70 | }, | 94 | }, |
71 | gofile_manage(files_id) { | 95 | gofile_manage(files_id) { |
72 | wx.navigateTo({ | 96 | wx.navigateTo({ |
@@ -82,50 +106,52 @@ Page({ | @@ -82,50 +106,52 @@ Page({ | ||
82 | complete: function(res) {}, | 106 | complete: function(res) {}, |
83 | }) | 107 | }) |
84 | }, | 108 | }, |
85 | - //判断是否有医生id和是否登陆 | ||
86 | - ifdoctorid(openid) { | ||
87 | - let that = this; | ||
88 | - let url = 'public/checkOpenid'; | ||
89 | - let params = { | ||
90 | - openid:openid | ||
91 | - } | ||
92 | - app.post(url, params).then((res) => { | ||
93 | - wx.setStorageSync('token', res.token); | ||
94 | - that.getRecommendArticleList(openid, res.doctor_id); | ||
95 | - if (res.doctor_id == 0) { //没有关联医生 | ||
96 | - if (app.globalData.doctorid == 0) { //没有传过来的doctorid | 109 | + // //判断是否有医生id和是否登陆 |
110 | + // ifdoctorid(openid) { | ||
111 | + // let that = this; | ||
112 | + // let url = 'public/checkOpenid'; | ||
113 | + // let params = { | ||
114 | + // openid:openid | ||
115 | + // } | ||
116 | + // app.post(url, params).then((res) => { | ||
117 | + // wx.setStorageSync('token', res.token); | ||
118 | + // | ||
119 | + // if (res.doctor_id == 0) { //没有关联医生 | ||
120 | + // if (app.globalData.doctorid == 0) { //没有传过来的doctorid | ||
121 | + // that.setData({ | ||
122 | + // showdoctor: false | ||
123 | + // }) | ||
124 | + // } else { | ||
125 | + // that.setData({ | ||
126 | + // showdoctor: true | ||
127 | + // }) | ||
97 | 128 | ||
98 | - } else { | ||
99 | - that.setData({ | ||
100 | - showdoctor: true | ||
101 | - }) | ||
102 | - that.getDoctorInfo(app.globalData.doctorid); | ||
103 | - that.bindDoctor(openid,app.globalData.doctorid); | ||
104 | - } | ||
105 | - } else { //有关联医生获取医生详情 | ||
106 | - that.setData({ | ||
107 | - showdoctor: true | ||
108 | - }) | ||
109 | - app.globalData.doctor_id = res.doctor_id; | ||
110 | - app.globalData.doctorid = res.doctorid; | ||
111 | - that.getDoctorInfo(res.doctorid); | ||
112 | - } | ||
113 | - }).catch((errMsg) => { | ||
114 | - console.log(errMsg) | ||
115 | - }) | ||
116 | - }, | ||
117 | - //绑定医生 | ||
118 | - bindDoctor(openid, doctorid) { | ||
119 | - let that = this; | ||
120 | - let url = 'public/bindDoctor'; | ||
121 | - let params = { | ||
122 | - openid: openid, | ||
123 | - doctorid: doctorid | ||
124 | - } | ||
125 | - app.post(url, params).then((res) => {}).catch((errMsg) => { | ||
126 | - console.log(errMsg) | ||
127 | - }) | ||
128 | - }, | 129 | + // that.bindDoctor(openid,app.globalData.doctorid); |
130 | + // } | ||
131 | + // } else { //有关联医生获取医生详情 | ||
132 | + // that.setData({ | ||
133 | + // showdoctor: true | ||
134 | + // }) | ||
135 | + // app.globalData.doctor_id = res.doctor_id; | ||
136 | + // app.globalData.doctorid = res.doctorid; | ||
137 | + // that.getDoctorInfo(res.doctorid); | ||
138 | + // } | ||
139 | + // }).catch((errMsg) => { | ||
140 | + // console.log(errMsg) | ||
141 | + // }) | ||
142 | + // }, | ||
143 | + // //绑定医生 | ||
144 | + // bindDoctor(openid, doctorid) { | ||
145 | + // let that = this; | ||
146 | + // let url = 'public/bindDoctor'; | ||
147 | + // let params = { | ||
148 | + // openid: openid, | ||
149 | + // doctorid: doctorid | ||
150 | + // } | ||
151 | + // app.post(url, params).then((res) => {}).catch((errMsg) => { | ||
152 | + // console.log(errMsg) | ||
153 | + // }) | ||
154 | + // }, | ||
129 | //获取医生详情,医生ID有两个用处不同 | 155 | //获取医生详情,医生ID有两个用处不同 |
130 | getDoctorInfo(doctorid) { | 156 | getDoctorInfo(doctorid) { |
131 | let that = this; | 157 | let that = this; |
@@ -138,8 +164,8 @@ Page({ | @@ -138,8 +164,8 @@ Page({ | ||
138 | res.avatar = '../../img/no_puimg.png' | 164 | res.avatar = '../../img/no_puimg.png' |
139 | } | 165 | } |
140 | that.setData({ | 166 | that.setData({ |
141 | - doctorinfo: res, | ||
142 | - showdoctor: true | 167 | + showdoctor: true, |
168 | + doctorinfo: res | ||
143 | }) | 169 | }) |
144 | }).catch((errMsg) => { | 170 | }).catch((errMsg) => { |
145 | console.log(errMsg) | 171 | console.log(errMsg) |
@@ -167,7 +193,6 @@ Page({ | @@ -167,7 +193,6 @@ Page({ | ||
167 | console.log(errMsg) | 193 | console.log(errMsg) |
168 | }) | 194 | }) |
169 | }, | 195 | }, |
170 | - | ||
171 | //到添加患者界面 | 196 | //到添加患者界面 |
172 | goaddfile() { | 197 | goaddfile() { |
173 | wx.navigateTo({ | 198 | wx.navigateTo({ |
@@ -221,6 +246,7 @@ Page({ | @@ -221,6 +246,7 @@ Page({ | ||
221 | filesLogdata: res, | 246 | filesLogdata: res, |
222 | show_notest: false | 247 | show_notest: false |
223 | }) | 248 | }) |
249 | + that.getLastFilesLog(openid);//档案数不为0获取最新档案 | ||
224 | } | 250 | } |
225 | }).catch((errMsg) => { | 251 | }).catch((errMsg) => { |
226 | console.log(errMsg) | 252 | console.log(errMsg) |
@@ -228,7 +254,7 @@ Page({ | @@ -228,7 +254,7 @@ Page({ | ||
228 | }, | 254 | }, |
229 | //授权 | 255 | //授权 |
230 | getopwer(e) { | 256 | getopwer(e) { |
231 | - console.log(e) | 257 | + |
232 | let that = this; | 258 | let that = this; |
233 | if (e.detail.encryptedData){ | 259 | if (e.detail.encryptedData){ |
234 | wx.login({ | 260 | wx.login({ |
@@ -238,20 +264,14 @@ Page({ | @@ -238,20 +264,14 @@ Page({ | ||
238 | code: res.code, | 264 | code: res.code, |
239 | encrypted_data: e.detail.encryptedData, | 265 | encrypted_data: e.detail.encryptedData, |
240 | iv: e.detail.iv, | 266 | iv: e.detail.iv, |
241 | - doctorid: app.globalData.doctorid | 267 | + doctor_id: app.globalData.doctor_id |
242 | } | 268 | } |
243 | app.post(url, params).then((res) => { | 269 | app.post(url, params).then((res) => { |
244 | wx.setStorageSync('token', res.token); | 270 | wx.setStorageSync('token', res.token); |
245 | that.setData({ | 271 | that.setData({ |
246 | hasToken: true | 272 | hasToken: true |
247 | }) | 273 | }) |
248 | - // if (e.currentTarget.dataset.tag == '1') { | ||
249 | that.goaddfile(); | 274 | that.goaddfile(); |
250 | - // } else if (e.currentTarget.dataset.tag == '2') { | ||
251 | - // that.gofile_manage(e.currentTarget.dataset.files_id); | ||
252 | - // } else if (e.currentTarget.dataset.tag == '3') { | ||
253 | - // that.goaddrecord(e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient); | ||
254 | - // } | ||
255 | }).catch((errMsg) => { | 275 | }).catch((errMsg) => { |
256 | console.log(errMsg) | 276 | console.log(errMsg) |
257 | }) | 277 | }) |
@@ -263,31 +283,34 @@ Page({ | @@ -263,31 +283,34 @@ Page({ | ||
263 | icon:'none' | 283 | icon:'none' |
264 | }) | 284 | }) |
265 | } | 285 | } |
266 | - // if (wx.getStorageSync('token') == undefined || wx.getStorageSync('token') == ''){ | ||
267 | - | ||
268 | - // }else{ | ||
269 | - // if (e.currentTarget.dataset.tag == '1') { | ||
270 | - // that.goaddfile(); | ||
271 | - // } else if (e.currentTarget.dataset.tag == '2') { | ||
272 | - // that.gofile_manage(e.currentTarget.dataset.files_id); | ||
273 | - // } else if (e.currentTarget.dataset.tag == '3') { | ||
274 | - // that.goaddrecord(e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient); | ||
275 | - // } | ||
276 | - // } | 286 | + |
277 | }, | 287 | }, |
278 | - | ||
279 | /** | 288 | /** |
280 | * 生命周期函数--监听页面加载 | 289 | * 生命周期函数--监听页面加载 |
281 | */ | 290 | */ |
282 | onLoad: function(options) { | 291 | onLoad: function(options) { |
283 | - // var openid = wx.getStorageSync('openid'); | 292 | + let that=this; |
284 | let token = wx.getStorageSync('token'); | 293 | let token = wx.getStorageSync('token'); |
294 | + let dateobj = app.dateLater(0); | ||
295 | + that.setData({ | ||
296 | + newdate: dateobj.dataday | ||
297 | + }) | ||
285 | // 判断是否授权设置授权权限 | 298 | // 判断是否授权设置授权权限 |
286 | if(token){ | 299 | if(token){ |
287 | this.setData({ | 300 | this.setData({ |
288 | hasToken: true | 301 | hasToken: true |
289 | }) | 302 | }) |
290 | } | 303 | } |
304 | + //判断是否有要显示医生信息 | ||
305 | + if (app.globalData.doctorid==0){ | ||
306 | + that.setData({ | ||
307 | + showdoctor:false | ||
308 | + }) | ||
309 | + }else{ | ||
310 | + that.getDoctorInfo(app.globalData.doctorid); | ||
311 | + | ||
312 | + } | ||
313 | + app.setStatisticsVisitorLog('/pages/index/index'); //统计打开界面数量 | ||
291 | }, | 314 | }, |
292 | /** | 315 | /** |
293 | * 生命周期函数--监听页面初次渲染完成 | 316 | * 生命周期函数--监听页面初次渲染完成 |
@@ -300,10 +323,10 @@ Page({ | @@ -300,10 +323,10 @@ Page({ | ||
300 | let that = this; | 323 | let that = this; |
301 | var openid = wx.getStorageSync('openid'); | 324 | var openid = wx.getStorageSync('openid'); |
302 | let token = wx.getStorageSync('token'); | 325 | let token = wx.getStorageSync('token'); |
303 | - this.ifdoctorid(openid); //判断是否有医生ID | 326 | + that.getRecommendArticleList(wx.getStorageSync('openid'), app.globalData.doctor_id); |
327 | + | ||
304 | this.getFilesNumber(openid); //获取档案数量 | 328 | this.getFilesNumber(openid); //获取档案数量 |
305 | - this.getLastFilesLog(openid); | ||
306 | - app.setStatisticsVisitorLog('/pages/index/index'); //统计打开界面数量 | 329 | + |
307 | 330 | ||
308 | }, | 331 | }, |
309 | /** | 332 | /** |
@@ -336,7 +359,35 @@ Page({ | @@ -336,7 +359,35 @@ Page({ | ||
336 | /** | 359 | /** |
337 | * 用户点击右上角分享 | 360 | * 用户点击右上角分享 |
338 | */ | 361 | */ |
339 | - onShareAppMessage: function() { | 362 | + onShareAppMessage: function (option) { |
363 | + let that = this; | ||
364 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
365 | + var shareObj = { | ||
366 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
367 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
368 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
369 | + success: function (res) { | ||
370 | + // 转发成功之后的回调 | ||
371 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
372 | + }, | ||
373 | + fail: function () { | ||
374 | + // 转发失败之后的回调 | ||
375 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
376 | + // 用户取消转发 | ||
377 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
378 | + // 转发失败,其中 detail message 为详细失败信息 | ||
379 | + } | ||
380 | + }, | ||
381 | + complete: function () { | ||
382 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
383 | + } | ||
384 | + } // 来自页面内的按钮的转发 | ||
385 | + | ||
386 | + if (option.from == 'button') { | ||
387 | + // 此处可以修改 shareObj 中的内容 | ||
388 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
389 | + } // 返回shareObj | ||
340 | 390 | ||
391 | + return shareObj; | ||
341 | } | 392 | } |
342 | }) | 393 | }) |
@@ -16,13 +16,13 @@ | @@ -16,13 +16,13 @@ | ||
16 | <view class='index_test' wx:if='{{show_notest}}'> | 16 | <view class='index_test' wx:if='{{show_notest}}'> |
17 | <view class='test_frist'> | 17 | <view class='test_frist'> |
18 | <view class='dot'></view> | 18 | <view class='dot'></view> |
19 | - 记录血项测评结果,并获得专家建议和正确医学科普知识。 | 19 | + 记录检查结果,并获得专家建议和医学科普知识 |
20 | <view class='button_box' > | 20 | <view class='button_box' > |
21 | <view class='jia_box' wx:if='{{hasToken}}' bindtap='goaddfile'> | 21 | <view class='jia_box' wx:if='{{hasToken}}' bindtap='goaddfile'> |
22 | <view class='iconfont icon-jia'></view> | 22 | <view class='iconfont icon-jia'></view> |
23 | </view> | 23 | </view> |
24 | - <button open-type="getUserInfo" wx:else class='jia_box' bindgetuserinfo='getopwer' data-tag='1'><view class='iconfont icon-jia'></view></button> | ||
25 | - <view class='jia_txt'>添加血项检测记录</view> | 24 | + <button open-type="getUserInfo" wx:else class='jia_box' bindgetuserinfo='getopwer' data-tag='1'><view class='iconfont icon-jia'></view></button> |
25 | + <view class='jia_txt'>添加记录</view> | ||
26 | </view> | 26 | </view> |
27 | </view> | 27 | </view> |
28 | </view> | 28 | </view> |
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | <view class='two_item'> | 37 | <view class='two_item'> |
38 | <view> | 38 | <view> |
39 | 最近添加记录: | 39 | 最近添加记录: |
40 | - <text class='time_txt'>{{fileslog.create_time}}</text> | 40 | + <text class='time_txt'>{{fileslog.test_time}}</text> |
41 | </view> | 41 | </view> |
42 | </view> | 42 | </view> |
43 | <view class='two_item_box' wx:if='{{showfilesLog}}'> | 43 | <view class='two_item_box' wx:if='{{showfilesLog}}'> |
@@ -95,9 +95,9 @@ | @@ -95,9 +95,9 @@ | ||
95 | </view> | 95 | </view> |
96 | </view> | 96 | </view> |
97 | <view class='notest' wx:else>暂无记录</view> | 97 | <view class='notest' wx:else>暂无记录</view> |
98 | - <view class='two_item' wx:if='{{fileslog.doctor_reply != null}}'> | 98 | + <view class='two_item' wx:if='{{fileslog.doctor_reply.length != 0}}'> |
99 | <view>医生建议:</view> | 99 | <view>医生建议:</view> |
100 | - <view class='two_item_content'>{{fileslog.doctor_reply == null ? '等待医生回复':fileslog.doctor_reply}}</view> | 100 | + <view class='two_item_content'>{{fileslog.doctor_reply.length == 0 ? '等待医生回复':fileslog.doctor_reply}}</view> |
101 | </view> | 101 | </view> |
102 | 102 | ||
103 | <!-- 授权判断 --> | 103 | <!-- 授权判断 --> |
@@ -114,18 +114,16 @@ | @@ -114,18 +114,16 @@ | ||
114 | <view class='jia_box two_jiabox'> | 114 | <view class='jia_box two_jiabox'> |
115 | <view class='iconfont icon-jia'></view> | 115 | <view class='iconfont icon-jia'></view> |
116 | </view> | 116 | </view> |
117 | - <view>添加血项检测记录</view> | 117 | + <view>添加记录</view> |
118 | </view> | 118 | </view> |
119 | 119 | ||
120 | <view class='two_item_yuan_box' bindtap='gorecord' data-showrecord='2' data-files_id='{{fileslog.files_id}}' data-patient='{{fileslog.patient}}'> | 120 | <view class='two_item_yuan_box' bindtap='gorecord' data-showrecord='2' data-files_id='{{fileslog.files_id}}' data-patient='{{fileslog.patient}}'> |
121 | <view class='two_item_yuan'> | 121 | <view class='two_item_yuan'> |
122 | <image src='../../img/bq.png'></image> | 122 | <image src='../../img/bq.png'></image> |
123 | </view> | 123 | </view> |
124 | - <view>病情记录</view> | 124 | + <view>历史记录</view> |
125 | </view> | 125 | </view> |
126 | </view> | 126 | </view> |
127 | - | ||
128 | - | ||
129 | </view> | 127 | </view> |
130 | </view> | 128 | </view> |
131 | 129 |
@@ -29,11 +29,7 @@ Page({ | @@ -29,11 +29,7 @@ Page({ | ||
29 | console.log(errMsg) | 29 | console.log(errMsg) |
30 | }) | 30 | }) |
31 | }, | 31 | }, |
32 | -//点击关注公号 | ||
33 | - handleContact(e){ | ||
34 | - console.log(e.path) | ||
35 | - console.log(e.query) | ||
36 | - }, | 32 | + |
37 | //拨打电话 | 33 | //拨打电话 |
38 | tel(){ | 34 | tel(){ |
39 | wx.makePhoneCall({ | 35 | wx.makePhoneCall({ |
@@ -105,7 +101,35 @@ Page({ | @@ -105,7 +101,35 @@ Page({ | ||
105 | /** | 101 | /** |
106 | * 用户点击右上角分享 | 102 | * 用户点击右上角分享 |
107 | */ | 103 | */ |
108 | - onShareAppMessage: function () { | 104 | + onShareAppMessage: function (option) { |
105 | + let that = this; | ||
106 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
107 | + var shareObj = { | ||
108 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
109 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
110 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
111 | + success: function (res) { | ||
112 | + // 转发成功之后的回调 | ||
113 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
114 | + }, | ||
115 | + fail: function () { | ||
116 | + // 转发失败之后的回调 | ||
117 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
118 | + // 用户取消转发 | ||
119 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
120 | + // 转发失败,其中 detail message 为详细失败信息 | ||
121 | + } | ||
122 | + }, | ||
123 | + complete: function () { | ||
124 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
125 | + } | ||
126 | + } // 来自页面内的按钮的转发 | ||
109 | 127 | ||
110 | - } | 128 | + if (option.from == 'button') { |
129 | + // 此处可以修改 shareObj 中的内容 | ||
130 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
131 | + } // 返回shareObj | ||
132 | + | ||
133 | + return shareObj; | ||
134 | + } | ||
111 | }) | 135 | }) |
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | <view>{{doctorinfo.hospital_name}}</view> | 10 | <view>{{doctorinfo.hospital_name}}</view> |
11 | </view> | 11 | </view> |
12 | </view> | 12 | </view> |
13 | - <button class='intr_tip' open-type="contact" bindcontact="handleContact">关注公众号</button> | 13 | + <navigator class='intr_tip' url='/pages/hint/hint' hover-class="other-navigator-hover">关注公众号</navigator> |
14 | </view> | 14 | </view> |
15 | <view class='intr_item'> | 15 | <view class='intr_item'> |
16 | <!-- <view class='intr_c_title'>擅长疾病</view> --> | 16 | <!-- <view class='intr_c_title'>擅长疾病</view> --> |
@@ -88,7 +88,35 @@ Page({ | @@ -88,7 +88,35 @@ Page({ | ||
88 | /** | 88 | /** |
89 | * 用户点击右上角分享 | 89 | * 用户点击右上角分享 |
90 | */ | 90 | */ |
91 | - onShareAppMessage: function () { | 91 | + onShareAppMessage: function (option) { |
92 | + let that = this; | ||
93 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
94 | + var shareObj = { | ||
95 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
96 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
97 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
98 | + success: function (res) { | ||
99 | + // 转发成功之后的回调 | ||
100 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
101 | + }, | ||
102 | + fail: function () { | ||
103 | + // 转发失败之后的回调 | ||
104 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
105 | + // 用户取消转发 | ||
106 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
107 | + // 转发失败,其中 detail message 为详细失败信息 | ||
108 | + } | ||
109 | + }, | ||
110 | + complete: function () { | ||
111 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
112 | + } | ||
113 | + } // 来自页面内的按钮的转发 | ||
114 | + | ||
115 | + if (option.from == 'button') { | ||
116 | + // 此处可以修改 shareObj 中的内容 | ||
117 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
118 | + } // 返回shareObj | ||
92 | 119 | ||
93 | - } | 120 | + return shareObj; |
121 | + } | ||
94 | }) | 122 | }) |
@@ -62,7 +62,35 @@ Page({ | @@ -62,7 +62,35 @@ Page({ | ||
62 | /** | 62 | /** |
63 | * 用户点击右上角分享 | 63 | * 用户点击右上角分享 |
64 | */ | 64 | */ |
65 | - onShareAppMessage: function () { | ||
66 | - | ||
67 | - } | 65 | + onShareAppMessage: function (option) { |
66 | + let that = this; | ||
67 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
68 | + var shareObj = { | ||
69 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
70 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
71 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
72 | + success: function (res) { | ||
73 | + // 转发成功之后的回调 | ||
74 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
75 | + }, | ||
76 | + fail: function () { | ||
77 | + // 转发失败之后的回调 | ||
78 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
79 | + // 用户取消转发 | ||
80 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
81 | + // 转发失败,其中 detail message 为详细失败信息 | ||
82 | + } | ||
83 | + }, | ||
84 | + complete: function () { | ||
85 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
86 | + } | ||
87 | + } // 来自页面内的按钮的转发 | ||
88 | + | ||
89 | + if (option.from == 'button') { | ||
90 | + // 此处可以修改 shareObj 中的内容 | ||
91 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
92 | + } // 返回shareObj | ||
93 | + | ||
94 | + return shareObj; | ||
95 | + } | ||
68 | }) | 96 | }) |
@@ -158,9 +158,9 @@ Page({ | @@ -158,9 +158,9 @@ Page({ | ||
158 | let that = this; | 158 | let that = this; |
159 | // 设置菜单中的转发按钮触发转发事件时的转发内容 | 159 | // 设置菜单中的转发按钮触发转发事件时的转发内容 |
160 | var shareObj = { | 160 | var shareObj = { |
161 | - title: '术后小程序', // 默认是小程序的名称(可以写slogan等) | ||
162 | - path: '/pages/start/start', // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
163 | - imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | 161 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) |
162 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
163 | + imageUrl:'/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
164 | success: function (res) { | 164 | success: function (res) { |
165 | // 转发成功之后的回调 | 165 | // 转发成功之后的回调 |
166 | if (res.errMsg == 'shareAppMessage:ok') { } | 166 | if (res.errMsg == 'shareAppMessage:ok') { } |
@@ -178,9 +178,9 @@ Page({ | @@ -178,9 +178,9 @@ Page({ | ||
178 | } | 178 | } |
179 | } // 来自页面内的按钮的转发 | 179 | } // 来自页面内的按钮的转发 |
180 | 180 | ||
181 | - if (options.from == 'button') { | 181 | + if (option.from == 'button') { |
182 | // 此处可以修改 shareObj 中的内容 | 182 | // 此处可以修改 shareObj 中的内容 |
183 | - // shareObj.path = '/pages/start/start?status=' + options.target.dataset.status | 183 | + shareObj.imageUrl = '/pages/shareimg/share.png' |
184 | } // 返回shareObj | 184 | } // 返回shareObj |
185 | 185 | ||
186 | return shareObj; | 186 | return shareObj; |
@@ -80,7 +80,35 @@ Page({ | @@ -80,7 +80,35 @@ Page({ | ||
80 | /** | 80 | /** |
81 | * 用户点击右上角分享 | 81 | * 用户点击右上角分享 |
82 | */ | 82 | */ |
83 | - onShareAppMessage: function () { | ||
84 | - | 83 | + onShareAppMessage: function (option) { |
84 | + let that = this; | ||
85 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
86 | + var shareObj = { | ||
87 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
88 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
89 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
90 | + success: function (res) { | ||
91 | + // 转发成功之后的回调 | ||
92 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
93 | + }, | ||
94 | + fail: function () { | ||
95 | + // 转发失败之后的回调 | ||
96 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
97 | + // 用户取消转发 | ||
98 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
99 | + // 转发失败,其中 detail message 为详细失败信息 | ||
100 | + } | ||
101 | + }, | ||
102 | + complete: function () { | ||
103 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
104 | + } | ||
105 | + } // 来自页面内的按钮的转发 | ||
106 | + | ||
107 | + if (option.from == 'button') { | ||
108 | + // 此处可以修改 shareObj 中的内容 | ||
109 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
110 | + } // 返回shareObj | ||
111 | + | ||
112 | + return shareObj; | ||
85 | } | 113 | } |
86 | }) | 114 | }) |
@@ -103,7 +103,35 @@ Page({ | @@ -103,7 +103,35 @@ Page({ | ||
103 | /** | 103 | /** |
104 | * 用户点击右上角分享 | 104 | * 用户点击右上角分享 |
105 | */ | 105 | */ |
106 | - onShareAppMessage: function () { | 106 | + onShareAppMessage: function (option) { |
107 | + let that = this; | ||
108 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
109 | + var shareObj = { | ||
110 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
111 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
112 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
113 | + success: function (res) { | ||
114 | + // 转发成功之后的回调 | ||
115 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
116 | + }, | ||
117 | + fail: function () { | ||
118 | + // 转发失败之后的回调 | ||
119 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
120 | + // 用户取消转发 | ||
121 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
122 | + // 转发失败,其中 detail message 为详细失败信息 | ||
123 | + } | ||
124 | + }, | ||
125 | + complete: function () { | ||
126 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
127 | + } | ||
128 | + } // 来自页面内的按钮的转发 | ||
107 | 129 | ||
108 | - } | 130 | + if (option.from == 'button') { |
131 | + // 此处可以修改 shareObj 中的内容 | ||
132 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
133 | + } // 返回shareObj | ||
134 | + | ||
135 | + return shareObj; | ||
136 | + } | ||
109 | }) | 137 | }) |
@@ -20,9 +20,49 @@ Page({ | @@ -20,9 +20,49 @@ Page({ | ||
20 | current_page: 1, //页码 | 20 | current_page: 1, //页码 |
21 | per_page: 2, //每页病情记录的条数 | 21 | per_page: 2, //每页病情记录的条数 |
22 | last_page:null,//最后一页 | 22 | last_page:null,//最后一页 |
23 | - line_rows: 10, //每页趋势图的个数 | ||
24 | - FilesLogList: [] | 23 | + tab:1,//1表示白细胞计数,2表示中粒细胞计数,3血红蛋白,4血小板 |
24 | + FilesLogList: [], | ||
25 | + current_week:0,//0为当前周,下一周加1,上一周减1 | ||
26 | + current_date:'', | ||
27 | + showline:true//true为有数据,flase为没有数据 | ||
25 | }, | 28 | }, |
29 | + //上一周 | ||
30 | + preweek(){ | ||
31 | + console.log('上一周'); | ||
32 | + let that=this; | ||
33 | + that.setData({ | ||
34 | + current_week: that.data.current_week-1 | ||
35 | + }) | ||
36 | + that.getFilesLogLine(); | ||
37 | + }, | ||
38 | + //下一周 | ||
39 | + nxetweek(){ | ||
40 | + console.log('下一周') | ||
41 | + let that = this; | ||
42 | + that.setData({ | ||
43 | + current_week: that.data.current_week+1 | ||
44 | + }) | ||
45 | + that.getFilesLogLine(); | ||
46 | + }, | ||
47 | + settab(e){ | ||
48 | + console.log(e); | ||
49 | + let that=this; | ||
50 | + that.setData({ | ||
51 | + tab: parseInt(e.currentTarget.dataset.tab) | ||
52 | + }) | ||
53 | + if (that.data.categories.length>0){ | ||
54 | + if (that.data.tab == 1) { | ||
55 | + that.lineShowwhite(that.data.series.white_blood_cell); | ||
56 | + } else if (that.data.tab == 2) { | ||
57 | + that.lineShowneutrophils(that.data.series.neutrophils); | ||
58 | + } else if (that.data.tab == 3) { | ||
59 | + that.lineShowhemoglobin(that.data.series.hemoglobin); | ||
60 | + } else if (that.data.tab == 4) { | ||
61 | + that.lineShowplatelet(that.data.series.platelet); | ||
62 | + } | ||
63 | + } | ||
64 | + | ||
65 | + }, | ||
26 | //切换显示记录于趋势图 | 66 | //切换显示记录于趋势图 |
27 | setshowrecord() { | 67 | setshowrecord() { |
28 | let that=this; | 68 | let that=this; |
@@ -30,7 +70,7 @@ Page({ | @@ -30,7 +70,7 @@ Page({ | ||
30 | showrecord: !this.data.showrecord | 70 | showrecord: !this.data.showrecord |
31 | }) | 71 | }) |
32 | if (this.data.showrecord){ | 72 | if (this.data.showrecord){ |
33 | - that.getFilesLogLine(); | 73 | + // that.getFilesLogLine(); |
34 | } | 74 | } |
35 | }, | 75 | }, |
36 | wxChartData() { | 76 | wxChartData() { |
@@ -90,7 +130,7 @@ Page({ | @@ -90,7 +130,7 @@ Page({ | ||
90 | }); | 130 | }); |
91 | }, | 131 | }, |
92 | //血红蛋白 | 132 | //血红蛋白 |
93 | - lineShowhemoglobin() { | 133 | + lineShowhemoglobin(hemoglobin) { |
94 | let that=this; | 134 | let that=this; |
95 | let cate = this.data.categories; | 135 | let cate = this.data.categories; |
96 | 136 | ||
@@ -102,7 +142,7 @@ Page({ | @@ -102,7 +142,7 @@ Page({ | ||
102 | 142 | ||
103 | series: [{ | 143 | series: [{ |
104 | name: '血红蛋白', | 144 | name: '血红蛋白', |
105 | - data: that.data.series.hemoglobin, | 145 | + data: hemoglobin, |
106 | format: function (val, name) { //点击显示的数据注释 | 146 | format: function (val, name) { //点击显示的数据注释 |
107 | return val + 'g/L'; | 147 | return val + 'g/L'; |
108 | } | 148 | } |
@@ -118,7 +158,7 @@ Page({ | @@ -118,7 +158,7 @@ Page({ | ||
118 | }); | 158 | }); |
119 | }, | 159 | }, |
120 | //白细胞 | 160 | //白细胞 |
121 | - lineShowwhite() { | 161 | + lineShowwhite(white_blood_cell) { |
122 | let that = this; | 162 | let that = this; |
123 | let cate = this.data.categories; | 163 | let cate = this.data.categories; |
124 | lineChartwhite = new wxCharts({ | 164 | lineChartwhite = new wxCharts({ |
@@ -128,7 +168,7 @@ Page({ | @@ -128,7 +168,7 @@ Page({ | ||
128 | animation: true, //是否开启动画 | 168 | animation: true, //是否开启动画 |
129 | series: [{ | 169 | series: [{ |
130 | name: '白细胞', | 170 | name: '白细胞', |
131 | - data: that.data.series.white_blood_cell, | 171 | + data: white_blood_cell, |
132 | format: function (val, name) { //点击显示的数据注释 | 172 | format: function (val, name) { //点击显示的数据注释 |
133 | return val + '*10^9/L'; | 173 | return val + '*10^9/L'; |
134 | } | 174 | } |
@@ -144,7 +184,7 @@ Page({ | @@ -144,7 +184,7 @@ Page({ | ||
144 | }); | 184 | }); |
145 | }, | 185 | }, |
146 | //中粒细胞 | 186 | //中粒细胞 |
147 | - lineShowneutrophils() { | 187 | + lineShowneutrophils(neutrophils) { |
148 | let that = this; | 188 | let that = this; |
149 | let cate = this.data.categories; | 189 | let cate = this.data.categories; |
150 | console.log(cate) | 190 | console.log(cate) |
@@ -155,7 +195,7 @@ Page({ | @@ -155,7 +195,7 @@ Page({ | ||
155 | animation: true, //是否开启动画 | 195 | animation: true, //是否开启动画 |
156 | series: [{ | 196 | series: [{ |
157 | name: '中性粒细胞', | 197 | name: '中性粒细胞', |
158 | - data: that.data.series.neutrophils, | 198 | + data: neutrophils, |
159 | format: function (val, name) { //点击显示的数据注释 | 199 | format: function (val, name) { //点击显示的数据注释 |
160 | return val + '*10^9/L'; | 200 | return val + '*10^9/L'; |
161 | } | 201 | } |
@@ -171,7 +211,7 @@ Page({ | @@ -171,7 +211,7 @@ Page({ | ||
171 | }); | 211 | }); |
172 | }, | 212 | }, |
173 | //血小板 | 213 | //血小板 |
174 | - lineShowplatelet() { | 214 | + lineShowplatelet(hemoglobin) { |
175 | let that = this; | 215 | let that = this; |
176 | let cate = this.data.categories; | 216 | let cate = this.data.categories; |
177 | console.log(cate) | 217 | console.log(cate) |
@@ -182,7 +222,7 @@ Page({ | @@ -182,7 +222,7 @@ Page({ | ||
182 | animation: true, //是否开启动画 | 222 | animation: true, //是否开启动画 |
183 | series: [{ | 223 | series: [{ |
184 | name: '血小板', | 224 | name: '血小板', |
185 | - data: that.data.series.hemoglobin, | 225 | + data: hemoglobin, |
186 | format: function (val, name) { //点击显示的数据注释 | 226 | format: function (val, name) { //点击显示的数据注释 |
187 | return val + '*10^9/L'; | 227 | return val + '*10^9/L'; |
188 | } | 228 | } |
@@ -306,18 +346,30 @@ Page({ | @@ -306,18 +346,30 @@ Page({ | ||
306 | } | 346 | } |
307 | let url = 'user/getFilesLogLine'; | 347 | let url = 'user/getFilesLogLine'; |
308 | let params = { | 348 | let params = { |
309 | - files_id: that.data.files_id, | ||
310 | - list_rows: that.data.line_rows | 349 | + files_id: that.data.files_id, |
350 | + current_week: that.data.current_week | ||
311 | } | 351 | } |
312 | app.post(url, params, header).then((res) => { | 352 | app.post(url, params, header).then((res) => { |
313 | that.setData({ | 353 | that.setData({ |
314 | series: res.series, | 354 | series: res.series, |
315 | - categories: res.categories | 355 | + categories: res.categories, |
356 | + current_date: res.current_date | ||
316 | }) | 357 | }) |
317 | - that.lineShowhemoglobin(); | ||
318 | - that.lineShowwhite(); | ||
319 | - that.lineShowneutrophils(); | ||
320 | - that.lineShowplatelet(); | 358 | + if (res.categories.length>0){ |
359 | + that.setData({ | ||
360 | + showline:true | ||
361 | + }) | ||
362 | + that.lineShowhemoglobin(res.series.hemoglobin); | ||
363 | + that.lineShowwhite(res.series.white_blood_cell); | ||
364 | + that.lineShowneutrophils(res.series.neutrophils); | ||
365 | + that.lineShowplatelet(res.series.platelet); | ||
366 | + }else{ | ||
367 | + that.setData({ | ||
368 | + showline: false | ||
369 | + }) | ||
370 | + | ||
371 | + } | ||
372 | + | ||
321 | }).catch((errMsg) => { | 373 | }).catch((errMsg) => { |
322 | console.log(errMsg) | 374 | console.log(errMsg) |
323 | }) | 375 | }) |
@@ -400,8 +452,36 @@ Page({ | @@ -400,8 +452,36 @@ Page({ | ||
400 | /** | 452 | /** |
401 | * 用户点击右上角分享 | 453 | * 用户点击右上角分享 |
402 | */ | 454 | */ |
403 | - onShareAppMessage: function() { | ||
404 | - | 455 | + onShareAppMessage: function (option) { |
456 | + let that = this; | ||
457 | + // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
458 | + var shareObj = { | ||
459 | + title: '健康随访助手', // 默认是小程序的名称(可以写slogan等) | ||
460 | + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
461 | + imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
462 | + success: function (res) { | ||
463 | + // 转发成功之后的回调 | ||
464 | + if (res.errMsg == 'shareAppMessage:ok') { } | ||
465 | + }, | ||
466 | + fail: function () { | ||
467 | + // 转发失败之后的回调 | ||
468 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
469 | + // 用户取消转发 | ||
470 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
471 | + // 转发失败,其中 detail message 为详细失败信息 | ||
472 | + } | ||
473 | + }, | ||
474 | + complete: function () { | ||
475 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
405 | } | 476 | } |
477 | + } // 来自页面内的按钮的转发 | ||
478 | + | ||
479 | + if (option.from == 'button') { | ||
480 | + // 此处可以修改 shareObj 中的内容 | ||
481 | + shareObj.imageUrl = '/pages/shareimg/share.png' | ||
482 | + } // 返回shareObj | ||
483 | + | ||
484 | + return shareObj; | ||
485 | + } | ||
406 | 486 | ||
407 | }) | 487 | }) |
1 | <!--pages/record/record.wxml--> | 1 | <!--pages/record/record.wxml--> |
2 | 2 | ||
3 | -<!-- <cover-view class='record_tab'> | 3 | +<cover-view class='record_tab'> |
4 | <cover-view class="record_left border_left {{showrecord?' active':''}}" bindtap='setshowrecord'>趋势图</cover-view> | 4 | <cover-view class="record_left border_left {{showrecord?' active':''}}" bindtap='setshowrecord'>趋势图</cover-view> |
5 | - <cover-view class="record_left {{showrecord?'':'active'}}" bindtap='setshowrecord'>病情记录</cover-view> | ||
6 | -</cover-view> --> | ||
7 | - | ||
8 | - <view class='container_box' wx:if='{{showrecord}}'> | ||
9 | - <view class="container"> | ||
10 | - <view class='container_txt'>白细胞</view> | 5 | + <cover-view class="record_left {{showrecord?'':'active'}}" bindtap='setshowrecord'>历史记录</cover-view> |
6 | +</cover-view> | ||
7 | +<view class='container_box' wx:if='{{showrecord}}'> | ||
8 | + <view class="container"> | ||
9 | + <view class='container_top'> | ||
10 | + <view class='top_left' bindtap='preweek'><image src='../../img/pre.png'></image></view> | ||
11 | + <view>{{current_date}}</view> | ||
12 | + <view class='top_rigth' bindtap='nxetweek'><image src='../../img/next.png'></image></view> | ||
13 | + </view> | ||
14 | + <view class='container_contertab'> | ||
15 | + <view class="contertab {{tab==1?'contertab_active':''}}" data-tab='1' bindtap='settab'>白细胞计数</view> | ||
16 | + <view class="contertab {{tab==2?'contertab_active':''}}" data-tab='2' bindtap='settab'>中性粒细胞</view> | ||
17 | + <view class="contertab {{tab==3?'contertab_active':''}}" data-tab='3' bindtap='settab'>血红蛋白</view> | ||
18 | + <view class="contertab {{tab==4?'contertab_active':''}}" data-tab='4' bindtap='settab'>血小板</view> | ||
19 | + </view> | ||
20 | + <view class='tab_content' wx:if='{{showline}}'> | ||
21 | + <!-- 白细胞 --> | ||
22 | + <view wx:if='{{tab==1}}'> | ||
11 | <canvas class="canvas" canvas-id="lineCanvaswhite" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerwhite"></canvas> | 23 | <canvas class="canvas" canvas-id="lineCanvaswhite" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerwhite"></canvas> |
12 | </view> | 24 | </view> |
13 | - <view class="container"> | ||
14 | - <view class='container_txt'>中性粒细胞</view> | 25 | + <!-- 中性粒细胞 --> |
26 | + <view wx:if='{{tab==2}}'> | ||
15 | <canvas class="canvas" canvas-id="lineCanvasneutrophils" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerneutrophils"></canvas> | 27 | <canvas class="canvas" canvas-id="lineCanvasneutrophils" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerneutrophils"></canvas> |
16 | </view> | 28 | </view> |
17 | - <view class="container"> | ||
18 | - <view class='container_txt'>血红蛋白</view> | 29 | + <!-- 血红蛋白 --> |
30 | + <view wx:if='{{tab==3}}'> | ||
19 | <canvas class="canvas" canvas-id="lineCanvashemoglobin" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerhemoglobin"></canvas> | 31 | <canvas class="canvas" canvas-id="lineCanvashemoglobin" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerhemoglobin"></canvas> |
20 | </view> | 32 | </view> |
21 | - <view class="container"> | ||
22 | - <view class='container_txt'>血小板</view> | 33 | + <!-- 血小板 --> |
34 | + <view wx:if='{{tab==4}}'> | ||
23 | <canvas class="canvas" canvas-id="lineCanvasplatelet" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerplatelet"></canvas> | 35 | <canvas class="canvas" canvas-id="lineCanvasplatelet" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerplatelet"></canvas> |
24 | </view> | 36 | </view> |
25 | </view> | 37 | </view> |
26 | - <!-- 病情记录 --> | ||
27 | - <scroll-view class='file_plan' wx:else scroll-y bindscrolltolower='scrollbottom'> | ||
28 | - <view class='plan_item1' wx:for='{{FilesLogList}}' wx:key> | ||
29 | - <view class='title_box'> | ||
30 | - <view>{{item.create_time}}</view> | ||
31 | - <view class='title_img' bindtap='goeditfile' data-id='{{item.id}}'> | ||
32 | - <image src='../../img/edit.png'></image> | ||
33 | - </view> | ||
34 | - </view> | ||
35 | - <view class="two_item two_items {{item.more.white_blood_cell_result=='正常'?'':'danger'}}"> | ||
36 | - <view class='two_items_left'> | ||
37 | - <view class='two_txt'>白细胞计数</view> | ||
38 | - <view class='two_state' bindtap='gonormal'> | ||
39 | - <view class='iconbox'> | ||
40 | - <view class='iconfont icon-jinggao'></view> | ||
41 | - </view> | ||
42 | - {{item.more.white_blood_cell_result}} | ||
43 | - </view> | 38 | + <view wx:else class='nodata'>暂无相关数据</view> |
39 | + </view> | ||
40 | +</view> | ||
41 | +<!-- 病情记录 --> | ||
42 | +<scroll-view class='file_plan' wx:else scroll-y bindscrolltolower='scrollbottom'> | ||
43 | + <view class='plan_item1' wx:for='{{FilesLogList}}' wx:key> | ||
44 | + <view class='title_box'> | ||
45 | + <view>{{item.test_time}}</view> | ||
46 | + <view class='title_img' bindtap='goeditfile' data-id='{{item.id}}'> | ||
47 | + <image src='../../img/edit.png'></image> | ||
48 | + </view> | ||
49 | + </view> | ||
50 | + <view class="two_item two_items {{item.more.white_blood_cell_result=='正常'?'':'danger'}}"> | ||
51 | + <view class='two_items_left'> | ||
52 | + <view class='two_txt'>白细胞计数</view> | ||
53 | + <view class='two_state' bindtap='gonormal'> | ||
54 | + <view class='iconbox'> | ||
55 | + <view class='iconfont icon-jinggao'></view> | ||
44 | </view> | 56 | </view> |
45 | - <view class="two_item_rigth"> | ||
46 | - <text class='two_num'> {{item.more.white_blood_cell}}</text>*10^9/L</view> | 57 | + {{item.more.white_blood_cell_result}} |
47 | </view> | 58 | </view> |
48 | - <view class="two_item two_items {{item.more.neutrophils_result=='正常'?'':'danger'}}"> | ||
49 | - <view class='two_items_left'> | ||
50 | - <view class='two_txt'>中性粒细胞计数</view> | ||
51 | - <view class='two_state' bindtap='gonormal'> | ||
52 | - <view class='iconbox'> | ||
53 | - <view class='iconfont icon-jinggao'></view> | ||
54 | - </view> | ||
55 | - {{item.more.neutrophils_result}} | ||
56 | - </view> | 59 | + </view> |
60 | + <view class="two_item_rigth"> | ||
61 | + <text class='two_num'> {{item.more.white_blood_cell}}</text>*10^9/L</view> | ||
62 | + </view> | ||
63 | + <view class="two_item two_items {{item.more.neutrophils_result=='正常'?'':'danger'}}"> | ||
64 | + <view class='two_items_left'> | ||
65 | + <view class='two_txt'>中性粒细胞计数</view> | ||
66 | + <view class='two_state' bindtap='gonormal'> | ||
67 | + <view class='iconbox'> | ||
68 | + <view class='iconfont icon-jinggao'></view> | ||
57 | </view> | 69 | </view> |
58 | - <view class="two_item_rigth"> | ||
59 | - <text class='two_num'>{{item.more.neutrophils}}</text>*10^9/L</view> | 70 | + {{item.more.neutrophils_result}} |
60 | </view> | 71 | </view> |
61 | - <view class="two_item two_items {{item.more.hemoglobin_result=='正常'?'':'danger'}}"> | ||
62 | - <view class='two_items_left'> | ||
63 | - <view class='two_txt'>血红蛋白</view> | ||
64 | - <view class='two_state' bindtap='gonormal'> | ||
65 | - <view class='iconbox'> | ||
66 | - <view class='iconfont icon-jinggao'></view> | ||
67 | - </view> | ||
68 | - {{item.more.hemoglobin_result}} | ||
69 | - </view> | 72 | + </view> |
73 | + <view class="two_item_rigth"> | ||
74 | + <text class='two_num'>{{item.more.neutrophils}}</text>*10^9/L</view> | ||
75 | + </view> | ||
76 | + <view class="two_item two_items {{item.more.hemoglobin_result=='正常'?'':'danger'}}"> | ||
77 | + <view class='two_items_left'> | ||
78 | + <view class='two_txt'>血红蛋白</view> | ||
79 | + <view class='two_state' bindtap='gonormal'> | ||
80 | + <view class='iconbox'> | ||
81 | + <view class='iconfont icon-jinggao'></view> | ||
70 | </view> | 82 | </view> |
71 | - <view class="two_item_rigth"> | ||
72 | - <text class='two_num'> {{item.more.hemoglobin}}</text>g/L</view> | 83 | + {{item.more.hemoglobin_result}} |
73 | </view> | 84 | </view> |
74 | - <view class="two_item two_items {{item.more.platelet_result=='正常'?'':'danger'}}"> | ||
75 | - <view class='two_items_left'> | ||
76 | - <view class='two_txt'>血小板计数</view> | ||
77 | - <view class='two_state' bindtap='gonormal'> | ||
78 | - <view class='iconbox'> | ||
79 | - <view class='iconfont icon-jinggao'></view> | ||
80 | - </view> | ||
81 | - {{item.more.platelet_result}} | ||
82 | - </view> | 85 | + </view> |
86 | + <view class="two_item_rigth"> | ||
87 | + <text class='two_num'> {{item.more.hemoglobin}}</text>g/L</view> | ||
88 | + </view> | ||
89 | + <view class="two_item two_items {{item.more.platelet_result=='正常'?'':'danger'}}"> | ||
90 | + <view class='two_items_left'> | ||
91 | + <view class='two_txt'>血小板计数</view> | ||
92 | + <view class='two_state' bindtap='gonormal'> | ||
93 | + <view class='iconbox'> | ||
94 | + <view class='iconfont icon-jinggao'></view> | ||
83 | </view> | 95 | </view> |
84 | - <view class="two_item_rigth"> | ||
85 | - <text class='two_num'>{{item.more.platelet}}</text>*10^9/L</view> | ||
86 | - </view> | ||
87 | - <view class='two_item' wx:if='{{item.doctor_reply != null}}'> | ||
88 | - <view>医生建议:</view> | ||
89 | - <view class='two_item_content'>{{item.doctor_reply == null ? '等待医生回复':item.doctor_reply}}</view> | 96 | + {{item.more.platelet_result}} |
90 | </view> | 97 | </view> |
91 | </view> | 98 | </view> |
92 | - <view class='addnomore' wx:if='{{shownomore}}'>——没有更多数据了——</view> | ||
93 | - </scroll-view> | 99 | + <view class="two_item_rigth"> |
100 | + <text class='two_num'>{{item.more.platelet}}</text>*10^9/L</view> | ||
101 | + </view> | ||
102 | + <view class='two_item' wx:if='{{item.doctor_reply.length != 0}}'> | ||
103 | + <view>医生建议:</view> | ||
104 | + <view class='two_item_content'>{{item.doctor_reply.length == 0 ? '等待医生回复':item.doctor_reply}}</view> | ||
105 | + </view> | ||
106 | + </view> | ||
107 | + <view class='addnomore' wx:if='{{shownomore}}'>——没有更多数据了——</view> | ||
108 | +</scroll-view> | ||
94 | 109 | ||
95 | <!-- 趋势图 --> | 110 | <!-- 趋势图 --> |
96 | <!-- <view class="container" wx:if='{{showrecord}}'> | 111 | <!-- <view class="container" wx:if='{{showrecord}}'> |
@@ -11,7 +11,7 @@ ec-canvas { | @@ -11,7 +11,7 @@ ec-canvas { | ||
11 | height: 100%; | 11 | height: 100%; |
12 | } | 12 | } |
13 | .container{ | 13 | .container{ |
14 | -height:530rpx; | 14 | +height:620rpx; |
15 | margin:30rpx 30rpx 0 30rpx; | 15 | margin:30rpx 30rpx 0 30rpx; |
16 | box-sizing:border-box; | 16 | box-sizing:border-box; |
17 | background:#fff; | 17 | background:#fff; |
@@ -21,8 +21,8 @@ border-radius:20rpx; | @@ -21,8 +21,8 @@ border-radius:20rpx; | ||
21 | box-shadow:0 0 100rpx #DADADA; | 21 | box-shadow:0 0 100rpx #DADADA; |
22 | } | 22 | } |
23 | .container canvas{ | 23 | .container canvas{ |
24 | - height: 500rpx; | ||
25 | - width: 100%; | 24 | + width:100%; |
25 | + height: 400rpx; | ||
26 | } | 26 | } |
27 | .container_txt{ | 27 | .container_txt{ |
28 | color:#999; | 28 | color:#999; |
@@ -143,4 +143,79 @@ z-index:100; | @@ -143,4 +143,79 @@ z-index:100; | ||
143 | } | 143 | } |
144 | .page_body{ | 144 | .page_body{ |
145 | flex: 1; | 145 | flex: 1; |
146 | +} | ||
147 | +.container_top{ | ||
148 | + margin: 0 30rpx; | ||
149 | + color:#333; | ||
150 | + font-size:26rpx; | ||
151 | + padding:28rpx 0 30rpx 0; | ||
152 | + display: flex; | ||
153 | + justify-content: space-between; | ||
154 | + align-items: center; | ||
155 | + border-bottom: 1rpx solid #d8d8d8; | ||
156 | +} | ||
157 | +.top_left{ | ||
158 | + width:120rpx; | ||
159 | + height: 44rpx; | ||
160 | + border-radius: 5rpx; | ||
161 | + overflow: hidden; | ||
162 | +} | ||
163 | + | ||
164 | +.top_rigth{ | ||
165 | + width:120rpx; | ||
166 | + height: 44rpx; | ||
167 | + border-radius: 5rpx; | ||
168 | + overflow: hidden; | ||
169 | +} | ||
170 | +.top_rigth image,.top_left image{ | ||
171 | +display: block; | ||
172 | +width:100%; | ||
173 | +height: 100%; | ||
174 | +} | ||
175 | +.container_contertab{ | ||
176 | + margin: 30rpx 30rpx; | ||
177 | + box-sizing: border-box; | ||
178 | + border-bottom: 1rpx solid #d8d8d8; | ||
179 | + height: 60rpx; | ||
180 | + border: 2rpx solid #3AA0EA; | ||
181 | +border-radius: 30rpx; | ||
182 | +display: flex; | ||
183 | +align-items: center; | ||
184 | +overflow: hidden; | ||
185 | +justify-content: space-around; | ||
186 | +} | ||
187 | +.contertab{ | ||
188 | + width:25%; | ||
189 | + height: 100%; | ||
190 | + position: relative; | ||
191 | + color:#3AA0EA; | ||
192 | + font-size:24rpx; | ||
193 | + | ||
194 | + | ||
195 | + display: flex; | ||
196 | + justify-content: center; | ||
197 | + align-items: center; | ||
198 | +} | ||
199 | +.contertab.contertab_active{ | ||
200 | + background: #3AA0EA; | ||
201 | + color:#fff; | ||
202 | +} | ||
203 | +.contertab::after{ | ||
204 | + content: ''; | ||
205 | + position: absolute; | ||
206 | + top:14rpx; | ||
207 | + right: 0rpx; | ||
208 | + width:3rpx; | ||
209 | + height: 34rpx; | ||
210 | + background: #3AA0EA; | ||
211 | +} | ||
212 | +.contertab:last-child::after{ | ||
213 | + content: ''; | ||
214 | + background: #fff; | ||
215 | + opacity: 0; | ||
216 | +} | ||
217 | +.nodata{ | ||
218 | + margin: 150rpx 0 0 0; | ||
219 | + text-align: center; | ||
220 | + | ||
146 | } | 221 | } |
pages/shareimg/share.png
0 → 100644
653.6 KB
@@ -8,19 +8,27 @@ Page({ | @@ -8,19 +8,27 @@ Page({ | ||
8 | * 页面的初始数据 | 8 | * 页面的初始数据 |
9 | */ | 9 | */ |
10 | data: { | 10 | data: { |
11 | - listdata:[] | 11 | + listdata:'' |
12 | }, | 12 | }, |
13 | //启动页 | 13 | //启动页 |
14 | - getWelcomeInfo(){ | 14 | + getWelcomeInfo(openid){ |
15 | let that=this; | 15 | let that=this; |
16 | let url ='index/getWelcomeInfo'; | 16 | let url ='index/getWelcomeInfo'; |
17 | let params={ | 17 | let params={ |
18 | - doctorid: app.globalData.doctorid | 18 | + doctorid: app.globalData.doctorid, |
19 | + openid: openid | ||
19 | } | 20 | } |
20 | app.post(url,params).then((res)=>{ | 21 | app.post(url,params).then((res)=>{ |
21 | that.setData({ | 22 | that.setData({ |
22 | listdata: res | 23 | listdata: res |
23 | }) | 24 | }) |
25 | + //医生的赋值 | ||
26 | + app.globalData.doctorid = res.doctorid; | ||
27 | + app.globalData.doctor_id = res.doctor_id; | ||
28 | + //记录小程序打开次数 | ||
29 | + app.setStatisticsOpenTimes(openid); | ||
30 | + wx.setStorageSync('token', res.token); | ||
31 | + wx.setStorageSync('userInfo', res.user); | ||
24 | setTimeout(function(){ | 32 | setTimeout(function(){ |
25 | wx.switchTab({ | 33 | wx.switchTab({ |
26 | url: '/pages/index/index', | 34 | url: '/pages/index/index', |
@@ -40,37 +48,19 @@ Page({ | @@ -40,37 +48,19 @@ Page({ | ||
40 | code: res.code | 48 | code: res.code |
41 | } | 49 | } |
42 | app.post(url, params).then((res) => { | 50 | app.post(url, params).then((res) => { |
43 | - that.gettoken(res.openid) | ||
44 | - wx.setStorageSync('openid', res.openid) | 51 | + that.getWelcomeInfo(res.openid); |
52 | + wx.setStorageSync('openid', res.openid); | ||
45 | }).catch((errMsg) => { | 53 | }).catch((errMsg) => { |
46 | console.log(errMsg) | 54 | console.log(errMsg) |
47 | }) | 55 | }) |
48 | } | 56 | } |
49 | }) | 57 | }) |
50 | }, | 58 | }, |
51 | - gettoken(openid){ | ||
52 | - let that = this; | ||
53 | - let url = 'public/checkOpenid'; | ||
54 | - let params = { | ||
55 | - openid: openid | ||
56 | - } | ||
57 | - app.post(url, params).then((res) => { | ||
58 | - console.log(res) | ||
59 | - wx.setStorageSync('token', res.token); | ||
60 | - wx.setStorageSync('userInfo', res.user); | ||
61 | - }).catch((errMsg) => { | ||
62 | - console.log(errMsg) | ||
63 | - }) | ||
64 | - | ||
65 | - }, | ||
66 | /** | 59 | /** |
67 | * 生命周期函数--监听页面加载 | 60 | * 生命周期函数--监听页面加载 |
68 | */ | 61 | */ |
69 | onLoad: function (options) { | 62 | onLoad: function (options) { |
70 | let that = this; | 63 | let that = this; |
71 | - console.log(options); | ||
72 | - that.getopenid(); | ||
73 | - | ||
74 | if (options.scene != undefined) { | 64 | if (options.scene != undefined) { |
75 | var scene = decodeURIComponent(options.scene); | 65 | var scene = decodeURIComponent(options.scene); |
76 | var doctorid = scene.split("=")[1]; | 66 | var doctorid = scene.split("=")[1]; |
@@ -82,7 +72,7 @@ Page({ | @@ -82,7 +72,7 @@ Page({ | ||
82 | if (options.doctorid != undefined) { | 72 | if (options.doctorid != undefined) { |
83 | app.globalData.doctorid = options.doctorid; | 73 | app.globalData.doctorid = options.doctorid; |
84 | } | 74 | } |
85 | - that.getWelcomeInfo(); | 75 | + that.getopenid(); |
86 | }, | 76 | }, |
87 | /** | 77 | /** |
88 | * 生命周期函数--监听页面初次渲染完成 | 78 | * 生命周期函数--监听页面初次渲染完成 |
@@ -94,8 +84,7 @@ Page({ | @@ -94,8 +84,7 @@ Page({ | ||
94 | * 生命周期函数--监听页面显示 | 84 | * 生命周期函数--监听页面显示 |
95 | */ | 85 | */ |
96 | onShow: function () { | 86 | onShow: function () { |
97 | - | ||
98 | - | 87 | + |
99 | }, | 88 | }, |
100 | 89 | ||
101 | /** | 90 | /** |
1 | <!--pages/start/start.wxml--> | 1 | <!--pages/start/start.wxml--> |
2 | <view class='start_img'> | 2 | <view class='start_img'> |
3 | - <image src='{{listdata.open_picture}}'></image> | 3 | + <image src='{{listdata.welcome.open_picture}}'></image> |
4 | </view> | 4 | </view> |
5 | -<view class='bottom_box' > | ||
6 | - <view class='st_title'>{{listdata.open_title}}</view> | ||
7 | - <view class='st_subtitle'>{{listdata.open_sub_title}}</view> | 5 | +<view class='bottom_box' wx:if="{{listdata != ''}}" > |
6 | + <view class='st_title'>{{listdata.welcome.open_title}}</view> | ||
7 | + <view class='st_subtitle'>{{listdata.welcome.open_sub_title}}</view> | ||
8 | <!-- <view class='st_subtitle'>你好,我是北京大学人民医院骨肿瘤科 孙馨</view> --> | 8 | <!-- <view class='st_subtitle'>你好,我是北京大学人民医院骨肿瘤科 孙馨</view> --> |
9 | <view class='rate_box'> | 9 | <view class='rate_box'> |
10 | <progress class='rate_item' activeColor='#3AA0EA' backgroundColor='rgba(255,255,255,1)' active percent='100' stroke-width='20'></progress> | 10 | <progress class='rate_item' activeColor='#3AA0EA' backgroundColor='rgba(255,255,255,1)' active percent='100' stroke-width='20'></progress> |
pages/test/test.js
0 → 100644
1 | +// pages/test/test.js | ||
2 | +Page({ | ||
3 | + | ||
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 | + } | ||
66 | +}) |
pages/test/test.json
0 → 100644
1 | +{} |
pages/test/test.wxml
0 → 100644
pages/test/test.wxss
0 → 100644
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | "compileType": "miniprogram", | 13 | "compileType": "miniprogram", |
14 | "libVersion": "2.4.0", | 14 | "libVersion": "2.4.0", |
15 | "appid": "wx0a0da51e3b931fad", | 15 | "appid": "wx0a0da51e3b931fad", |
16 | - "projectname": "%E6%9C%AF%E5%90%8E%E5%B0%8F%E7%A8%8B%E5%BA%8F(%E6%8F%90%E4%BA%A4%E7%BB%99%E5%AE%A2%E6%88%B7)", | 16 | + "projectname": "%E6%9C%AF%E5%90%8E%EF%BC%8820181119%EF%BC%89", |
17 | "debugOptions": { | 17 | "debugOptions": { |
18 | "hidedInDevtools": [] | 18 | "hidedInDevtools": [] |
19 | }, | 19 | }, |
@@ -36,8 +36,50 @@ | @@ -36,8 +36,50 @@ | ||
36 | "list": [] | 36 | "list": [] |
37 | }, | 37 | }, |
38 | "miniprogram": { | 38 | "miniprogram": { |
39 | - "current": -1, | ||
40 | - "list": [] | 39 | + "current": 6, |
40 | + "list": [ | ||
41 | + { | ||
42 | + "id": 0, | ||
43 | + "name": "start", | ||
44 | + "pathName": "pages/start/start", | ||
45 | + "query": "doctorid=tigeryang" | ||
46 | + }, | ||
47 | + { | ||
48 | + "id": -1, | ||
49 | + "name": "hint", | ||
50 | + "pathName": "pages/hint/hint", | ||
51 | + "query": "doctorid=tigeryang" | ||
52 | + }, | ||
53 | + { | ||
54 | + "id": -1, | ||
55 | + "name": "初始化", | ||
56 | + "pathName": "pages/index/index", | ||
57 | + "query": "" | ||
58 | + }, | ||
59 | + { | ||
60 | + "id": -1, | ||
61 | + "name": "注册", | ||
62 | + "pathName": "pages/addrecord/addrecord", | ||
63 | + "query": "" | ||
64 | + }, | ||
65 | + { | ||
66 | + "id": -1, | ||
67 | + "name": "记录", | ||
68 | + "pathName": "pages/record/record", | ||
69 | + "query": "" | ||
70 | + }, | ||
71 | + { | ||
72 | + "id": -1, | ||
73 | + "name": "添加文件", | ||
74 | + "pathName": "pages/addfile/addfile", | ||
75 | + "query": "" | ||
76 | + }, | ||
77 | + { | ||
78 | + "id": -1, | ||
79 | + "name": "添加文件", | ||
80 | + "pathName": "pages/record/record" | ||
81 | + } | ||
82 | + ] | ||
41 | } | 83 | } |
42 | } | 84 | } |
43 | } | 85 | } |
-
请 注册 或 登录 后发表评论