Commit 71728231 by yancanhua

fix: 前端自测问题修改

1 parent 2741ed8f
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<link rel="icon" href="/admin/main/favicon/favicon.ico" type="image/x-icon"> <link rel="icon" href="/admin/main/favicon/favicon.ico" type="image/x-icon">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>专电优拍</title> <title>专电优拍</title>
<script type="module" crossorigin src="https://aus.test.glsx.com.cn/assets/index-B1uOQ9hD.js"></script> <script type="module" crossorigin src="https://aus.test.glsx.com.cn/assets/index-DC3mbaN5.js"></script>
<link rel="stylesheet" crossorigin href="https://aus.test.glsx.com.cn/assets/index-Y3L1Smzp.css"> <link rel="stylesheet" crossorigin href="https://aus.test.glsx.com.cn/assets/index-Y3L1Smzp.css">
</head> </head>
<body> <body>
......
...@@ -53,8 +53,10 @@ ...@@ -53,8 +53,10 @@
</a-form-item> </a-form-item>
<a-form-item label="品牌偏好" name="vehicleBrand"> <a-form-item label="品牌偏好" name="vehicleBrand">
<a-select v-model:value="pageData.vehicleBrand" style="width: 100%;" mode="multiple" <a-select v-model:value="pageData.vehicleBrand" style="width: 100%;" mode="multiple"
:max-tag-count="3" :max-tag-text-length="10" placeholder="请选择品牌偏好"> :max-tag-count="3" :max-tag-text-length="maxTagTextLength" placeholder="请选择品牌偏好"
<a-select-option v-for="(item, index) in brands" :key="index" :value="item.label"> @change="handleBrandChange">
<a-select-option v-for="(item, index) in brands" :key="index" :value="item.label"
:disabled="pageData.vehicleBrand && pageData.vehicleBrand.length >= 10 && !pageData.vehicleBrand.includes(item.label)">
{{ item.label }} {{ item.label }}
</a-select-option> </a-select-option>
</a-select> </a-select>
...@@ -115,6 +117,7 @@ export default class PreferenceForm extends FormComponent<Venue> { ...@@ -115,6 +117,7 @@ export default class PreferenceForm extends FormComponent<Venue> {
vehicleFuelTypeList = returnPreferenceList('vehicleFuelTypeList'); vehicleFuelTypeList = returnPreferenceList('vehicleFuelTypeList');
vehicleTypeList = returnPreferenceList('vehicleTypeList'); vehicleTypeList = returnPreferenceList('vehicleTypeList');
brands: DefaultOptionType[] = []; brands: DefaultOptionType[] = [];
maxTagTextLength = 10;
created(): void { created(): void {
//获取区域选择数据 //获取区域选择数据
...@@ -189,6 +192,14 @@ export default class PreferenceForm extends FormComponent<Venue> { ...@@ -189,6 +192,14 @@ export default class PreferenceForm extends FormComponent<Venue> {
this.$emit('cancelExit'); this.$emit('cancelExit');
} }
// 处理品牌选择,限制最多选择10个
handleBrandChange(value: string[]) {
if (value && value.length > 10) {
// 如果选择超过10个,只保留前10个
this.pageData.vehicleBrand = value.slice(0, 10);
}
}
} }
</script> </script>
...@@ -204,4 +215,4 @@ export default class PreferenceForm extends FormComponent<Venue> { ...@@ -204,4 +215,4 @@ export default class PreferenceForm extends FormComponent<Venue> {
.flex-form .ant-form-item { .flex-form .ant-form-item {
width: 33.33333%; width: 33.33333%;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<!--查询栏--> <!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="pageReload" <m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="handlePageReload"
@onReset="handleReset" :simpleFieldNum="4"> @onReset="handleReset" :simpleFieldNum="4">
<template #cityCodeName="{ record }"> <template #cityCodeName="{ record }">
<a-cascader v-model:value="carProvinceCity" :options="areaData" @change="handleChangeCity" <a-cascader v-model:value="carProvinceCity" :options="areaData" @change="handleChangeCity"
...@@ -213,9 +213,17 @@ export default class PreferencePage extends PaginationComponent<Deposit> { ...@@ -213,9 +213,17 @@ export default class PreferencePage extends PaginationComponent<Deposit> {
this.pagination.queryForm.cityCode = code; this.pagination.queryForm.cityCode = code;
} }
handlePageReload() {
this.selectIds = [];
this.selectedItems = [];
this.pageReload();
}
//重置查询条件 //重置查询条件
handleReset() { handleReset() {
this.carProvinceCity = ''; this.carProvinceCity = '';
this.selectIds = [];
this.selectedItems = [];
this.pageReset(); this.pageReset();
} }
......
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
<view class="wrapper"> <view class="wrapper">
<view class="top-bg"> <view class="top-bg">
<view class="top-icon"> <view class="top-icon">
<image src="https://img02.glsx.com.cn/aus/images/preference/top-icon.png" class="top-icon-image"></image> <image src="https://img02.glsx.com.cn/aus/images/preference/top-icon.png"
class="top-icon-image"></image>
</view> </view>
<view class="top-title"> <view class="top-title">
<image src="https://img02.glsx.com.cn/aus/images/preference/head-txt.png" class="top-icon-title"></image> <image src="https://img02.glsx.com.cn/aus/images/preference/head-txt.png"
class="top-icon-title"></image>
</view> </view>
<view class="popup-content">只需1分钟,我们将为您智能推荐最符合您需求的车辆,节省90%的找车时间!</view> <view class="popup-content">只需1分钟,我们将为您智能推荐最符合您需求的车辆,节省90%的找车时间!</view>
<view @click="toIndexPage()" class="popup-button-primary"> <view @click="toIndexPage()" class="popup-button-primary">
...@@ -40,8 +42,13 @@ export default class ImprovePopup extends Vue { ...@@ -40,8 +42,13 @@ export default class ImprovePopup extends Vue {
onShow(() => { onShow(() => {
//判断是否登录 //判断是否登录
const authService: AuthService = this.$auth; const authService: AuthService = this.$auth;
const accountInfo = authService.getAuthentication();
if (authService.isLogin()) { if (authService.isLogin()) {
this.getPreferencePopup(); if (accountInfo && accountInfo.accountType === 'COMMON' && accountInfo.certifiedState !== "CERTIFICATING") {
console.log('用户未认证,不能展示收车偏好弹窗弹窗')
} else {
this.getPreferencePopup();
}
} }
}) })
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="pageBox"> <view class="pageBox">
<view class="width-calc"> <view class="width-calc">
<view class="content-title"> <view class="content-title">
品牌偏好<span>(多选)</span> 品牌偏好<span class="content-title-span"> (多选)</span>
<view v-if="vehicleBrandList.length" @click="handleClear()" class="clearBox"> <view v-if="vehicleBrandList.length" @click="handleClear()" class="clearBox">
<uni-icons type="trash" size="13" color="#141E34" /> <uni-icons type="trash" size="13" color="#141E34" />
<span class="clear-text">清空</span> <span class="clear-text">清空</span>
...@@ -98,6 +98,11 @@ export default class stepThree extends Vue { ...@@ -98,6 +98,11 @@ export default class stepThree extends Vue {
position: relative; position: relative;
} }
.content-title-span {
color: #333333;
font-size: 14px;
}
.reason-select { .reason-select {
width: 100%; width: 100%;
height: 52px; height: 52px;
......
...@@ -74,6 +74,7 @@ export default class selectVehicleBrand extends Vue { ...@@ -74,6 +74,7 @@ export default class selectVehicleBrand extends Vue {
//获取品牌列表数据 //获取品牌列表数据
loadData(): void { loadData(): void {
uni.showLoading({title: '正在加载中...', mask: true});
const cacheBrands = uni.getStorageSync('cacheBrands'); const cacheBrands = uni.getStorageSync('cacheBrands');
if (cacheBrands && cacheBrands.length > 0) { if (cacheBrands && cacheBrands.length > 0) {
this.brands = cacheBrands; this.brands = cacheBrands;
...@@ -92,6 +93,10 @@ export default class selectVehicleBrand extends Vue { ...@@ -92,6 +93,10 @@ export default class selectVehicleBrand extends Vue {
item.selected = brandObj.id ? true : false; item.selected = brandObj.id ? true : false;
return item; return item;
}); });
this.selectedBrand = this.brands.filter(brand => brand.selected);
setTimeout(() => {
uni.hideLoading();
}, 600);
} }
getBrandsByLetter(letter: string): Brand[] { getBrandsByLetter(letter: string): Brand[] {
...@@ -206,7 +211,7 @@ export default class selectVehicleBrand extends Vue { ...@@ -206,7 +211,7 @@ export default class selectVehicleBrand extends Vue {
.check-icon { .check-icon {
position: absolute; position: absolute;
right: 4px; right: 16px;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
width: 16px; width: 16px;
......
...@@ -90,9 +90,8 @@ ...@@ -90,9 +90,8 @@
</van-dialog> </van-dialog>
<!-- 完善收车偏好弹窗 --> <!-- 完善收车偏好弹窗 -->
<div v-if="isShowImprovePopup" > <improve-popup ref="improvePopupRef" />
<improve-popup ref="improvePopupRef" />
</div>
</template> </template>
...@@ -137,7 +136,6 @@ export default class HomePage extends Vue { ...@@ -137,7 +136,6 @@ export default class HomePage extends Vue {
changeCity: any; changeCity: any;
showCertifyDialog = false; showCertifyDialog = false;
isShowImprovePopup = false;
carousels: Carousel[] = []; carousels: Carousel[] = [];
carouselPhotos: FileInfo[] = []; carouselPhotos: FileInfo[] = [];
...@@ -303,8 +301,6 @@ export default class HomePage extends Vue { ...@@ -303,8 +301,6 @@ export default class HomePage extends Vue {
setTimeout(() => { setTimeout(() => {
this.showCertifyDialog = true; this.showCertifyDialog = true;
}, 1000); }, 1000);
} else {
this.isShowImprovePopup = true
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!