xg4's recent timeline updates
xg4

xg4

V2EX member #397099, joined on 2019-03-31 18:18:26 +08:00
xg4's recent replies
1CPU RAM512MB 10G SSD ,这不是以前 3.5$ 的配置吗
Dec 28, 2022
Replied to a topic by lsy99 问与答 求助大佬,浏览器怎么实现定时执行
```ts
interface Token {
value: string
expires: string
}

function onClear() {
// TODO: clear
}

function setToken(token: string) {
localStorage.setItem(
'token',
JSON.stringify({
value: token,
expires: new Date('2023/1/2 10:00:00').toISOString(),
})
)
}

function checkToken() {
const tokenJson = localStorage.getItem('token')
if (tokenJson) {
const token: Token = JSON.parse(tokenJson)
const diff = Date.now() - new Date(token.expires).getTime()
if (diff >= 0) {
onClear()
return
}
setTimeout(onClear, diff)
}
}

checkToken()
```
1. 戴眼镜确实会影响眼部形态,低度数可以需要时在佩戴,中高度数建议长期佩戴,矫正视力
2. 最好医院
3. 明月、依视路、蔡司
有确定的数据,网上配镜即可
数据需要 左右眼 近视度数、散光度数、散光度数方向、双眼瞳距
Jul 30, 2022
Replied to a topic by meisen 生活 很多人不知道洗洁精可以洗果蔬吧 😅
只洗表面光滑的蔬菜或者水果,不然感觉容易残留洗洁精
Jul 28, 2022
Replied to a topic by bthulu JavaScript js 写后台, 是不是有点先天残缺?
uniqBy
Jul 28, 2022
Replied to a topic by bthulu JavaScript js 写后台, 是不是有点先天残缺?
去重 _.uniq, _.unionBy
排序 _.sortBy, _.orderBy
分组 _.groupBy

https://lodash.com/docs/4.17.15
还有个问题
vue-router 使用的 history 模式,但是 nginx 没有配置,刷新页面会请求 nginx 路由( 404 ),而不是前端路由
Jul 30, 2020
Replied to a topic by gaocc 问与答 有个 js 小问题请教下,如下图
headers 改为 content-type: application/json,就可以正确发送 json 字符串
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1693 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms · UTC 00:01 · PVG 08:01 · LAX 17:01 · JFK 20:01
♥ Do have faith in what you're doing.