Commit 23caca08 by zujiaozhang

'问卷列表添加获取wechatId判断,空列表添加展示页面'

parent bca503e1
......@@ -30,4 +30,28 @@
}
.hide{
display: none;
}
\ No newline at end of file
}
.my_questionnaire_no{
position: relative;
}
.my_questionnaire_no_img{
position: absolute;
left: 50%;
top: 2rem;
transform: translateX(-50%);
height: 3.04rem;
width: 3.04rem;
}
.my_questionnaire_no_img img{
height: 100%;
width: 100%;
}
.my_questionnaire_no_text{
margin-top: .2rem;
font-size: .38rem;
width: 100%;
text-align: center;
font-family:PingFangSC-Regular,PingFang SC;
color: #000;
font-weight:500;
}
\ No newline at end of file
......@@ -138,7 +138,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getQuestionAnswer: function(){
var crm = discomfort.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/getAnswer',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/getAnswer',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -278,7 +278,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getPreQuestion:function(){
var crm = discomfort.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/previousQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/previousQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -303,7 +303,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
var crm = discomfort.adminId==''? '':'/crm'
console.log(discomfort.checks)
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/nextQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/nextQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -380,7 +380,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
submitQuestionAnswer: function(data){
var crm = discomfort.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/completeQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/completeQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......
......@@ -343,7 +343,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getQuestionAnswer: function(){
var crm = discomfortGeneralPage.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/getAnswer',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/getAnswer',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -374,7 +374,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getPreQuestion:function(){
var crm = discomfortGeneralPage.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/previousQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/previousQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -459,7 +459,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getNextQuestion:function(data,url){
var crm = discomfortGeneralPage.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/nextQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/nextQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -532,7 +532,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
submitQuestionAnswer: function(data){
var crm = discomfortGeneralPage.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/completeQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/completeQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......
......@@ -122,7 +122,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getQuestionAnswer: function(){
var crm = examination.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/getAnswer',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/getAnswer',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -203,7 +203,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getPreQuestion:function(){
var crm = examination.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/previousQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/previousQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -230,7 +230,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getNextQuestion:function(data){
var crm = examination.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/nextQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/nextQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......
......@@ -170,7 +170,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
},
getWechatTicket: function() {
medtap.submitAjax({
url: 'https://gateway.medtap.cn/wechat/lung/fetchWechatTicket',
url: 'https://testdevgw.medtap.cn/wechat/lung/fetchWechatTicket',
type: 'GET',
async: false,
data: {
......@@ -250,7 +250,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
//上传图片
upLoadImg: function(serverId, localId) {
$.ajax({
url: 'https://gateway.medtap.cn/common/uploadWechatFile',
url: 'https://testdevgw.medtap.cn/common/uploadWechatFile',
type: 'POST',
async: false,
data: {
......@@ -285,7 +285,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getQuestionAnswer: function(){
var crm = furtherConsultation.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/getAnswer',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/getAnswer',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -335,7 +335,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getPreQuestion:function(){
var crm = furtherConsultation.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/previousQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/previousQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -358,7 +358,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getNextQuestion:function(data){
var crm = furtherConsultation.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/nextQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/nextQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......
......@@ -187,7 +187,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
},
getWechatTicket: function() {
medtap.submitAjax({
url: 'https://gateway.medtap.cn/wechat/lung/fetchWechatTicket',
url: 'https://testdevgw.medtap.cn/wechat/lung/fetchWechatTicket',
type: 'GET',
async: false,
data: {
......@@ -265,7 +265,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
//上传图片
upLoadImg: function(serverId, localId) {
$.ajax({
url: 'https://gateway.medtap.cn/common/uploadWechatFile',
url: 'https://testdevgw.medtap.cn/common/uploadWechatFile',
type: 'POST',
async: false,
data: {
......@@ -298,7 +298,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getQuestionAnswer: function(){
var crm = geneDetection.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/getAnswer',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/getAnswer',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -354,7 +354,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getPreQuestion:function(){
var crm = geneDetection.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/previousQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/previousQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -404,7 +404,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getNextQuestion:function(data,url){
var crm = geneDetection.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/nextQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/nextQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......
......@@ -106,7 +106,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
},
getWechatTicket: function() {
medtap.submitAjax({
url: 'https://gateway.medtap.cn/wechat/lung/fetchWechatTicket',
url: 'https://testdevgw.medtap.cn/wechat/lung/fetchWechatTicket',
type: 'GET',
async: false,
data: {
......@@ -186,7 +186,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
//上传图片
upLoadImg: function(serverId, localId) {
$.ajax({
url: 'https://gateway.medtap.cn/common/uploadWechatFile',
url: 'https://testdevgw.medtap.cn/common/uploadWechatFile',
type: 'POST',
async: false,
data: {
......@@ -219,7 +219,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getQuestionAnswer: function(){
var crm = generalPage.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/getAnswer',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/getAnswer',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -255,7 +255,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getPreQuestion:function(){
var crm = generalPage.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/previousQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/previousQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -304,7 +304,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getNextQuestion:function(data,url){
var crm = generalPage.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/nextQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/nextQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......
......@@ -17,7 +17,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {
localStorage.wxLungToken = '';
medtap.loading(1);
medtap.submitAjax({
url: 'https://gateway.medtap.cn/user/auth/token',
url: 'https://testdevgw.medtap.cn/user/auth/token',
type: 'POST',
async: false,
contentType: 'application/json',
......@@ -41,7 +41,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {
getMyquestionnaire: function(){
var crm = index.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+ crm +'/followUpUser',
url: 'https://testdevgw.medtap.cn/operation/followUp'+ crm +'/followUpUser',
type: 'post',
async: false,
contentType: 'application/json',
......
......@@ -4,8 +4,11 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
adminId: medtap.getRequest('adminId')||'',
// 问卷id
followUpId: '',
wechatId: localStorage.getItem('wechatId'),
wechatId: medtap.getRequest('wechatId')||localStorage.getItem('wechatId'),
init:function(){
if(medtap.getRequest('wechatId')){
myQuestionnaireList.getToken()
}
$(".tabbox li").click(function ()
  {
    //获取点击的元素给其添加样式,讲其兄弟元素的样式移除
......@@ -17,10 +20,35 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
  });
myQuestionnaireList.getQuestionnaireList()
},
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: myQuestionnaireList.wechatId
},
success: function(res) {
medtap.loading(0);
if (res.success == true) {
var token = res.content.token;
localStorage.setItem('wxLungToken', token);
} else {
}
},
error: function(res) {
console.log(res.resultDesc);
}
})
},
// 获取问卷列表
getQuestionnaireList:function(){
medtap.submitAjax({
url: "https://gateway.medtap.cn/operation/followUp/followUpList",
url: "https://testdevgw.medtap.cn/operation/followUp/followUpList",
type: 'post',
async: false,
contentType: 'application/json',
......@@ -28,9 +56,9 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
"adminId": myQuestionnaireList.adminId
},
success: function(res) {
console.log(res)
var html = ''
var QuestionnaireList = res.content.followUpList
if(QuestionnaireList.length>0){
for (var i = 0; i < QuestionnaireList.length; i++) {
var times = QuestionnaireList[i].answerTime.split('-')
var mouthTime =times[1]
......@@ -57,6 +85,15 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
}
})
}else{
var html ='<div class="my_questionnaire_no">'+
'<div class="my_questionnaire_no_img">'+
'<img src="../images/ILCC_question_png@2x.png" alt="">'+
'<p class="my_questionnaire_no_text">暂无问卷</p>'+
'</div>'+
'</div>'
$('.my_questionnaire_box').append(html)
}
}
})
}
......
......@@ -117,7 +117,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getQuestionAnswer: function(){
var crm = otherTreatment.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/getAnswer',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/getAnswer',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -154,7 +154,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getPreQuestion:function(){
var crm = otherTreatment.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/previousQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/previousQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -178,7 +178,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getNextQuestion:function(data){
var crm = otherTreatment.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/nextQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/nextQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......
......@@ -19,7 +19,7 @@ define(['zepto','medtap'],function($,medtap){
},
getQueDetails:function(){
medtap.submitAjax({
url: "https://gateway.medtap.cn/operation/followUp/followUpDetail",
url: "https://testdevgw.medtap.cn/operation/followUp/followUpDetail",
type: 'post',
async: false,
contentType: 'application/json',
......@@ -1382,7 +1382,7 @@ define(['zepto','medtap'],function($,medtap){
},
getWechatTicket: function() {
medtap.submitAjax({
url: 'https://gateway.medtap.cn/wechat/lung/fetchWechatTicket',
url: 'https://testdevgw.medtap.cn/wechat/lung/fetchWechatTicket',
type: 'GET',
async: false,
data: {
......
......@@ -28,7 +28,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getQuestionAnswer: function(){
var crm = questionnaireWeight.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/getAnswer',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/getAnswer',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -52,7 +52,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getNextQuestion:function(){
var crm = questionnaireWeight.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/nextQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/nextQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......
......@@ -11,7 +11,7 @@ define(['zepto','medtap'],function($,medtap){
checkUser:function(){
medtap.loading(1);
medtap.submitAjax({
url:'https://gateway.medtap.cn/wechat/user/getWechatUser',
url:'https://testdevgw.medtap.cn/wechat/user/getWechatUser',
type:'GET',
async: false,
data:{
......@@ -34,7 +34,7 @@ define(['zepto','medtap'],function($,medtap){
localStorage.setItem('wechatId', rukou.wechatId);
medtap.loading(1);
medtap.submitAjax({
url: 'https://gateway.medtap.cn/user/auth/token',
url: 'https://testdevgw.medtap.cn/user/auth/token',
type: 'POST',
async: false,
contentType: 'application/json',
......
......@@ -218,7 +218,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
initCityl: function() {
medtap.loading(1);
$.ajax({
url: "https://gateway.medtap.cn/common/listAreaV0",
url: "https://testdevgw.medtap.cn/common/listAreaV0",
data: {},
type: 'get',
async: true,
......@@ -393,7 +393,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
},
// 获取医保信息
getPatientInfo: function(){
var crm = targetedTherapy.adminId==''? 'https://gateway.medtap.cn/user/patientEMR/getPatientInfo':'https://gateway.medtap.cn/operation/followUp/crm/getPatientInfo'
var crm = targetedTherapy.adminId==''? 'https://testdevgw.medtap.cn/user/patientEMR/getPatientInfo':'https://testdevgw.medtap.cn/operation/followUp/crm/getPatientInfo'
console.log(crm)
medtap.submitAjax({
url: crm,
......@@ -418,7 +418,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
},
// 更新医保信息
updatePatientInfo: function(){
var crm = targetedTherapy.adminId==''? 'https://gateway.medtap.cn/user/patientEMR/updatePatientInfo':'https://gateway.medtap.cn/operation/followUp/crm/updatePatientInfo'
var crm = targetedTherapy.adminId==''? 'https://testdevgw.medtap.cn/user/patientEMR/updatePatientInfo':'https://testdevgw.medtap.cn/operation/followUp/crm/updatePatientInfo'
medtap.submitAjax({
url: crm,
type: 'post',
......@@ -440,7 +440,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getQuestionAnswer: function(){
var crm = targetedTherapy.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/getAnswer',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/getAnswer',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -488,7 +488,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getPreQuestion:function(){
var crm = targetedTherapy.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/previousQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/previousQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......@@ -513,7 +513,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
getNextQuestion:function(data,url){
var crm = targetedTherapy.adminId==''? '':'/crm'
medtap.submitAjax({
url: 'https://gateway.medtap.cn/operation/followUp'+crm+'/nextQuestion',
url: 'https://testdevgw.medtap.cn/operation/followUp'+crm+'/nextQuestion',
type: 'post',
async: false,
contentType: 'application/json',
......
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