作者 liaolinfeng

change

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/shuhou.iml" filepath="$PROJECT_DIR$/.idea/shuhou.iml" />
</modules>
</component>
</project>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="9d7f73d3-be2f-4094-8ffa-838dba3347a4" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/app.js" beforeDir="false" afterPath="$PROJECT_DIR$/app.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app.json" beforeDir="false" afterPath="$PROJECT_DIR$/app.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/app.wxss" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/aboutme/aboutme.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/aboutme/aboutme.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/addfile/addfile.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addfile/addfile.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/addfile/addfile.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addfile/addfile.wxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/addrecord/addrecord.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addrecord/addrecord.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/addrecord/addrecord.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addrecord/addrecord.wxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/addrecord/addrecord.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/pages/addrecord/addrecord.wxss" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/agreement/agreement.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/agreement/agreement.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/article/article.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/article/article.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/article_detail/article_detail.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/article_detail/article_detail.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/editfile/editfile.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/editfile/editfile.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/editfile/editfile.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/editfile/editfile.wxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/editrecord/editrecord.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/editrecord/editrecord.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/editrecord/editrecord.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/editrecord/editrecord.wxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/file_choose/file_choose.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/file_choose/file_choose.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/file_manage/file_manage.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/file_manage/file_manage.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/index/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/index/index.json" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/index/index.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.wxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/introduce/introduce.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/introduce/introduce.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/introduce/introduce.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/introduce/introduce.wxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/map/map.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/map/map.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/mold/mold.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/mold/mold.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/my/my.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/my/my.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/normal/normal.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/normal/normal.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/opinion/opinion.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/opinion/opinion.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/record/record.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/record/record.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/record/record.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/record/record.wxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/record/record.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/pages/record/record.wxss" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/start/start.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/start/start.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/start/start.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/start/start.wxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/project.config.json" beforeDir="false" afterPath="$PROJECT_DIR$/project.config.json" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
<ignored path="$PROJECT_DIR$/tmp/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="aboutme.wxml" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.wxml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="5" column="7" lean-forward="true" selection-start-line="5" selection-start-column="7" selection-end-line="5" selection-end-column="7" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="aboutme.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="509">
<caret line="97" column="54" lean-forward="true" selection-start-line="97" selection-start-column="54" selection-end-line="97" selection-end-column="54" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>术后小程序</find>
<find>path: '/pages/start/start'</find>
</findStrings>
<replaceStrings>
<replace>健康</replace>
<replace>健康随访助手</replace>
<replace>path: '/pages/start/start?doctorid=' + app.globalData.doctorid</replace>
</replaceStrings>
<dirStrings>
<dir>C:\Users\LIAO\Desktop\shuhou</dir>
</dirStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/pages/aboutme/aboutme.js" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodePackageJsonFileManager">
<packageJsonPaths />
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="1042" />
<option name="width" value="660" />
<option name="height" value="1000" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="shuhou" type="b2602c69:ProjectViewProjectNode" />
<item name="shuhou" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="shuhou" type="b2602c69:ProjectViewProjectNode" />
<item name="shuhou" type="462c0819:PsiDirectoryNode" />
<item name="pages" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="E:/project/振威网站" />
<property name="node.js.detected.package.prettier" value="true" />
<property name="node.js.path.for.package.prettier" value="project" />
<property name="node.js.selected.package.prettier" value="" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="9d7f73d3-be2f-4094-8ffa-838dba3347a4" name="Default" comment="" />
<created>1543310242198</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1543310242198</updated>
<workItem from="1543310245658" duration="202000" />
<workItem from="1543468663935" duration="392000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="594000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1696" height="1026" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24969843" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Version Control" order="7" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Terminal" order="7" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.wxml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="5" column="7" lean-forward="true" selection-start-line="5" selection-start-column="7" selection-end-line="5" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.js">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.wxml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="5" column="7" lean-forward="true" selection-start-line="5" selection-start-column="7" selection-end-line="5" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pages/aboutme/aboutme.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="509">
<caret line="97" column="54" lean-forward="true" selection-start-line="97" selection-start-column="54" selection-end-line="97" selection-end-column="54" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
... ...
... ... @@ -17,11 +17,9 @@ App({
wx.setStorageSync('openid', res.openid);
wx.setStorageSync('session_key', res.session_key);
//记录小程序打开次数
that.setStatisticsOpenTimes(res.openid)
// 调用sendSession方法,将session_key以参数形式传入
that.aldstat.sendSession(res.session_key);
// 调用sendOpenid方法,将openid以参数形式传入
that.aldstat.sendOpenid(res.openid);
}).catch((errMsg) => {
console.log(errMsg)
})
... ... @@ -40,14 +38,15 @@ App({
* @return {Promise} promise 返回promise供后续操作
*/
post: function (url, data, headerParams) {
wx.showNavigationBarLoading()
wx.showLoading({
title: '加载中',
})
// wx.showNavigationBarLoading()
// wx.showLoading({
// title: '加载中',
// })
var promise = new Promise((resolve, reject) => {
let that = this;
let postData = data;
let baseUrl = 'https://shuhou.superkangaroo.net/api/wxapp/';
// let baseUrl = 'http://postoperative.w.bronet.cn/api/wxapp/';//测试域名
//网络请求
let header = {
'content-type': 'application/x-www-form-urlencoded'
... ... @@ -59,6 +58,7 @@ App({
method: 'POST',
header: header,
success: function (res) {//返回取得的数据
console.log(res.data.data)
if (res.data.code == '20000') {
resolve(res.data.data);
} else if (res.data.code == '40001') {//返回错误提示信息
... ... @@ -86,8 +86,7 @@ App({
} else if (res.data.code == '40006'){
}
else {
}else {
wx.showModal({
title: '提示',
content: res.data.msg,
... ... @@ -95,18 +94,18 @@ App({
})
reject(res.data)
}
setTimeout(function () {
wx.hideLoading()
wx.hideNavigationBarLoading()
}, 500)
// wx.hideLoading()
// wx.hideNavigationBarLoading()
},
error: function (e) {
console.log(e)
reject('网络出错');
// wx.hideLoading()
wx.hideNavigationBarLoading()
// wx.hideNavigationBarLoading()
}
})
});
return promise;
},
... ... @@ -154,7 +153,7 @@ App({
that.post(url, params ).then((res) => {
let url = 'index/setStatisticsVisitorLog';
let params = {
'doctor_id': that.globalData.doctorid,
'doctor_id': that.globalData.doctor_id,
'page': page,
'openid': res.openid
}
... ... @@ -172,6 +171,8 @@ App({
globalData: {
userInfo: '',
doctorid: 0,//字符串id,用于获取医生详情
doctor_id: 0//本小程序中使用的id
doctor_id: 0,//本小程序中使用的id
is_register:0,//是否注册过,
is_bind_doctor_id:0//是否绑定医生id
}
})
\ No newline at end of file
... ...
{
"pages": [
"pages/start/start",
"pages/index/index",
"pages/aboutme/aboutme",
"pages/addrecord/addrecord",
"pages/addfile/addfile",
"pages/introduce/introduce",
"pages/my/my",
"pages/opinion/opinion",
"pages/record/record",
"pages/normal/normal",
"pages/file_manage/file_manage",
"pages/article/article",
"pages/mold/mold",
"pages/line/line",
"pages/article_detail/article_detail",
"pages/ence_push/ence_push",
"pages/map/map",
"pages/editfile/editfile",
"pages/editrecord/editrecord",
"pages/agreement/agreement",
"pages/file_choose/file_choose"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#3AA0EA",
"navigationBarTitleText": "术后小程序",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
},
"tabBar": {
"color": "#A1A1A1",
"selectedColor": "#1CB9FA",
"list": [
{
"pagePath": "pages/index/index",
"text": "血项测评",
"iconPath": "img/x2.png",
"selectedIconPath": "img/x1.png"
},
{
"pagePath": "pages/my/my",
"text": "我的",
"iconPath": "img/w2.png",
"selectedIconPath": "img/w1.png"
}
]
}
"pages": [
"pages/start/start",
"pages/index/index",
"pages/aboutme/aboutme",
"pages/addrecord/addrecord",
"pages/addfile/addfile",
"pages/introduce/introduce",
"pages/my/my",
"pages/opinion/opinion",
"pages/record/record",
"pages/normal/normal",
"pages/file_manage/file_manage",
"pages/article/article",
"pages/mold/mold",
"pages/line/line",
"pages/article_detail/article_detail",
"pages/ence_push/ence_push",
"pages/map/map",
"pages/editfile/editfile",
"pages/editrecord/editrecord",
"pages/agreement/agreement",
"pages/file_choose/file_choose",
"pages/test/test",
"pages/hint/hint"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#3AA0EA",
"navigationBarTitleText": "健康随访助手",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
},
"tabBar": {
"color": "#A1A1A1",
"selectedColor": "#1CB9FA",
"list": [
{
"pagePath": "pages/index/index",
"text": "记录",
"iconPath": "img/jl2@2x.png",
"selectedIconPath": "img/jl1@2x.png"
},
{
"pagePath": "pages/my/my",
"text": "我的",
"iconPath": "img/w2.png",
"selectedIconPath": "img/w1.png"
}
]
}
}
\ No newline at end of file
... ...
... ... @@ -35,6 +35,9 @@
font-size: 15px;
color: #ccc;
}
.other-navigator-hover{
background: none;
}
@font-face {font-family: "iconfont";
src: url('//at.alicdn.com/t/font_873289_cq7godatqkt.eot?t=1539597789388'); /* IE9*/
src: url('//at.alicdn.com/t/font_873289_cq7godatqkt.eot?t=1539597789388#iefix') format('embedded-opentype'), /* IE6-IE8 */
... ...
... ... @@ -80,7 +80,35 @@ let that=this;
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
}
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -246,7 +246,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
}
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
<!--pages/addfile/addfile.wxml-->
<view class='top_tip'>
为了给您提供更准确的化疗后追踪服务,请务必如实填写以下资料
为了给您提供更准确的健康随访服务,请务必如实填写以下资料
</view>
<view class='record_main addfile_top'>
<view class='input_box'>
... ... @@ -80,7 +80,7 @@
</view>
<cover-view class='btn addfile_btn' bindtap='addFiles'>保存 并开始记录</cover-view>
<view class='btn addfile_btn' bindtap='addFiles'>保存 并开始记录</view>
</view>
\ No newline at end of file
... ...
/* pages/addfile/addfile.wxss */
@import '/pages/addrecord/addrecord.wxss';
.btn
.addfile_top{
margin-top: 40rpx;
}
... ...
... ... @@ -387,7 +387,35 @@ app.post(url,params,header).then((res)=>{
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
}
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
<!--pages/addrecord/addrecord.wxml-->
<view class='top_tip'>
为了给您提供更准确的化疗后血项测评服务,请务必如实填写以下资料
为了给您提供更准确的健康随访服务,请务必如实填写以下资料
</view>
<view class='user_name' bindtap='goaddfile'>
用户:{{patient}}
... ... @@ -14,7 +14,7 @@
</view>
</view>
<picker mode="date" value="{{date}}" end="{{enddate}}" bindchange="bindDateChange">
<picker mode="date" value="{{date}}" bindchange="bindDateChange">
<view class='input_box'>
<view>停药日期:</view>
<view class="input_cell">{{date}}</view>
... ... @@ -57,13 +57,13 @@
</view>
</view>
<view class='upimgbox'>
<view><textarea placeholder='特殊情况请给医生留言并上传照片。' placeholder-style='text_class' bindinput='setremarks'></textarea> </view>
<view class='textareabox'><textarea placeholder='特殊情况请给医生留言并上传照片。' placeholder-style='text_class' bindinput='setremarks'></textarea> </view>
<view class='upitem'>
<view class='upbox' wx:for='{{upimg}}' wx:key>
<view class='up_colse' bindtap='del_upimg' data-index='{{index}}'>
<image src='../../img/colse.png'></image>
</view>
<image bindtap="imgYu" data-list="{{upimg}}" src="{{item}}"></image>
<image bindtap="imgYu" data-list="{{upimg}}" src='{{item}}' data-src="{{item}}"></image>
</view>
<view class='upbox' bindtap='uploadImages' wx:if="{{upimg.length<8}}">
<image src='../../img/noimg.png'></image>
... ... @@ -72,6 +72,6 @@
</view>
</view>
</view>
<form bindsubmit="formSubmit" report-submit='true' >
<cover-view class='bt_bg'><button formType="submit" class='btn'> 保 存</button></cover-view>
<form bindsubmit="formSubmit" report-submit='true' class='bt_bg'>
<button formType="submit" class='btn '> 保 存</button>
</form>
... ...
... ... @@ -61,9 +61,9 @@ page{
}
.upimgbox{
margin: 30rpx 0 20rpx 0;
border:1rpx solid #e5e5e5;
border-radius: 5rpx;
padding:30rpx 30rpx 40rpx 30rpx;
padding:30rpx 0 40rpx 0;
color:#999;
font-size:34rpx;
}
... ... @@ -175,3 +175,9 @@ color:#fff;
background-color:#3AA0EA;
}
.textareabox{
height: 165rpx;
border: 1rpx solid #D8D8D8;
border-radius: 8rpx;
padding:20rpx 24rpx;
}
\ No newline at end of file
... ...
... ... @@ -77,7 +77,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -124,8 +124,36 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
},
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -4,7 +4,6 @@ const Page = require('../../utils/ald-stat.js').Page;
const app=getApp();
var wxParse = require('../../wxParse/wxParse.js')
Page({
/**
* 页面的初始数据
*/
... ... @@ -85,7 +84,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
}
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -257,7 +257,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
<!--pages/editfile/editfile.wxml-->
<view class='top_tip'>
为了给您提供更准确的化疗后追踪服务,请务必如实填写以下资料
为了给您提供更准确的健康随访服务,请务必如实填写以下资料
</view>
<view class='record_main addfile_top'>
<view class='input_box'>
... ...
... ... @@ -23,6 +23,7 @@ Page({
upimg: []
},
imgYu: function (event) {
console.log(event);
var src = event.currentTarget.dataset.src;//获取data-src
var imgList = event.currentTarget.dataset.list;//获取data-list
//图片预览
... ... @@ -349,7 +350,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
<!--pages/editrecord/editrecord.wxml-->
<!--pages/addrecord/addrecord.wxml-->
<view class='top_tip'>
为了给您提供更准确的化疗后血项测评服务,请务必如实填写以下资料
为了给您提供更准确的健康随访服务,请务必如实填写以下资料
</view>
<view class='user_name' bindtap='goaddfile'>
用户:{{patient}}
... ... @@ -14,7 +14,7 @@
<input type='text' placeholder='请输入用药' bindinput='setdrug' placeholder-class='drug_input_pla' value='{{drug}}'></input>
</view>
</view>
<picker mode="date" value="{{date}}" end='{{enddate}}' bindchange="bindDateChange">
<picker mode="date" value="{{date}}" bindchange="bindDateChange">
<view class='input_box'>
<view>停药日期:</view>
<view class="input_cell">{{date}}</view>
... ... @@ -46,13 +46,13 @@
<input placeholder='0-1000' type='digit' placeholder-class='placeholderStyle' bindinput='setplatelet' value='{{platelet}}'></input><div class='cell_txt'>*10⁹/L</div></view>
</view>
<view class='upimgbox'>
<view><textarea placeholder='特殊情况请给医生留言并上传照片。' placeholder-style='text_class' bindinput='setremarks' value='{{remarks}}'></textarea></view>
<view class='textareabox'><textarea placeholder='特殊情况请给医生留言并上传照片。' placeholder-style='text_class' bindinput='setremarks' value='{{remarks}}'></textarea></view>
<view class='upitem' >
<view class='upbox' wx:for='{{upimg}}' wx:key>
<view class='up_colse' bindtap='del_upimg' data-index='{{index}}'>
<image src='../../img/colse.png'></image>
</view>
<image bindtap="imgYu" data-list="{{upimg}}" src="{{item}}"></image>
<image bindtap="imgYu" data-list="{{upimg}}" src='{{item}}' data-src="{{item}}"></image>
</view>
<view class='upbox' bindtap='uploadImages' wx:if="{{upimg.length<8}}">
<image src='../../img/noimg.png'></image>
... ... @@ -61,8 +61,8 @@
</view>
</view>
</view>
<form bindsubmit="formSubmit" report-submit='true' >
<cover-view class='bt_bg'><button formType="submit" class='btn'> 保 存</button></cover-view>
<form bindsubmit="formSubmit" report-submit='true' class='bt_bg'>
<button formType="submit" class='btn'> 保 存</button>
</form>
... ...
... ... @@ -176,7 +176,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -167,7 +167,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
}
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
// pages/hint/hint.js
Page({
/**
* 页面的初始数据
*/
data: {
},
//点击关注公号
handleContact(e) {
console.log(e.path)
console.log(e.query)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
{}
\ No newline at end of file
... ...
<!--pages/hint/hint.wxml-->
<view class='hint_txt'>点击<text class='blue'>继续</text>按钮</view>
<view class='hint_subtxt'>对话框输入数字<text class='numbox'>1</text>关注公众号</view>
<button class='btn' open-type="contact" bindcontact="handleContact">继续</button>
... ...
/* pages/hint/hint.wxss */
.hint_txt{
color:#333333;
font-size: 32rpx;
font-weight: bold;
text-align: center;
margin: 170rpx auto 20rpx auto;
}
.blue{
color:#4FA1EB;
}
.hint_subtxt{
color:#333;
font-size:28rpx;
text-align:center;
font-weight: bold;
margin: 0 auto 137rpx auto;
}
.numbox{
display: inline-block;
background: #4FA1EB;
width:56rpx;
height: 56rpx;
border-radius: 50%;
margin: 0 18rpx;
color:#fff;
font-size:44rpx;
font-weight: bold;
text-align: center;
line-height: 56rpx;
}
.btn{
display: flex;
align-items: center;
justify-content: center;
background: #4FA1EB;
border-radius: 4rpx;
width:560rpx;
height: 90rpx;
font-size:28rpx;
font-weight: bold;
color:#fff;
}
.btn:active{
opacity: 0.7;
}
\ No newline at end of file
... ...
... ... @@ -13,10 +13,11 @@ Page({
showfilesLog: false, //是否显示最新记录(没有记录不显示)
showdoc_adv:true,
articlelist:[],
newdate:'',//当前年月日
filesLogdata: '', //档案数量
doctorinfo: [], //医生信息
fileslog: {}, //最新记录
hasToken: false
hasToken: false
},
goaddrecord(files_id, patient) {
wx.navigateTo({
... ... @@ -66,7 +67,30 @@ Page({
}
},
addrecord(e){
this.goaddrecord(e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient);
let that=this;
if (that.data.newdate == that.data.fileslog.create_time){
wx.showModal({
title: '提示',
content: '您已提交今日的检查纪录,如提交有误可进行修改',
showCancel: true,
cancelText: '取消',
confirmText: '查看记录',
success: function(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/record/record?showrecord=2&files_id=' +
that.data.fileslog.files_id,
})
} else if (res.cancel) {
console.log('用户点击取消')
}
},
fail: function(res) {},
complete: function(res) {},
})
}else{
that.goaddrecord(e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient);
}
},
gofile_manage(files_id) {
wx.navigateTo({
... ... @@ -82,50 +106,52 @@ Page({
complete: function(res) {},
})
},
//判断是否有医生id和是否登陆
ifdoctorid(openid) {
let that = this;
let url = 'public/checkOpenid';
let params = {
openid:openid
}
app.post(url, params).then((res) => {
wx.setStorageSync('token', res.token);
that.getRecommendArticleList(openid, res.doctor_id);
if (res.doctor_id == 0) { //没有关联医生
if (app.globalData.doctorid == 0) { //没有传过来的doctorid
// //判断是否有医生id和是否登陆
// ifdoctorid(openid) {
// let that = this;
// let url = 'public/checkOpenid';
// let params = {
// openid:openid
// }
// app.post(url, params).then((res) => {
// wx.setStorageSync('token', res.token);
//
// if (res.doctor_id == 0) { //没有关联医生
// if (app.globalData.doctorid == 0) { //没有传过来的doctorid
// that.setData({
// showdoctor: false
// })
// } else {
// that.setData({
// showdoctor: true
// })
} else {
that.setData({
showdoctor: true
})
that.getDoctorInfo(app.globalData.doctorid);
that.bindDoctor(openid,app.globalData.doctorid);
}
} else { //有关联医生获取医生详情
that.setData({
showdoctor: true
})
app.globalData.doctor_id = res.doctor_id;
app.globalData.doctorid = res.doctorid;
that.getDoctorInfo(res.doctorid);
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//绑定医生
bindDoctor(openid, doctorid) {
let that = this;
let url = 'public/bindDoctor';
let params = {
openid: openid,
doctorid: doctorid
}
app.post(url, params).then((res) => {}).catch((errMsg) => {
console.log(errMsg)
})
},
// that.bindDoctor(openid,app.globalData.doctorid);
// }
// } else { //有关联医生获取医生详情
// that.setData({
// showdoctor: true
// })
// app.globalData.doctor_id = res.doctor_id;
// app.globalData.doctorid = res.doctorid;
// that.getDoctorInfo(res.doctorid);
// }
// }).catch((errMsg) => {
// console.log(errMsg)
// })
// },
// //绑定医生
// bindDoctor(openid, doctorid) {
// let that = this;
// let url = 'public/bindDoctor';
// let params = {
// openid: openid,
// doctorid: doctorid
// }
// app.post(url, params).then((res) => {}).catch((errMsg) => {
// console.log(errMsg)
// })
// },
//获取医生详情,医生ID有两个用处不同
getDoctorInfo(doctorid) {
let that = this;
... ... @@ -138,8 +164,8 @@ Page({
res.avatar = '../../img/no_puimg.png'
}
that.setData({
doctorinfo: res,
showdoctor: true
showdoctor: true,
doctorinfo: res
})
}).catch((errMsg) => {
console.log(errMsg)
... ... @@ -167,7 +193,6 @@ Page({
console.log(errMsg)
})
},
//到添加患者界面
goaddfile() {
wx.navigateTo({
... ... @@ -221,6 +246,7 @@ Page({
filesLogdata: res,
show_notest: false
})
that.getLastFilesLog(openid);//档案数不为0获取最新档案
}
}).catch((errMsg) => {
console.log(errMsg)
... ... @@ -228,7 +254,7 @@ Page({
},
//授权
getopwer(e) {
console.log(e)
let that = this;
if (e.detail.encryptedData){
wx.login({
... ... @@ -238,20 +264,14 @@ Page({
code: res.code,
encrypted_data: e.detail.encryptedData,
iv: e.detail.iv,
doctorid: app.globalData.doctorid
doctor_id: app.globalData.doctor_id
}
app.post(url, params).then((res) => {
wx.setStorageSync('token', res.token);
that.setData({
hasToken: true
})
// if (e.currentTarget.dataset.tag == '1') {
that.goaddfile();
// } else if (e.currentTarget.dataset.tag == '2') {
// that.gofile_manage(e.currentTarget.dataset.files_id);
// } else if (e.currentTarget.dataset.tag == '3') {
// that.goaddrecord(e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient);
// }
}).catch((errMsg) => {
console.log(errMsg)
})
... ... @@ -263,31 +283,34 @@ Page({
icon:'none'
})
}
// if (wx.getStorageSync('token') == undefined || wx.getStorageSync('token') == ''){
// }else{
// if (e.currentTarget.dataset.tag == '1') {
// that.goaddfile();
// } else if (e.currentTarget.dataset.tag == '2') {
// that.gofile_manage(e.currentTarget.dataset.files_id);
// } else if (e.currentTarget.dataset.tag == '3') {
// that.goaddrecord(e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient);
// }
// }
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
// var openid = wx.getStorageSync('openid');
let that=this;
let token = wx.getStorageSync('token');
let dateobj = app.dateLater(0);
that.setData({
newdate: dateobj.dataday
})
// 判断是否授权设置授权权限
if(token){
this.setData({
hasToken: true
})
}
//判断是否有要显示医生信息
if (app.globalData.doctorid==0){
that.setData({
showdoctor:false
})
}else{
that.getDoctorInfo(app.globalData.doctorid);
}
app.setStatisticsVisitorLog('/pages/index/index'); //统计打开界面数量
},
/**
* 生命周期函数--监听页面初次渲染完成
... ... @@ -300,10 +323,10 @@ Page({
let that = this;
var openid = wx.getStorageSync('openid');
let token = wx.getStorageSync('token');
this.ifdoctorid(openid); //判断是否有医生ID
that.getRecommendArticleList(wx.getStorageSync('openid'), app.globalData.doctor_id);
this.getFilesNumber(openid); //获取档案数量
this.getLastFilesLog(openid);
app.setStatisticsVisitorLog('/pages/index/index'); //统计打开界面数量
},
/**
... ... @@ -336,7 +359,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
{"navigationBarTitleText": "化疗后血项测评"}
\ No newline at end of file
{"navigationBarTitleText": "健康随访助手"}
\ No newline at end of file
... ...
... ... @@ -16,13 +16,13 @@
<view class='index_test' wx:if='{{show_notest}}'>
<view class='test_frist'>
<view class='dot'></view>
记录血项测评结果,并获得专家建议和正确医学科普知识。
记录检查结果,并获得专家建议和医学科普知识
<view class='button_box' >
<view class='jia_box' wx:if='{{hasToken}}' bindtap='goaddfile'>
<view class='iconfont icon-jia'></view>
</view>
<button open-type="getUserInfo" wx:else class='jia_box' bindgetuserinfo='getopwer' data-tag='1'><view class='iconfont icon-jia'></view></button>
<view class='jia_txt'>添加血项检测记录</view>
<button open-type="getUserInfo" wx:else class='jia_box' bindgetuserinfo='getopwer' data-tag='1'><view class='iconfont icon-jia'></view></button>
<view class='jia_txt'>添加记录</view>
</view>
</view>
</view>
... ... @@ -37,7 +37,7 @@
<view class='two_item'>
<view>
最近添加记录:
<text class='time_txt'>{{fileslog.create_time}}</text>
<text class='time_txt'>{{fileslog.test_time}}</text>
</view>
</view>
<view class='two_item_box' wx:if='{{showfilesLog}}'>
... ... @@ -95,9 +95,9 @@
</view>
</view>
<view class='notest' wx:else>暂无记录</view>
<view class='two_item' wx:if='{{fileslog.doctor_reply != null}}'>
<view class='two_item' wx:if='{{fileslog.doctor_reply.length != 0}}'>
<view>医生建议:</view>
<view class='two_item_content'>{{fileslog.doctor_reply == null ? '等待医生回复':fileslog.doctor_reply}}</view>
<view class='two_item_content'>{{fileslog.doctor_reply.length == 0 ? '等待医生回复':fileslog.doctor_reply}}</view>
</view>
<!-- 授权判断 -->
... ... @@ -114,18 +114,16 @@
<view class='jia_box two_jiabox'>
<view class='iconfont icon-jia'></view>
</view>
<view>添加血项检测记录</view>
<view>添加记录</view>
</view>
<view class='two_item_yuan_box' bindtap='gorecord' data-showrecord='2' data-files_id='{{fileslog.files_id}}' data-patient='{{fileslog.patient}}'>
<view class='two_item_yuan'>
<image src='../../img/bq.png'></image>
</view>
<view>病情记录</view>
<view>历史记录</view>
</view>
</view>
</view>
</view>
... ...
... ... @@ -29,11 +29,7 @@ Page({
console.log(errMsg)
})
},
//点击关注公号
handleContact(e){
console.log(e.path)
console.log(e.query)
},
//拨打电话
tel(){
wx.makePhoneCall({
... ... @@ -105,7 +101,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
}
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -10,7 +10,7 @@
<view>{{doctorinfo.hospital_name}}</view>
</view>
</view>
<button class='intr_tip' open-type="contact" bindcontact="handleContact">关注公众号</button>
<navigator class='intr_tip' url='/pages/hint/hint' hover-class="other-navigator-hover">关注公众号</navigator>
</view>
<view class='intr_item'>
<!-- <view class='intr_c_title'>擅长疾病</view> -->
... ...
... ... @@ -88,7 +88,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
}
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -62,7 +62,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -158,9 +158,9 @@ Page({
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '术后小程序', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start', // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl:'/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
... ... @@ -178,9 +178,9 @@ Page({
}
}   // 来自页面内的按钮的转发
if (options.from == 'button') {
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
// shareObj.path = '/pages/start/start?status=' + options.target.dataset.status
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
... ...
... ... @@ -80,7 +80,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -103,7 +103,35 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
}
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -20,17 +20,48 @@ Page({
current_page: 1, //页码
per_page: 2, //每页病情记录的条数
last_page:null,//最后一页
line_rows: 10, //每页趋势图的个数
tab:1,//1表示白细胞计数,2表示中粒细胞计数,3血红蛋白,4血小板
FilesLogList: []
FilesLogList: [],
current_week:0,//0为当前周,下一周加1,上一周减1
current_date:'',
showline:true//true为有数据,flase为没有数据
},
//上一周
preweek(){
console.log('上一周');
let that=this;
that.setData({
current_week: that.data.current_week-1
})
that.getFilesLogLine();
},
//下一周
nxetweek(){
console.log('下一周')
let that = this;
that.setData({
current_week: that.data.current_week+1
})
that.getFilesLogLine();
},
settab(e){
console.log(e);
let that=this;
that.setData({
tab:e.currentTarget.dataset.tab
tab: parseInt(e.currentTarget.dataset.tab)
})
that.getFilesLogLine();
if (that.data.categories.length>0){
if (that.data.tab == 1) {
that.lineShowwhite(that.data.series.white_blood_cell);
} else if (that.data.tab == 2) {
that.lineShowneutrophils(that.data.series.neutrophils);
} else if (that.data.tab == 3) {
that.lineShowhemoglobin(that.data.series.hemoglobin);
} else if (that.data.tab == 4) {
that.lineShowplatelet(that.data.series.platelet);
}
}
},
//切换显示记录于趋势图
setshowrecord() {
... ... @@ -39,7 +70,7 @@ Page({
showrecord: !this.data.showrecord
})
if (this.data.showrecord){
that.getFilesLogLine();
// that.getFilesLogLine();
}
},
wxChartData() {
... ... @@ -99,7 +130,7 @@ Page({
});
},
//血红蛋白
lineShowhemoglobin() {
lineShowhemoglobin(hemoglobin) {
let that=this;
let cate = this.data.categories;
... ... @@ -111,7 +142,7 @@ Page({
series: [{
name: '血红蛋白',
data: that.data.series.hemoglobin,
data: hemoglobin,
format: function (val, name) { //点击显示的数据注释
return val + 'g/L';
}
... ... @@ -127,7 +158,7 @@ Page({
});
},
//白细胞
lineShowwhite() {
lineShowwhite(white_blood_cell) {
let that = this;
let cate = this.data.categories;
lineChartwhite = new wxCharts({
... ... @@ -137,7 +168,7 @@ Page({
animation: true, //是否开启动画
series: [{
name: '白细胞',
data: that.data.series.white_blood_cell,
data: white_blood_cell,
format: function (val, name) { //点击显示的数据注释
return val + '*10^9/L';
}
... ... @@ -153,7 +184,7 @@ Page({
});
},
//中粒细胞
lineShowneutrophils() {
lineShowneutrophils(neutrophils) {
let that = this;
let cate = this.data.categories;
console.log(cate)
... ... @@ -164,7 +195,7 @@ Page({
animation: true, //是否开启动画
series: [{
name: '中性粒细胞',
data: that.data.series.neutrophils,
data: neutrophils,
format: function (val, name) { //点击显示的数据注释
return val + '*10^9/L';
}
... ... @@ -180,7 +211,7 @@ Page({
});
},
//血小板
lineShowplatelet() {
lineShowplatelet(hemoglobin) {
let that = this;
let cate = this.data.categories;
console.log(cate)
... ... @@ -191,7 +222,7 @@ Page({
animation: true, //是否开启动画
series: [{
name: '血小板',
data: that.data.series.hemoglobin,
data: hemoglobin,
format: function (val, name) { //点击显示的数据注释
return val + '*10^9/L';
}
... ... @@ -315,18 +346,30 @@ Page({
}
let url = 'user/getFilesLogLine';
let params = {
files_id: that.data.files_id,
list_rows: that.data.line_rows
files_id: that.data.files_id,
current_week: that.data.current_week
}
app.post(url, params, header).then((res) => {
that.setData({
series: res.series,
categories: res.categories
categories: res.categories,
current_date: res.current_date
})
that.lineShowhemoglobin();
that.lineShowwhite();
that.lineShowneutrophils();
that.lineShowplatelet();
if (res.categories.length>0){
that.setData({
showline:true
})
that.lineShowhemoglobin(res.series.hemoglobin);
that.lineShowwhite(res.series.white_blood_cell);
that.lineShowneutrophils(res.series.neutrophils);
that.lineShowplatelet(res.series.platelet);
}else{
that.setData({
showline: false
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
... ... @@ -409,8 +452,36 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '健康随访助手', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '/pages/shareimg/share.png',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (option.from == 'button') {
// 此处可以修改 shareObj 中的内容
shareObj.imageUrl = '/pages/shareimg/share.png'
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
<!--pages/record/record.wxml-->
<!-- <cover-view class='record_tab'>
<cover-view class='record_tab'>
<cover-view class="record_left border_left {{showrecord?' active':''}}" bindtap='setshowrecord'>趋势图</cover-view>
<cover-view class="record_left {{showrecord?'':'active'}}" bindtap='setshowrecord'>病情记录</cover-view>
</cover-view> -->
<cover-view class="record_left {{showrecord?'':'active'}}" bindtap='setshowrecord'>历史记录</cover-view>
</cover-view>
<view class='container_box' wx:if='{{showrecord}}'>
<view class="container">
<view class='container_top'>
<view class='top_left' style=" background-image:url('../../img/pre.png')"></view>
<view>6月7日-6月13日</view>
<view class='top_rigth' style=" background-image:url('../../img/next.png')"></view>
<view class='top_left' bindtap='preweek'><image src='../../img/pre.png'></image></view>
<view>{{current_date}}</view>
<view class='top_rigth' bindtap='nxetweek'><image src='../../img/next.png'></image></view>
</view>
<view class='container_contertab'>
<view class="contertab {{tab==1?'contertab_active':''}}" data-tab='1' bindtap='settab'>白细胞计数</view>
... ... @@ -19,7 +17,7 @@
<view class="contertab {{tab==3?'contertab_active':''}}" data-tab='3' bindtap='settab'>血红蛋白</view>
<view class="contertab {{tab==4?'contertab_active':''}}" data-tab='4' bindtap='settab'>血小板</view>
</view>
<view class='tab_content'>
<view class='tab_content' wx:if='{{showline}}'>
<!-- 白细胞 -->
<view wx:if='{{tab==1}}'>
<canvas class="canvas" canvas-id="lineCanvaswhite" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerwhite"></canvas>
... ... @@ -37,13 +35,14 @@
<canvas class="canvas" canvas-id="lineCanvasplatelet" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerplatelet"></canvas>
</view>
</view>
<view wx:else class='nodata'>暂无相关数据</view>
</view>
</view>
<!-- 病情记录 -->
<scroll-view class='file_plan' wx:else scroll-y bindscrolltolower='scrollbottom'>
<view class='plan_item1' wx:for='{{FilesLogList}}' wx:key>
<view class='title_box'>
<view>{{item.create_time}}</view>
<view>{{item.test_time}}</view>
<view class='title_img' bindtap='goeditfile' data-id='{{item.id}}'>
<image src='../../img/edit.png'></image>
</view>
... ... @@ -100,9 +99,9 @@
<view class="two_item_rigth">
<text class='two_num'>{{item.more.platelet}}</text>*10^9/L</view>
</view>
<view class='two_item' wx:if='{{item.doctor_reply != null}}'>
<view class='two_item' wx:if='{{item.doctor_reply.length != 0}}'>
<view>医生建议:</view>
<view class='two_item_content'>{{item.doctor_reply == null ? '等待医生回复':item.doctor_reply}}</view>
<view class='two_item_content'>{{item.doctor_reply.length == 0 ? '等待医生回复':item.doctor_reply}}</view>
</view>
</view>
<view class='addnomore' wx:if='{{shownomore}}'>——没有更多数据了——</view>
... ...
... ... @@ -158,17 +158,19 @@ z-index:100;
width:120rpx;
height: 44rpx;
border-radius: 5rpx;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
overflow: hidden;
}
.top_rigth{
width:120rpx;
height: 44rpx;
border-radius: 5rpx;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
overflow: hidden;
}
.top_rigth image,.top_left image{
display: block;
width:100%;
height: 100%;
}
.container_contertab{
margin: 30rpx 30rpx;
... ... @@ -211,4 +213,9 @@ justify-content: space-around;
content: '';
background: #fff;
opacity: 0;
}
.nodata{
margin: 150rpx 0 0 0;
text-align: center;
}
\ No newline at end of file
... ...
... ... @@ -8,19 +8,27 @@ Page({
* 页面的初始数据
*/
data: {
listdata:[]
listdata:''
},
//启动页
getWelcomeInfo(){
getWelcomeInfo(openid){
let that=this;
let url ='index/getWelcomeInfo';
let params={
doctorid: app.globalData.doctorid
doctorid: app.globalData.doctorid,
openid: openid
}
app.post(url,params).then((res)=>{
that.setData({
listdata: res
})
//医生的赋值
app.globalData.doctorid = res.doctorid;
app.globalData.doctor_id = res.doctor_id;
//记录小程序打开次数
app.setStatisticsOpenTimes(openid);
wx.setStorageSync('token', res.token);
wx.setStorageSync('userInfo', res.user);
setTimeout(function(){
wx.switchTab({
url: '/pages/index/index',
... ... @@ -40,37 +48,19 @@ Page({
code: res.code
}
app.post(url, params).then((res) => {
that.gettoken(res.openid)
wx.setStorageSync('openid', res.openid)
that.getWelcomeInfo(res.openid);
wx.setStorageSync('openid', res.openid);
}).catch((errMsg) => {
console.log(errMsg)
})
}
})
},
gettoken(openid){
let that = this;
let url = 'public/checkOpenid';
let params = {
openid: openid
}
app.post(url, params).then((res) => {
console.log(res)
wx.setStorageSync('token', res.token);
wx.setStorageSync('userInfo', res.user);
}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this;
console.log(options);
that.getopenid();
if (options.scene != undefined) {
var scene = decodeURIComponent(options.scene);
var doctorid = scene.split("=")[1];
... ... @@ -82,7 +72,7 @@ Page({
if (options.doctorid != undefined) {
app.globalData.doctorid = options.doctorid;
}
that.getWelcomeInfo();
that.getopenid();
},
/**
* 生命周期函数--监听页面初次渲染完成
... ... @@ -94,8 +84,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
... ...
<!--pages/start/start.wxml-->
<view class='start_img'>
<image src='{{listdata.open_picture}}'></image>
<image src='{{listdata.welcome.open_picture}}'></image>
</view>
<view class='bottom_box' >
<view class='st_title'>{{listdata.open_title}}</view>
<view class='st_subtitle'>{{listdata.open_sub_title}}</view>
<view class='bottom_box' wx:if="{{listdata != ''}}" >
<view class='st_title'>{{listdata.welcome.open_title}}</view>
<view class='st_subtitle'>{{listdata.welcome.open_sub_title}}</view>
<!-- <view class='st_subtitle'>你好,我是北京大学人民医院骨肿瘤科 孙馨</view> -->
<view class='rate_box'>
<progress class='rate_item' activeColor='#3AA0EA' backgroundColor='rgba(255,255,255,1)' active percent='100' stroke-width='20'></progress>
... ...
// pages/test/test.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{}
\ No newline at end of file
... ...
<!--pages/test/test.wxml-->
<navigator url='/pages/start/start?doctorid=sunxin' class='test'>医生孙鑫</navigator>
<navigator url='/pages/start/start?doctorid=tigeryang' class='test'>医生杨医生</navigator>
<navigator url='/pages/start/start' class='test'>不带doctorid</navigator>
... ...
/* pages/test/test.wxss */
.test{
height: 100rpx;
line-height: 100rpx;
margin: 20rpx 0;
background: #ccc;
display: flex;
justify-items: center;
justify-content: center;
}
\ No newline at end of file
... ...
... ... @@ -36,13 +36,48 @@
"list": []
},
"miniprogram": {
"current": 0,
"current": 6,
"list": [
{
"id": 0,
"name": "start",
"pathName": "pages/start/start",
"query": "doctorid=tigeryang"
},
{
"id": -1,
"name": "hint",
"pathName": "pages/hint/hint",
"query": "doctorid=tigeryang"
},
{
"id": -1,
"name": "record",
"name": "初始化",
"pathName": "pages/index/index",
"query": ""
},
{
"id": -1,
"name": "注册",
"pathName": "pages/addrecord/addrecord",
"query": ""
},
{
"id": -1,
"name": "记录",
"pathName": "pages/record/record",
"query": "showrecord=1&files_id=84"
"query": ""
},
{
"id": -1,
"name": "添加文件",
"pathName": "pages/addfile/addfile",
"query": ""
},
{
"id": -1,
"name": "添加文件",
"pathName": "pages/record/record"
}
]
}
... ...