我想访问上下文变量以使用该isMobile标志根据结果选择不同的端点。我可以从组件中传递它dispatch,但我知道应该有一种方法可以做到这一点。
export const actions = {
...
signUpGoogle({ commit }) {
fireauth.useDeviceLanguage()
if (context.isMobile) {
fireauth.signInWithPopup(GoogleProvider).then ...
} else {
fireauth.signInWithRedirect(GoogleProvider)
}
}
Run Code Online (Sandbox Code Playgroud)
我在这里看到它可以在服务器初始化上获取,但我真的不想依赖它,因为缓存会把事情搞砸
https://nuxtjs.org/guide/vuex-store/#the-nuxtserverinit-action
谢谢您的帮助
I am using Cake Crud Api plugin and baking all models.
The datetime format in the json response is like this:
"created": "2016-08-01T08:49:11+0000"
Run Code Online (Sandbox Code Playgroud)
I want it to look like a normal datatime:
"created": "2016-08-01 08:49:11"
Run Code Online (Sandbox Code Playgroud)
I have tryied setting application wide:
Time::setJsonEncodeFormat('yyyy-MM-dd HH:mm:ss');
Run Code Online (Sandbox Code Playgroud)
with no luck and also I have searched for any Time reference in the Crud plugin, but I haven't finded out where the default ajax format comes from.
Any idea? Thanks.
是否有任何程序可以通过编程方式将文件编码更改为UTF-8.我有1000个文件,我想在linux中以UTF-8格式保存它们.
谢谢.