作者 liaolinfeng

Merge branch 'master' of http://114.215.101.231:8099/miniprogram/shuhou into Branch_liao

# Conflicts:
#	pages/record/record.wxss
... ... @@ -43,7 +43,7 @@ App({
wx.showNavigationBarLoading()
wx.showLoading({
title: '加载中',
})
})
var promise = new Promise((resolve, reject) => {
let that = this;
let postData = data;
... ... @@ -151,7 +151,7 @@ App({
let params = {
code: res.code
}
that.post(url, params).then((res) => {
that.post(url, params ).then((res) => {
let url = 'index/setStatisticsVisitorLog';
let params = {
'doctor_id': that.globalData.doctorid,
... ...
{
"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"
],
"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"
],
"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"
}
]
}
}
\ No newline at end of file
... ...
... ... @@ -27,6 +27,14 @@
.wxParse-img{
width:100% !important;
}
.nodata{
width: 100%;
height: 60px;
line-height: 60px;
text-align: center;
font-size: 15px;
color: #ccc;
}
@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 */
... ...

2.1 KB | 宽: | 高:

20.8 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

1.9 KB | 宽: | 高:

21.8 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

2.6 KB | 宽: | 高:

23.4 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

2.3 KB | 宽: | 高:

22.7 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖
... ... @@ -78,7 +78,7 @@ Page({
uploadImages() {
let that = this;
wx.chooseImage({
count: 9 - that.data.upimg.length ,
count: 8 - that.data.upimg.length ,
sizeType: ['original', 'compressed'],
success: function (res) {
let successUp = 0; //成功个数
... ... @@ -116,10 +116,13 @@ Page({
wx.hideNavigationBarLoading();
wx.hideLoading();
let upimg = that.data.upimg;
upimg.push(temdata.data.url);
that.setData({
upimg: upimg
})
if(upimg.length<8){
upimg.push(temdata.data.url);
that.setData({
upimg: upimg
})
}
},
fail: function (res) {
wx.hideNavigationBarLoading()
... ... @@ -153,8 +156,8 @@ Page({
let err = '';
if (that.data.files_id == '') {
err = '患者id不能为空'
} else if (that.data.drug == '请选择用药') {
err = '请选择用药'
} else if (that.data.drug == '') {
err = '请输入用药'
} else if (that.data.date == '请选择时间') {
err = '请停药日期'
} else if (that.data.date1 == '请选择时间') {
... ... @@ -169,42 +172,72 @@ Page({
err = '请填写血小板数量'
}
if (err == '') {
let url = 'user/addFilesLog';
let header = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''
}
let params = {
form_id: e.detail.formId,
fields_id: that.data.files_id,
drug_name: that.data.drug,
stop_date: that.data.date,
blood_test_date: that.data.date1,
hemoglobin: that.data.hemoglobin,
white_blood_cell: that.data.white_blood_cell,
neutrophils: that.data.neutrophils,
platelet: that.data.platelet,
remark: that.data.remarks,
images: that.data.upimg
}
app.post(url, params, header).then((res) => {
wx.showModal({
title: '成功',
content: '添加记录成功',
showCancel: false,
success(res) {
if (res.confirm) {
wx.switchTab({
url: '/pages/index/index'
})
} else if (res.cancel) {
console.log('用户点击取消')
if (that.data.white_blood_cell > 100) {
wx.showModal({
title: '提示',
content: '请输入正确的白细胞指标',
showCancel: false
})
return false
} else if (that.data.neutrophils > 100) {
wx.showModal({
title: '提示',
content: '请输入正确的中性粒细胞指标',
showCancel: false
})
return false
} else if (that.data.hemoglobin > 250) {
wx.showModal({
title: '提示',
content: '请输入正确的血红蛋白指标',
showCancel: false
})
return false
} else if (that.data.hemoglobin > 1000) {
wx.showModal({
title: '提示',
content: '请输入正确的血小板指标',
showCancel: false
})
return false
} else {
let url = 'user/addFilesLog';
let header = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''
}
}
})
}).catch((errMsg) => {
console.log(errMsg)
})
let params = {
form_id: e.detail.formId,
fields_id: that.data.files_id,
drug_name: that.data.drug,
stop_date: that.data.date,
blood_test_date: that.data.date1,
hemoglobin: that.data.hemoglobin,
white_blood_cell: that.data.white_blood_cell,
neutrophils: that.data.neutrophils,
platelet: that.data.platelet,
remark: that.data.remarks,
images: that.data.upimg
}
app.post(url, params, header).then((res) => {
wx.showModal({
title: '成功',
content: '添加记录成功',
showCancel: false,
success(res) {
if (res.confirm) {
wx.switchTab({
url: '/pages/index/index'
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}).catch((errMsg) => {
console.log(errMsg)
})
}
} else {
wx.showModal({
title: '提示',
... ...
... ... @@ -30,30 +30,30 @@
<view class='input_box'>
<view>白细胞计数:</view>
<view class="input_cell">
<input placeholder='请输入' type='digit' placeholder-class='placeholderStyle' bindinput='setwhite_blood_cell'></input>
<view class='cell_txt'> *10^9/L</view>
<input placeholder='0-100' type='digit' placeholder-class='placeholderStyle' bindinput='setwhite_blood_cell'></input>
<view class='cell_txt'> *10⁹/L</view>
</view>
</view>
<view class='input_box'>
<view>中性粒细胞计数:</view>
<view class="input_cell">
<input placeholder='请输入' type='digit' placeholder-class='placeholderStyle' bindinput='setneutrophils'></input>
<view class='cell_txt'> *10^9/L</view>
<input placeholder='0-100' type='digit' placeholder-class='placeholderStyle' bindinput='setneutrophils'></input>
<view class='cell_txt'> *10⁹/L</view>
</view>
</view>
<view class='input_box'>
<view>血红蛋白:</view>
<view class="input_cell">
<input placeholder='请输入' type='digit' placeholder-class='placeholderStyle' bindinput='sethemoglobin'></input>
<input placeholder='0-250' type='digit' placeholder-class='placeholderStyle' bindinput='sethemoglobin'></input>
<view class='cell_txt'>g/L</view>
</view>
</view>
<view class='input_box'>
<view>血小板计数:</view>
<view class="input_cell">
<input placeholder='请输入' type='digit' placeholder-class='placeholderStyle' bindinput='setplatelet'></input>
<div class='cell_txt'>*10^9/L</div>
<input placeholder='0-1000' type='digit' placeholder-class='placeholderStyle' bindinput='setplatelet'></input>
<div class='cell_txt'>*10⁹/L</div>
</view>
</view>
<view class='upimgbox'>
... ... @@ -65,13 +65,13 @@
</view>
<image bindtap="imgYu" data-list="{{upimg}}" src="{{item}}"></image>
</view>
<view class='upbox' bindtap='uploadImages'>
<view class='upbox' bindtap='uploadImages' wx:if="{{upimg.length<8}}">
<image src='../../img/noimg.png'></image>
</view>
<view class='up_txt'>添加图片(患者化验单,用药情况和皮肤粘膜情况等)</view>
<view class='up_txt' wx:if='{{upimg.length<1}}'>添加图片(患者化验单,用药情况和皮肤粘膜情况等)</view>
</view>
</view>
</view>
<form bindsubmit="formSubmit" report-submit='true' >
<cover-view class='btn'><button formType="submit" class='btn'> 保 存</button></cover-view>
<cover-view class='bt_bg'><button formType="submit" class='btn'> 保 存</button></cover-view>
</form>
... ...
... ... @@ -38,28 +38,29 @@ page{
font-size:28rpx;
}
.input_cell input{
text-align: right;
padding:0 10rpx 0 0;
color:#E88686;
font-size:34rpx;
flex: 1;
}
.input_cell{
width:50%;
text-align: right;
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
color:#999;
font-size:34rpx;
}
.placeholderStyle{
font-size:34rpx;
font-size:30rpx;
color: #ccc;
}
.upimgbox{
margin: 30rpx 0 0 0;
margin: 30rpx 0 20rpx 0;
border:1rpx solid #e5e5e5;
border-radius: 5rpx;
padding:30rpx 30rpx 40rpx 30rpx;
... ... @@ -70,7 +71,7 @@ page{
display: flex;
align-items: center;
flex-wrap:wrap;
margin-top: 30rpx;
}
.upbox{
position: relative;
... ... @@ -90,11 +91,11 @@ page{
position: absolute;
top:-15rpx;
right:-5rpx;
width: 30rpx;
height: 30rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
overflow: hidden;
z-index:100;
z-index:10;
background: #fff;
}
.up_colse image{
... ... @@ -105,6 +106,14 @@ page{
.up_txt{
flex: 1;
}
.bt_bg{
background: #FFF;
position: fixed;
height: 140rpx;
bottom: 0;
left: 0;
width: 100%;
}
.btn{
position: fixed;
margin: 20rpx 30rpx 0 30rpx;
... ...
... ... @@ -167,53 +167,83 @@ Page({
err = '请填写血小板数量'
}
if (err == '') {
wx.showModal({
title: '提示',
content: '修改记录会影响医生的建议准确性,是否确认修改',
confirmText: '确认修改',
cancelText:'暂不修改',
success(res) {
if (res.confirm) {
let url = 'user/editFilesLog';
let header = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''
}
let params = {
id: that.data.id,
form_id: e.detail.formId,
fields_id: that.data.files_id,
drug_name: that.data.drug,
stop_date: that.data.date,
blood_test_date: that.data.date1,
hemoglobin: that.data.hemoglobin,
white_blood_cell: that.data.white_blood_cell,
neutrophils: that.data.neutrophils,
platelet: that.data.platelet,
remark: that.data.remarks,
images: that.data.upimg
}
app.post(url, params, header).then((res) => {
wx.showToast({
title: '编辑记录成功',
icon: 'none',
duration: 2000
})
setTimeout(function () {
wx.navigateBack({
url: '/pages/record/record?showrecord=2&files_id=' + that.data.files_id,
})
}, 1000);
}).catch((errMsg) => {
console.log(errMsg)
if (that.data.white_blood_cell>100){
wx.showModal({
title: '提示',
content: '请输入正确的白细胞指标',
showCancel: false
})
return false
} else if (that.data.neutrophils > 100){
wx.showModal({
title: '提示',
content: '请输入正确的中性粒细胞指标',
showCancel: false
})
return false
} else if (that.data.hemoglobin > 250) {
wx.showModal({
title: '提示',
content: '请输入正确的血红蛋白指标',
showCancel: false
})
return false
} else if (that.data.hemoglobin > 1000) {
wx.showModal({
title: '提示',
content: '请输入正确的血小板指标',
showCancel: false
})
return false
}else{
wx.showModal({
title: '提示',
content: '修改记录会影响医生的建议准确性,是否确认修改',
confirmText: '确认修改',
cancelText: '暂不修改',
success(res) {
if (res.confirm) {
let url = 'user/editFilesLog';
let header = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''
}
let params = {
id: that.data.id,
form_id: e.detail.formId,
fields_id: that.data.files_id,
drug_name: that.data.drug,
stop_date: that.data.date,
blood_test_date: that.data.date1,
hemoglobin: that.data.hemoglobin,//血红蛋白
white_blood_cell: that.data.white_blood_cell,//白细胞
neutrophils: that.data.neutrophils,//中性粒细胞
platelet: that.data.platelet,//血小板
remark: that.data.remarks,
images: that.data.upimg
}
app.post(url, params, header).then((res) => {
wx.showToast({
title: '编辑记录成功',
icon: 'none',
duration: 2000
})
setTimeout(function () {
wx.navigateBack({
url: '/pages/record/record?showrecord=2&files_id=' + that.data.files_id,
})
}, 1000);
}).catch((errMsg) => {
console.log(errMsg)
})
} else if (res.cancel) {
wx.navigateBack({
delta: 1,
})
}
}
})
} else if (res.cancel) {
wx.navigateBack({
delta: 1,
})
}
}
})
} else {
wx.showModal({
title: '提示',
... ...
... ... @@ -29,21 +29,21 @@
</picker>
<view class='input_box'>
<view>白细胞计数:</view>
<view class="input_cell"><input placeholder='请输入' type='digit' placeholder-class='placeholderStyle' bindinput='setwhite_blood_cell' value='{{white_blood_cell}}'></input><view class='cell_txt'> *10^9/L</view></view>
<view class="input_cell"><input placeholder='0-100' type='digit' placeholder-class='placeholderStyle' bindinput='setwhite_blood_cell' value='{{white_blood_cell}}'></input><view class='cell_txt'> *10⁹/L</view></view>
</view>
<view class='input_box'>
<view>中性粒细胞计数:</view>
<view class="input_cell"><input placeholder='请输入' type='digit' placeholder-class='placeholderStyle' bindinput='setneutrophils' value='{{neutrophils}}'></input><view class='cell_txt'> *10^9/L</view></view>
<view class="input_cell"><input placeholder='0-100' type='digit' placeholder-class='placeholderStyle' bindinput='setneutrophils' value='{{neutrophils}}'></input><view class='cell_txt'> *10⁹/L</view></view>
</view>
<view class='input_box'>
<view>血红蛋白:</view>
<view class="input_cell"><input placeholder='请输入' type='digit' placeholder-class='placeholderStyle' bindinput='sethemoglobin' value='{{hemoglobin}}'></input><view class='cell_txt'>g/L</view></view>
<view class="input_cell"><input placeholder='0-250' type='digit' placeholder-class='placeholderStyle' bindinput='sethemoglobin' value='{{hemoglobin}}'></input><view class='cell_txt'>g/L</view></view>
</view>
<view class='input_box'>
<view>血小板计数:</view>
<view class="input_cell">
<input placeholder='请输入' type='digit' placeholder-class='placeholderStyle' bindinput='setplatelet' value='{{platelet}}'></input><div class='cell_txt'>*10^9/L</div></view>
<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>
... ... @@ -54,15 +54,15 @@
</view>
<image bindtap="imgYu" data-list="{{upimg}}" src="{{item}}"></image>
</view>
<view class='upbox' bindtap='uploadImages'>
<view class='upbox' bindtap='uploadImages' wx:if="{{upimg.length<8}}">
<image src='../../img/noimg.png'></image>
</view>
<view class='up_txt'>添加图片(患者化验单,用药情况和皮肤粘膜情况等)</view>
<view class='up_txt' wx:if="{{upimg.length<1}}">添加图片(患者化验单,用药情况和皮肤粘膜情况等)</view>
</view>
</view>
</view>
<form bindsubmit="formSubmit" report-submit='true' >
<cover-view class='btn'><button formType="submit" class='btn'> 保 存</button></cover-view>
<cover-view class='bt_bg'><button formType="submit" class='btn'> 保 存</button></cover-view>
</form>
... ...
// pages/file_manage/file_manage.js
// 请注意常量的命名必须是Page
const Page = require('../../utils/ald-stat.js').Page;
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
datalist: [],
files_id: '',
show: true,//是否显示选择项
hadData: true
},
goaddfile() {
wx.navigateTo({
url: '/pages/addfile/addfile',
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
})
},
setstate(e) {
let that = this;
let index = e.currentTarget.dataset.index;
let datalist = this.data.datalist;
let url = 'user/setDefaultFilesId';
let header = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''
}
let params = {
fields_id: e.currentTarget.id
}
app.post(url, params, header).then((res) => {
for (let obj of datalist) {
obj.state = false;
}
datalist[index].state = true;
that.setData({
datalist: datalist
})
wx.showToast({
title: '切换成功',
icon: 'success',
duration: 1000,
success: function(res) {
},
fail: function(res) {},
complete: function(res) {},
})
setTimeout(()=>{
wx.switchTab({
url: '/pages/index/index',
})
},1000)
// wx.showModal({
// title: '提示',
// content: '设置成功',
// showCancel: false,
// success: function (res) {
// if (res.cancel) {
// } else {
// }
// },
// fail: function (res) { },
// complete: function (res) { },
// })
}).catch((errMsg) => {
console.log(errMsg)
})
},
//获取档案列表
getFilesList() {
let that = this;
let header = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''//不知道啥含义
}
let url = 'user/getFilesList';
app.post(url, {}, header).then((res) => {
let list = res;
for (let obj of list) {
obj.state = false;
if (obj.id == that.data.files_id) {
obj.state = true
}
}
that.setData({
datalist: list
})
console.log(res)
}).catch((errMsg) => {
console.log(errMsg)
})
},
//编辑档案
goeditfile(e) {
console.log(e.currentTarget.dataset.obj)
wx.navigateTo({
url: '/pages/editfile/editfile?obj=' + JSON.stringify(e.currentTarget.dataset.obj),
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this;
app.setStatisticsVisitorLog('/pages/file_manage/file_manage');
if (options.files_id != undefined) {
that.setData({
files_id: options.files_id
})
}
if (options.show != undefined) {
that.setData({
show: false
})
}
that.getFilesList();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getFilesList();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{}
\ No newline at end of file
... ...
<!--pages/file_manage/file_manage.wxml-->
<view class='addfile' bindtap='goaddfile'>
<view class='addfile_left'>
<view class='addfile_img'>
<image src='../../img/jia.png'></image>
</view>
<view>添加新档案</view>
</view>
<view class='iconfont icon-xiangyou'></view>
</view>
<view class='manage'>
<view class='manage_item' wx:for='{{datalist}}' wx:key bindtap='setstate' data-index='{{index}}' id='{{item.id}}' data-obj='{{item}}'>
<view class='manage_left'>
<view>{{item.patient}}
<text class='txt_sex'>{{item.sex_string}}</text>{{item.age}}岁</view>
<view class='sub_item'>{{item.disease_name}}</view>
</view>
<view wx:if='{{show}}'>
<view class='manage_right' wx:if='{{item.state}}' >
<image src='../../img/choose_yes.png'></image>
</view>
<view class='manage_right' wx:else >
<image src='../../img/choose_no.png'></image>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/file_choose/file_choose.wxss */
@import '../file_manage/file_manage.wxss'
\ No newline at end of file
... ...
... ... @@ -10,7 +10,8 @@ Page({
data: {
datalist:[],
files_id:'',
show:true//是否显示选择项
show:true,//是否显示选择项
hadData: true
},
goaddfile(){
wx.navigateTo({
... ... @@ -70,7 +71,12 @@ Page({
}
let url ='user/getFilesList';
app.post(url,{},header).then((res)=>{
const list = res;
let list = res;
if(res.length<1){
that.setData({
hadData: false
})
}
for (let obj of list){
obj.state=false;
if (obj.id == that.data.files_id){
... ...
... ... @@ -8,7 +8,8 @@
</view>
<view class='iconfont icon-xiangyou'></view>
</view>
<view class='manage'>
<view class='manage' wx:if="{{hadData}}">
<view class='manage_item' wx:for='{{datalist}}' wx:key bindtap='goeditfile' data-obj='{{item}}'>
<view class='manage_left'>
<view>{{item.patient}}
... ... @@ -24,5 +25,6 @@
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
<view class='nodata' wx:else>您还没有建立档案哦</view>
\ No newline at end of file
... ...
... ... @@ -16,6 +16,7 @@ Page({
filesLogdata: '', //档案数量
doctorinfo: [], //医生信息
fileslog: {}, //最新记录
hasToken: false
},
goaddrecord(files_id, patient) {
wx.navigateTo({
... ... @@ -64,9 +65,12 @@ Page({
})
}
},
addrecord(e){
this.goaddrecord(e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient);
},
gofile_manage(files_id) {
wx.navigateTo({
url: '/pages/file_manage/file_manage?files_id=' + files_id,
url: '/pages/file_choose/file_choose?files_id=' + files_id,
})
},
//到文章详情
... ... @@ -89,15 +93,19 @@ Page({
wx.setStorageSync('token', res.token);
that.getRecommendArticleList(openid, res.doctor_id);
if (res.doctor_id == 0) { //没有关联医生
if (app.globalData.doctorid == 0) { //没有传过来的doctorid
if (app.globalData.doctorid == 0) { //没有传过来的doctorid
} else {
that.setData({
showdoctor: true
})
that.getDoctorInfo(app.globalData.doctorid);
that.bindDoctor(openid,app.globalData.doctorid);
}
} else { //有关联医生获取医生详情
that.setData({
showdoctor: false
showdoctor: true
})
} else {
that.getDoctorInfo(app.globalData.doctorid);
that.bindDoctor(openid,app.globalData.doctorid);
}
} else { //有关联医生获取医生详情
app.globalData.doctor_id = res.doctor_id;
app.globalData.doctorid = res.doctorid;
that.getDoctorInfo(res.doctorid);
... ... @@ -169,6 +177,9 @@ Page({
complete: function(res) {},
})
},
switchUser(e){
this.gofile_manage(e.currentTarget.dataset.files_id);
},
//获取最新病情记录
getLastFilesLog(openid) {
let that = this;
... ... @@ -217,65 +228,66 @@ Page({
},
//授权
getopwer(e) {
console.log(e)
let that = this;
console.log('token',wx.getStorageSync('token'));
if (wx.getStorageSync('token') == undefined || wx.getStorageSync('token') == ''){
wx.login({
success: (res) => {
let url = 'public/login';
let params = {
code: res.code,
encrypted_data: e.detail.encryptedData,
iv: e.detail.iv,
doctorid: app.globalData.doctorid
}
app.post(url, params).then((res) => {
wx.setStorageSync('token', res.token);
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)
if (e.detail.encryptedData){
wx.login({
success: (res) => {
let url = 'public/login';
let params = {
code: res.code,
encrypted_data: e.detail.encryptedData,
iv: e.detail.iv,
doctorid: app.globalData.doctorid
}
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)
})
}
})
}else{
wx.showToast({
title: '授权后才能正常使用',
icon:'none'
})
}
})
}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);
}
}
// 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) {
let that = this;
wx.login({
success: (res) => {
let url = 'public/getSessionKey';
let params = {
code: res.code
}
app.post(url, params).then((res) => {
wx.setStorageSync('openid', res.openid)
that.ifdoctorid(res.openid); //判断是否有医生ID
that.getFilesNumber(res.openid); //获取档案数量
that.getLastFilesLog(res.openid);
app.setStatisticsVisitorLog('/pages/index/index'); //统计打开界面数量
}).catch((errMsg) => {
console.log(errMsg)
})
// var openid = wx.getStorageSync('openid');
let token = wx.getStorageSync('token');
// 判断是否授权设置授权权限
if(token){
this.setData({
hasToken: true
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
... ... @@ -285,23 +297,14 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function(options) {
let that = this;
wx.login({
success: (res) => {
let url = 'public/getSessionKey';
let params = {
code: res.code
}
app.post(url, params).then((res) => {
that.ifdoctorid(res.openid); //判断是否有医生ID
that.getFilesNumber(res.openid); //获取档案数量
that.getLastFilesLog(res.openid);
}).catch((errMsg) => {
console.log(errMsg)
})
}
})
let that = this;
var openid = wx.getStorageSync('openid');
let token = wx.getStorageSync('token');
this.ifdoctorid(openid); //判断是否有医生ID
this.getFilesNumber(openid); //获取档案数量
this.getLastFilesLog(openid);
app.setStatisticsVisitorLog('/pages/index/index'); //统计打开界面数量
},
/**
* 生命周期函数--监听页面隐藏
... ...
<view wx:if='{{showdoctor}}'>
<view class='index_item' bindtap='gointroduce' data-id='{{doctorinfo.doctor_id}}'>
<view class='index_item_left'>
<view class='itemimg'>
<image src='{{doctorinfo.avatar}}'></image>
</view>
<view class='item_box'>
<view class='item_box_title'>{{doctorinfo.name}}</view>
<view class='item_contenr'>{{doctorinfo.department_name}} {{doctorinfo.title_name}}</view>
<view>{{doctorinfo.hospital_name}}</view>
</view>
<view class='index_item' bindtap='gointroduce' data-id='{{doctorinfo.doctor_id}}'>
<view class='index_item_left'>
<view class='itemimg'>
<image src='{{doctorinfo.avatar}}'></image>
</view>
<view class='item_box'>
<view class='item_box_title'>{{doctorinfo.name}}</view>
<view class='item_contenr'>{{doctorinfo.department_name}} {{doctorinfo.title_name}}</view>
<view>{{doctorinfo.hospital_name}}</view>
</view>
</view>
<view class='iconfont icon-xiangyou'></view>
</view>
<view class='iconfont icon-xiangyou'></view>
</view>
</view>
<view class='index_test' wx:if='{{show_notest}}'>
<view class='test_frist'>
<view class='dot'></view>
记录血项测评结果,并获得专家建议和正确医学科普知识。
<view class='button_box'>
<button open-type="getUserInfo" bindgetuserinfo='getopwer' data-tag='1'></button>
<view class='jia_box'>
<view class='iconfont icon-jia'></view>
</view>
<view class='jia_txt'>添加血项检测记录</view>
<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>
</view>
</view>
</view>
</view>
<view class='index_twotest' wx:else>
<view class='index_twotab'>
<view>用户:{{fileslog.patient}} {{fileslog.age}}岁</view>
<view class='twotab' wx:if='{{filesLogdata > 1}}'>
<button class='twotab_button' open-type='getUserInfo' bindgetuserinfo='getopwer' data-tag='2' data-files_id='{{fileslog.files_id}}'></button>
切换用户
</view>
</view>
<view class='two_main'>
<view class='two_item'>
<view>
最近添加记录:
<text class='time_txt'>{{fileslog.create_time}}</text>
<view class='index_twotab'>
<view>用户:{{fileslog.patient}} {{fileslog.age}}岁</view>
<view class='twotab' bindtap='switchUser' data-files_id='{{fileslog.files_id}}' wx:if="{{filesLogdata>1}}">
切换用户
</view>
</view>
<view class='two_item_box' wx:if='{{showfilesLog}}'>
<view class="two_item two_items {{fileslog.more.white_blood_cell_result=='正常'?'':'danger'}} " >
<view class='two_items_left'>
<view class='two_txt'>白细胞计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
<view class='two_main'>
<view class='two_item'>
<view>
最近添加记录:
<text class='time_txt'>{{fileslog.create_time}}</text>
</view>
{{fileslog.more.white_blood_cell_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{fileslog.more.white_blood_cell}}</text>*10^9/L</view>
</view>
<view class="two_item two_items {{fileslog.more.neutrophils_result=='正常'?'':'danger'}} ">
<view class='two_items_left'>
<view class='two_txt'>中性粒细胞计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
<view class='two_item_box' wx:if='{{showfilesLog}}'>
<view class="two_item two_items {{fileslog.more.white_blood_cell_result=='正常'?'':'danger'}} ">
<view class='two_items_left'>
<view class='two_txt'>白细胞计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
{{fileslog.more.white_blood_cell_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{fileslog.more.white_blood_cell}}</text>*10⁹/L</view>
</view>
{{fileslog.more.neutrophils_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{fileslog.more.neutrophils}}</text>*10^9/L</view>
</view>
<view class="two_item two_items {{fileslog.more.hemoglobin_result=='正常'?'':'danger'}} " >
<view class='two_items_left'>
<view class='two_txt'>血红蛋白</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
<view class="two_item two_items {{fileslog.more.neutrophils_result=='正常'?'':'danger'}} ">
<view class='two_items_left'>
<view class='two_txt'>中性粒细胞计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
{{fileslog.more.neutrophils_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{fileslog.more.neutrophils}}</text>*10⁹/L</view>
</view>
{{fileslog.more.hemoglobin_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{fileslog.more.hemoglobin}}</text>g/L</view>
</view>
<view class="two_item two_items {{fileslog.more.platelet_result=='正常'?'':'danger'}} ">
<view class='two_items_left'>
<view class='two_txt'>血小板计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
<view class="two_item two_items {{fileslog.more.hemoglobin_result=='正常'?'':'danger'}} ">
<view class='two_items_left'>
<view class='two_txt'>血红蛋白</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
{{fileslog.more.hemoglobin_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{fileslog.more.hemoglobin}}</text>g/L</view>
</view>
<view class="two_item two_items {{fileslog.more.platelet_result=='正常'?'':'danger'}} ">
<view class='two_items_left'>
<view class='two_txt'>血小板计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
{{fileslog.more.platelet_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{fileslog.more.platelet}}</text>*10⁹/L</view>
</view>
{{fileslog.more.platelet_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{fileslog.more.platelet}}</text>*10^9/L</view>
</view>
</view>
<view class='notest' wx:else>暂无记录</view>
<view class='two_item' wx:if='{{fileslog.doctor_reply != null}}'>
<view>医生建议:</view>
<view class='two_item_content'>{{fileslog.doctor_reply == null ? '等待医生回复':fileslog.doctor_reply}}</view>
</view>
<view class='two_item two_items'>
<view class='two_item_yuan_box' bindtap='gorecord' data-files_id='{{fileslog.files_id}}' data-showrecord='1'>
<view class='two_item_yuan'>
<image src='../../img/qst.png'></image>
</view>
<view>趋势图</view>
</view>
<view class='two_item_yuan_box'>
<button class='two_item_yuan_box_button' open-type='getUserInfo' bindgetuserinfo='getopwer' data-tag='3' data-files_id='{{fileslog.files_id}}' data-patient='{{fileslog.patient}}'></button>
<view class='jia_box two_jiabox'>
<view class='iconfont icon-jia'></view>
<view class='notest' wx:else>暂无记录</view>
<view class='two_item' wx:if='{{fileslog.doctor_reply != null}}'>
<view>医生建议:</view>
<view class='two_item_content'>{{fileslog.doctor_reply == null ? '等待医生回复':fileslog.doctor_reply}}</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 class='two_item two_items' >
<view class='two_item_yuan_box' bindtap='gorecord' data-files_id='{{fileslog.files_id}}' data-showrecord='1'>
<view class='two_item_yuan'>
<image src='../../img/qst.png'></image>
</view>
<view>趋势图</view>
</view>
<view class='two_item_yuan_box' bindtap='addrecord' data-tag='3' data-files_id='{{fileslog.files_id}}' data-patient='{{fileslog.patient}}'>
<!-- <button class='two_item_yuan_box_button' open-type='getUserInfo' bindgetuserinfo='getopwer' data-tag='3' data-files_id='{{fileslog.files_id}}' data-patient='{{fileslog.patient}}' ></button> -->
<view class='jia_box two_jiabox'>
<view class='iconfont icon-jia'></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>
</view>
</view>
<view class='index_three'>
<view class='three'>
<view class='three_title'>相关文章:</view>
</view>
<view wx:for='{{articlelist}}' wx:key>
<view class='three' bindtap='goarticle_details' id='{{item.id}}'>
<view class='threeimg_box'>
<image src='{{item.more.thumbnail}}'></image>
</view>
<view class='three_txtbox'>
<view class='three_txtbox_title'>{{item.post_title}}</view>
<view>
{{item.hospital_name}} {{item.department_name}}{{item.title_name}} {{item.doctor_name}}</view>
</view>
<view class='three'>
<view class='three_title'>相关文章:</view>
</view>
<view wx:for='{{articlelist}}' wx:key>
<view class='three' bindtap='goarticle_details' id='{{item.id}}'>
<view class='threeimg_box'>
<image src='{{item.more.thumbnail}}'></image>
</view>
<view class='three_txtbox'>
<view class='three_txtbox_title'>{{item.post_title}}</view>
<view>
{{item.hospital_name}} {{item.department_name}}{{item.title_name}} {{item.doctor_name}}</view>
</view>
</view>
</view>
<view class='three just_last' bindtap='goarticle'>
<view class='more'>查看更多</view>
<view class='iconfont icon-xiangyou'></view>
</view>
</view>
<view class='three just_last' bindtap='goarticle'>
<view class='more'>查看更多</view>
<view class='iconfont icon-xiangyou'></view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -288,10 +288,14 @@ opacity: 0;
.button_box{
position:relative;
}
.button_box button{
button.jia_box{
width: 130rpx;
height: 130rpx;
}
/* .button_box button{
position: absolute;
width:100%;
height: 100%;
opacity: 0;
z-index:100;
}
\ No newline at end of file
} */
\ No newline at end of file
... ...
... ... @@ -11,14 +11,12 @@ Page({
},
//登陆
getopwer(e){
console.log(e)
let that = this;
app.globalData.userInfo = e.detail.userInfo;
wx.setStorageSync('userInfo', e.detail.userInfo);
if (wx.getStorageSync('token') == undefined || wx.getStorageSync('token') == ''){
if (e.detail.encryptedData){
wx.login({
success: (res) => {
console.log(res);
let url = 'public/login';
let params = {
code: res.code,
... ... @@ -28,6 +26,7 @@ Page({
}
app.post(url, params).then((res) => {
wx.setStorageSync('token', res.token);
wx.setStorageSync('token', res.token);
that.setData({
userInfo: app.globalData.userInfo,
ifpower: true
... ... @@ -37,6 +36,11 @@ Page({
})
}
})
}else{
wx.showToast({
title: '授权登录后才能正常使用',
icon: 'none'
})
}
},
... ... @@ -62,12 +66,21 @@ Page({
})
},
gofile_manage(){
wx.navigateTo({
url: '/pages/file_manage/file_manage?show='+1,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
let token = wx.getStorageSync('token');
if(token){
wx.navigateTo({
url: '/pages/file_manage/file_manage?show=' + 1,
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
})
}else{
wx.showToast({
title: '请授权登录后使用',
icon: 'none'
})
}
},
goaboutme(){
wx.navigateTo({
... ... @@ -83,18 +96,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
app.setStatisticsVisitorLog('/pages/my/my');
if (wx.getStorageSync('token')==undefined){
that.setData({
ifpower: false
})
}else{
that.setData({
userInfo: app.globalData.userInfo,
ifpower: true
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
... ... @@ -107,7 +109,18 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
app.setStatisticsVisitorLog('/pages/my/my');
let that = this;
let token = wx.getStorageSync('token')
if (token) {
that.setData({
ifpower: true
})
} else {
that.setData({
ifpower: false
})
}
},
/**
... ...
<!--pages/my/my.wxml-->
<view class='my_top'>
<button class='login_btn' wx:if='{{!ifpower}}' open-type="getUserInfo" bindgetuserinfo='getopwer'>
</button>
<view class='my_top_content' wx:if='{{ifpower}}' >
<view class='my_top_content'>
<view class='my_img'>
<open-data type="userAvatarUrl"></open-data>
<!-- <image src='{{userInfo.avatarUrl}}'></image> -->
</view>
<!-- <view>{{userInfo.nickName}}</view> -->
<view><open-data type="userNickName"></open-data></view>
<view wx:if="{{ifpower}}"><open-data type="userNickName"></open-data></view>
<view wx:else><button class='user_login' open-type="getUserInfo" bindgetuserinfo='getopwer'>授权登录</button></view>
</view>
<view class='my_top_content' wx:else>
<!-- <view class='my_top_content'>
<view class='my_img'>
<image src='../../img/no_puimg.png'></image>
</view>
<view>点击登录</view>
</view>
<view></view>
</view> -->
</view>
<view class='my_itembox'>
<view class='my_item' bindtap='gofile_manage'>
... ... @@ -39,7 +36,8 @@
</view>
<view class='my_itembox'>
<view class='my_item' bindtap='goopinion'>
<button class='my_item button_item' open-type="feedback">
<!-- <view class='my_item' bindtap='goopinion'> -->
<view class='my_item_left'>
<view class='my_itemimg'>
<image src='../../img/edit_yijian.png'></image>
... ... @@ -47,7 +45,8 @@
<view>意见反馈</view>
</view>
<view class='iconfont icon-xiangyou'></view>
</view>
<!-- </view> -->
</button>
<button class='my_item button_item' open-type="contact">
<view class='my_item_left'>
<view class='my_itemimg'>
... ...
... ... @@ -49,6 +49,9 @@ page{
border-bottom:1rpx solid #e5e5e5;
}
button.my_item:after{
border: none;
}
.my_item:last-child{
border:none
}
... ... @@ -65,7 +68,7 @@ page{
display: flex;
align-items: center;
color:#333;
font-size:34rpx;
font-size:32rpx;
}
.my_item .iconfont{
color:#c7c7c7;
... ... @@ -74,4 +77,16 @@ page{
}
.button_item{
padding:6rpx 30rpx;
}
button.user_login{
line-height: 1.4;
color: #FFF;
background: none;
font-size: 30rpx;
padding-left: 6px;
padding-right: 6px;
border: none;
}
button.user_login:after{
border: 1rpx solid #FFF;
}
\ No newline at end of file
... ...
... ... @@ -105,7 +105,7 @@ Page({
lineCharthemoglobin=new wxCharts({
canvasId: 'lineCanvashemoglobin',
type: 'area',
type: 'line',
categories: cate,
animation: true, //是否开启动画
... ... @@ -132,7 +132,7 @@ Page({
let cate = this.data.categories;
lineChartwhite = new wxCharts({
canvasId: 'lineCanvaswhite',
type: 'area',
type: 'line',
categories: cate,
animation: true, //是否开启动画
series: [{
... ... @@ -159,11 +159,11 @@ Page({
console.log(cate)
lineChartneutrophils = new wxCharts({
canvasId: 'lineCanvasneutrophils',
type: 'area',
type: 'line',
categories: cate,
animation: true, //是否开启动画
series: [{
name: '血红蛋白',
name: '中性粒细胞',
data: that.data.series.neutrophils,
format: function (val, name) { //点击显示的数据注释
return val + '*10^9/L';
... ... @@ -186,7 +186,7 @@ Page({
console.log(cate)
lineChartplatelet = new wxCharts({
canvasId: 'lineCanvasplatelet',
type: 'area',
type: 'line',
categories: cate,
animation: true, //是否开启动画
series: [{
... ...
<!--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> -->
<view class='container_box' wx:if='{{showrecord}}'>
... ...
... ... @@ -31,6 +31,7 @@ Page({
})
},
getopenid(){
wx.clearStorageSync('token')
let that=this;
wx.login({
success: (res) => {
... ... @@ -40,6 +41,7 @@ Page({
}
app.post(url, params).then((res) => {
that.gettoken(res.openid)
wx.setStorageSync('openid', res.openid)
}).catch((errMsg) => {
console.log(errMsg)
})
... ... @@ -50,13 +52,16 @@ Page({
let that = this;
let url = 'public/checkOpenid';
let params = {
openid: openid
openid: openid
}
app.post(url, params).then((res) => {
wx.setStorageSync('token', res.token);
console.log(res)
wx.setStorageSync('token', res.token);
wx.setStorageSync('userInfo', res.user);
}).catch((errMsg) => {
console.log(errMsg)
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
... ... @@ -64,6 +69,8 @@ Page({
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];
... ... @@ -72,12 +79,10 @@ Page({
app.globalData.doctorid = doctorid;
}
}
console.log(options.doctorid);
if (options.doctorid != undefined) {
app.globalData.doctorid = options.doctorid;
}
that.getWelcomeInfo();
that.getopenid();
},
/**
* 生命周期函数--监听页面初次渲染完成
... ...