refactor: keepalive无效问题修复和代码vue社区代码规范调整

Former-commit-id: f661982d54f1738ff9739f1afc993181a466f052
This commit is contained in:
郝先瑞
2022-04-24 00:08:25 +08:00
parent c0b96bfab8
commit 47ed525fcd
71 changed files with 2814 additions and 1912 deletions

View File

@@ -33,10 +33,10 @@ const state = reactive({
loaded: false,
active: 0,
goodsInfo: {
album: [] as string[],
attrList: [] as any[],
specList: [] as any[],
skuList: [] as any[]
album: [],
attrList: [],
specList: [],
skuList: []
} as GoodsDetail
});
@@ -48,8 +48,8 @@ function loadData() {
if (goodsId) {
getGoodsDetail(goodsId).then((response) => {
state.goodsInfo = response.data
state.goodsInfo.originPrice = state.goodsInfo.originPrice / 100
state.goodsInfo.price = state.goodsInfo.price / 100
state.goodsInfo.originPrice = (state.goodsInfo.originPrice as any) / 100
state.goodsInfo.price = (state.goodsInfo.price as any) / 100
state.loaded = true
})
} else {