Closed subaru-hello closed 2 years ago
const foods = [ {"name": "apple", "value": 300 }, {"name": "pine", "value": 400}, {"name": "banana", "value": 200} ];
get = foods[Math.floor(Math.random() * foods.length)]; console.log(get); //{name: "pine", value: 400}
配列 ```javascript const foods = [ ["apple", "pine", "banana", "orange"], ["carrot","broccoli","celery","lettuce"], ["coffee","tea","wine","beer"] ]; let get = []; for (let i of foods) { get.push(i[Math.floor(Math.random() * foods.length)]); } console.log(get); console.log(get); //["apple", "celery", "wine"]
[x] アルコールか、ソフトドリンクかを識別する関数 https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L353
[x] alcohol_controller#getを叩いてお酒の順番をフロントに表示させる https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L381
[x] お酒の強さを条件分岐を使って作成 https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L465
[x] 1軒目の気分に応じたスタンプを表示 https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L489
[x] ゲストユーザーで作成した酒ケジュールを引き継ぐ https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L409
[x] Twitter共有
https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L521
0ac359e で対応
概要
119 で作成した酒ケジュールをResult.vueに表示させたい
TODO
get = foods[Math.floor(Math.random() * foods.length)]; console.log(get); //{name: "pine", value: 400}
[x] アルコールか、ソフトドリンクかを識別する関数 https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L353
[x] alcohol_controller#getを叩いてお酒の順番をフロントに表示させる https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L381
[x] お酒の強さを条件分岐を使って作成 https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L465
[x] 1軒目の気分に応じたスタンプを表示 https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L489
[x] ゲストユーザーで作成した酒ケジュールを引き継ぐ https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L409
[x] Twitter共有
https://github.com/subaru-hello/Zeroken/blob/6074a54a21d64046a41b209602f727f3522c4411/app/frontend/pages/Result.vue#L521