Commit 2d8be5ca by hanpeng

-mark 我的医生

parent 0e38d764
define(['zepto','medtap'],function($,medtap){
var doctor = {
init:function(){
},
getDoctorList:function(){
},
getToken:function(){
}
}
})
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();
})
<!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>
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