Files
hs-usedcar-miniapp/pages/mine/soldList.vue
T
2025-09-19 09:54:43 +08:00

100 lines
2.1 KiB
Vue

<template>
<view>
<view class="">
<z-paging ref="paging" v-model="contList" @query="queryList" :empty-view-text="$t('emptysold')">
<template #top>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.Sold')"></uni-nav-bar>
</template>
<view class="t-conten" v-for="(item,index) in contList" :key="index" @click="findfn(item)">
<view> {{item.name}}</view>
<view class="find">
<text class="t1"> <text class="t2">{{$t('mine.Sold')}}</text></text>
<text >{{$t('view')}}</text>
</view>
</view>
</z-paging>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
contList:[]
}
},
onLoad() {
},
methods: {
leftClick(){
uni.navigateBack({})
},
queryList(pageNo, pageSize) {
var that = this;
request({
url:'vehicle/list',
method:'get',
data: {
page:pageNo,
limit:10,
is_saled:1
}
}).then(res => {
console.log(res.data)
if(res.data.code ==0){
var datas = res.data.data.list;
this.$refs.paging.complete(datas);
}else{
// this.$refs.paging.complete(null);
// that.listlength=0
}
uni.stopPullDownRefresh();
//
})
},
findfn(item){
uni.removeStorageSync('carlistinfo')
uni.navigateTo({
url: '/pages/mine/soldList/soldcarinfo?id='+item.id
});
}
}
}
</script>
<style lang="scss">
.t-conten{
justify-content: space-between;
margin: 10px;
border-radius: 10px;
overflow: hidden;
background-color: white;
padding: 0px 10px;
display: flex;
height: 70px;
line-height: 70px;
font-weight: 500;
}
.uni-list{
background-color: #F9F9F9 !important;
}
.find{
color: #646465;
font-size: 13px;
}
.t1{
border: 2px solid #19AD7E;
border-radius: 4px;
padding: 6px 4px;
color: #19AD7E;
margin-right: 20px;
}
.t2{
border: 1px solid #19AD7E;
border-radius: 4px;
padding: 2px 4px;
}
</style>