wiki保存修改

This commit is contained in:
simple321vip
2022-11-26 20:58:49 +08:00
parent 51b4012fa1
commit 978356a713
4 changed files with 96 additions and 48 deletions
+27 -3
View File
@@ -1,4 +1,5 @@
import { type } from "os";
import router from '../router'
import { setToken, setTenant } from '../utils/auth'
// config/index.js
const env = process.env.NODE_ENV!;
@@ -34,6 +35,29 @@ const configObj: any = {
QR_CODE: '&qrcode=' + '1',
DISPLAY: '&display=popup'
},
};
}
export default { ...configObj[env] };
const scan_method: any = {
production: (qrcode: string) => {
window.location.href = qrcode
},
development: () => {
setToken("token")
setTenant(
{
tenantId: "111"
}
)
router.push({
path: '/home'
})
},
test: (qrcode: string) => {
window.location.href = qrcode
},
}
const scan = scan_method[env]
const config = configObj[env]
export { scan, config }