Commit fbc88f8e by 李伟康

commit 提交

1 parent 6e3a8a3e
...@@ -83,7 +83,6 @@ export default { ...@@ -83,7 +83,6 @@ export default {
if (carBrandList.length) this.selectCar(carBrandList[0], true) if (carBrandList.length) this.selectCar(carBrandList[0], true)
}, },
open () { open () {
this.$refs.carBrandListVisible.open()
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; { shopMerchantId } = userInfo;
/**获取品牌车型 */ /**获取品牌车型 */
...@@ -100,6 +99,15 @@ export default { ...@@ -100,6 +99,15 @@ export default {
}); });
this.$store.dispatch("setCarBrandsList", carBrandList); this.$store.dispatch("setCarBrandsList", carBrandList);
}) })
const { carBrand } = this
if (carBrand) {
const { carBrandList } = this,
item = carBrandList.find(e => e.name == carBrand)
if (item && carBrandList.length == 1) this.selectCar(item)
else this.$refs.carBrandListVisible.open()
return
}
this.$refs.carBrandListVisible.open()
}, },
selectCar (e, auto = false) { selectCar (e, auto = false) {
let { clickFlga } = this let { clickFlga } = this
...@@ -108,9 +116,6 @@ export default { ...@@ -108,9 +116,6 @@ export default {
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
const customerInfo = this.$store.state.user.customerInfo
customerInfo.carBrand = e.name
this.$store.dispatch('setCustomerInfo', customerInfo)
this.selectItem = { this.selectItem = {
carBrand: e.brandName, carBrand: e.brandName,
carBrandId: e.brandId, carBrandId: e.brandId,
...@@ -132,10 +137,14 @@ export default { ...@@ -132,10 +137,14 @@ export default {
}) })
}, },
handleSelect (item) { handleSelect (item) {
const customerInfo = this.$store.state.user.customerInfo,
{ selectItem } = this
customerInfo.carBrand = selectItem.carChildsBrandName
this.$store.dispatch('setCustomerInfo', customerInfo)
this.$refs.carBoxVisible.close(); this.$refs.carBoxVisible.close();
this.$emit('select', { this.$emit('select', {
...item, ...item,
...this.selectItem ...selectItem
}) })
}, },
close () { close () {
......
...@@ -37,84 +37,89 @@ const list = [ ...@@ -37,84 +37,89 @@ const list = [
name: "冷却系统", name: "冷却系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-1.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-1.webp",
style: 'width: 284rpx;height: 498rpx;' style: 'width: 284rpx;height: 498rpx;float: left;'
}, },
{ {
name: "悬挂系统", name: "悬挂系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-2.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-2.webp",
style: 'width: 582rpx;height: 330rpx;' style: 'width: 582rpx;height: 330rpx;float: left;'
}, },
{ {
name: "制动系统", name: "制动系统",
detailUrl: "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-3.webp", detailUrl: "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-3.webp",
style: 'width: 288rpx;height: 330rpx;' style: 'width: 288rpx;height: 330rpx;float: left;'
}, },
{ {
name: "灯光照明系统", name: "灯光照明系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-4.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-4.webp",
style: 'width: 584rpx;height: 330rpx;' style: 'width: 584rpx;height: 330rpx;float: left;'
}, },
{ {
name: "安全气囊系统", name: "转向系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-5.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-9.webp",
style: 'width: 284rpx;height: 330rpx;' style: 'width: 284rpx;height: 242rpx; float: right;'
}, },
{ {
name: "空调系统", name: "传动系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-6.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-8.webp",
style: 'width: 286rpx;height: 498rpx;' style: 'width: 284rpx;height: 242rpx;float: right;'
}, },
{ {
name: "电气系统", name: "电气系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-7.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-7.webp",
style: 'width: 584rpx;height: 498rpx;' style: 'width: 584rpx;height: 498rpx;float: right;'
}, },
{ {
name: "传动系统", name: "空调系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-8.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-6.webp",
style: 'width: 284rpx;height: 242rpx;' style: 'width: 286rpx;height: 498rpx;float: right;'
}, },
{ {
name: "转向系统", name: "安全气囊系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-9.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-5.webp",
style: 'width: 284rpx;height: 242rpx;' style: 'width: 284rpx;height: 330rpx;float: right;'
}, },
{ {
name: "智能辅助系统", name: "智能辅助系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-10.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-10.webp",
style: 'width: 584rpx;height: 240rpx;' style: 'width: 584rpx;height: 240rpx;position: absolute;top:604rpx;right:0;'
}, },
{ {
name: "增程器", name: "增程器",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-11.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-11.webp",
style: 'width: 586rpx;height: 332rpx;' style: 'width: 586rpx;height: 332rpx;float: left;'
}, },
{ {
name: "舒适系统", name: "舒适系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-12.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-12.webp",
style: 'width: 284rpx;height: 332rpx;' style: 'width: 284rpx;height: 332rpx;float: left;'
}, },
{ {
name: "ABS防抱死制动系统", name: "ABS防抱死制动系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-13.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-13.webp",
style: 'width: 582rpx;height: 332rpx;' style: 'width: 582rpx;height: 332rpx;float: left;'
}, },
{ {
name: "娱乐系统", name: "娱乐系统",
detailUrl: detailUrl:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-14.webp", "https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-14.webp",
style: 'width: 286rpx;height: 332rpx;' style: 'width: 286rpx;height: 332rpx;float: left;'
}, },
]; ];
export default { export default {
...@@ -168,9 +173,15 @@ export default { ...@@ -168,9 +173,15 @@ export default {
// flex-wrap: wrap; // flex-wrap: wrap;
// column-count: 4; // column-count: 4;
// column-gap: 16rpx; // column-gap: 16rpx;
&::after{
content: "";
display: block;
clear: both;
}
flex: 1; flex: 1;
.item { .item {
float: left;
// float: left;
margin: 6rpx; margin: 6rpx;
} }
.item-image { .item-image {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!