This commit is contained in:
2025-02-19 00:34:51 +08:00
parent cf1cc83547
commit 2f3ffe2a34
33 changed files with 3180 additions and 832 deletions

View File

@@ -46,9 +46,9 @@ _.router.post('/login', async function (req, res, next) {
res.json({
status: 200,
message: '登录成功',
result: _.rsa.PrivateKeyEncryption({
token: token
})
result: {
token: token
}
});
} else {
res.json({
@@ -99,7 +99,7 @@ _.router.post('/add', async function (req, res, next) {
res.json({
status: 200,
message: '注册成功',
result: _.rsa.PrivateKeyEncryption({})
result: {}
});
} else {
res.json({
@@ -145,7 +145,7 @@ _.router.post('/like', async function (req, res, next) {
res.json({
status: 404,
message: '抱歉,请勿重复收藏',
result: _.rsa.PrivateKeyEncryption({})
result: {}
});
} else {
var data = await _.db.query({
@@ -157,7 +157,7 @@ _.router.post('/like', async function (req, res, next) {
res.json({
status: 200,
message: '收藏成功',
result: _.rsa.PrivateKeyEncryption({})
result: {}
});
} else {
res.json({
@@ -201,7 +201,7 @@ _.router.post('/likeList', async function(req, res, next) {
res.json({
status: 200,
message: '请求成功',
result: _.rsa.PrivateKeyEncryption(data)
result: data
});
});
@@ -239,13 +239,13 @@ _.router.post('/getUserAddress', async function(req, res, next) {
res.json({
status: 200,
message: '没有收货地址',
result: _.rsa.PrivateKeyEncryption({})
result: {}
});
} else {
res.json({
status: 200,
message: '请求成功',
result: _.rsa.PrivateKeyEncryption(data)
result: data
});
}