sss
This commit is contained in:
@@ -43,7 +43,7 @@ _.router.post('/addCar', async function(req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '成功添加购物车',
|
||||
result: _.rsa.PrivateKeyEncryption(data)
|
||||
result: data
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -79,13 +79,13 @@ _.router.post('/getCarList', async function(req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: _.rsa.PrivateKeyEncryption(data)
|
||||
result: data
|
||||
});
|
||||
} else {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '购物车没有数据',
|
||||
result: _.rsa.PrivateKeyEncryption({})
|
||||
result: {}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -130,17 +130,17 @@ _.router.post('/checkCar', async function(req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '商品已添加购物车',
|
||||
result: _.rsa.PrivateKeyEncryption({
|
||||
result: {
|
||||
isAddCar: true
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '商品未添加购物车',
|
||||
result: _.rsa.PrivateKeyEncryption({
|
||||
result: {
|
||||
isAddCar: false
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ _.router.post('/deleteCar', async function(req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '删除成功',
|
||||
result: _.rsa.PrivateKeyEncryption({})
|
||||
result: {}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -221,13 +221,13 @@ _.router.post('/updateCarNum', async function(req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '更新成功',
|
||||
result: _.rsa.PrivateKeyEncryption({})
|
||||
result: {}
|
||||
});
|
||||
} else {
|
||||
res.json({
|
||||
status: 404,
|
||||
message: '更新失败',
|
||||
result: _.rsa.PrivateKeyEncryption({})
|
||||
result: {}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -273,7 +273,7 @@ _.router.post('/submitCar', async function(req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '订单增加成功',
|
||||
result: _.rsa.PrivateKeyEncryption({})
|
||||
result: {}
|
||||
});
|
||||
});
|
||||
module.exports = _.router;
|
||||
|
||||
@@ -32,7 +32,7 @@ _.router.post('/index', async function (req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: _.rsa.PrivateKeyEncryption(data)
|
||||
result: data
|
||||
});
|
||||
});
|
||||
|
||||
@@ -92,7 +92,7 @@ _.router.post('/banner', async function (req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: _.rsa.PrivateKeyEncryption(banner)
|
||||
result: banner
|
||||
});
|
||||
});
|
||||
|
||||
@@ -128,7 +128,7 @@ _.router.post('/recommend', async function (req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: _.rsa.PrivateKeyEncryption(recommend)
|
||||
result: recommend
|
||||
});
|
||||
});
|
||||
|
||||
@@ -165,7 +165,7 @@ _.router.post('/info', async function (req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: _.rsa.PrivateKeyEncryption(data)
|
||||
result: data
|
||||
});
|
||||
});
|
||||
|
||||
@@ -202,7 +202,7 @@ _.router.post('/activity', async function (req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: _.rsa.PrivateKeyEncryption(data)
|
||||
result: data
|
||||
});
|
||||
});
|
||||
|
||||
@@ -240,7 +240,7 @@ _.router.post('/search', async function (req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: _.rsa.PrivateKeyEncryption(data)
|
||||
result: data
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -44,13 +44,13 @@ _.router.post('/allOrder', async function(req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: _.rsa.PrivateKeyEncryption(allOrder)
|
||||
result: allOrder
|
||||
});
|
||||
} else {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '没有订单',
|
||||
result: _.rsa.PrivateKeyEncryption({})
|
||||
result: {}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ _.router.post('/buyOrder', async function(req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '购买成功',
|
||||
result: _.rsa.PrivateKeyEncryption({})
|
||||
result: {}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ _.router.post('/list', async function(req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: _.rsa.PrivateKeyEncryption(data)
|
||||
result: data
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user