1、右上角的登录信息改为优先显示真实姓名

2、修复已知bug
This commit is contained in:
2024-07-27 13:53:11 +08:00
parent 904bd82e39
commit b9df13a916
23 changed files with 1499 additions and 92 deletions

View File

@@ -334,6 +334,7 @@
import { GoodsSku } from "@/api/shop/goodsSku/model";
import { GoodsSpec } from "@/api/shop/goodsSpec/model";
import { generateGoodsSku, listGoodsSku } from "@/api/shop/goodsSku";
import { listGoodsSpec } from "@/api/shop/goodsSpec";
// 是否是修改
const isUpdate = ref(false);
@@ -371,7 +372,6 @@
const name = ref();
const value = ref();
const skuList = ref<GoodsSku[]>([]);
const fileList = ref<any[]>([]);
const files = ref<ItemType[]>([]);
const goodsSpec = ref<GoodsSpec>();
const category = ref<string[]>([]);
@@ -584,9 +584,26 @@
const onChange = (text: string) => {
// 加载商品多规格
if(text == 'spec'){
listGoodsSku({goodsId: props.data?.goodsId}).then(data => {
skuList.value = data;
})
const goodsId = props.data?.goodsId;
if(goodsId){
listGoodsSpec({goodsId}).then(data => {
console.log(data[0].specValue);
const specValue = data[0].specValue;
if(specValue){
spec.value = JSON.parse(specValue).map( d => {
console.log(d);
return {
value: d.value,
detail: d.detail
};
})
}
console.log(spec.value);
})
listGoodsSku({goodsId}).then(data => {
skuList.value = data;
})
}
}
};
@@ -710,13 +727,10 @@
.validate()
.then(() => {
loading.value = true;
files.value.map((d) => {
fileList.value.push(d.url);
});
const formData = {
...form,
content: content.value,
files: JSON.stringify(fileList.value),
files: JSON.stringify(files.value),
goodsSpec: goodsSpec.value,
goodsSkus: skuList.value
};
@@ -741,8 +755,8 @@
(visible) => {
if (visible) {
images.value = [];
files.value = [];
category.value = [];
files.value = [];
if (props.data) {
assignObject(form, props.data);
if (props.data.image) {
@@ -753,14 +767,7 @@
});
}
if(props.data.files){
const arr = JSON.parse(props.data.files);
arr.map((img) => {
files.value.push({
uid: uuid(),
url: img,
status: 'done'
});
});
files.value = JSON.parse(props.data.files);
}
if(props.data.goodsSpecs){
goodsSpec.value = props.data.goodsSpecs[0];
@@ -793,7 +800,7 @@
isUpdate.value = true;
} else {
spec.value = [];
goodsSpec.value = {};
goodsSpec.value = undefined;
skuList.value = [];
isUpdate.value = false;
}