Browse Source

promocode ui v2

master
gsd 1 year ago
parent
commit
adb230630e
  1. BIN
      src/assets/images/vip/promocode.jpg
  2. 10
      src/components/TabsMenuElements/VipView/Components/PromocodeDialog.vue

BIN
src/assets/images/vip/promocode.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

10
src/components/TabsMenuElements/VipView/Components/PromocodeDialog.vue

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

Loading…
Cancel
Save