二手车小程序
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="">
|
||||
<z-paging ref="paging" v-model="contList" @query="queryList" :empty-view-text="$t('empty')">
|
||||
<template #top>
|
||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.mycar')"></uni-nav-bar>
|
||||
</template>
|
||||
<view class="t-conten" v-for="(item,index) in contList" :key="index" @click="godetile(item)">
|
||||
<view> {{item.name}}</view>
|
||||
<view :style="{'color': item.info_status==0?'#387CD3':item.info_status==1?'#F0712C':'#D23B35'}">
|
||||
<text v-if="item.info_status==0">{{$t('status0')}}</text>
|
||||
<text v-if="item.info_status==1">{{$t('status1')}}</text>
|
||||
<text v-if="item.info_status==2">{{$t('status2')}}</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
|
||||
}
|
||||
}).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();
|
||||
})
|
||||
},
|
||||
godetile(item){
|
||||
console.log(item.status)
|
||||
if(item.info_status==2){
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine/mycarSource/nopass?id='+item.id
|
||||
});
|
||||
}else{
|
||||
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;
|
||||
text{
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
.uni-list{
|
||||
background-color: #F9F9F9 !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user