From 1e4bb7fd1f67397680875d654259c1e6df058493 Mon Sep 17 00:00:00 2001 From: 728 Date: Wed, 8 Mar 2023 12:53:42 +0800 Subject: [PATCH] close #40 --- cli/dbexport.zsh | 2 +- cli/dbimport.zsh | 2 +- ismism.ts/cli/dbset.ts | 50 ++++++++++++++++++++-------------------- ismism.ts/ui/bind/nav.ts | 2 +- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/cli/dbexport.zsh b/cli/dbexport.zsh index 9121c49..b6b075c 100644 --- a/cli/dbexport.zsh +++ b/cli/dbexport.zsh @@ -1,6 +1,6 @@ rm -rf dbexport -coll=(user soc agenda worker work fund imgsrc txt) +coll=(usr soc agd work fund act aut) for c in $coll; do echo exporting ismism.$c to dbexport/$c.json diff --git a/cli/dbimport.zsh b/cli/dbimport.zsh index d2a0ef5..42662f7 100644 --- a/cli/dbimport.zsh +++ b/cli/dbimport.zsh @@ -1,4 +1,4 @@ -coll=(user soc agenda worker work fund imgsrc txt) +coll=(usr soc agd work fund act aut) for c in $coll; do echo importing $1/$c.json to ismism.$c diff --git a/ismism.ts/cli/dbset.ts b/ismism.ts/cli/dbset.ts index c14c7e1..1151154 100644 --- a/ismism.ts/cli/dbset.ts +++ b/ismism.ts/cli/dbset.ts @@ -1,31 +1,31 @@ import { db } from "../src/db.ts" -import { act_c } from "../src/eid/act.ts" -import { aut_c } from "../src/eid/aut.ts" -import { usr_c, usr_u } from "../src/eid/usr.ts" +// import { act_c } from "../src/eid/act.ts" +// import { aut_c } from "../src/eid/aut.ts" +// import { usr_c, usr_u } from "../src/eid/usr.ts" await db("ismism", true) -const exp = new Date("2023-06-31").getTime() -const actid = [ - `ismism${Math.round(Math.random() * 1000000)}`, - `ismism${Math.round(Math.random() * 1000000)}`, -] +// const exp = new Date("2023-06-31").getTime() +// const actid = [ +// `ismism${Math.round(Math.random() * 1000000)}`, +// `ismism${Math.round(Math.random() * 1000000)}`, +// ] -const [uid1] = await Promise.all([ - usr_c("11111111111", "江苏", "苏州"), - act_c({ _id: actid[0], exp, act: "nbr", uid: 1 }), - aut_c({ _id: 1 }), -]) -const [uid2] = await Promise.all([ - usr_c("11111111112", "江苏", "苏州"), - act_c({ _id: actid[1], exp, act: "nbr", uid: 2 }), - aut_c({ _id: 2 }), -]) -await Promise.all([ - usr_u(uid1!, { $set: { nam: "未明子", ref: [1, 2] } }), - usr_u(uid1!, { $unset: { nbr: "" } }), - usr_u(uid2!, { $set: { nam: "张正午", ref: [1, 2] } }), - usr_u(uid2!, { $unset: { nbr: "" } }), -]) +// const [uid1] = await Promise.all([ +// usr_c("11111111111", "江苏", "苏州"), +// act_c({ _id: actid[0], exp, act: "nbr", uid: 1 }), +// aut_c({ _id: 1 }), +// ]) +// const [uid2] = await Promise.all([ +// usr_c("11111111112", "江苏", "苏州"), +// act_c({ _id: actid[1], exp, act: "nbr", uid: 2 }), +// aut_c({ _id: 2 }), +// ]) +// await Promise.all([ +// usr_u(uid1!, { $set: { nam: "未明子", ref: [1, 2] } }), +// usr_u(uid1!, { $unset: { nbr: "" } }), +// usr_u(uid2!, { $set: { nam: "张正午", ref: [1, 2] } }), +// usr_u(uid2!, { $unset: { nbr: "" } }), +// ]) -console.log([uid1, uid2], actid) +// console.log([uid1, uid2], actid) diff --git a/ismism.ts/ui/bind/nav.ts b/ismism.ts/ui/bind/nav.ts index 64544d4..362d193 100644 --- a/ismism.ts/ui/bind/nav.ts +++ b/ismism.ts/ui/bind/nav.ts @@ -116,7 +116,7 @@ window.addEventListener("hashchange", () => { export async function load( ) { - console.log("ismism-20230304") + console.log("ismism-20230308") console.log(`\n主义主义开发小组!成员招募中!\n\n发送自我介绍至网站维护邮箱,或微信联系 728 万大可\n \n`) await navpas() window.dispatchEvent(new Event("hashchange"))