|
|
@ -30,10 +30,10 @@ |
|
|
|
<md-field> |
|
|
|
<label for="movie">Тип промокода</label> |
|
|
|
<md-select v-model="promogen_type"> |
|
|
|
<md-option value="vip">VIP</md-option> |
|
|
|
<md-option value="VIP">VIP</md-option> |
|
|
|
</md-select> |
|
|
|
</md-field> |
|
|
|
<md-field v-if="promogen_type === 'vip'"> |
|
|
|
<md-field v-if="promogen_type === 'VIP'"> |
|
|
|
<label>Количество минут</label> |
|
|
|
<md-input v-model="promogen_value"/> |
|
|
|
</md-field> |
|
|
@ -46,7 +46,7 @@ |
|
|
|
<md-button class="btn-unusual" v-on:click="clearPromo()">Очистить</md-button> |
|
|
|
<md-field v-if="promogen_result.length>0"> |
|
|
|
<label>Результат</label> |
|
|
|
<md-textarea readonly v-model="promogen_result"/> |
|
|
|
<md-textarea readonly v-model="promogen_result" style="color: #FAFAFA"/> |
|
|
|
</md-field> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -67,7 +67,7 @@ export default { |
|
|
|
error:"", |
|
|
|
success:"", |
|
|
|
/////////// |
|
|
|
promogen_type:"", |
|
|
|
promogen_type:"VIP", |
|
|
|
promogen_value:60, |
|
|
|
promogen_append:"GOYDA", |
|
|
|
promogen_result: "" |
|
|
@ -80,12 +80,14 @@ export default { |
|
|
|
this.promogen_result = ""; |
|
|
|
}, |
|
|
|
createPromo() { |
|
|
|
this.clearPromo(); |
|
|
|
axios.post("api/promocode?action="+this.promogen_type+":"+`${this.promogen_value*60}`+"&append="+this.promogen_append+Random.getRndWebAppend()) |
|
|
|
.then(response => { |
|
|
|
this.promogen_result += response.data + ` ${this.promogen_type.toUpperCase()} ${this.promogen_value} минут \n`; |
|
|
|
}) |
|
|
|
}, |
|
|
|
actualPromo() { |
|
|
|
this.clearPromo(); |
|
|
|
axios.get("api/promocode" + Random.getRndWebNew()) |
|
|
|
.then(response => { |
|
|
|
for (const code in response.data) { |
|
|
|