# Reserve
# AMS 预约
const sDataByAc = {
BookAccType: bookType,
BookAccountID:
bookType === 'qq' ? loginObj.userInfo.uin : loginObj.userInfo.openid,
PlatID: 'GW',
Reserve: Common.checkPlat() === 'Browser' ? 'GW' : Common.checkPlat(),
}
const reserveByAMS = (amsObj, bookData) => {
amsObj
.doCustom('605708', bookData)
.then((res) => {
if (res.jData.ret == '1' || res.jData.ret == '0') {
document.querySelector('.checkReserve').innerText = '预约成功'
Common.hide('.reserve')
} else {
document.querySelector('.checkReserve').innerText = '预约失败'
}
})
.catch((e) => {
console.error(e)
})
}
reserveByAMS(amsObj, sDataByAc)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# AMS 查询
const amsObj = new AMS(256485, () => {
amsObj
.doCustom('606705', {
BookAccType: bookType,
})
.then((res) => {
if (res.jData.ret == '1') {
console.log('已经预约')
} else {
console.log('未预约')
}
})
.catch((e) => {
console.error(e)
})
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 微信查询&预约
// 查询
Reserve.checkReserveByWX()
.then((res) => {
// 已经预约
if (res === 1) {
document.querySelector('.checkReserve').innerText = '已预约'
} else {
document.querySelector('.checkReserve').innerText = '未预约'
}
})
.catch((e) => {
console.log(e)
})
//预约
Reserve.reserveByWX()
.then((res) => {
console.log(res)
})
.catch((e) => {
console.log(e)
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 手 Q 查询&预约
// 查询
Reserve.checkReserveByQQ()
.then((res) => {
// 已经预约
if (res === 1) {
document.querySelector('.checkReserve').innerText = '已经预约'
} else {
document.querySelector('.checkReserve').innerText = '未预约'
}
})
.catch((e) => {
console.log(e)
})
// 预约
Reserve.reserveByQQ()
.then((res) => {
console.log(res)
})
.catch((e) => {
console.log(e)
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 预约 DEMO
- 官方链接 https://lol.qq.com/jssdk/example/reserve_index.html
- 手 Q 链接 https://lol.qq.com/jssdk/example/reserve_qq.html
- 微信链接 https://lol.qq.com/jssdk/example/reserve_wx.html
- 掌盟链接 https://lol.qq.com/jssdk/example/reserve_zm.html