Commit f4d02323 by hanpeng

-mark- error

parent 3e330abe
define(['zepto','medtap'],function($,medtap){
var doctor = {
init:function(){
},
getDoctorList:function(){
},
getToken:function(){
}
}
})
\ No newline at end of file
define(['zepto','medtap'],function($,medtap){
var rukou = {
wechatId:medtap.getRequest('wechatId'),
init:function(){
rukou.getToken()
},
checkUser:function(){
medtap.loading(1);
medtap.submitAjax({
url:'https://testdevgw.medtap.cn/wechat/user/getWechatUser',
type:'GET',
async: false,
data:{
wechatId:rukou.wechatId
},
success:function(res){
medtap.loading(0);
var info = res.content.wechatUser;
if(info.hasOwnProperty('userId')){
//medtap.pushWindow('index.html?wechatId=' + rukou.wechatId)
window.location.replace('index.html?wechatId=' + rukou.wechatId)
}else{
window.location.replace('https://review-formal.iplusmed.com/wechatForLungCancer/dev/wechat_lung_login/login.html?wechatId=' + rukou.wechatId)
}
}
})
},
getToken:function(){
localStorage.wxLungToken = '';
medtap.loading(1);
medtap.submitAjax({
url: 'https://testdevgw.medtap.cn/user/auth/token',
type: 'POST',
async: false,
contentType: 'application/json',
data: {
wechatId: rukou.wechatId
},
success: function(res) {
medtap.loading(0);
if (res.success == true) {
var token = res.content.token;
localStorage.setItem('wxLungToken', token);
rukou.checkUser();
} else {
}
},
error: function(res) {
console.log(res.resultDesc);
}
})
}
}
rukou.init();
})
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<link rel="stylesheet" type="text/css" href="https://review-formal.iplusmed.com/Common/css/wechat_Reset.min.css" />
<script src="https://review-formal.iplusmed.com/Common/javaScript/calRem.js" type="text/javascript" charset="utf-8"></script>
<title>我的医生</title>
<script src="https://review-formal.iplusmed.com/Common/javaScript/require.min.js"></script>
<script type="text/javascript">
require.config({
baseUrl: "./",
paths: {
"zepto": "https://review-formal.iplusmed.com/Common/javaScript/zepto.min",
"medtap": "https://review-formal.iplusmed.com/Common/javaScript/medtap_core_wx",
"md5": "https://review-formal.iplusmed.com/Common/javaScript/md5.min"
},
shim: {
"zepto": {
exports: "$"
}
}
});
</script>
</head>
<body>
<div id="content">
<div class="doctor_list">
<div class="doctor_item">
<img src="../images/post_title_bg@2x.png" class="doctor_profile">
<div class="doctor_info">
<span class="doctor_name">刘怎容</span>
<span class="doctor_title">主任医师</span>
<span class="attention_status">互相关注</span>
<p class="doctor_hospital">哈尔滨医科大学附属肿瘤医院 肿瘤内科</p>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
require(['../javaScript/myDoctor.js'])
</script>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>加载中...</title>
<script src="https://review-formal.iplusmed.com/Common/javaScript/require.min.js"></script>
<script type="text/javascript">
require.config({
baseUrl: "./",
paths: {
"zepto": "https://review-formal.iplusmed.com/Common/javaScript/zepto.min",
"medtap": "https://review-formal.iplusmed.com/Common/javaScript/medtap_core_wx",
"md5": "https://review-formal.iplusmed.com/Common/javaScript/md5.min"
},
shim: {
"zepto": {
exports: "$"
}
}
});
</script>
</head>
<body>
</body>
<script type="text/javascript">
require(['javaScript/rukou.js'])
</script>
</html>
......@@ -4,9 +4,9 @@ define(['zepto', 'medtap'], function($, medtap) {
localIds: [],
serverId: "",
imgList: [],
init: function() {
treatment.bindEve();
treatment.getWechatTicket();
},
bindEve: function() {
$('#hasPoint').on('click', function() {
......@@ -28,11 +28,15 @@ define(['zepto', 'medtap'], function($, medtap) {
$('.select_btn_list .select_btn_item').attr('disabled', 'disabled');
}
})
$('.select_btn_list .select_btn_item').unbind().bind('click', function() {
$('.select_btn_list .select_btn_item').on('click', function() {
if ($('.yes').attr('data-select') == 'yes') {
$(this).toggleClass('selectOn');
//$(this).toggleClass('selectOn');
if ($(this).hasClass('selectOn')) {
$(this).removeClass('selectOn');
} else {
$(this).addClass('selectOn');
}
} else if ($('.no').attr('data-select') == 'yes') {
}
......@@ -61,242 +65,11 @@ define(['zepto', 'medtap'], function($, medtap) {
} else if ($('.no').attr('data-select') == 'yes') {
}
if (str.length == 0) {
$('.hasPoint').text('请选择');
} else {
$('.hasPoint').text(treatment.pointList)
}
});
$('.treatWay_btn').unbind().bind('click', function() {
$('#content').hide();
$('.hasPre').hide();
$('.content_2').show();
})
$('#treat_confirm').unbind().bind('click', function() {
$('.content_2').hide();
$('#content').show();
$('.hasPre').show();
});
$('.add_btn').unbind().bind('click', function() {
$('#content').hide();
$('.hasPre').hide();
$('.content_3').show();
});
$('#treat_confirm_history').unbind().bind('click', function() {
$('.content_3').hide();
$('#content').show();
$('.hasPre').show();
});
//content_2事件定义
$('.content_2 .select_item').unbind().bind('click', function() {
$(this).addClass('select');
$(this).siblings('.select_item').removeClass('select');
if ($(this).hasClass('has')) {
$('.content_2 .common_btn').show();
} else if ($(this).hasClass('no')) {
$('.content_2 .common_btn').hide();
}
})
$('.content_2 .btn_icon').unbind().bind('click', function() {
$(this).toggleClass('btnSelect');
if ($(this).hasClass('btnSelect')) {
$(this).attr('select', 'yes')
} else {
$(this).attr('select', 'no')
}
});
$('.content_2 .more_way_btn').unbind().bind('click', function() {
$(this).toggleClass('btnOn');
if ($(this).hasClass('btnOn')) {
$(this).attr('select', 'yes')
} else {
$(this).attr('select', 'no')
}
})
//content_3事件定义
$('.content_3 .select_item').unbind().bind('click', function() {
$(this).addClass('select');
$(this).siblings('.select_item').removeClass('select');
if ($(this).hasClass('has')) {
$('.content_3 .common_btn').show();
} else if ($(this).hasClass('no')) {
$('.content_3 .common_btn').hide();
}
})
$('.content_3 .btn_icon').unbind().bind('click', function() {
$(this).toggleClass('btnSelect');
if ($(this).hasClass('btnSelect')) {
$(this).attr('select', 'yes')
} else {
$(this).attr('select', 'no')
}
});
$('.content_3 .more_way_btn').unbind().bind('click', function() {
$(this).toggleClass('btnOn');
if ($(this).hasClass('btnOn')) {
$(this).attr('select', 'yes')
} else {
$(this).attr('select', 'no')
}
})
},
//获取微信票据
getWechatTicket: function() {
medtap.submitAjax({
url: 'https://testdevgw.medtap.cn/wechat/lung/fetchWechatTicket',
type: 'GET',
async: false,
data: {
url: window.location.href
},
success: function(res) {
var data = res.content;
wx.config({
debug: false,
appId: data.appId, // 必填,公众号的唯一标识
timestamp: data.timestamp, // 必填,生成签名的时间戳
nonceStr: data.nonceStr, // 必填,生成签名的随机串
signature: data.signature, // 必填,签名,见附录1
jsApiList: [
'chooseImage',
'previewImage',
'uploadImage'
]
})
}
})
}, //选择图片
choseImage: function() {
$('#upload').on('click', function() {
var html = '';
wx.ready(function() {
var syncUpload = function(localIds) {
localId = localIds[0];
localIds = localIds.length > 1 ? localIds.slice(1) : localIds[0];
wx.uploadImage({
localId: localId,
isShowProgressTips: 1,
success: function(res) {
var serverId = res.serverId; // 返回图片的服务器端ID
//其他对serverId做处理的代码
treatment.upLoadImg(serverId, localId);
if (localIds.length > 0) {
syncUpload(localIds);
}
}
});
};
wx.chooseImage({
count: 9,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: function(res) {
treatment.localIds = res.localIds;
//所有需要上传到图片预览
syncUpload(treatment.localIds);
}
})
})
})
},
//图片预览
previewImage: function() {
$('#ImgUp').on('click', '.image_files_img', function() {
var imgArray = [];
var curImageSrc = $(this).attr('src');
if (curImageSrc) {
$('#ImgUp .image_files_img').each(function(index, el) {
var itemSrc = $(this).attr('src');
imgArray.push(itemSrc);
});
wx.previewImage({
current: curImageSrc,
urls: imgArray
});
}
});
$('#ImgUp').on('click', '.image_del', function() {
if (confirm('确定要删除图片吗?')) {
$(this).parent().remove();
}
});
},
//上传图片
upLoadImg: function(serverId, localId) {
$.ajax({
url: 'https://testdevgw.medtap.cn/common/uploadWechatFile',
type: 'POST',
async: false,
data: {
bizType: "3",
folder: 'patientInfo',
mediaId: serverId,
ext: 'jpg'
},
success: function(data) {
if (data.success == true) {
var res = data.content;
var imgKey = res.ossKey;
treatment.imgList.push(imgKey);
var html = '<div class="image_files_item">' +
'<img src="' + localId + '" class="image_files_img" imgkey="' + imgKey + '">' +
'<img src="../images/post_delete_btn@2x.png" class="image_del" >' +
'</div>';
$('#ImgUp').append(html);
}
}
})
},
postData:function(){
var urls = [],
picUrl = "";
[].forEach.call($('#ImgUp .image_files_img'), function(item) {
urls.push($(item).attr('imgkey'));
});
var picUrl = urls.join(',');
medtap.loading(1);
medtap.submitAjax({
url:'https://devgw.medtap.cn/user/patientEMR/createPatientEMR',
type:'post',
contentType: 'application/json',
data:{
targetedMutations:'',
acceptingCure:'',//当前正在接受的治疗
acceptedCure:'',//既往接受过的治疗
curePic:picUrl,//选择的图片
},
success:function(res){
medtap.loading(0);
if(res.success == true){
setTimeout(function(){
medtap.toast({
message:'保存成功',
time:1500
});
setTimeout(function(){
window.location.replace('doctorHomePage.html');//跳转至医生主页
},1500)
},2000)
}
}
})
}
}
treatment.init();
treatment.choseImage();
treatment.previewImage();
})
......@@ -44,7 +44,7 @@
</div>
<div class="input_item clearfix">
<div class="input_item_title">当前正在接受的治疗</div>
<div class="input_item_info treatWay_btn">
<div class="input_item_info">
<span class="input_content">请选择</span>
<img src="../images/_arrows _right@2x.png" class="arrow_icon">
</div>
......@@ -60,7 +60,7 @@
<img src="../images/post_ picture_btn@2x.png" >
</div>
<div class="image_files clearfix" id="ImgUp">
<!-- <div class="image_files_item">
<div class="image_files_item">
<img src="../images/post_title_bg@2x.png" class="image_files_img">
<img src="../images/post_delete_btn@2x.png" class="image_del" >
</div>
......@@ -95,7 +95,7 @@
<div class="image_files_item">
<img src="../images/post_title_bg@2x.png" class="image_files_img">
<img src="../images/post_delete_btn@2x.png" class="image_del" >
</div> -->
</div>
</div>
</div>
</div>
......@@ -139,188 +139,6 @@
<div class="content_mod">
</div>
<div class="content_2">
<div class="select_warp">
<span class="select_title">治疗项目(多选)</span>
<span class="select_item has select"></span>
<span class="select_item no"></span>
</div>
<div class="common_btn">
<div class="select_btn_list">
<div class="select_btn clearfix">
<div class="btn_name">化疗</div>
<div class="btn_icon">
</div>
</div>
<div class="select_btn clearfix">
<div class="btn_name">手术</div>
<div class="btn_icon">
</div>
</div>
<div class="select_btn clearfix">
<div class="btn_name">放疗</div>
<div class="btn_icon">
</div>
</div>
<div class="select_btn clearfix">
<div class="btn_name">PD-1/PD-L1</div>
<div class="btn_icon">
</div>
</div>
<div class="select_btn clearfix">
<div class="btn_name">中药治疗</div>
<div class="btn_icon">
</div>
</div>
</div>
<div class="more_way_list">
<div class="more_way_title">靶向治疗</div>
<div class="more_way_item_header clearfix">
<div class="green_line"></div>
<div class="more_way_item_name">EGFR突变</div>
</div>
<div class="more_way_item_header_title">一代</div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">易瑞沙(吉非替尼片)</span>
<span class="more_way_btn rl">特罗凯(厄洛替尼片)</span>
<span class="more_way_btn">凯美纳(埃克替尼片)</span>
<span class="more_way_btn rl">伊瑞可(国产吉非替尼片)</span>
<span class="more_way_btn">其他</span>
</div>
<div class="more_way_item_header_title mr_3">二代</div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">吉泰瑞(阿法替尼)</span>
<span class="more_way_btn rl">其他</span>
</div>
<div class="more_way_item_header_title mr_3">三代</div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">泰瑞沙(奥希替尼片)</span>
<span class="more_way_btn rl">其他</span>
</div>
<div class="more_way_item_header clearfix db">
<div class="green_line"></div>
<div class="more_way_item_name">ALK突变</div>
</div>
<div class="more_way_item_header_title"></div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">赛可瑞(克唑替尼)</span>
<span class="more_way_btn rl">赛可瑞(克唑替尼)</span>
<span class="more_way_btn">安圣莎(阿来替尼)</span>
<span class="more_way_btn rl">其他</span>
</div>
<div class="more_way_item_header clearfix db">
<div class="green_line"></div>
<div class="more_way_item_name">VEGFR</div>
</div>
<div class="more_way_item_header_title"></div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">福可维(安罗替尼)</span>
<span class="more_way_btn rl">艾坦(阿帕替尼)</span>
<span class="more_way_btn">安维汀(贝伐单抗)</span>
<span class="more_way_btn rl">其他</span>
</div>
</div>
<div class="select_btn clearfix" style="margin-top:0.2rem;">
<div class="btn_name">其他</div>
<div class="btn_icon">
</div>
</div>
</div>
<div class="footer_btn_02" id="treat_confirm">
确定
</div>
</div>
<div class="content_3">
<div class="select_warp">
<span class="select_title">治疗项目(多选)</span>
<span class="select_item has select"></span>
<span class="select_item no"></span>
</div>
<div class="common_btn">
<div class="select_btn_list">
<div class="select_btn clearfix">
<div class="btn_name">化疗</div>
<div class="btn_icon">
</div>
</div>
<div class="select_btn clearfix">
<div class="btn_name">手术</div>
<div class="btn_icon">
</div>
</div>
<div class="select_btn clearfix">
<div class="btn_name">放疗</div>
<div class="btn_icon">
</div>
</div>
<div class="select_btn clearfix">
<div class="btn_name">PD-1/PD-L1</div>
<div class="btn_icon">
</div>
</div>
<div class="select_btn clearfix">
<div class="btn_name">中药治疗</div>
<div class="btn_icon">
</div>
</div>
</div>
<div class="more_way_list">
<div class="more_way_title">靶向治疗</div>
<div class="more_way_item_header clearfix">
<div class="green_line"></div>
<div class="more_way_item_name">EGFR突变</div>
</div>
<div class="more_way_item_header_title">一代</div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">易瑞沙(吉非替尼片)</span>
<span class="more_way_btn rl">特罗凯(厄洛替尼片)</span>
<span class="more_way_btn">凯美纳(埃克替尼片)</span>
<span class="more_way_btn rl">伊瑞可(国产吉非替尼片)</span>
<span class="more_way_btn">其他</span>
</div>
<div class="more_way_item_header_title mr_3">二代</div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">吉泰瑞(阿法替尼)</span>
<span class="more_way_btn rl">其他</span>
</div>
<div class="more_way_item_header_title mr_3">三代</div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">泰瑞沙(奥希替尼片)</span>
<span class="more_way_btn rl">其他</span>
</div>
<div class="more_way_item_header clearfix db">
<div class="green_line"></div>
<div class="more_way_item_name">ALK突变</div>
</div>
<div class="more_way_item_header_title"></div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">赛可瑞(克唑替尼)</span>
<span class="more_way_btn rl">赛可瑞(克唑替尼)</span>
<span class="more_way_btn">安圣莎(阿来替尼)</span>
<span class="more_way_btn rl">其他</span>
</div>
<div class="more_way_item_header clearfix db">
<div class="green_line"></div>
<div class="more_way_item_name">VEGFR</div>
</div>
<div class="more_way_item_header_title"></div>
<div class="more_way_item_btn">
<span class="more_way_btn btnOn">福可维(安罗替尼)</span>
<span class="more_way_btn rl">艾坦(阿帕替尼)</span>
<span class="more_way_btn">安维汀(贝伐单抗)</span>
<span class="more_way_btn rl">其他</span>
</div>
</div>
<div class="select_btn clearfix" style="margin-top:0.2rem;">
<div class="btn_name">其他</div>
<div class="btn_icon">
</div>
</div>
</div>
<div class="footer_btn_03" id="treat_confirm_history">
确定
</div>
</div>
</body>
<script type="text/javascript">
require(['../javaScript/createTreatmentInfo.js'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment