<v-list>
<v-list-tile
v-for="(item, index) in menuItems"
:key="index"
:href="'/'+item.locale" <!-- тут экспортируемое значение item.locale нормально работает -->
@click="buttonClick(index)"
>
<v-list-tile-title>{{ item.title }}</v-list-tile-title>
</v-list-tile>
</v-list>
buttonClick: function(index) {
// пишем локаль в кукисы
const flag = true
setCookie('flag', flag)
setCookie('language', this.menuItems[index].locale ) // сюда нужно вставить, но item.locale выдает ошибку
}
var kids = $('#main-content').children().toArray();
'pluginOptions' => [
'depends'=>['typ-id'],
'placeholder'=>'Sub...',
'initialize' => true,
'initDepends'=>['Cat'],
'url'=>Url::to(['orders/subcat']),
],
function onSubmit () {
document.getElementById('osForm').style.display = 'none';
document.getElementById('form_one_success').style.display = 'block';
setTimeout(function () {
document.getElementById('form_one_success').style.display = 'none';
document.getElementById('osForm').style.display = 'block';
}, 5000);
}
var getUrlSha = function(url) {
return $.ajax({
type: 'GET',
url: 'sha1.php',
data: {
url: url
}
});
};
var getCommentsCount = function(url, sign) {
return $.ajax({
type: 'POST',
url: 'https://c1api.hypercomments.com/1.0/streams/get',
dataType: 'jsonp',
cache: false,
crossDomain: true,
data: {
body: '{"widget_id":11070,"link":"' + url + '"}',
signature: sign
}
});
};
function getSumComments(url) {
return getUrlSha(url).then(function(sign) {
return getCommentsCount(url, sign);
});
}
getSumComments('https://www.metrtv.ru/articles/second_estate/11617').then(function(count) {
console.log(count);
});
$proxyList = [
['ip' => '1.2.3.4', 'port' => '1234'],
['ip' => '4.3.2.1', 'port' => '5678'],
];
$requestOptions = [
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_CONNECTTIMEOUT => 3,
CURLOPT_TIMEOUT => 7,
];
$ch = curl_init('http://test.ru/get?a=1&b=2');
curl_setopt_array($ch, $requestOptions);
foreach ($proxyList as $item) {
curl_setopt($ch, CURLOPT_PROXY, $item['ip']);
curl_setopt($ch, CURLOPT_PROXYPORT, $item['port']);
$response = curl_exec($ch);
}
curl_close($ch);
$model = Product::findOne(['id'=>1]);
$model->name="Новое название";
$model->save();