Merge remote-tracking branch 'origin/master'

pull/156/head
YunaiV 2025-07-15 09:09:04 +08:00
commit 08fa88129e
3 changed files with 24 additions and 24 deletions

View File

@ -133,7 +133,7 @@
}); });
const state = reactive({ const state = reactive({
selectedSku: {}, // SKU selectedSku: {}, // SKU
currentPropertyArray: [], // Mapkey property value value currentPropertyArray: {}, // Mapkey property value value
grouponNum: props.grouponNum, grouponNum: props.grouponNum,
}); });
@ -212,7 +212,7 @@
noChooseValueIds.splice(index, 1); noChooseValueIds.splice(index, 1);
} else { } else {
// value id // value id
state.currentPropertyArray.forEach((currentPropertyId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, currentPropertyId]) => {
if (currentPropertyId.toString() !== '') { if (currentPropertyId.toString() !== '') {
return; return;
} }
@ -229,8 +229,8 @@
let choosePropertyIds = []; let choosePropertyIds = [];
if (!isChecked) { if (!isChecked) {
// property // property
state.currentPropertyArray.forEach((currentPropertyId, currentValueId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, currentValueId]) => {
if (currentPropertyId !== '') { if (currentValueId !== '') {
// currentPropertyId // currentPropertyId
choosePropertyIds.push(currentValueId); choosePropertyIds.push(currentValueId);
} }
@ -261,9 +261,9 @@
continue; continue;
} }
let isOk = true; let isOk = true;
state.currentPropertyArray.forEach((propertyId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, valueId]) => {
// propertyId sku // valueId sku
if (propertyId.toString() !== '' && sku.value_id_array.indexOf(propertyId) < 0) { if (valueId.toString() !== '' && sku.value_id_array.indexOf(valueId) < 0) {
isOk = false; isOk = false;
} }
}); });
@ -292,7 +292,7 @@
// property // property
let choosePropertyId = []; let choosePropertyId = [];
state.currentPropertyArray.forEach((currentPropertyId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, currentPropertyId]) => {
if (currentPropertyId !== '') { if (currentPropertyId !== '') {
// currentPropertyId // currentPropertyId
choosePropertyId.push(currentPropertyId); choosePropertyId.push(currentPropertyId);

View File

@ -126,7 +126,7 @@
const state = reactive({ const state = reactive({
goodsInfo: computed(() => props.modelValue), goodsInfo: computed(() => props.modelValue),
selectedSku: {}, selectedSku: {},
currentPropertyArray: [], currentPropertyArray: {},
}); });
const getShowPriceText = computed(() => { const getShowPriceText = computed(() => {
let priceText = `${fen2yuan(state.goodsInfo.price)}`; let priceText = `${fen2yuan(state.goodsInfo.price)}`;
@ -209,7 +209,7 @@
noChooseValueIds.splice(index, 1); noChooseValueIds.splice(index, 1);
} else { } else {
// value id // value id
state.currentPropertyArray.forEach((currentPropertyId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, currentPropertyId]) => {
if (currentPropertyId.toString() !== '') { if (currentPropertyId.toString() !== '') {
return; return;
} }
@ -226,8 +226,8 @@
let choosePropertyIds = []; let choosePropertyIds = [];
if (!isChecked) { if (!isChecked) {
// property // property
state.currentPropertyArray.forEach((currentPropertyId, currentValueId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, currentValueId]) => {
if (currentPropertyId !== '') { if (currentValueId !== '') {
// currentPropertyId // currentPropertyId
choosePropertyIds.push(currentValueId); choosePropertyIds.push(currentValueId);
} }
@ -258,9 +258,9 @@
continue; continue;
} }
let isOk = true; let isOk = true;
state.currentPropertyArray.forEach((propertyId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, valueId]) => {
// propertyId sku // valueId sku
if (propertyId.toString() !== '' && sku.value_id_array.indexOf(propertyId) < 0) { if (valueId.toString() !== '' && sku.value_id_array.indexOf(valueId) < 0) {
isOk = false; isOk = false;
} }
}); });
@ -289,7 +289,7 @@
// property // property
let choosePropertyId = []; let choosePropertyId = [];
state.currentPropertyArray.forEach((currentPropertyId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, currentPropertyId]) => {
if (currentPropertyId !== '') { if (currentPropertyId !== '') {
// currentPropertyId // currentPropertyId
choosePropertyId.push(currentPropertyId); choosePropertyId.push(currentPropertyId);

View File

@ -111,7 +111,7 @@
const state = reactive({ const state = reactive({
selectedSku: {}, // SKU selectedSku: {}, // SKU
currentPropertyArray: [], // Mapkey property value value currentPropertyArray: {}, // Mapkey property value value
}); });
const propertyList = convertProductPropertyList(props.goodsInfo.skus); const propertyList = convertProductPropertyList(props.goodsInfo.skus);
@ -202,7 +202,7 @@
noChooseValueIds.splice(index, 1); noChooseValueIds.splice(index, 1);
} else { } else {
// value id // value id
state.currentPropertyArray.forEach((currentPropertyId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, currentPropertyId]) => {
if (currentPropertyId.toString() !== '') { if (currentPropertyId.toString() !== '') {
return; return;
} }
@ -219,8 +219,8 @@
let choosePropertyIds = []; let choosePropertyIds = [];
if (!isChecked) { if (!isChecked) {
// property // property
state.currentPropertyArray.forEach((currentPropertyId, currentValueId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, currentValueId]) => {
if (currentPropertyId !== '') { if (currentValueId !== '') {
// currentPropertyId // currentPropertyId
choosePropertyIds.push(currentValueId); choosePropertyIds.push(currentValueId);
} }
@ -251,9 +251,9 @@
continue; continue;
} }
let isOk = true; let isOk = true;
state.currentPropertyArray.forEach((propertyId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, valueId]) => {
// propertyId sku // valueId sku
if (propertyId.toString() !== '' && sku.value_id_array.indexOf(propertyId) < 0) { if (valueId.toString() !== '' && sku.value_id_array.indexOf(valueId) < 0) {
isOk = false; isOk = false;
} }
}); });
@ -282,7 +282,7 @@
// property // property
let choosePropertyId = []; let choosePropertyId = [];
state.currentPropertyArray.forEach((currentPropertyId) => { Object.entries(state.currentPropertyArray).forEach(([propertyId, currentPropertyId]) => {
if (currentPropertyId !== '') { if (currentPropertyId !== '') {
// currentPropertyId // currentPropertyId
choosePropertyId.push(currentPropertyId); choosePropertyId.push(currentPropertyId);