From 4891a5b5e6a48a075035f43ea9312f0b268ea0cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Tue, 28 Jul 2020 12:01:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=B9=E9=87=8F=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=8C=89=E9=92=AE;=E5=88=A0=E9=99=A4=E5=8D=95?= =?UTF-8?q?=E4=B8=AA=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/css/app.css | 2 +- src/css/app.scss | 3 ++- src/index.html | 3 ++- src/js/app.js | 18 ++++++++++++------ 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 32ffd4c..8684e65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "io.yutent.gaystat", - "version": "1.3.0", + "version": "1.4.0", "description": "搞基数据", "main": "src/main.js", "scripts": { diff --git a/src/css/app.css b/src/css/app.css index a14f306..d4ad7f1 100644 --- a/src/css/app.css +++ b/src/css/app.css @@ -1 +1 @@ -html{font-size:12.8px;width:100%;height:100vh}body{display:flex;flex-direction:column;width:100%;height:100%;padding-top:.9375rem;line-height:1.25;font-size:1.09375rem;color:#f2f5fc;background:transparent}.app{position:relative;display:flex;flex-direction:column;height:100%;padding:1.25rem 0 .46875rem;border-radius:.46875rem;background:rgba(88,88,88,0.85)}.app::before{position:absolute;left:12.10938rem;top:-.54688rem;width:1.09375rem;height:1.09375rem;border-radius:.15625rem;background:linear-gradient(to bottom right, rgba(88,88,88,0.85) 50%, transparent 50%);-webkit-transform:rotate(45deg);transform:rotate(45deg);content:""}.app .option,.app .close{position:absolute;right:.46875rem;top:.15625rem;--size: 1.09375rem;cursor:pointer;opacity:0}.app .option:hover,.app .close:hover{opacity:1}.app .close{right:auto;left:.46875rem}.app .list{flex:1}.app .list .item{display:flex;align-items:center;height:4.21875rem;padding:.78125rem .9375rem;line-height:1.17188rem;border-bottom:.07812rem solid rgba(200,200,200,0.1);border-top:.07812rem solid rgba(0,0,0,0.1)}.app .list .item:first-child{border-top:0}.app .list .item:last-child{border-bottom:0}.app .list .item .info{overflow:hidden;flex:1}.app .list .item .info h3{font-size:1.09375rem}.app .list .item .info cite{color:#dae1e9}.app .list .item .last-week{display:flex;width:3.75rem;height:2.34375rem;margin:0 1.25rem}.app .list .item .today{width:4.0625rem;font-size:.9375rem;color:#fff;text-align:right}.app .list .item .today span{display:block;padding:0 .3125rem}.app .list .item .today .percent{border-radius:.15625rem}.app .list .item .today .percent.red{background:#ff5061}.app .list .item .today .percent.green{background:#4caf50} +html{font-size:12.8px;width:100%;height:100vh}body{display:flex;flex-direction:column;width:100%;height:100%;padding-top:.9375rem;line-height:1.25;font-size:1.09375rem;color:#f2f5fc;background:transparent}.app{position:relative;display:flex;flex-direction:column;height:100%;padding:1.25rem 0 .46875rem;border-radius:.46875rem;background:rgba(88,88,88,0.85)}.app::before{position:absolute;left:12.10938rem;top:-.54688rem;width:1.09375rem;height:1.09375rem;border-radius:.15625rem;background:linear-gradient(to bottom right, rgba(88,88,88,0.85) 50%, transparent 50%);-webkit-transform:rotate(45deg);transform:rotate(45deg);content:""}.app .option,.app .close,.app .load{position:absolute;right:.46875rem;top:.15625rem;--size: 1.09375rem;cursor:pointer;opacity:0}.app .option:hover,.app .close:hover,.app .load:hover{opacity:1}.app .close{right:auto;left:.46875rem}.app .load{right:auto;left:12.10938rem}.app .list{flex:1}.app .list .item{display:flex;align-items:center;height:4.21875rem;padding:.78125rem .9375rem;line-height:1.17188rem;border-bottom:.07812rem solid rgba(200,200,200,0.1);border-top:.07812rem solid rgba(0,0,0,0.1)}.app .list .item:first-child{border-top:0}.app .list .item:last-child{border-bottom:0}.app .list .item .info{overflow:hidden;flex:1}.app .list .item .info h3{font-size:1.09375rem}.app .list .item .info cite{color:#dae1e9}.app .list .item .last-week{display:flex;width:3.75rem;height:2.34375rem;margin:0 1.25rem}.app .list .item .today{width:4.0625rem;font-size:.9375rem;color:#fff;text-align:right}.app .list .item .today span{display:block;padding:0 .3125rem}.app .list .item .today .percent{border-radius:.15625rem}.app .list .item .today .percent.red{background:#ff5061}.app .list .item .today .percent.green{background:#4caf50} diff --git a/src/css/app.scss b/src/css/app.scss index b42047f..9e19014 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -40,7 +40,7 @@ body { content:""; } - .option, .close { + .option, .close, .load { position:absolute; right:px(6);top:px(2); --size: #{px(14)}; @@ -52,6 +52,7 @@ body { } } .close {right:auto;left:px(6)} + .load {right:auto;left:px(155)} .list { flex:1; diff --git a/src/index.html b/src/index.html index e3cd1ee..6aad89b 100644 --- a/src/index.html +++ b/src/index.html @@ -13,6 +13,7 @@
+ @@ -24,7 +25,7 @@ -
+
{ - return b.percent - a.percent - }) - - Anot.ls('watch_list', this.list.$model) }, removeGay(item) { @@ -158,6 +152,18 @@ Anot({ Anot.ls('watch_list', this.list.$model) }) .catch(Anot.noop) + }, + + updateGays() { + for (let it of this.list) { + this.updateGay(it) + } + + this.list.sort((a, b) => { + return b.percent - a.percent + }) + + Anot.ls('watch_list', this.list.$model) } } })