|
@@ -61,6 +61,9 @@ class Lepao {
|
|
|
// const randomPath = paths[Math.floor(Math.random() * paths.length)]
|
|
// const randomPath = paths[Math.floor(Math.random() * paths.length)]
|
|
|
const randomPath = paths[0]
|
|
const randomPath = paths[0]
|
|
|
|
|
|
|
|
|
|
+ const updateSql = 'UPDATE path_data SET count = count + 1 WHERE id = ?'
|
|
|
|
|
+ db.query(updateSql, [randomPath.id])
|
|
|
|
|
+
|
|
|
return randomPath.id
|
|
return randomPath.id
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -68,7 +71,6 @@ class Lepao {
|
|
|
async getRecord(uid, token, school_id, student_id) {
|
|
async getRecord(uid, token, school_id, student_id) {
|
|
|
try {
|
|
try {
|
|
|
const reqData = { uid, token, school_id, student_id }
|
|
const reqData = { uid, token, school_id, student_id }
|
|
|
- console.log(reqData)
|
|
|
|
|
const recordUrl = this.runpy + '/get_record'
|
|
const recordUrl = this.runpy + '/get_record'
|
|
|
let recordRes = await axios.post(recordUrl, reqData)
|
|
let recordRes = await axios.post(recordUrl, reqData)
|
|
|
const { data } = recordRes
|
|
const { data } = recordRes
|