Commit 0745651c by luyt

other:调整分页内容倒叙

1 parent 5a0c5b0a
'use strict';
const Service = require('egg').Service;
const sequelize = require('sequelize');
class TrackService extends Service {
async create(params) {
......@@ -38,9 +39,10 @@ class TrackService extends Service {
const page = +params.page || 1;
const pageSize = +params.pageSize || 10;
const blogPageList = await app.model.Track.findAll({
// order: [
// [ 'id', 'desc' ],
// ],
order: [
[ 'create_date', 'DESC' ],
],
// order: sequelize.literal('create_date'),
limit: pageSize,
offset: (page - 1) * pageSize,
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!