Битрикс сам много чего имеет
Битрикс это как раз весь тот "самолет", который мы пытаемся затащить в оперативку целиком чтобы он работал оттуда.
import createMutationsSharer from "vuex-shared-mutations";
const store = BX.Vuex.store(
{
strict: APP.data.env.stage == 'dev',
state: Object.assign({
// собственные состояния
},APP.data),
getters: {
isFavorite: (state) => id => {
for (var i in state.user.favorites) {
if (state.user.favorites[i] == id) return true;
}
return false;
},
},
actions: {
favorite_toggle ({commit, getters}, params) {
BX.ajax.runAction('xmm:solar.api.favorite.'+params.action, {
data: {id: params.id}
})
.then(function (response) {
if (response.status == 'success') {
commit('update',{'user':{'favorites':response.data}});
commit('inc');
}
SendFavoriteEsputnik();
}, function (response) {
console.log(response);
});
},
},
mutations: {
update (state,data) {
for (let k in data) BX.Vue.set(state,k,data[k]);
}
},
plugins: [createMutationsSharer({ predicate: ['update'] })]
});
export {store};
locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=
localectl
System Locale: LANG=ru_RU.UTF-8
VC Keymap: us
X11 Layout: us
Dudoroff, скажите, а зачем? Мне просто интересно.