去掉随机选择

This commit is contained in:
Linzm committed 2025-06-09 16:32:49 +08:00
1 parent f38a5dc7eb
commit 8bb73181e0
2 files changed
+16 -9

No files matched your search

+8 -5
View File
@@ -190,6 +190,10 @@ function compare() {
const kindList = ref([])
const checkId = ref(0)
function reload() {
if (checkId.value == 0) {
showToast('请选择风格样式')
return
}
badgeApi.getKindList({
page: 1,
size: 20,
@@ -207,17 +211,16 @@ function reload() {
})
showReload.value = true
}
const getKindID = () => {
return kindList.value.map(obj => obj.id)[Math.floor(Math.random() * kindList.value.length)];
}
// const getKindID = () => {
// return kindList.value.map(obj => obj.id)[Math.floor(Math.random() * kindList.value.length)];
// }
function sureReload() {
console.log('sureReload')
imageUrl.value = '';
group.value = newGroup.value
const kindID = checkId.value == 0 ? getKindID() : checkId.value
const params = {
pid: pid.value,
kind_id: kindID,
kind_id: checkId.value,
extend_value: extend_value.value,
group: group.value,
}