新增基础配置
This commit is contained in:
@@ -29,9 +29,10 @@ export const getConfig = query => {
|
||||
// 基础配置-修改
|
||||
export const updateSet = query => {
|
||||
return request({
|
||||
headers: { "Content-Type": 'application/json;charset=UTF-8' },
|
||||
url: '/admin/lucky24/config/update',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
};
|
||||
// 个人数据
|
||||
@@ -53,9 +54,17 @@ export const platform = query => {
|
||||
// 保存池子
|
||||
export const save = query => {
|
||||
return request({
|
||||
headers:{"Content-Type": 'application/json;charset=UTF-8'},
|
||||
headers: { "Content-Type": 'application/json;charset=UTF-8' },
|
||||
url: '/admin/lucky24/pool/save',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
};
|
||||
// 赠送用户
|
||||
export const updateUserMulti = query => {
|
||||
return request({
|
||||
url: '/admin/lucky24/config/updateUserMulti',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
@@ -33,6 +33,7 @@
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 1;
|
||||
editDialogTitle = '对比值N';
|
||||
value = inquire.comparisonValue;
|
||||
@@ -42,6 +43,77 @@
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- <div class="inquire">
|
||||
<span>对比值M</span>
|
||||
<el-input
|
||||
v-model="inquire.x"
|
||||
placeholder=""
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 5;
|
||||
editDialogTitle = '对比值M';
|
||||
value = inquire.x;
|
||||
"
|
||||
>
|
||||
编辑</el-button
|
||||
>
|
||||
</div> -->
|
||||
|
||||
<div class="inquire">
|
||||
<span>金币对比值A</span>
|
||||
<!-- @input="handleInput" -->
|
||||
<el-input
|
||||
v-model="inquire.supplement.conditionInput"
|
||||
placeholder=""
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 6;
|
||||
editDialogTitle = '金币对比值A';
|
||||
value = inquire.supplement.conditionInput;
|
||||
"
|
||||
>
|
||||
编辑</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="inquire">
|
||||
<span>奖励金币倍数</span>
|
||||
<!-- @input="handleInput" -->
|
||||
<el-input
|
||||
v-model="inquire.supplement.supplementMulti"
|
||||
placeholder=""
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 7;
|
||||
editDialogTitle = '奖励金币倍数';
|
||||
value = inquire.supplement.supplementMulti;
|
||||
"
|
||||
>
|
||||
编辑</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="inquire">
|
||||
<span>幸运24金币库存</span>
|
||||
<el-input
|
||||
@@ -55,6 +127,7 @@
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 2;
|
||||
editDialogTitle = '幸运24金币库存';
|
||||
value = inquire.goldInventory;
|
||||
@@ -63,6 +136,29 @@
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- <div class="inquire">
|
||||
<span>幸运礼物ID</span>
|
||||
<el-input
|
||||
v-model="inquire.x"
|
||||
placeholder=""
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 8;
|
||||
editDialogTitle = '幸运礼物ID';
|
||||
value = inquire.x;
|
||||
"
|
||||
>
|
||||
编辑</el-button
|
||||
>
|
||||
</div> -->
|
||||
|
||||
<div class="inquire">
|
||||
<span>平台抽成</span>
|
||||
<el-input
|
||||
@@ -76,6 +172,7 @@
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 3;
|
||||
editDialogTitle = '平台抽成';
|
||||
value = inquire.platformCommission;
|
||||
@@ -97,6 +194,7 @@
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 4;
|
||||
editDialogTitle = '用户收益比例';
|
||||
value = inquire.userRevenueRatio;
|
||||
@@ -104,6 +202,93 @@
|
||||
>编辑</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="inquire">
|
||||
<span>通知制定金额</span>
|
||||
<!-- @input="handleInput" -->
|
||||
<el-input
|
||||
v-model="inquire.warnMulti"
|
||||
placeholder=""
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 9;
|
||||
editDialogTitle = '通知制定金额';
|
||||
value = inquire.warnMulti;
|
||||
"
|
||||
>
|
||||
编辑</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- <div class="inquire">
|
||||
<span>库存告急通知</span>
|
||||
<el-input
|
||||
v-model="inquire.x"
|
||||
placeholder=""
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 10;
|
||||
editDialogTitle = '库存告急通知';
|
||||
value = inquire.x;
|
||||
"
|
||||
>
|
||||
编辑</el-button
|
||||
>
|
||||
</div> -->
|
||||
|
||||
<div class="inquire">
|
||||
<span>用户上线列表</span>
|
||||
<!-- @input="handleInput" -->
|
||||
<el-input
|
||||
v-model="inquire.followErbanNoList"
|
||||
placeholder=""
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 11;
|
||||
editDialogTitle = '用户上线列表';
|
||||
value = inquire.followErbanNoList;
|
||||
"
|
||||
>
|
||||
编辑</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>赠送1000倍奖励</span>
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
:disabled="butClick"
|
||||
@click="
|
||||
editDialog = true;
|
||||
type = 12;
|
||||
editDialogTitle = '赠送1000倍奖励';
|
||||
value = inquire.x;
|
||||
"
|
||||
>
|
||||
赠送</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
<el-dialog v-model="editDialog" :title="editDialogTitle" width="36%" center>
|
||||
@@ -123,8 +308,18 @@
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="editDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="editDialogClick()">
|
||||
<el-button
|
||||
@click="
|
||||
editDialog = false;
|
||||
butClick = false;
|
||||
"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="butClick"
|
||||
@click="editDialogClick()"
|
||||
>
|
||||
保存
|
||||
</el-button>
|
||||
</span>
|
||||
@@ -133,7 +328,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getConfig, updateSet } from "@/api/luckGift/luckGift";
|
||||
import { getConfig, updateSet, updateUserMulti } from "@/api/luckGift/luckGift";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
@@ -144,6 +339,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
butClick: false,
|
||||
butClickTime: null,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
value: 2,
|
||||
@@ -166,6 +363,14 @@ export default {
|
||||
giftId: "",
|
||||
platformCommission: "",
|
||||
userRevenueRatio: "",
|
||||
supplement: {
|
||||
conditionInput: "",
|
||||
conditionNum: "",
|
||||
supplementMulti: "",
|
||||
supplementNum: "",
|
||||
},
|
||||
warnMulti: "",
|
||||
followErbanNoList: "",
|
||||
},
|
||||
editDialog: false,
|
||||
editDialogTitle: "",
|
||||
@@ -184,39 +389,77 @@ export default {
|
||||
this.inquire.goldInventory = res.data.stock;
|
||||
this.inquire.platformCommission = res.data.platformRatio;
|
||||
this.inquire.userRevenueRatio = res.data.receiverRatio;
|
||||
this.inquire.supplement = res.data.supplement;
|
||||
this.inquire.warnMulti = res.data.warnMulti;
|
||||
this.inquire.followErbanNoList = res.data.followErbanNoList.join();
|
||||
});
|
||||
},
|
||||
// 确认保存
|
||||
editDialogClick() {
|
||||
var obj = {};
|
||||
obj.partitionId = this.inquire.value;
|
||||
if (this.type == 1) {
|
||||
obj.productionRatio = this.value;
|
||||
} else if (this.type == 2) {
|
||||
console.log(1111);
|
||||
obj.stock = this.value;
|
||||
} else if (this.type == 3) {
|
||||
obj.platformRatio = this.value;
|
||||
} else if (this.type == 4) {
|
||||
obj.receiverRatio = this.value;
|
||||
}
|
||||
updateSet(obj).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存成功",
|
||||
type: "success",
|
||||
});
|
||||
this.editDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
if (this.type == 12) {
|
||||
this.butClick = true;
|
||||
updateUserMulti({ erbanNo: this.value }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "赠送成功",
|
||||
type: "success",
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.butClick = false;
|
||||
console.log("进来了2");
|
||||
}, 3000);
|
||||
this.editDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
this.butClick = false;
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this.type == 1) {
|
||||
obj.productionRatio = this.value;
|
||||
} else if (this.type == 2) {
|
||||
obj.stock = this.value;
|
||||
} else if (this.type == 3) {
|
||||
obj.platformRatio = this.value;
|
||||
} else if (this.type == 4) {
|
||||
obj.receiverRatio = this.value;
|
||||
} else if (this.type == 6) {
|
||||
obj.supplement = this.inquire.supplement;
|
||||
obj.supplement.conditionInput = this.value;
|
||||
} else if (this.type == 7) {
|
||||
obj.supplement = this.inquire.supplement;
|
||||
obj.supplement.supplementMulti = this.value;
|
||||
} else if (this.type == 9) {
|
||||
obj.warnMulti = this.value;
|
||||
} else if (this.type == 11) {
|
||||
obj.followErbanNoList = this.value.split(",");
|
||||
}
|
||||
});
|
||||
updateSet(obj).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存成功",
|
||||
type: "success",
|
||||
});
|
||||
this.editDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 监听类型
|
||||
handleChange(value) {
|
||||
|
Reference in New Issue
Block a user