added redirected on click btn

This commit is contained in:
Kostya
2023-12-13 20:52:14 +03:00
parent 7618c902f4
commit c505d88aee

View File

@@ -21,7 +21,7 @@
<input type="text"> <input type="text">
</div> </div>
<div class="btn-deposit btn-style-payments"> <div class="btn-deposit btn-style-payments">
<button type="submit" @click="detectorMethod('dep')">Пополнить</button> <button type="submit" @click="RedirectedMethodDep">Пополнить</button>
</div> </div>
</div> </div>
</div> </div>
@@ -36,7 +36,7 @@
<input v-model="card" type="number"> <input v-model="card" type="number">
</div> </div>
<div class="btn-withdraw btn-style-payments"> <div class="btn-withdraw btn-style-payments">
<button type="submit" @click="detectorMethod('with')">Вывод</button> <button type="submit">Вывод</button>
</div> </div>
</div> </div>
</div> </div>
@@ -81,19 +81,22 @@ export default {
closeModal() { closeModal() {
return this.$emit('closemodal') return this.$emit('closemodal')
}, },
detectorMethod(method) { RedirectedMethodDep() {
this.closeModal() window.location.href = this.url
if (method === 'dep') {
return this.$emit('deposit', this.amount)
}
else if (method === 'with') {
return this.$emit('withdraw', this.amount, this.card)
}
else {
console.log('Произошла ошибка при взаимодействие')
return
}
}, },
// detectorMethod(method) {
// this.closeModal()
// if (method === 'dep') {
// return this.$emit('deposit', this.amount)
// }
// else if (method === 'with') {
// return this.$emit('withdraw', this.amount, this.card)
// }
// else {
// console.log('Произошла ошибка при взаимодействие')
// return
// }
// },
clickedBtnChoice(index, content) { clickedBtnChoice(index, content) {
this.clickedBtn = index this.clickedBtn = index
this.amount = content this.amount = content