Browse Source

debug

release_1.1.2
巴林闲侠 2 years ago
parent
commit
7bc12c9861
  1. 8
      code/VideoAccess-VCMP/api/app/lib/utils/token4yingshi.js

8
code/VideoAccess-VCMP/api/app/lib/utils/token4yingshi.js

@ -27,7 +27,7 @@ module.exports = function (app, opts) {
appSecret: secret appSecret: secret
} }
}) })
if (tokenRes.code == 200) { if (tokenRes.code == 200 && tokenRes.data) {
const { accessToken, expireTime } = tokenRes.data const { accessToken, expireTime } = tokenRes.data
await models.SecretYingshi.update({ await models.SecretYingshi.update({
token: accessToken, token: accessToken,
@ -39,7 +39,11 @@ module.exports = function (app, opts) {
}) })
return accessToken return accessToken
} else { } else {
throw tokenRes throw {
msg: '未能获取萤石token',
key, secret,
tokenRes
}
} }
} }

Loading…
Cancel
Save