二手车小程序

This commit is contained in:
浅念
2025-09-19 09:54:43 +08:00
parent 91e604a6af
commit 507bff6d65
869 changed files with 107160 additions and 0 deletions
+181
View File
@@ -0,0 +1,181 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.changinfo')"></uni-nav-bar>
<view class="content">
<view class="cell">
<view>{{$t('mine.avatar')}}</view>
<view class="right">
<uni-file-picker fileMediatype="image" limit="1" @select="select" @delete="delfn" :del-icon="false" disable-preview :imageStyles="imageStyles">
<image :src="userinfo.avatar==''?'/static/image/mine/user.png':userinfo.avatar" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</view>
<view class="cell1">
<view>{{$t('mine.nickname')}}</view>
<view class="right select">
<input :placeholder="$t('mine.nickinput')" v-model="userinfo.nickname"></input>
<uni-icons type="right" size="18"></uni-icons>
</view>
</view>
<view class="cell1">
<view>{{$t('mine.phone')}}</view>
<view class="right select">
<input :placeholder="$t('mine.phoneinput')" type="number" v-model="userinfo.phone"></input>
<uni-icons type="right" size="18"></uni-icons>
</view>
</view>
<view class="cell1">
<view>{{$t('mine.company')}}</view>
<view class="right select">
<input :placeholder="$t('mine.companyinput')" v-model="userinfo.company"></input>
<uni-icons type="right" size="18"></uni-icons>
</view>
</view>
</view>
<view class="foot">
<button class="btn" @click="bcFn">{{$t('button.save')}}</button>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
imageStyles: {
width: 40,
height: 40,
border: {
radius: '50%'
}
},
userinfo:{
nickname:'',
avatar:'',
company:'',
phone:'',
},
}
},
onLoad() {
this.getinfo()
},
methods: {
getinfo(){
var that= this;
request({
url:'user/info',
method:'POST',
}).then(res => {
that.userinfo = res.data.data
})
},
uploadfn(imgUrl){
var that = this;
uni.uploadFile({
url: 'https://usedcar.server.hnxinyouhe.com/applet/upload/image',
filePath: imgUrl,
name: 'image',
header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('token')},
success: (uploadFileRes) => {
const path=JSON.parse(uploadFileRes.data)
that.userinfo.avatar = path.data.image_url
console.log(that.carinfo)
}
});
},
delfn(){
that.userinfo.avatar =''
},
select(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl)
},
leftClick(){
uni.navigateBack({})
},
bcFn(){
request({
url:'user/update',
method:'POST',
data:{
nickname:this.userinfo.nickname,
avatar:this.userinfo.avatar,
company:this.userinfo.company,
phone:this.userinfo.phone
}
}).then(res => {
uni.showToast({
title: res.data.message,
icon: 'none'
});
if(res.data.code ==0){
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/mine',// 替换为你要跳转的页面路径
});
}, 1000);
}
})
}
}
}
</script>
<style>
.uniui-right{
position: absolute;
top: 2px;
}
.content{
margin: 20px 12px;
background: #FFFFFF;
border-radius: 10px;
}
.cell{
display: flex;
justify-content:space-between;
padding: 10px 20px;
/* border-bottom: 1px solid #C3C3C3; */
align-items: center;
font-weight: 500;
}
.cell1{
display: flex;
justify-content:space-between;
padding: 18px 20px;
align-items: center;
font-weight: 500;
}
.right{
text-align: right;
}
.select{
display: flex;
position: relative;
margin-right: 10px;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
width: 84%;
margin-bottom: 40px;
margin: 20px 8%;
}
.addimg{
width: 35px;
height: 35px;
border-radius: 50%;
}
</style>
+97
View File
@@ -0,0 +1,97 @@
<template>
<view>
<view class="">
<z-paging ref="paging" v-model="contList" @query="queryList" :empty-view-text="$t('emptycg')">
<template #top>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.drafts')"></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">
{{$t('view')}}
</view>
</view>
</z-paging>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
contList:[],
listlength:0,
}
},
onLoad() {
this.getcontList()
},
methods: {
leftClick(){
uni.navigateBack({})
},
getcontList(){
request({
url:'draft/list',
method:'get',
}).then(res => {
this.contList = res.data.data.list
})
},
queryList(pageNo, pageSize) {
console.log(pageNo)
console.log(pageSize)
var that = this;
request({
url:'draft/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();
//
})
},
findfn(item){
uni.navigateTo({
url: '/pages/mine/drafts/draftsDetil?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;
}
</style>
+551
View File
@@ -0,0 +1,551 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.carinfo')"></uni-nav-bar>
<view class="content">
<view class="cell">
<view>{{$t('carinfo.productName')}} <text class="red">*</text></view>
<view class="right">
<input :placeholder="$t('carinfo.inputproduct')" v-model="carinfo.name" />
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.product_image')}}</view>
<view class="right">
<uni-file-picker fileMediatype="image" limit="1" @select="select" @delete="delfn" :del-icon="false" disable-preview :imageStyles="imageStyles">
<image :src="carinfo.cover_full==''?'/static/image/img.png':carinfo.cover_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.vin')}}</view>
<view class="right">
<input :placeholder="$t('carinfo.inputVIN')" v-model="carinfo.vin" />
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.brand')}}</view>
<view class="right select" @click="showbrand=true">
<input :placeholder="$t('carinfo.selectbrand')" disabled v-model="brandname" />
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.model')}}</view>
<view class="right select" @click="showmodel = true">
<input :placeholder="$t('carinfo.selectmodel')" disabled v-model="model" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showmodel" @cancel="cancel('showmodel')" :defaultIndex="defaultIndexm" :columns="modelList" keyName="name" @confirm="modelChange"></u-picker>
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.price')}}</view>
<view class="right">
<input :placeholder="$t('carinfo.inputprice')" type="digit" v-model="carinfo.price" />
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.type')}}</view>
<view class="right select" @click="showtype=true">
<input :placeholder="$t('carinfo.selecttype')" disabled v-model="type" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showtype" @cancel="cancel('showtype')" :defaultIndex="defaultIndex2" :columns="typesList" keyName="name" @confirm="typesChange"></u-picker>
<!-- <ld-select :list="typesList" label-key="name" value-key="id" placeholder="选择车辆类型" v-model="carinfo.type" @change="typesChange"></ld-select> -->
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.energy')}}</view>
<view class="right select" @click="showenergy=true">
<input :placeholder="$t('carinfo.selectenergy')" disabled v-model="energy" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showenergy" @cancel="cancel('showenergy')" :defaultIndex="defaultIndex3" :columns="energyList" keyName="name" @confirm="energyChange"></u-picker>
<!-- <ld-select :list="energyList" label-key="name" value-key="id" placeholder="选择能源类型" v-model="carinfo.energy" @change="energyChange"></ld-select> -->
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.store_status')}}</view>
<view class="right select" @click="showstatus = true">
<input :placeholder="$t('carinfo.select')" disabled v-model="store_status" />
<u-picker :defaultIndex="defaultIndexs" :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showstatus" @cancel="cancel('showstatus')" :columns="statusList" keyName="name" @confirm="statusChange"></u-picker>
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.location')}}</view>
<view class="right select" @click="showlocation = true">
<input :placeholder="$t('carinfo.select')" disabled v-model="location" />
<u-picker :defaultIndex="defaultIndexl" :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showlocation" @cancel="cancel('showlocation')" :columns="locationList" keyName="name" @confirm="locationChange"></u-picker>
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.mileage')}}</view>
<view class="right">
<input :placeholder="$t('carinfo.inputmileage')" type="digit" v-model="carinfo.mileage"/>
</view>
</view>
<view class="cell1">
<view>{{$t('carinfo.age')}}</view>
<view class="right">
<input :placeholder="$t('carinfo.inputage')" type="digit" v-model="carinfo.vehicle_age" />
</view>
</view>
</view>
<view class="zw"></view>
<view class="foot">
<button class="btn" @click="nextFn">{{$t('button.next')}}</button>
</view>
<u-popup closeOnClickOverlay :show="showbrand" mode="bottom" :round="10" @close="cancel('showbrand')">
<view class="text">
<view class="qx" @click="cancel('showbrand') ">{{$t('cancel')}}</view>
<view class="qd" @click="brandChange">{{$t('confirm')}}</view>
</view>
<view class="popup-content">
<!-- 搜索框 -->
<u-input
v-model="searchKeyword"
:placeholder="$t('keyword')"
@input="handleSearch"
></u-input>
<!-- 选项列表 -->
<scroll-view scroll-y class="option-list">
<view
v-for="(item, index) in filteredOptions"
:key="index"
class="option-item"
@click="handleSelect(item)"
:class="actives==item.id?'actives':''"
>
{{ item.name }}
</view>
<view v-if="filteredOptions.length === 0" class="no-data">
{{$t('noresults')}}
</view>
</scroll-view>
</view>
</u-popup>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
// import ldSelect from '@/components/ld-select/ld-select.vue'
export default {
data() {
return {
id:'',
imageStyles: {
width: 50,
height: 50,
},
i18locale:uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):'zh',
actives:'',
searchKeyword: "", // 搜索关键词
selectedLabel: "", // 选中的值(显示在输入框中)
filteredOptions: [], // 过滤后的数据
brandList:[],
energyList:[],
typesList:[],
brandList1:[],
energyList1:[],
typesList1:[],
modelList:[],
locationList:[],
modelList1:[],
locationList1:[],
showbrand: false,
showtype: false,
showenergy: false,
showmodel: false,
showlocation: false,
showstatus: false,
defaultIndex1:[0],
defaultIndex2:[0],
defaultIndex3:[0],
defaultIndexm:[0],
defaultIndexl:[0],
defaultIndexs:[0],
brandname:'',
type:'',
energy:'',
statusList:[[{
name: this.$t('carinfo.in_stock'),
id: '1'
}, {
name: this.$t('carinfo.in_transit'),
id: '2'
},{
name: this.$t('carinfo.on_order'),
id: '3'
}]],
model:'',
location:'',
store_status:'',
carinfo:{
cover:'',
model:'',
location:'',
store_status:'',
name:'',
vin:'',
brand:'',
price:'',
type:'',
energy:'',
mileage :'',
vehicle_age:'',
condition_desc:'',
front_45_degree:'',
front_left_45_degree:'',
front_left_headlight:'',
front_view:'',
lower_front:'',
wheel_hub:'',
front_right_seat:'',
right_lower_side:'',
rear_right_taillight:'',
rear_right_45_degree:'',
lower_rear:'',
trunk:'',
left_lower_side:'',
rear_seats:'',
center_console:'',
control_panel:'',
gear_shift:'',
car_key:'',
steering_wheel:'',
dashboard:'',
odometer_reading:'',
front_left_door_panel:'',
front_left_door_function_area:'',
front_left_seat:'',
interior_ceiling:'',
}
}
},
onLoad(options) {
console.log(options);
this.getbrand()
this.getenergy()
this.gettypes()
this.getlocation()
this.id = options.id;
this.getcontList()
var that = this
},
methods: {
getbrand(){
request({
url:'brand',
method:'get',
data:{
language:this.i18locale
}
}).then(res => {
var list = res.data.data
this.brandList1= list;
this.filteredOptions = list;
this.brandList = [list]
})
},
getmodel(brand_id,items){
var that =this
that.model = ''
that.defaultIndexm=['']
request({
url:'models',
method:'get',
data:{
brand_id:brand_id
}
}).then(res => {
var list = res.data.data
this.modelList1 = list
this.modelList = [list]
if(items){
that.modelList1.forEach((item,index) => {
if(item.id == items){
that.model = item.name
that.defaultIndexm=[index]
}
})
}else{
if(list.length>0){
that.model = list[0].name
that.carinfo.model = list[0].id
}else{
that.model =''
that.carinfo.model =''
}
}
})
},
getenergy(){
request({
url:'energy',
method:'get',
data:{
language:this.i18locale
}
}).then(res => {
var list = res.data.data
this.energyList1= res.data.data
this.energyList = [list]
})
},
gettypes(){
request({
url:'types',
method:'get',
data:{
language:this.i18locale
}
}).then(res => {
var list = res.data.data
this.typesList1= res.data.data
this.typesList = [list]
})
},
getlocation(){
request({
url:'location/presets',
method:'get'
}).then(res => {
var list = res.data.data
this.locationList1 = list
this.locationList = [list]
})
},
// 搜索处理函数
handleSearch() {
if (this.searchKeyword) {
console.log(this.searchKeyword)
this.filteredOptions = this.brandList1.filter((item) =>
item.name.includes(this.searchKeyword)
);
console.log(this.filteredOptions)
} else {
// 如果搜索框为空,显示全部数据
this.filteredOptions = this.brandList1;
}
},
// 选择选项
handleSelect(item) {
this.selectedLabel = item.name; // 回显选中的值
// this.searchKeyword = item.name
this.actives = item.id
// this.showPicker = false; // 关闭弹窗
console.log("选中的值:", item.id);
console.log("选中的值:", item.name);
},
brandChange(){
this.carinfo.brand = this.actives
this.brandname = this.selectedLabel
this.showbrand = false
this.getmodel(this.actives)
},
energyChange(val){
this.carinfo.energy = val.value[0].id
this.energy = val.value[0].name
this.showenergy = false
},
typesChange(val){
this.carinfo.type = val.value[0].id
this.type = val.value[0].name
this.showtype = false
},
modelChange(val){
this.carinfo.model = val.value[0].id
this.model = val.value[0].name
this.showmodel = false
},
statusChange(val){
this.carinfo.store_status = val.value[0].id
this.store_status = val.value[0].name
this.showstatus = false
},
locationChange(val){
this.carinfo.location = val.value[0].id
this.location = val.value[0].name
this.showlocation = false
},
leftClick(){
uni.navigateBack({})
},
cancel(val){
this[val] = false
},
getcontList(){
var that = this;
request({
url:'draft/detail/'+this.id,
method:'get',
}).then(res => {
that.carinfo = res.data.data
this.actives = res.data.data.brand
this.getmodel(that.carinfo.brand,that.carinfo.model)
that.brandname = that.carinfo.brand_name
that.energy = that.carinfo.energy_name
that.type = that.carinfo.type_name
that.location = that.carinfo.location_name
var statusList = that.statusList[0]
statusList.forEach((item,index) => {
if(item.id == that.carinfo.store_status){
that.store_status = item.name
that.defaultIndexs=[index]
}
})
that.brandList1.forEach((item,index) => {
if(item.id == that.carinfo.brand){
that.defaultIndex1=[index]
}
})
that.energyList1.forEach((item,index) => {
if(item.energy_id == that.carinfo.energy){
that.defaultIndex3=[index]
}
})
that.typesList1.forEach((item,index) => {
if(item.energy_id == that.carinfo.type){
that.defaultIndex2=[index]
}
})
that.locationList1.forEach((item,index) => {
if(item.id == that.carinfo.location){
that.defaultIndexl=[index]
}
})
})
},
nextFn(){
const carinfo = JSON.stringify(this.carinfo);
uni.setStorageSync('newcarinfo', carinfo);
uni.navigateTo({
url: '/pages/mine/drafts/draftsDetil1?id='+this.id
});
}
}
}
</script>
<style lang="scss">
.zw{
height: 120px;
}
.uniui-right{
position: absolute;
top: 2px;
}
.content{
margin: 20px 12px;
background: #FFFFFF;
border-radius: 10px;
}
.red{
color: red;
}
.cell{
position: relative;
display: flex;
justify-content:space-between;
padding: 18px 20px;
/* border-bottom: 1px solid #C3C3C3; */
align-items: center;
font-weight: 500;
}
.cell::after{
content : '';
position : absolute;
width : 200%;
height : 200%;
top : 0;
left : 0;
transform-origin: 0 0;
border-width: 0;
border-bottom-width:1px;
border-style : solid;
transform : scale(0.5, 0.5);
border-radius : 1px;
box-sizing : border-box;
pointer-events : none;
border-color:#C3C3C3;
}
.cell1{
display: flex;
justify-content:space-between;
padding: 18px 20px;
align-items: center;
font-weight: 500;
}
.right{
text-align: right;
}
.select{
display: flex;
position: relative;
margin-right: 10px;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
z-index: 2;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
width: 92%;
margin-bottom: 40px;
margin: 15px 4%;
}
.actives{
background-color: #dfdfdf;
}
.text{
display: flex;
align-items: center;
justify-content: space-between;
line-height: 30px;
padding: 10px 15px 0px;
.qd{
color: #3471FF;
}
}
.popup-content {
padding: 20px;
background-color: #fff;
}
.option-list {
max-height: 400rpx;
margin-top: 20rpx;
}
.option-item {
padding: 20rpx;
border-bottom: 1rpx solid #eee;
}
.option-item:last-child {
border-bottom: none;
}
.no-data {
text-align: center;
padding: 20rpx;
color: #999;
}
.addimg{
width: 50px;
height: 50px;
}
</style>
+664
View File
@@ -0,0 +1,664 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.carinfo')"></uni-nav-bar>
<view class="cont">
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.front45Degree')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select" @delete="delfn('front_45_degree')">
<image :src="carinfo.front_45_degree_full==''?'/static/image/img.png':carinfo.front_45_degree_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFront45Degree')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select1" @delete="delfn('front_left_45_degree')">
<image :src="carinfo.front_left_45_degree_full==''?'/static/image/img.png':carinfo.front_left_45_degree_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontHeadlight')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select2" @delete="delfn('front_left_headlight')">
<image :src="carinfo.front_left_headlight_full==''?'/static/image/img.png':carinfo.front_left_headlight_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.front')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select3" @delete="delfn('front_view')">
<image :src="carinfo.front_view_full==''?'/static/image/img.png':carinfo.front_view_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.frontLowerPart')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select4" @delete="delfn('lower_front')">
<image :src="carinfo.lower_front_full==''?'/static/image/img.png':carinfo.lower_front_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.wheelHub')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select5" @delete="delfn('wheel_hub')">
<image :src="carinfo.wheel_hub_full==''?'/static/image/img.png':carinfo.wheel_hub_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightFrontSeat')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select6" @delete="delfn('front_right_seat')">
<image :src="carinfo.front_right_seat_full==''?'/static/image/img.png':carinfo.front_right_seat_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightBottomEdge')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select7" @delete="delfn('right_lower_side')">
<image :src="carinfo.right_lower_side_full==''?'/static/image/img.png':carinfo.right_lower_side_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightRearTaillight')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select8" @delete="delfn('rear_right_taillight')">
<image :src="carinfo.rear_right_taillight_full==''?'/static/image/img.png':carinfo.rear_right_taillight_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightRear45Degree')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select9" @delete="delfn('rear_right_45_degree')">
<image :src="carinfo.rear_right_45_degree_full==''?'/static/image/img.png':carinfo.rear_right_45_degree_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rearLowerPart')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select10" @delete="delfn('lower_rear')">
<image :src="carinfo.lower_rear_full==''?'/static/image/img.png':carinfo.lower_rear_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.trunk')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select11" @delete="delfn('trunk')">
<image :src="carinfo.trunk_full==''?'/static/image/img.png':carinfo.trunk_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftBottomEdge')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select12" @delete="delfn('left_lower_side')">
<image :src="carinfo.left_lower_side_full==''?'/static/image/img.png':carinfo.left_lower_side_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rearSeat')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select13" @delete="delfn('rear_seats')">
<image :src="carinfo.rear_seats_full==''?'/static/image/img.png':carinfo.rear_seats_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.console')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select14" @delete="delfn('center_console')">
<image :src="carinfo.center_console_full==''?'/static/image/img.png':carinfo.center_console_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.controlPanel')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select15" @delete="delfn('control_panel')">
<image :src="carinfo.control_panel_full==''?'/static/image/img.png':carinfo.control_panel_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.gearLever')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select16" @delete="delfn('gear_shift')">
<image :src="carinfo.gear_shift_full==''?'/static/image/img.png':carinfo.gear_shift_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.key')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select17" @delete="delfn('car_key')">
<image :src="carinfo.car_key_full==''?'/static/image/img.png':carinfo.car_key_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.steeringWheel')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select18" @delete="delfn('steering_wheel')">
<image :src="carinfo.steering_wheel_full==''?'/static/image/img.png':carinfo.steering_wheel_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.dashboard')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select19" @delete="delfn('dashboard')">
<image :src="carinfo.dashboard_full==''?'/static/image/img.png':carinfo.dashboard_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.displayedMileage')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select20" @delete="delfn('odometer_reading')">
<image :src="carinfo.odometer_reading_full==''?'/static/image/img.png':carinfo.odometer_reading_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontDoorPanel')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select21" @delete="delfn('front_left_door_panel')">
<image :src="carinfo.front_left_door_panel_full==''?'/static/image/img.png':carinfo.front_left_door_panel_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontDoorFunctionArea')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select22" @delete="delfn('front_left_door_function_area')">
<image :src="carinfo.front_left_door_function_area_full==''?'/static/image/img.png':carinfo.front_left_door_function_area_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontSeat')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select23" @delete="delfn('front_left_seat')">
<image :src="carinfo.front_left_seat_full==''?'/static/image/img.png':carinfo.front_left_seat_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.ceiling')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select24" @delete="delfn('interior_ceiling')">
<image :src="carinfo.interior_ceiling==''?'/static/image/img.png':carinfo.interior_ceiling" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<view class="foot">
<view>
<button class="btn1" plain="true" @click="goFn">{{$t('button.previous')}}</button>
<button class="btn" @click="nextFn">{{$t('button.next')}}</button>
</view>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
carinfo:{},
}
},
onLoad(options) {
this.id = options.id;
const carinfo = uni.getStorageSync('newcarinfo');
this.carinfo = JSON.parse(carinfo);
// this.getcontList()
},
methods: {
getcontList(){
request({
url:'draft/detail/'+this.id,
method:'get',
}).then(res => {
this.carinfo = res.data.data.detail
})
},
uploadfn(imgUrl,name){
var that = this;
uni.uploadFile({
url: 'https://usedcar.server.hnxinyouhe.com/applet/upload/image',
filePath: imgUrl,
name: 'image',
header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('token')},
success: (uploadFileRes) => {
const path=JSON.parse(uploadFileRes.data)
that.carinfo[name] = path.data.image_name
console.log(that.carinfo)
}
});
},
delfn(name){
that.carinfo[name] =''
},
select(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_45_degree')
},
select1(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_45_degree')
},
select2(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_headlight')
},
select3(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_view')
},
select4(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'lower_front')
},
select5(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'wheel_hub')
},
select6(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_right_seat')
},
select7(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'right_lower_side')
},
select8(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'rear_right_taillight')
},
select9(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'rear_right_45_degree')
},
select10(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'lower_rear')
},
select11(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'trunk')
},
select12(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'left_lower_side')
},
select13(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'rear_seats')
},
select14(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'center_console')
},
select15(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'control_panel')
},
select16(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'gear_shift')
},
select17(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'car_key')
},
select18(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'steering_wheel')
},
select19(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'dashboard')
},
select20(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'odometer_reading')
},
select21(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_door_panel')
},
select22(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_door_function_area')
},
select23(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_seat')
},
select24(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'interior_ceiling')
},
leftClick(){
uni.navigateBack({})
},
goFn(){
uni.navigateBack({})
},
nextFn(){
const carinfo = JSON.stringify(this.carinfo);
uni.setStorageSync('newcarinfo', carinfo);
uni.navigateTo({
url: '/pages/mine/drafts/draftsDetil2?id='+this.id
});
}
}
}
</script>
<style>
.uni-file-picker {
margin-left: 33.3%;
}
.cont{
padding: 10px 0px 130px;
}
.content{
margin: 10px 12px;
background: #FFFFFF;
border-radius: 10px;
overflow: hidden;
}
.con-title{
padding: 18px 10px;
font-weight: 500;
}
.red{
color: red;
}
.contents{
padding:10px;
text-align: center;
}
.addimg{
width: 110px;
height:110px;
}
.caogao{
position: fixed;
right: 0px;
bottom: 280rpx;
}
.caogao image{
width: 64px;
height: 64px;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
}
.foot view{
display: flex;
width: 94%;
margin: 15px 3%;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
margin-bottom: 40px;
margin-left: 2%;
flex-grow:1
}
.btn1{
border-color:#9E9E9E !important;
border-radius: 50px;
color: #414141;
margin-bottom: 40px;
width: 110px;
background-color: #fff;
}
</style>
+140
View File
@@ -0,0 +1,140 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.carinfo')"></uni-nav-bar>
<view class="content">
<view class="cont">{{$t('carinfo.mag')}}</view>
<view class="">
<textarea auto-height v-model="carinfo.condition_desc" :placeholder="$t('carinfo.maginput')"/>
</view>
</view>
<view class="foot">
<view>
<button class="btn1" plain="true" @click="leftClick">{{$t('button.previous')}}</button>
<button class="btn" @click="addFn">{{$t('button.submit')}}</button>
</view>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
carinfo:{},
}
},
onLoad(options) {
this.id = options.id;
const carinfo = uni.getStorageSync('newcarinfo');
this.carinfo = JSON.parse(carinfo);
this.carinfo .draft_id=this.id
},
methods: {
leftClick(){
uni.navigateBack({})
},
addFn(){
console.log(this.carinfo)
request({
url:'vehicle/add',
method:'post',
data:this.carinfo
}).then(res => {
uni.showToast({
title: res.data.message,
icon: 'none'
});
if(res.data.code ==0){
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/mine',// 替换为你要跳转的页面路径
});
}, 1000);
}
})
}
}
}
</script>
<style lang="scss">
textarea {
min-height: 640rpx;// 设置默认高度 ,解决设置自适应高度之后高度无效问题
width: 100%;
}
.content{
margin: 20px 12px;
background: #FFFFFF;
border-radius: 10px;
.cont{
position: relative;
font-weight: 500;
}
.cont::after{
content : '';
position : absolute;
width : 200%;
height : 200%;
top : 0;
left : 0;
transform-origin: 0 0;
border-width: 0;
border-bottom-width:1px;
border-style : solid;
transform : scale(0.5, 0.5);
border-radius : 1px;
box-sizing : border-box;
pointer-events : none;
border-color:#C3C3C3;
}
}
.content view{
padding: 20px 10px;
}
.right{
text-align: right;
}
.select{
display: flex;
}
.caogao{
position: fixed;
right: 0px;
bottom: 280rpx;
}
.caogao image{
width: 64px;
height: 64px;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
}
.foot view{
display: flex;
width: 94%;
margin: 15px 3%;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
margin-bottom: 40px;
margin-left: 2%;
flex-grow:1
}
.btn1{
border-color:#9E9E9E !important;
border-radius: 50px;
color: #414141;
margin-bottom: 40px;
width: 110px;
background-color: #fff;
}
</style>
+92
View File
@@ -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>
+556
View File
@@ -0,0 +1,556 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.carinfo')"></uni-nav-bar>
<view class="content">
<view class="cell">
<view>{{$t('carinfo.productName')}} <text class="red">*</text></view>
<view class="right">
<input :placeholder="$t('carinfo.inputproduct')" v-model="carinfo.name" />
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.product_image')}}</view>
<view class="right">
<uni-file-picker fileMediatype="image" limit="1" @select="select" @delete="delfn" :del-icon="false" disable-preview :imageStyles="imageStyles">
<image :src="carinfo.cover_full==''?'/static/image/img.png':carinfo.cover_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.vin')}}</view>
<view class="right">
<input :placeholder="$t('carinfo.inputVIN')" v-model="carinfo.vin" />
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.brand')}}</view>
<view class="right select" @click="showbrand=true">
<input :placeholder="$t('carinfo.selectbrand')" disabled v-model="brandname" />
<!-- <u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showbrand" @cancel="cancel('showbrand')" :defaultIndex="defaultIndex1" :columns="brandList" keyName="name" @confirm="brandChange"></u-picker> -->
<!-- <ld-select :list="brandList" label-key="name" value-key="brand_id" placeholder="请选择" v-model="carinfo.brand" @change="brandChange"></ld-select> -->
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.model')}}</view>
<view class="right select" @click="showmodel = true">
<input :placeholder="$t('carinfo.selectmodel')" disabled v-model="model" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showmodel" @cancel="cancel('showmodel')" :defaultIndex="defaultIndexm" :columns="modelList" keyName="name" @confirm="modelChange"></u-picker>
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.price')}}</view>
<view class="right">
<input :placeholder="$t('carinfo.inputprice')" type="digit" v-model="carinfo.price" />
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.type')}}</view>
<view class="right select" @click="showtype=true">
<input :placeholder="$t('carinfo.selecttype')" disabled v-model="type" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showtype" @cancel="cancel('showtype')" :defaultIndex="defaultIndex2" :columns="typesList" keyName="name" @confirm="typesChange"></u-picker>
<!-- <ld-select :list="typesList" label-key="name" value-key="energy_id" placeholder="选择车辆类型" v-model="carinfo.type" @change="typesChange"></ld-select> -->
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.energy')}}</view>
<view class="right select" @click="showenergy=true">
<input :placeholder="$t('carinfo.selectenergy')" disabled v-model="energy" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showenergy" @cancel="cancel('showenergy')" :defaultIndex="defaultIndex3" :columns="energyList" keyName="name" @confirm="energyChange"></u-picker>
<!-- <ld-select :list="energyList" label-key="name" value-key="energy_id" placeholder="选择能源类型" v-model="carinfo.energy" @change="energyChange"></ld-select> -->
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.store_status')}}</view>
<view class="right select" @click="showstatus = true">
<input :placeholder="$t('carinfo.select')" disabled v-model="store_status" />
<u-picker :defaultIndex="defaultIndexs" :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showstatus" @cancel="cancel('showstatus')" :columns="statusList" keyName="name" @confirm="statusChange"></u-picker>
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.location')}}</view>
<view class="right select" @click="showlocation = true">
<input :placeholder="$t('carinfo.select')" disabled v-model="location" />
<u-picker :defaultIndex="defaultIndexl" :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showlocation" @cancel="cancel('showlocation')" :columns="locationList" keyName="name" @confirm="locationChange"></u-picker>
<uni-icons type="right" size="18" color="#747474"></uni-icons>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.mileage')}}</view>
<view class="right">
<input :placeholder="$t('carinfo.inputmileage')" type="digit" v-model="carinfo.mileage"/>
</view>
</view>
<view class="cell1">
<view>{{$t('carinfo.age')}}</view>
<view class="right">
<input :placeholder="$t('carinfo.inputage')" type="digit" v-model="carinfo.vehicle_age" />
</view>
</view>
</view>
<view class="zw"></view>
<view class="foot">
<button class="btn" @click="nextFn">{{$t('button.next')}}</button>
</view>
<u-popup closeOnClickOverlay :show="showbrand" mode="bottom" :round="10" @close="cancel('showbrand')">
<view class="text">
<view class="qx" @click="cancel('showbrand') ">{{$t('cancel')}}</view>
<view class="qd" @click="brandChange">{{$t('confirm')}}</view>
</view>
<view class="popup-content">
<!-- 搜索框 -->
<u-input
v-model="searchKeyword"
:placeholder="$t('keyword')"
@input="handleSearch"
></u-input>
<!-- 选项列表 -->
<scroll-view scroll-y class="option-list">
<view
v-for="(item, index) in filteredOptions"
:key="index"
class="option-item"
@click="handleSelect(item)"
:class="actives==item.id?'actives':''"
>
{{ item.name }}
</view>
<view v-if="filteredOptions.length === 0" class="no-data">
{{$t('noresults')}}
</view>
</scroll-view>
</view>
</u-popup>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
// import ldSelect from '@/components/ld-select/ld-select.vue'
export default {
data() {
return {
id:'',
imageStyles: {
width: 50,
height: 50,
},
i18locale:uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):'zh',
actives:'',
searchKeyword: "", // 搜索关键词
selectedLabel: "", // 选中的值(显示在输入框中)
filteredOptions: [], // 过滤后的数据
brandList:[],
energyList:[],
typesList:[],
brandList1:[],
energyList1:[],
typesList1:[],
modelList:[],
locationList:[],
modelList1:[],
locationList1:[],
showbrand: false,
showtype: false,
showenergy: false,
showmodel: false,
showlocation: false,
showstatus: false,
defaultIndex1:[0],
defaultIndex2:[0],
defaultIndex3:[0],
defaultIndexm:[0],
defaultIndexl:[0],
defaultIndexs:[0],
brandname:'',
type:'',
energy:'',
statusList:[[{
name: this.$t('carinfo.in_stock'),
id: '1'
}, {
name: this.$t('carinfo.in_transit'),
id: '2'
},{
name: this.$t('carinfo.on_order'),
id: '3'
}]],
model:'',
location:'',
store_status:'',
carinfo:{
name:'',
vin:'',
cover:'',
model:'',
location:'',
store_status:'',
brand:'',
price:'',
type:'',
energy:'',
mileage :'',
vehicle_age:'',
condition_desc:'',
front_45_degree:'',
front_left_45_degree:'',
front_left_headlight:'',
front_view:'',
lower_front:'',
wheel_hub:'',
front_right_seat:'',
right_lower_side:'',
rear_right_taillight:'',
rear_right_45_degree:'',
lower_rear:'',
trunk:'',
left_lower_side:'',
rear_seats:'',
center_console:'',
control_panel:'',
gear_shift:'',
car_key:'',
steering_wheel:'',
dashboard:'',
odometer_reading:'',
front_left_door_panel:'',
front_left_door_function_area:'',
front_left_seat:'',
interior_ceiling:'',
}
}
},
onLoad(options) {
console.log(options);
this.getbrand()
this.getenergy()
this.gettypes()
this.getlocation()
this.id = options.id;
this.getcontList()
var that = this
},
methods: {
getbrand(){
request({
url:'brand',
method:'get',
data:{
language:this.i18locale
}
}).then(res => {
var list = res.data.data
this.brandList1= list;
this.filteredOptions = list;
this.brandList = [list]
})
},
getmodel(brand_id,items){
var that =this
that.model = ''
that.defaultIndexm=['']
request({
url:'models',
method:'get',
data:{
brand_id:brand_id
}
}).then(res => {
var list = res.data.data
this.modelList1 = list
this.modelList = [list]
if(items){
that.modelList1.forEach((item,index) => {
if(item.id == items){
that.model = item.name
that.defaultIndexm=[index]
}
})
}else{
if(list.length>0){
that.model = list[0].name
that.carinfo.model = list[0].id
}else{
that.model =''
that.carinfo.model =''
}
}
})
},
getenergy(){
request({
url:'energy',
method:'get',
data:{
language:this.i18locale
}
}).then(res => {
var list = res.data.data
this.energyList1= res.data.data
this.energyList = [list]
})
},
gettypes(){
request({
url:'types',
method:'get',
data:{
language:this.i18locale
}
}).then(res => {
var list = res.data.data
this.typesList1= res.data.data
this.typesList = [list]
})
},
getlocation(){
request({
url:'location/presets',
method:'get'
}).then(res => {
var list = res.data.data
this.locationList1 = list
this.locationList = [list]
})
},
// 搜索处理函数
handleSearch() {
if (this.searchKeyword) {
console.log(this.searchKeyword)
this.filteredOptions = this.brandList1.filter((item) =>
item.name.includes(this.searchKeyword)
);
console.log(this.filteredOptions)
} else {
// 如果搜索框为空,显示全部数据
this.filteredOptions = this.brandList1;
}
},
// 选择选项
handleSelect(item) {
this.selectedLabel = item.name; // 回显选中的值
// this.searchKeyword = item.name
this.actives = item.id
// this.showPicker = false; // 关闭弹窗
console.log("选中的值:", item.id);
console.log("选中的值:", item.name);
},
brandChange(){
this.carinfo.brand = this.actives
this.brandname = this.selectedLabel
this.showbrand = false
this.getmodel(this.actives)
},
energyChange(val){
this.carinfo.energy = val.value[0].id
this.energy = val.value[0].name
this.showenergy = false
},
typesChange(val){
this.carinfo.type = val.value[0].id
this.type = val.value[0].name
this.showtype = false
},
modelChange(val){
this.carinfo.model = val.value[0].id
this.model = val.value[0].name
this.showmodel = false
},
statusChange(val){
this.carinfo.store_status = val.value[0].id
this.store_status = val.value[0].name
this.showstatus = false
},
locationChange(val){
this.carinfo.location = val.value[0].id
this.location = val.value[0].name
this.showlocation = false
},
cancel(val){
this[val] = false
},
leftClick(){
uni.navigateBack({})
},
getcontList(){
var that = this;
request({
url:'vehicle/detail/'+this.id,
method:'get',
}).then(res => {
that.carinfo = res.data.data
this.actives = res.data.data.brand
this.getmodel(that.carinfo.brand,that.carinfo.model)
that.brandname = that.carinfo.brand_name
that.energy = that.carinfo.energy_name
that.type = that.carinfo.type_name
that.location = that.carinfo.location_name
var statusList = that.statusList[0]
statusList.forEach((item,index) => {
if(item.id == that.carinfo.store_status){
that.store_status = item.name
that.defaultIndexs=[index]
}
})
that.brandList1.forEach((item,index) => {
if(item.id == that.carinfo.brand){
that.defaultIndex1=[index]
}
})
that.energyList1.forEach((item,index) => {
if(item.energy_id == that.carinfo.energy){
that.defaultIndex3=[index]
}
})
that.typesList1.forEach((item,index) => {
if(item.energy_id == that.carinfo.type){
that.defaultIndex2=[index]
}
})
that.locationList1.forEach((item,index) => {
if(item.id == that.carinfo.location){
that.defaultIndexl=[index]
}
})
})
},
nextFn(){
const carinfo = JSON.stringify(this.carinfo);
uni.setStorageSync('edtcarinfo', carinfo);
uni.navigateTo({
url: '/pages/mine/mycarSource/info1?id='+this.id
});
}
}
}
</script>
<style lang="scss">
.zw{
height: 120px;
}
.uniui-right{
position: absolute;
top: 2px;
}
.content{
margin: 20px 12px;
background: #FFFFFF;
border-radius: 10px;
}
.red{
color: red;
}
.cell{
position: relative;
display: flex;
justify-content:space-between;
padding: 18px 20px;
/* border-bottom: 1px solid #C3C3C3; */
align-items: center;
font-weight: 500;
}
.cell::after{
content : '';
position : absolute;
width : 200%;
height : 200%;
top : 0;
left : 0;
transform-origin: 0 0;
border-width: 0;
border-bottom-width:1px;
border-style : solid;
transform : scale(0.5, 0.5);
border-radius : 1px;
box-sizing : border-box;
pointer-events : none;
border-color:#C3C3C3;
}
.cell1{
display: flex;
justify-content:space-between;
padding: 18px 20px;
align-items: center;
font-weight: 500;
}
.right{
text-align: right;
}
.select{
display: flex;
position: relative;
margin-right: 10px;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
z-index: 2;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
width: 92%;
margin-bottom: 40px;
margin: 15px 4%;
}
.actives{
background-color: #dfdfdf;
}
.text{
display: flex;
align-items: center;
justify-content: space-between;
line-height: 30px;
padding: 10px 15px 0px;
.qd{
color: #3471FF;
}
}
.popup-content {
padding: 20px;
background-color: #fff;
}
.option-list {
max-height: 400rpx;
margin-top: 20rpx;
}
.option-item {
padding: 20rpx;
border-bottom: 1rpx solid #eee;
}
.option-item:last-child {
border-bottom: none;
}
.no-data {
text-align: center;
padding: 20rpx;
color: #999;
}
.addimg{
width: 40px;
height: 40px;
}
</style>
+665
View File
@@ -0,0 +1,665 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.newcar')"></uni-nav-bar>
<view class="cont">
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.front45Degree')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select" @delete="delfn('front_45_degree')">
<image :src="carinfo.front_45_degree_full==''?'/static/image/img.png':carinfo.front_45_degree_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFront45Degree')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select1" @delete="delfn('front_left_45_degree')">
<image :src="carinfo.front_left_45_degree_full==''?'/static/image/img.png':carinfo.front_left_45_degree_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontHeadlight')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select2" @delete="delfn('front_left_headlight')">
<image :src="carinfo.front_left_headlight_full==''?'/static/image/img.png':carinfo.front_left_headlight_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.front')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select3" @delete="delfn('front_view')">
<image :src="carinfo.front_view_full==''?'/static/image/img.png':carinfo.front_view_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.frontLowerPart')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select4" @delete="delfn('lower_front')">
<image :src="carinfo.lower_front_full==''?'/static/image/img.png':carinfo.lower_front_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.wheelHub')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select5" @delete="delfn('wheel_hub')">
<image :src="carinfo.wheel_hub_full==''?'/static/image/img.png':carinfo.wheel_hub_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightFrontSeat')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select6" @delete="delfn('front_right_seat')">
<image :src="carinfo.front_right_seat_full==''?'/static/image/img.png':carinfo.front_right_seat_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightBottomEdge')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select7" @delete="delfn('right_lower_side')">
<image :src="carinfo.right_lower_side_full==''?'/static/image/img.png':carinfo.right_lower_side_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightRearTaillight')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select8" @delete="delfn('rear_right_taillight')">
<image :src="carinfo.rear_right_taillight_full==''?'/static/image/img.png':carinfo.rear_right_taillight_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightRear45Degree')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select9" @delete="delfn('rear_right_45_degree')">
<image :src="carinfo.rear_right_45_degree_full==''?'/static/image/img.png':carinfo.rear_right_45_degree_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rearLowerPart')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select10" @delete="delfn('lower_rear')">
<image :src="carinfo.lower_rear_full==''?'/static/image/img.png':carinfo.lower_rear_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.trunk')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select11" @delete="delfn('trunk')">
<image :src="carinfo.trunk_full==''?'/static/image/img.png':carinfo.trunk_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftBottomEdge')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select12" @delete="delfn('left_lower_side')">
<image :src="carinfo.left_lower_side_full==''?'/static/image/img.png':carinfo.left_lower_side_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rearSeat')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select13" @delete="delfn('rear_seats')">
<image :src="carinfo.rear_seats_full==''?'/static/image/img.png':carinfo.rear_seats_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.console')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select14" @delete="delfn('center_console')">
<image :src="carinfo.center_console_full==''?'/static/image/img.png':carinfo.center_console_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.controlPanel')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select15" @delete="delfn('control_panel')">
<image :src="carinfo.control_panel_full==''?'/static/image/img.png':carinfo.control_panel_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.gearLever')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select16" @delete="delfn('gear_shift')">
<image :src="carinfo.gear_shift_full==''?'/static/image/img.png':carinfo.gear_shift_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.key')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select17" @delete="delfn('car_key')">
<image :src="carinfo.car_key_full==''?'/static/image/img.png':carinfo.car_key_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.steeringWheel')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select18" @delete="delfn('steering_wheel')">
<image :src="carinfo.steering_wheel_full==''?'/static/image/img.png':carinfo.steering_wheel_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.dashboard')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select19" @delete="delfn('dashboard')">
<image :src="carinfo.dashboard_full==''?'/static/image/img.png':carinfo.dashboard_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.displayedMileage')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select20" @delete="delfn('odometer_reading')">
<image :src="carinfo.odometer_reading_full==''?'/static/image/img.png':carinfo.odometer_reading_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontDoorPanel')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select21" @delete="delfn('front_left_door_panel')">
<image :src="carinfo.front_left_door_panel_full==''?'/static/image/img.png':carinfo.front_left_door_panel_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontDoorFunctionArea')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select22" @delete="delfn('front_left_door_function_area')">
<image :src="carinfo.front_left_door_function_area_full==''?'/static/image/img.png':carinfo.front_left_door_function_area_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontSeat')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select23" @delete="delfn('front_left_seat')">
<image :src="carinfo.front_left_seat_full==''?'/static/image/img.png':carinfo.front_left_seat_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.ceiling')}}</text>
</view>
</template>
<view class="contents">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select24" @delete="delfn('interior_ceiling')">
<image :src="carinfo.interior_ceiling_full==''?'/static/image/img.png':carinfo.interior_ceiling_full" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<view class="foot">
<view>
<button class="btn1" plain="true" @click="goFn">{{$t('button.previous')}}</button>
<button class="btn" @click="nextFn">{{$t('button.next')}}</button>
</view>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
carinfo:{},
}
},
onLoad(options) {
this.id = options.id;
const carinfo = uni.getStorageSync('edtcarinfo');
this.carinfo = JSON.parse(carinfo);
console.log(this.carinfo )
// this.getcontList()
},
methods: {
getcontList(){
request({
url:'draft/detail/'+this.id,
method:'get',
}).then(res => {
this.carinfo = res.data.data.detail
})
},
uploadfn(imgUrl,name){
var that = this;
uni.uploadFile({
url: 'https://api.collect.hs.hnzhwlkj.club/api/upload/image',
filePath: imgUrl,
name: 'image',
header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('token')},
success: (uploadFileRes) => {
const path=JSON.parse(uploadFileRes.data)
that.carinfo[name] = path.data.image_name
console.log(that.carinfo)
}
});
},
delfn(name){
that.carinfo[name] =''
},
select(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_45_degree')
},
select1(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_45_degree')
},
select2(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_headlight')
},
select3(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_view')
},
select4(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'lower_front')
},
select5(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'wheel_hub')
},
select6(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_right_seat')
},
select7(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'right_lower_side')
},
select8(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'rear_right_taillight')
},
select9(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'rear_right_45_degree')
},
select10(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'lower_rear')
},
select11(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'trunk')
},
select12(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'left_lower_side')
},
select13(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'rear_seats')
},
select14(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'center_console')
},
select15(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'control_panel')
},
select16(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'gear_shift')
},
select17(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'car_key')
},
select18(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'steering_wheel')
},
select19(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'dashboard')
},
select20(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'odometer_reading')
},
select21(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_door_panel')
},
select22(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_door_function_area')
},
select23(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_left_seat')
},
select24(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'interior_ceiling')
},
leftClick(){
uni.navigateBack({})
},
goFn(){
uni.navigateBack({})
},
nextFn(){
const carinfo = JSON.stringify(this.carinfo);
uni.setStorageSync('edtcarinfo', carinfo);
uni.navigateTo({
url: '/pages/mine/mycarSource/info2?id='+this.id
});
}
}
}
</script>
<style>
.uni-file-picker {
margin-left: 33.3%;
}
.cont{
padding: 10px 0px 130px;
}
.content{
margin: 10px 12px;
background: #FFFFFF;
border-radius: 10px;
overflow: hidden;
}
.con-title{
padding: 18px 10px;
font-weight: 500;
}
.red{
color: red;
}
.contents{
padding:10px;
text-align: center;
}
.addimg{
width: 110px;
height:110px;
}
.caogao{
position: fixed;
right: 0px;
bottom: 280rpx;
}
.caogao image{
width: 64px;
height: 64px;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
}
.foot view{
display: flex;
width: 94%;
margin: 20px 3%;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
margin-bottom: 40px;
margin-left: 2%;
flex-grow:1
}
.btn1{
border-color:#9E9E9E !important;
border-radius: 20px;
color: #414141;
margin-bottom: 40px;
width: 110px;
background-color: #fff;
}
</style>
+213
View File
@@ -0,0 +1,213 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.newcar')"></uni-nav-bar>
<view class="content">
<view class="cont">{{$t('carinfo.mag')}}</view>
<view class="">
<textarea auto-height v-model="carinfo.condition_desc" :placeholder="$t('carinfo.maginput')"/>
</view>
</view>
<view class="foot">
<view>
<button class="btn1" plain="true" @click="leftClick">{{$t('button.previous')}}</button>
<button class="btn" @click="addFn">{{$t('button.submit')}}</button>
</view>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
oldcarinfo:{},
carinfo:{
name:'',
vin:'',
brand:'',
price:'',
type:'',
energy:'',
mileage :'',
vehicle_age:'',
condition_desc:'',
front_45_degree:'',
front_left_45_degree:'',
front_left_headlight:'',
front_view:'',
lower_front:'',
wheel_hub:'',
front_right_seat:'',
right_lower_side:'',
rear_right_taillight:'',
rear_right_45_degree:'',
lower_rear:'',
trunk:'',
left_lower_side:'',
rear_seats:'',
center_console:'',
control_panel:'',
gear_shift:'',
car_key:'',
steering_wheel:'',
dashboard:'',
odometer_reading:'',
front_left_door_panel:'',
front_left_door_function_area:'',
front_left_seat:'',
interior_ceiling:'',
}
}
},
onLoad(options) {
this.id = options.id;
const carinfo = uni.getStorageSync('edtcarinfo');
this.oldcarinfo = JSON.parse(carinfo);
this.carinfo.name=this.oldcarinfo.name
this.carinfo.vin=this.oldcarinfo.vin
this.carinfo.brand=this.oldcarinfo.brand
this.carinfo.price=this.oldcarinfo.price
this.carinfo.type=this.oldcarinfo.type
this.carinfo.energy=this.oldcarinfo.energy
this.carinfo.mileage=this.oldcarinfo.mileage
this.carinfo.model=this.oldcarinfo.model
this.carinfo.location=this.oldcarinfo.location
this.carinfo.store_status=this.oldcarinfo.store_status
this.carinfo.cover=this.oldcarinfo.cover
this.carinfo.vehicle_age=this.oldcarinfo.vehicle_age
this.carinfo.condition_desc=this.oldcarinfo.condition_desc
this.carinfo.front_45_degree=this.oldcarinfo.front_45_degree
this.carinfo.front_left_45_degree=this.oldcarinfo.front_left_45_degree
this.carinfo.front_left_headlight=this.oldcarinfo.front_left_headlight
this.carinfo.front_view=this.oldcarinfo.front_view
this.carinfo.lower_front=this.oldcarinfo.lower_front
this.carinfo.wheel_hub=this.oldcarinfo.wheel_hub
this.carinfo.front_right_seat=this.oldcarinfo.front_right_seat
this.carinfo.right_lower_side=this.oldcarinfo.right_lower_side
this.carinfo.rear_right_taillight=this.oldcarinfo.rear_right_taillight
this.carinfo.rear_right_45_degree=this.oldcarinfo.rear_right_45_degree
this.carinfo.lower_rear=this.oldcarinfo.lower_rear
this.carinfo.trunk=this.oldcarinfo.trunk
this.carinfo.left_lower_side=this.oldcarinfo.left_lower_side
this.carinfo.rear_seats=this.oldcarinfo.rear_seats
this.carinfo.center_console=this.oldcarinfo.center_console
this.carinfo.control_panel=this.oldcarinfo.control_panel
this.carinfo.gear_shift=this.oldcarinfo.gear_shift
this.carinfo.car_key=this.oldcarinfo.car_key
this.carinfo.steering_wheel=this.oldcarinfo.steering_wheel
this.carinfo.dashboard=this.oldcarinfo.dashboard
this.carinfo.odometer_reading=this.oldcarinfo.odometer_reading
this.carinfo.front_left_door_panel=this.oldcarinfo.front_left_door_panel
this.carinfo.front_left_door_function_area=this.oldcarinfo.front_left_door_function_area
this.carinfo.front_left_seat=this.oldcarinfo.front_left_seat
this.carinfo.interior_ceiling=this.oldcarinfo.interior_ceiling
},
methods: {
leftClick(){
uni.navigateBack({})
},
addFn(){
request({
url:'vehicle/update/'+this.id,
method:'post',
data:this.carinfo
}).then(res => {
uni.showToast({
title: res.data.message,
icon: 'none'
});
if(res.data.code ==0){
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/mine',// 替换为你要跳转的页面路径
});
}, 1000);
}
})
}
}
}
</script>
<style lang="scss">
textarea {
min-height: 640rpx;// 设置默认高度 ,解决设置自适应高度之后高度无效问题
width: 100%;
}
.content{
margin: 20px 12px;
background: #FFFFFF;
border-radius: 10px;
.cont{
position: relative;
font-weight: 500;
}
.cont::after{
content : '';
position : absolute;
width : 200%;
height : 200%;
top : 0;
left : 0;
transform-origin: 0 0;
border-width: 0;
border-bottom-width:1px;
border-style : solid;
transform : scale(0.5, 0.5);
border-radius : 1px;
box-sizing : border-box;
pointer-events : none;
border-color:#C3C3C3;
}
}
.content view{
padding: 20px 10px;
}
.right{
text-align: right;
}
.select{
display: flex;
}
.caogao{
position: fixed;
right: 0px;
bottom: 280rpx;
}
.caogao image{
width: 64px;
height: 64px;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
}
.foot view{
display: flex;
width: 94%;
margin: 20px 3%;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
margin-bottom: 40px;
margin-left: 2%;
flex-grow:1
}
.btn1{
border-color:#9E9E9E !important;
border-radius: 20px;
color: #414141;
margin-bottom: 40px;
width: 110px;
background-color: #fff;
}
</style>
+100
View File
@@ -0,0 +1,100 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.Vehiclesource')"></uni-nav-bar>
<view class="cont">
<image v-if="i18locale=='zh'" src="/static/image/mine/error.png" mode="widthFix">
<image v-if="i18locale=='en'" src="/static/image/mine/errore.png" mode="widthFix">
<image v-if="i18locale=='ru'" src="/static/image/mine/errorr.png" mode="widthFix">
<view class="">
{{$t('status2')}}
</view>
</view>
<view class="content">
<view class="">{{$t('carinfo.errormag')}}:</view>
<view class="contmsg">
<textarea auto-height v-model="desc" disabled :placeholder="$t('carinfo.errormaginput')"/>
</view>
</view>
<view class="foot">
<button class="btn" @click="nextFn">{{$t('button.edit')}}</button>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
desc:'',
i18locale:uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):'zh',
}
},
onLoad(options) {
console.log(options);
this.id = options.id;
this.getcontList()
},
methods: {
leftClick(){
uni.navigateBack({})
},
getcontList(){
request({
url:'apply/'+this.id,
method:'get',
}).then(res => {
this.desc = res.data.data.desc
})
},
nextFn(){
uni.removeStorageSync('edtcarinfo')
uni.navigateTo({
url: '/pages/mine/mycarSource/info?id='+this.id
});
}
}
}
</script>
<style lang="scss">
textarea {
min-height: 400rpx;// 设置默认高度 ,解决设置自适应高度之后高度无效问题
width: 100%;
}
.content{
margin: 20px 12px;
background: #FFFFFF;
border-radius: 10px;
padding:20px 10px;
font-weight: 500;
}
.contmsg{
overflow-wrap: break-word;
margin-top: 5px;
}
.cont{
padding: 30px 0px;
text-align: center;
color: #D23B35;
font-size: 16px;
font-weight: 500;
}
.cont image{
width: 85px;
height: 85px;
}
.foot{
margin: 30px auto;
text-align: center;
padding: 10px;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
width: 100%;
margin-bottom: 40px;
}
</style>
+99
View File
@@ -0,0 +1,99 @@
<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>
+198
View File
@@ -0,0 +1,198 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.carinfo')"></uni-nav-bar>
<view class="content">
<view class="cell">
<view>{{$t('carinfo.productName')}}</view>
<view class="right">
<text>{{cont.name}}</text>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.product_image')}}</view>
<view class="right">
<image :src="cont.cover_full" mode="" @click="previewImage(cont.cover_full)"></image>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.vin')}}</view>
<view class="right">
<text>{{cont.vin}}</text>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.brand')}}</view>
<view class="right ">
<text>{{cont.brand_name}}</text>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.model')}}</view>
<view class="right ">
<text>{{cont.model_name}}</text>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.price')}}</view>
<view class="right">
<text>{{cont.price}}</text>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.type')}}</view>
<view class="right">
<text>{{cont.type_name}}</text>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.energy')}}</view>
<view class="right">
<text>{{cont.energy_name}}</text>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.mileage')}}</view>
<view class="right">
<text>{{cont.mileage}}</text>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.store_status')}}</view>
<view class="right">
<text>{{cont.store_status_name}}</text>
</view>
</view>
<view class="cell">
<view>{{$t('carinfo.location')}}</view>
<view class="right">
<text>{{cont.location_name}}</text>
</view>
</view>
<view class="cell1">
<view>{{$t('carinfo.age')}}</view>
<view class="right">
<text>{{cont.vehicle_age}}</text>
</view>
</view>
</view>
<view class="zw"></view>
<view class="foot">
<button class="btn" @click="nextFn">{{$t('button.next')}}</button>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
cont:{
}
}
},
onLoad(options) {
console.log(options);
this.id = options.id;
this.getcontList()
},
methods: {
leftClick(){
uni.navigateBack({})
},
getcontList(){
request({
url:'vehicle/detail/'+this.id,
data:{id:this.id},
method:'get',
}).then(res => {
this.cont = res.data.data
const carinfo = JSON.stringify(this.cont);
// console.log(carinfo)
uni.setStorageSync('carlistinfo', carinfo);
})
},
nextFn(){
uni.navigateTo({
url: '/pages/mine/soldList/soldcarinfo1?id='+this.id
});
},
previewImage(url) {
uni.previewImage({
current: url, // 当前显示图片
urls: [url], // 需要预览的图片列表
indicator: "number", // 显示指示器
loop: true // 是否可循环预览
})
}
}
}
</script>
<style lang="less">
.content{
margin: 20px 12px;
background: #FFFFFF;
border-radius: 10px;
}
.cell{
display: flex;
justify-content:space-between;
padding: 18px 20px;
/* border-bottom: 1px solid #C3C3C3; */
align-items: center;
position: relative;
font-weight: 500;
image{
width: 40px;
height: 40px;
}
}
.cell::after{
content : '';
position : absolute;
width : 200%;
height : 200%;
top : 0;
left : 0;
transform-origin: 0 0;
border-width: 0;
border-bottom-width:1px;
border-style : solid;
transform : scale(0.5, 0.5);
border-radius : 1px;
box-sizing : border-box;
pointer-events : none;
border-color:#C3C3C3;
}
.cell1{
display: flex;
justify-content:space-between;
padding: 18px 20px;
align-items: center;
font-weight: 500;
}
.right{
text-align: right;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
z-index: 1;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
width: 84%;
margin-bottom: 40px;
margin: 15px 8%;
}
.zw{
height: 120px;
}
</style>
+448
View File
@@ -0,0 +1,448 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.carinfo')"></uni-nav-bar>
<view class="cont">
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.front45Degree')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.front_45_degree_full==''?'/static/image/kong.png':carinfo.front_45_degree_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFront45Degree')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.front_left_45_degree_full==''?'/static/image/kong.png':carinfo.front_left_45_degree_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontHeadlight')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.front_left_headlight_full==''?'/static/image/kong.png':carinfo.front_left_headlight_full_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.front')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.front_view_full==''?'/static/image/kong.png':carinfo.front_view_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.frontLowerPart')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.lower_front_full==''?'/static/image/kong.png':carinfo.lower_front_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.wheelHub')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.wheel_hub_full==''?'/static/image/kong.png':carinfo.wheel_hub_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightFrontSeat')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.front_right_seat_full==''?'/static/image/kong.png':carinfo.front_right_seat_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightBottomEdge')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.right_lower_side_full==''?'/static/image/kong.png':carinfo.right_lower_side_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightRearTaillight')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.rear_right_taillight_full==''?'/static/image/kong.png':carinfo.rear_right_taillight_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rightRear45Degree')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.rear_right_45_degree_full==''?'/static/image/kong.png':carinfo.rear_right_45_degree_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rearLowerPart')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.lower_rear_full==''?'/static/image/kong.png':carinfo.lower_rear_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.trunk')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.trunk_full==''?'/static/image/kong.png':carinfo.trunk_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftBottomEdge')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.left_lower_side_full==''?'/static/image/kong.png':carinfo.left_lower_side_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.rearSeat')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.rear_seats_full==''?'/static/image/kong.png':carinfo.rear_seats_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.console')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.center_console_full==''?'/static/image/kong.png':carinfo.center_console_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.controlPanel')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.control_panel_full==''?'/static/image/kong.png':carinfo.control_panel_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.gearLever')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.gear_shift_full==''?'/static/image/kong.png':carinfo.gear_shift_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.key')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.car_key_full==''?'/static/image/kong.png':carinfo.car_key_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.steeringWheel')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.steering_wheel_full==''?'/static/image/kong.png':carinfo.steering_wheel_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.dashboard')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.dashboard_full==''?'/static/image/kong.png':carinfo.dashboard_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.displayedMileage')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.odometer_reading_full==''?'/static/image/kong.png':carinfo.odometer_reading_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontDoorPanel')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.front_left_door_panel_full==''?'/static/image/kong.png':carinfo.front_left_door_panel_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontDoorFunctionArea')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.front_left_door_function_area_full==''?'/static/image/kong.png':carinfo.front_left_door_function_area_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.leftFrontSeat')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.front_left_seat_full==''?'/static/image/kong.png':carinfo.front_left_seat_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<view class="content">
<uni-collapse>
<uni-collapse-item title-border="none" :border="false" :open="true">
<template v-slot:title>
<view class="con-title">
<text>{{$t('carinfo.ceiling')}}</text>
</view>
</template>
<view class="contents">
<image :src="carinfo.interior_ceiling_full==''?'/static/image/kong.png':carinfo.interior_ceiling_full" mode="" class="addimg"></image>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<view class="foot">
<view>
<button class="btn1" plain="true" @click="leftClick">{{$t('button.previous')}}</button>
<button class="btn" @click="nextFn">{{$t('button.next')}}</button>
</view>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
carinfo:{}
}
},
onLoad(options) {
console.log(options);
this.id = options.id;
const carinfo = uni.getStorageSync('carlistinfo');
this.carinfo = JSON.parse(carinfo);
var that = this;
},
methods: {
leftClick(){
uni.navigateBack({})
},
nextFn(){
uni.navigateTo({
url: '/pages/mine/soldList/soldcarinfo2?id='+this.id
});
}
}
}
</script>
<style>
.cont{
padding: 10px 0px 130px;
}
.content{
margin: 10px 12px;
background: #FFFFFF;
border-radius: 10px;
overflow: hidden;
}
.con-title{
padding: 18px 10px;
font-weight: 500;
}
.red{
color: red;
}
.contents{
padding:10px;
text-align: center;
}
.addimg{
width: 110px;
height:110px;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
}
.foot view{
display: flex;
width: 94%;
margin: 15px 3%;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
margin-bottom: 40px;
margin-left: 2%;
flex-grow:1
}
.btn1{
border-color:#9E9E9E !important;
border-radius: 50px;
color: #414141;
margin-bottom: 40px;
width: 110px;
background-color: #fff;
}
</style>
+113
View File
@@ -0,0 +1,113 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.carinfo')"></uni-nav-bar>
<view class="content">
<view class="cont">{{$t('carinfo.mag')}}</view>
<view class="contmsg">
<textarea auto-height v-model="carinfo.condition_desc" disabled placeholder=" "/>
</view>
</view>
<view class="foot">
<view>
<button class="btn1" plain="true" @click="leftClick">{{$t('button.previous')}}</button>
<button class="btn" @click="nextFn">{{$t('button.exit')}}</button>
</view>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
carinfo:{}
}
},
onLoad(options) {
this.id = options.id;
const carinfo = uni.getStorageSync('carlistinfo');
this.carinfo = JSON.parse(carinfo);
var that = this;
},
methods: {
leftClick(){
uni.navigateBack({})
},
nextFn(){
uni.reLaunch({
url: '/pages/index/mine',// 替换为你要跳转的页面路径
});
}
}
}
</script>
<style lang="scss">
textarea {
min-height: 400rpx;// 设置默认高度 ,解决设置自适应高度之后高度无效问题
width: 100%;
}
.content{
margin: 20px 12px;
background: #FFFFFF;
border-radius: 10px;
.cont{
padding: 20px 10px;
position: relative;
font-weight: 500;
}
.cont::after{
content : '';
position : absolute;
width : 200%;
height : 200%;
top : 0;
left : 0;
transform-origin: 0 0;
border-width: 0;
border-bottom-width:1px;
border-style : solid;
transform : scale(0.5, 0.5);
border-radius : 1px;
box-sizing : border-box;
pointer-events : none;
border-color:#C3C3C3;
}
.contmsg{
overflow-wrap: break-word;
margin-top: 5px;
padding: 20px 10px;
}
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 240rpx;
background: #FFFFFF;
}
.foot view{
display: flex;
width: 94%;
margin: 15px 3%;
}
.btn{
background-color: #3F435B;
color: white;
border-radius: 50px;
margin-bottom: 40px;
margin-left: 2%;
flex-grow:1
}
.btn1{
border-color:#9E9E9E !important;
border-radius: 50px;
color: #414141;
margin-bottom: 40px;
width: 110px;
background-color: #fff;
}
</style>