作者 liaolinfeng

提交

// pages/agreement/agreement.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/agreement/agreement.wxml-->
<text>pages/agreement/agreement.wxml</text>
/* pages/agreement/agreement.wxss */
\ No newline at end of file
... ... @@ -4,4 +4,4 @@
<import src="../../wxParse/wxParse.wxml" />
<template is='wxParse' data='{{wxParseData:content.nodes}}' />
</view>
<view class='nodata'>暂无详情</view>
\ No newline at end of file
<view class='nodata' wx:else>暂无详情</view>
\ No newline at end of file
... ...
... ... @@ -4,18 +4,18 @@
const Page = require('../../utils/ald-stat.js').Page;
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
showdoctor:false,//是否显示首页医生信息
show_notest:false,//显示有记录和无记录之间的切换
showfilesLog:false,//是否显示最新记录(没有记录不显示)
filesLogdata:'',//档案数量
doctorinfo:[],//医生信息
fileslog:{},//最新记录
},
goaddrecord(files_id, patient){
/**
* 页面的初始数据
*/
data: {
showdoctor: false, //是否显示首页医生信息
show_notest: false, //显示有记录和无记录之间的切换
showfilesLog: false, //是否显示最新记录(没有记录不显示)
filesLogdata: '', //档案数量
doctorinfo: [], //医生信息
fileslog: {}, //最新记录
},
goaddrecord(files_id, patient) {
wx.navigateTo({
url: '/pages/addrecord/addrecord?fields_id=' + files_id + '&patient=' + patient,
success: function(res) {},
... ... @@ -23,24 +23,24 @@ Page({
complete: function(res) {},
})
},
gointroduce(e){
gointroduce(e) {
console.log(e.currentTarget.dataset.id);
wx.navigateTo({
url: '/pages/introduce/introduce?doctor_id=' + e.currentTarget.dataset.id,
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
gonormal(){
gonormal() {
wx.navigateTo({
url: '/pages/normal/normal',
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
goarticle(){
goarticle() {
wx.navigateTo({
url: '/pages/article/article',
success: function(res) {},
... ... @@ -48,14 +48,14 @@ Page({
complete: function(res) {},
})
},
gorecord(e){
let that=this;
if (that.data.showfilesLog){
gorecord(e) {
let that = this;
if (that.data.showfilesLog) {
wx.navigateTo({
url: '/pages/record/record?showrecord=' + e.currentTarget.dataset.showrecord + '&files_id=' +
e.currentTarget.dataset.files_id,
})
}else{
} else {
wx.showToast({
title: '暂无记录',
icon: 'none',
... ... @@ -63,99 +63,98 @@ Page({
})
}
},
gofile_manage(files_id){
gofile_manage(files_id) {
console.log(files_id)
wx.navigateTo({
url: '/pages/file_manage/file_manage?files_id=' + files_id,
})
},
//到文章详情
goarticle_details(e){
goarticle_details(e) {
console.log(e)
wx.navigateTo({
url: '/pages/article_detail/article_detail?id='+e.currentTarget.id,
url: '/pages/article_detail/article_detail?id=' + e.currentTarget.id,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
//判断是否有医生id和是否登陆
ifdoctorid(){
let that=this;
if (app.globalData.doctorid == 0) {//没有传过来的doctorid
let url ='public/checkOpenid';
let params={
openid: wx.getStorageSync('openid')
}
app.post(url,params).then((res)=>{
wx.setStorageSync('token', res.token);
if (res.doctor_id==0){//没有关联医生
that.setData({
showdoctor:false
})
}else{//有关联医生获取医生详情
app.globalData.doctor_id = res.doctor_id;
app.globalData.doctorid = res.doctorid;
that.getDoctorInfo(doctorid);
}
}).catch((errMsg)=>{
console.log(errMsg)
})
}else{
that.getDoctorInfo(app.globalData.doctorid);
that.bindDoctor(app.globalData.doctorid);
}
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.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);
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//绑定医生
bindDoctor(doctorid){
let that=this;
let url ='public/bindDoctor';
let params={
openid: wx.getStorageSync('openid'),
doctorid: doctorid
}
app.post(url,params).then((res)=>{
}).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;
let url = 'index/getDoctorInfo';
let params = {
// doctorid: doctorid//暂时
doctorid:'tigeryang01'
getDoctorInfo(doctorid) {
let that = this;
let url = 'index/getDoctorInfo';
let params = {
// doctorid: doctorid//暂时
doctorid: 'tigeryang01'
}
app.post(url, params).then((res) => {
if (res.avatar == '') {
res.avatar = '../../img/no_puimg.png'
}
app.post(url, params).then((res) => {
if (res.avatar == ''){
res.avatar ='../../img/no_puimg.png'
}
that.setData({
doctorinfo: res,
showdoctor:true
})
}).catch((errMsg) => {
console.log(errMsg)
})
that.setData({
doctorinfo: res,
showdoctor: true
})
}).catch((errMsg) => {
console.log(errMsg)
})
},
//获取文章列表
getArticleList(){
let that=this;
let url ='index/getArticleList';
let params={//参数暂时
doctor_id:1,
page:1,
list_rows:5
getArticleList() {
let that = this;
let url = 'index/getArticleList';
let params = { //参数暂时
doctor_id: 1,
page: 1,
list_rows: 5
}
app.post(url, params).then((res) => {
let list=res.data;
for(let obj of list){
if (obj.more.thumbnail==''){
obj.more.thumbnail ='../../img/LoadFail.png'
let list = res.data;
for (let obj of list) {
if (obj.more.thumbnail == '') {
obj.more.thumbnail = '../../img/LoadFail.png'
}
}
res.data=list;
res.data = list;
that.setData({
articlelist: res
})
... ... @@ -164,7 +163,7 @@ Page({
})
},
//到添加患者界面
goaddfile(){
goaddfile() {
wx.navigateTo({
url: '/pages/addfile/addfile',
success: function(res) {},
... ... @@ -173,53 +172,53 @@ Page({
})
},
//获取最新病情记录
getLastFilesLog(){
let that=this;
let url ='index/getLastFilesLog';
let params={
'openid': wx.getStorageSync('openid')
}
app.post(url,params).then((res)=>{
if (res.more.length != 0 ){
if (res.doctor_reply == null) {
res.doctor_reply = '等待医生回复'
}
that.setData({
showfilesLog:true,
fileslog:res
})
}else{
that.setData({
showfilesLog: false,
fileslog: res
})
}
}).catch((errMsg)=>{
console.log(errMsg)
})
getLastFilesLog(openid) {
let that = this;
let url = 'index/getLastFilesLog';
let params = {
'openid': openid
}
app.post(url, params).then((res) => {
if (res.more.length != 0) {
if (res.doctor_reply == null) {
res.doctor_reply = '等待医生回复'
}
that.setData({
showfilesLog: true,
fileslog: res
})
} else {
that.setData({
showfilesLog: false,
fileslog: res
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//获取档案数
getFilesNumber(){
let that=this;
let url='index/getFilesNumber';
let params={
openid: wx.getStorageSync('openid')
}
app.post(url, params).then((res) => {
if(res==0){
that.setData({
filesLogdata:res,
show_notest:true//显示没有档案,没有记录
})
}else{
that.setData({
filesLogdata: res,
show_notest: false
getFilesNumber(openid) {
let that = this;
let url = 'index/getFilesNumber';
let params = {
openid: openid
}
app.post(url, params).then((res) => {
if (res == 0) {
that.setData({
filesLogdata: res,
show_notest: true //显示没有档案,没有记录
})
} else {
that.setData({
filesLogdata: res,
show_notest: false
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//授权
getopwer(e) {
... ... @@ -236,17 +235,23 @@ Page({
wx.setStorageSync('openid', res.openid);
wx.setStorageSync('session_key', res.session_key);
if (e.currentTarget.dataset.tag == '1') {
that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, '', '', e.currentTarget.dataset.tag);
} else if (e.currentTarget.dataset.tag == '2') {
that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, e.currentTarget.dataset.files_id, '', e.currentTarget.dataset.tag);
} else if (e.currentTarget.dataset.tag == '3') {
that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient, e.currentTarget.dataset.tag);
}
// 调用sendSession方法,将session_key以参数形式传入
that.aldstat.sendSession(res.session_key);
// 调用sendOpenid方法,将openid以参数形式传入
that.aldstat.sendOpenid(res.openid);
}).catch((errMsg) => {
console.log(errMsg)
})
... ... @@ -254,7 +259,7 @@ Page({
})
},
//用户登陆
login(openid, session_key, encryptedData, iv, files_id='', patient='',tag) {
login(openid, session_key, encryptedData, iv, files_id = '', patient = '', tag) {
console.log('files_id', files_id);
console.log('patient', patient);
console.log('tag', tag);
... ... @@ -272,80 +277,99 @@ Page({
that.setData({
userInfo: app.globalData.userInfo,
})
if(tag=='1'){
if (tag == '1') {
that.goaddfile();
}else if(tag=='2'){
} else if (tag == '2') {
that.gofile_manage(files_id);
}else if(tag == '3'){
} else if (tag == '3') {
that.goaddrecord(files_id, patient);
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
that.ifdoctorid();//判断是否有医生ID
that.getArticleList();//获取文章列表
that.getFilesNumber();//获取档案数量
let openid = wx.getStorageSync('openid');//获取最新记录
if(openid != ''){
that.getLastFilesLog();
/**
* 生命周期函数--监听页面加载
*/
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.getArticleList(res.openid); //获取文章列表
that.getFilesNumber(res.openid); //获取档案数量
that.getLastFilesLog(res.openid);
app.setStatisticsVisitorLog('/pages/index/index'); //统计打开界面数量
}).catch((errMsg) => {
console.log(errMsg)
})
}
app.setStatisticsVisitorLog('/pages/index/index');//统计打开界面数量
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function (options) {
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function(options) {
let that = this;
that.ifdoctorid();//判断是否有医生ID
that.getArticleList();//获取文章列表
that.getFilesNumber();//获取档案数量
let openid = wx.getStorageSync('openid');//获取最新记录
if (openid != '') {
that.getLastFilesLog();
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
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.getArticleList(res.openid); //获取文章列表
that.getFilesNumber(res.openid); //获取档案数量
that.getLastFilesLog(res.openid);
}).catch((errMsg) => {
console.log(errMsg)
})
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
// pages/introduce/introduce.js
// 请注意常量的命名必须是Page
const Page = require('../../utils/ald-stat.js').Page;
const app=getApp();
var wxParse = require('../../wxParse/wxParse.js')
Page({
/**
* 页面的初始数据
... ... @@ -22,6 +24,7 @@ Page({
that.setData({
doctorinfo: res
})
wxParse.wxParse('content', 'html', res.content, that, 5);
}).catch((errMsg) => {
console.log(errMsg)
})
... ...
... ... @@ -2,7 +2,7 @@
<view class='intr_top'>
<view class='intr_left'>
<view class='intr_imgbox'>
<image src='../../img/startimg.png'></image>
<image src='{{doctorinfo.avatar}}'></image>
</view>
<view class='intr_txtbox'>
<view class='intr_title'>{{doctorinfo.name}}</view>
... ... @@ -13,45 +13,10 @@
<button class='intr_tip' open-type="contact" bindcontact="handleContact">关注公众号</button>
</view>
<view class='intr_item'>
<view class='intr_c_title'>擅长疾病</view>
<view class='intr_content'>事骨肿瘤专业十四年,临床工作经验丰富,擅长骨与软组织肿瘤的诊断及手术、化疗、靶向治疗、免疫治疗等综合治疗。</view>
</view>
<view class='intr_item'>
<view class='intr_c_title'>教育经历</view>
<view class='intr_content'>
<view> 2007/09-2010/06,北京大学医学部,人民医院,博士,导师:郭卫</view>
<view> 2007/09-2010/06,北京大学医学部,人民医院,博士,导师:郭卫</view>
<view> 2007/09-2010/06,北京大学医学部,人民医院,博士,导师:郭卫</view>
</view>
</view>
<view class='intr_item'>
<view class='intr_c_title'>工作经历</view>
<view class='intr_content'>
<view>2010/09-至今,北京大学人民医院,外科(骨肿瘤科),高年资主治医师</view>
<view>2014/07-2015/10,美国麻省总医院(Massachusetts General Hospital),骨科,research fellow</view>
<view>2012/09-2012/12,意大利Rizolli骨科研究所(Rizzoli Orthopedic Institution),骨肿瘤科,research fellow</view>
</view>
</view>
<view class='intr_item'>
<view class='intr_c_title'>参加主要专业会议</view>
<!-- <view class='intr_c_title'>擅长疾病</view> -->
<view class='intr_content'>
<view>2006.6 第8届全国骨肿瘤学术会议 青岛参会</view>
<view>2007.9 第9届全国骨肿瘤学术会议 上海参会</view>
<view>2007.11 第2届COA全国骨科大会 郑州 --大会发言《骶骨肿瘤术后神经功能预测及评估》</view>
<view>2008.9 APMST亚太地区骨肿瘤会议 北京参会</view>
<view>2009.11 第3届COA全国骨科大会 厦门大会发言《儿童保肢治疗的选择》</view>
<view>2010.11 第4届COA全国骨科大会 成都大会发言《硬纤维瘤的药物治疗疗效分析》</view>
<view>2011.9 第16届ISOLS国际保肢协会会议 北京 参会</view>
<view>2013.5 第14届全国骨肿瘤学术会议 合肥大会发言《骨肿瘤肺转移患者的治疗及预后评估》</view>
<view>2015.10 第18届ISOLS国际保肢协会会议 美国奥兰多 大会发言</view>
<import src="../../wxParse/wxParse.wxml" />
<template is='wxParse' data='{{wxParseData:content.nodes}}' />
</view>
</view>
<view class='bottom_box'>
... ...
... ... @@ -23,7 +23,9 @@ Page({
app.post(url, params).then((res) => {
wx.setStorageSync('openid', res.openid);
wx.setStorageSync('session_key', res.session_key);
that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv);
console.log('token',wx.getStorageSync('token'))
console.log(typeof wx.getStorageSync('token'))
that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv);
// 调用sendSession方法,将session_key以参数形式传入
that.aldstat.sendSession(res.session_key);
// 调用sendOpenid方法,将openid以参数形式传入
... ...
... ... @@ -18,28 +18,38 @@ Page({
},
submitFeedback(){
let that=this;
let header={
'XX-Token':wx.getStorageSync('token'),
'XX-Device-Type':''
}
let url ='user/submitFeedback';
let param={
content: that.data.content
}
app.post(url,param,header).then((res)=>{
if (that.data.content==''){
wx.showToast({
title: '提交成功',
icon:'none',
duration:2000
title: '提交内容不能为空',
icon: 'none',
duration: 2000,
})
setTimeout(function(){
wx.switchTab({
url: '/pages/my/my',
}else{
let header = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''
}
let url = 'user/submitFeedback';
let param = {
content: that.data.content
}
app.post(url, param, header).then((res) => {
wx.showToast({
title: '提交成功',
icon: 'none',
duration: 2000
})
setTimeout(function () {
wx.switchTab({
url: '/pages/my/my',
})
}, 500)
}).catch((errMsg) => {
console.log(errMsg)
})
},500)
}).catch((errMsg)=>{
console.log(errMsg)
})
}
},
/**
* 生命周期函数--监听页面加载
... ...
... ... @@ -44,7 +44,7 @@ page{
left:0;
width:100%;
background-color: #fff;
border-bottom:1rpx solid #DADADA;
border-bottom:2px solid #DADADA;
color:#353535;
font-size:30rpx;
display: flex;
... ... @@ -59,10 +59,10 @@ page{
justify-content: center;
width:50%;
height: 100%;
line-height: 100%;
line-height: 100rpx;
}
.border_left{
border-right: 1rpx solid #DADADA;
border-right: 2px solid #DADADA;
}
.record_tab .active{
color:#3AA0EA;
... ... @@ -79,8 +79,7 @@ page{
}
.plan_item1{
margin: 30rpx 30rpx 0 30rpx;
box-sizing: border-box;
box-sizing: border-box;
background: #fff;
color:#999;
font-size:28rpx;
... ...
... ... @@ -35,6 +35,7 @@ Page({
*/
onLoad: function (options) {
let that = this;
if (options.scene != undefined) {
var scene = decodeURIComponent(options.scene);
var doctorid = scene.split("=")[1];
... ... @@ -46,7 +47,6 @@ Page({
if (options.doctorid != undefined) {
app.globalData.doctorid = doctorid;
}
app.setStatisticsVisitorLog('/pages/start/start');
that.getWelcomeInfo();
},
/**
... ... @@ -59,7 +59,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
... ...
... ... @@ -14,13 +14,14 @@
}
.st_title{
color:#333;
font-size:48rpx;
font-size:40rpx;
white-space: nowrap;
margin:65rpx 0 5rpx 0;
text-align: center;
}
.st_subtitle{
color:#999;
font-size:34rpx;
font-size:32rpx;
text-align: center;
}
.rate_box{
... ...