Commit fbc88f8e by 李伟康

commit 提交

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