Skip to content

Commit

Permalink
feat: 3.1.9 新增排序方式切换功能.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkw199711 committed Apr 1, 2023
1 parent 21646ff commit c6484d5
Show file tree
Hide file tree
Showing 18 changed files with 1,030 additions and 895 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smanga",
"version": "3.1.8",
"version": "3.1.9",
"private": true,
"scripts": {
"serve": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve",
Expand Down
29 changes: 25 additions & 4 deletions php/manga/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,39 @@
$mediaId = $_POST['mediaId'];
$pageSize = $_POST['pageSize'];
$recordStart = $_POST['recordStart'];
$order = $_POST['order'];

if ($mediaId) {
# 执行查询
$sqlRes=dosql(array(
$params = array(
'table'=>'manga,media',
'name'=>['manga.mediaId','mangaId','mangaName','mangaCover','chapterCount','browseType','mangaPath',
'manga.chapterCount','manga.updateTime','manga.direction','manga.removeFirst',
'manga.chapterCount','manga.updateTime','manga.direction','manga.removeFirst','manga.createTime',
'media.direction as mediaDirection','media.removeFirst as mediaRemoveFirst'],
'where'=>['manga.mediaId='.$mediaId,'manga.mediaId=media.mediaId'],
'limit'=>$pageSize,
'start'=>$recordStart,
));
);

// 设置排序规则
if ($order) {
if ($order==='name') {
$params['order'] = 'mangaName';

}elseif ($order==='nameDesc') {
$params['order'] = 'mangaName';
$params['desc'] = true;

}elseif ($order==='time') {
$params['order'] = 'manga.createTime';

}elseif ($order==='timeDesc') {
$params['order'] = 'manga.createTime';
$params['desc'] = true;
}
}

# 执行查询
$sqlRes=dosql($params);

$count = dosql(array(
'table'=>'manga',
Expand Down
8 changes: 4 additions & 4 deletions src/api/manga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {ajax} from "./index";
* @param recordStart
* @param pageSize
*/
export function get_manga(mediaId: number, recordStart: number, pageSize: number) {
export function get_manga(mediaId: number, recordStart: number, pageSize: number,order='') {
return ajax({
url: 'php/manga/get.php',
data: {mediaId, recordStart, pageSize}
})
url: "php/manga/get.php",
data: { mediaId, recordStart, pageSize, order },
});
}

/**
Expand Down
35 changes: 29 additions & 6 deletions src/assets/icon/demo_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">

<li class="dib">
<span class="icon iconfont">&#xe610;</span>
<div class="name">排序</div>
<div class="code-name">&amp;#xe610;</div>
</li>

<li class="dib">
<span class="icon iconfont">&#xe8dc;</span>
<div class="name">253列表视图、菜单</div>
Expand Down Expand Up @@ -102,12 +108,12 @@ <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</co
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.eot?t=1680315405078'); /* IE9 */
src: url('iconfont.eot?t=1680315405078#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1680315405078') format('woff2'),
url('iconfont.woff?t=1680315405078') format('woff'),
url('iconfont.ttf?t=1680315405078') format('truetype'),
url('iconfont.svg?t=1680315405078#iconfont') format('svg');
src: url('iconfont.eot?t=1680361686680'); /* IE9 */
src: url('iconfont.eot?t=1680361686680#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1680361686680') format('woff2'),
url('iconfont.woff?t=1680361686680') format('woff'),
url('iconfont.ttf?t=1680361686680') format('truetype'),
url('iconfont.svg?t=1680361686680#iconfont') format('svg');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
Expand All @@ -133,6 +139,15 @@ <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面
<div class="content font-class">
<ul class="icon_lists dib-box">

<li class="dib">
<span class="icon iconfont icon-paixu"></span>
<div class="name">
排序
</div>
<div class="code-name">.icon-paixu
</div>
</li>

<li class="dib">
<span class="icon iconfont icon-liebiaoshitu"></span>
<div class="name">
Expand Down Expand Up @@ -205,6 +220,14 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h
<div class="content symbol">
<ul class="icon_lists dib-box">

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-paixu"></use>
</svg>
<div class="name">排序</div>
<div class="code-name">#icon-paixu</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-liebiaoshitu"></use>
Expand Down
16 changes: 10 additions & 6 deletions src/assets/icon/iconfont.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@font-face {
font-family: "iconfont"; /* Project id 3852924 */
src: url('iconfont.eot?t=1680315405078'); /* IE9 */
src: url('iconfont.eot?t=1680315405078#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1680315405078') format('woff2'),
url('iconfont.woff?t=1680315405078') format('woff'),
url('iconfont.ttf?t=1680315405078') format('truetype'),
url('iconfont.svg?t=1680315405078#iconfont') format('svg');
src: url('iconfont.eot?t=1680361686680'); /* IE9 */
src: url('iconfont.eot?t=1680361686680#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1680361686680') format('woff2'),
url('iconfont.woff?t=1680361686680') format('woff'),
url('iconfont.ttf?t=1680361686680') format('truetype'),
url('iconfont.svg?t=1680361686680#iconfont') format('svg');
}

.iconfont {
Expand All @@ -16,6 +16,10 @@
-moz-osx-font-smoothing: grayscale;
}

.icon-paixu:before {
content: "\e610";
}

.icon-liebiaoshitu:before {
content: "\e8dc";
}
Expand Down
Binary file modified src/assets/icon/iconfont.eot
Binary file not shown.
2 changes: 1 addition & 1 deletion src/assets/icon/iconfont.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/assets/icon/iconfont.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "漫画流媒体库",
"glyphs": [
{
"icon_id": "7159324",
"name": "排序",
"font_class": "paixu",
"unicode": "e610",
"unicode_decimal": 58896
},
{
"icon_id": "1727500",
"name": "253列表视图、菜单",
Expand Down
Loading

0 comments on commit c6484d5

Please sign in to comment.