二手车交易,车源发布做缓存
This commit is contained in:
@ -90,21 +90,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-dialog v-model="show" title="电话" show-cancel-button>
|
<!-- <van-dialog v-model="show" title="电话" show-cancel-button>
|
||||||
<van-button type="primary" :to="{tel:this.detailInfo.contactNumber}">打电话1</van-button>
|
<van-button type="primary" :to="{tel:this.detailInfo.contactNumber}">打电话1</van-button>
|
||||||
<van-button type="primary" to="tel:15237688303">打电话2</van-button>
|
<van-button type="primary" to="tel:15237688303">打电话2</van-button>
|
||||||
<a href="tel:15237688303">
|
<a href="tel:15237688303">{{this.detailInfo.contactNumber}}
|
||||||
<van-button type="primary">打电话3</van-button>
|
|
||||||
|
<van-button type="primary">{{}}</van-button>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</van-dialog>
|
</van-dialog>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {carInfoDetail,saveRecord} from "@/api/secondHandCar";
|
import {carInfoDetail,saveRecord} from "@/api/secondHandCar";
|
||||||
// import { Dialog } from 'vant';
|
import { Dialog } from 'vant';
|
||||||
export default {
|
export default {
|
||||||
name: "forSale",
|
name: "forSale",
|
||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
@ -171,7 +172,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handle(){
|
handle(){
|
||||||
this.show=true
|
this.show=true
|
||||||
/* Dialog.alert({
|
Dialog.alert({
|
||||||
message:this.detailInfo.contactNumber ,
|
message:this.detailInfo.contactNumber ,
|
||||||
confirmButtonText:'拨打电话',
|
confirmButtonText:'拨打电话',
|
||||||
showCancelButton:true,
|
showCancelButton:true,
|
||||||
@ -181,7 +182,7 @@ export default {
|
|||||||
window.location.href = `tel:${this.detailInfo.contactNumber}`;
|
window.location.href = `tel:${this.detailInfo.contactNumber}`;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// on cancel
|
// on cancel
|
||||||
});*/
|
});
|
||||||
},
|
},
|
||||||
onChange(index) {
|
onChange(index) {
|
||||||
this.current = index;
|
this.current = index;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<img class="bg" src="@/assets/secondHandCar/bg.png" />
|
<img class="bg" src="@/assets/secondHandCar/bg.png" />
|
||||||
<img class="mine" src="@/assets/secondHandCar/mine.png" @click="goMine" />
|
<img class="mine" src="@/assets/secondHandCar/mine.png" @click="goMine" />
|
||||||
<el-input
|
<el-input
|
||||||
|
@blur="getList"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
v-model.trim="topSearch">
|
v-model.trim="topSearch">
|
||||||
<img slot="suffix" class="search" src="@/assets/secondHandCar/search.png"/>
|
<img slot="suffix" class="search" src="@/assets/secondHandCar/search.png"/>
|
||||||
@ -79,7 +80,7 @@
|
|||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="title">{{item.vehicleType}}</div>
|
<div class="title">{{item.vehicleType}}</div>
|
||||||
<div v-if="activeTab==0" class="type">{{ item.boardType?.label }} | {{ item.licenseType?.label }} |
|
<div v-if="activeTab==0" class="type">{{ item.boardType?.label }} | {{ item.licenseType?.label }} |
|
||||||
{{ item.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0]?.replace(/牌$/, '') }} | {{ item.mileage }}km | {{item.emissionStandard?.label}}</div>
|
{{ item.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0]?.replace(/牌$/, '') }} | {{ formatToWan(item.mileage) }}公里 | {{item.emissionStandard?.label}}</div>
|
||||||
<div v-else class="type">{{ item.boardType?.label }} |
|
<div v-else class="type">{{ item.boardType?.label }} |
|
||||||
{{item.vehicleType }} | {{item.emissionStandard?.label}}</div>
|
{{item.vehicleType }} | {{item.emissionStandard?.label}}</div>
|
||||||
<div class="date" v-show="activeTab==0 && item.registerDate">注册日期: {{item.registerDate?.substring(0,10)}}</div>
|
<div class="date" v-show="activeTab==0 && item.registerDate">注册日期: {{item.registerDate?.substring(0,10)}}</div>
|
||||||
@ -122,10 +123,10 @@ export default {
|
|||||||
name: "indexList",
|
name: "indexList",
|
||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
watch:{
|
watch:{
|
||||||
topSearch(){
|
/* topSearch(){
|
||||||
this.setSearchVal();
|
this.setSearchVal();
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},*/
|
||||||
licenseType(){
|
licenseType(){
|
||||||
this.setSearchVal();
|
this.setSearchVal();
|
||||||
this.getList()
|
this.getList()
|
||||||
@ -192,6 +193,16 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods:{
|
methods:{
|
||||||
|
formatToWan(num) {
|
||||||
|
let result = (num / 10000).toString();
|
||||||
|
if (result.includes('.')) {
|
||||||
|
let decimalPart = result.split('.')[1];
|
||||||
|
if (decimalPart.length > 2) {
|
||||||
|
result = parseFloat(result).toFixed(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result + '万';
|
||||||
|
},
|
||||||
async tabClick(type){
|
async tabClick(type){
|
||||||
this.activeTab=type
|
this.activeTab=type
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
|
Reference in New Issue
Block a user