feat: 新增运动节拍训练工具套件与子工具页面
新增运动节拍RepClock全套小程序页面、后端API与数据库服务,新增subhub子工具汇总页面,优化全局主页样式与配置,为web静态资源添加版本缓存参数,补充配套调试脚本
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
const http = require('http')
|
||||
const data = JSON.stringify({ cardId: 'rc_card_c6aebdfb-7330-43c1-b42c-a6a856a715f2' })
|
||||
const req = http.request({
|
||||
hostname: '127.0.0.1', port: 8976,
|
||||
path: '/api/mp_rep_clock/kits/rep_clock/sessions/start',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
'Content-Length': Buffer.byteLength(data),
|
||||
'Accept': 'application/json; charset=utf-8',
|
||||
'X-Mp-Timeassistant': 'smoke_test_probe_xxx',
|
||||
}
|
||||
}, (res) => {
|
||||
let buf = ''
|
||||
res.on('data', c => buf += c)
|
||||
res.on('end', () => {
|
||||
console.log('HTTP', res.statusCode)
|
||||
console.log('BODY:', buf)
|
||||
try {
|
||||
const j = JSON.parse(buf)
|
||||
console.log('字段检查:')
|
||||
console.log(' ok =', j.ok)
|
||||
console.log(' error =', j.error)
|
||||
console.log(' conflictSessionId =', j.conflictSessionId)
|
||||
console.log(' conflict_session_id =', j.conflict_session_id)
|
||||
console.log(' expiresInMs =', j.expiresInMs, typeof j.expiresInMs)
|
||||
console.log(' expires_in_ms =', j.expires_in_ms, typeof j.expires_in_ms)
|
||||
} catch (e) { console.log('not json', e.message) }
|
||||
})
|
||||
})
|
||||
req.on('error', e => console.log('err:', e.message))
|
||||
req.write(data)
|
||||
req.end()
|
||||
Reference in New Issue
Block a user