Browse Source

调接口

12-plugin-assessment
aBin 4 years ago
parent
commit
06b3e641b7
  1. 20
      index.html

20
index.html

@ -47,7 +47,7 @@
<!-- 示例插件2 id=100-->
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="p100.show()">测试组建2</button>
<div data-tname="入院评估" data-pid="1402932548627206144" data-uid="1323567842540523520" data-rid="rid333" data-tid="tid444" data-did="did555" style="height:50px;width:100%">
<div data-tname="入院评估" data-pid="1420652719055839232" data-uid="1323567842540523520" data-rid="rid333" data-tid="tid444" data-did="did555" style="height:50px;width:100%">
<!-- 评估插件 -->
<div data-root="p1419895741178191872" class="flex flex-row items-center" style="height:100%;width:100%;" onclick="p1419895741178191872.jumpDetails(this)">
<div class="flex-1 title"></div>
@ -118,8 +118,9 @@
}
});
fetch('http://www.tall.wiki/gateway/qcp/v3.0/patient/subordinate', {
fetch('https://www.tall.wiki/gateway/qcp/v3.0/patient/subordinate', {
method: 'POST',
mode: 'cors',
body: params,
headers: new Headers({
'Authorization': 'Bearer ' + that.token ,'Content-Type': 'application/json;charset=utf-8'
@ -128,13 +129,6 @@
return response.json();
}).catch(function(error){
console.error('Error:', error)
// TODO: 测试数据
const aa = {
completeNum: 5,
totalNum: 10,
}
that.setDate(aa)
// TODO
}).then(function(res){
const { success, code, data, msg } = res;
if (success && code === 200) {
@ -176,10 +170,10 @@
// 跳转详情
jumpDetails(that) {
const pId = that.parentNode.parentNode.getAttribute('data-pid');
const rId = that.parentNode.parentNode.getAttribute('data-rid');
const uId = that.parentNode.parentNode.getAttribute('data-uid');
const tId = that.parentNode.parentNode.getAttribute('data-tid');
const pId = this.dom.parentNode.getAttribute('data-pid');
const rId = this.dom.parentNode.getAttribute('data-rid');
const uId = this.dom.parentNode.getAttribute('data-uid');
const tId = this.dom.parentNode.getAttribute('data-tid');
location.href = `https://www.tall.wiki/qc/assess?projectId=${pId}&roleId=${rId}&userId=${uId}&id=${tId}`;
}
}

Loading…
Cancel
Save