Browse Source

调接口

11-plugin-be-present
aBin 4 years ago
parent
commit
31b0fa1c98
  1. 10
      index.html

10
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" data-pstart="1627560659000" data-rstart="1627564259000" style="height:50px;width:100%">
<div data-tname="急诊医生到场" data-pid="1420652719055839232" data-uid="1323567842540523520" data-rid="rid333" data-tid="tid444" data-did="did555" data-pstart="1627560659000" data-rstart="1627564259000" style="height:50px;width:100%">
<!-- 到场插件 -->
<div data-root="p1419895701453938688" class="flex flex-row items-center" style="height:100%;width:100%;">
<div class="flex-1 title"></div>
@ -182,8 +182,9 @@
userType: 0
}
});
fetch('http://www.tall.wiki/gateway/qcp/v3.0/patient/aidRecord', {
fetch('https://www.tall.wiki/gateway/qcp/v3.0/patient/aidRecord', {
method: 'POST',
mode: 'cors',
body: params,
headers: new Headers({
'Authorization': 'Bearer ' + that.token ,'Content-Type': 'application/json;charset=utf-8'
@ -192,9 +193,6 @@
return response.json();
}).catch(function(error){
console.error('Error:', error)
// TODO: 测试数据
that.setDate()
// TODO:
}).then(function(res){
const { success, code, data, msg } = res;
if (success && code === 200) {
@ -300,11 +298,9 @@
if(min<10) {
min = '0' + min
}
console.log(`${year}-${month}-${day} ${hour}:${min}`)
const chooseTime = `${year}-${month}-${day} ${hour}:${min}`
if(chooseTime){
await this.choose(new Date(chooseTime).getTime())
console.log('new Date(chooseTime).getTime(): ', new Date(chooseTime).getTime());
this.cancelTime()
}
},

Loading…
Cancel
Save