二手车小程序
This commit is contained in:
@@ -0,0 +1,547 @@
|
||||
<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="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="/static/image/img.png" 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')" :columns="brandList" keyName="name" @confirm="changeHandler"></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')" :columns="modelList" keyName="name" @confirm="modelChange"></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.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 :defaultIndex="defaultIndex2" :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showtype" @cancel="cancel('showtype')" :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 :defaultIndex="defaultIndex2" :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showenergy" @cancel="cancel('showenergy')" :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="defaultIndex2" :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="defaultIndex2" :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="">
|
||||
<movable-area class="movable-area">
|
||||
<movable-view class="movable-view" :x="x" :y="y" direction="all">
|
||||
<view class="index" @tap="draftadd" >
|
||||
<image v-if="i18locale=='zh'" src="/static/image/cg.png" mode="widthFix">
|
||||
<image v-if="i18locale=='en'" src="/static/image/cge.png" mode="widthFix">
|
||||
<image v-if="i18locale=='ru'" src="/static/image/cgr.png" mode="widthFix">
|
||||
</view>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
</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="changeHandler">{{$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 {
|
||||
imageStyles: {
|
||||
width: 50,
|
||||
height: 50,
|
||||
},
|
||||
showbrand: false,
|
||||
showtype: false,
|
||||
showenergy: false,
|
||||
showmodel: false,
|
||||
showstatus: false,
|
||||
showlocation: false,
|
||||
actives:'',
|
||||
searchKeyword: "", // 搜索关键词
|
||||
selectedLabel: "", // 选中的值(显示在输入框中)
|
||||
filteredOptions: [], // 过滤后的数据
|
||||
x: 300, //x坐标
|
||||
y: 550, //y坐标
|
||||
brandList:[],
|
||||
energyList:[],
|
||||
typesList:[],
|
||||
modelList:[],
|
||||
locationList:[],
|
||||
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'
|
||||
}]],
|
||||
brandname:'',
|
||||
model:'',
|
||||
location:'',
|
||||
type:'',
|
||||
energy:'',
|
||||
store_status:'',
|
||||
defaultIndex2:[0],
|
||||
i18locale:uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):'zh',
|
||||
carinfo:{
|
||||
name:'',
|
||||
brand:'',
|
||||
price:0,
|
||||
cover:'',
|
||||
type:'',
|
||||
energy:'',
|
||||
mileage :'',
|
||||
model:'',
|
||||
location:'',
|
||||
store_status:'',
|
||||
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() {
|
||||
this.getbrand()
|
||||
this.getenergy()
|
||||
this.gettypes()
|
||||
this.getlocation()
|
||||
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
|
||||
this.x = windowWidth-70
|
||||
this.y = windowHeight-185
|
||||
},
|
||||
methods: {
|
||||
uploadfn(imgUrl){
|
||||
var that = this;
|
||||
uni.uploadFile({
|
||||
url: 'https://usedcar.server.hnxinyouhe.com/applet/upload/image',
|
||||
filePath: imgUrl,
|
||||
name: 'image',
|
||||
header:{'lang':this.i18locale,'Authorization': 'Bearer ' + uni.getStorageSync('token')},
|
||||
success: (uploadFileRes) => {
|
||||
const path=JSON.parse(uploadFileRes.data)
|
||||
that.carinfo.cover = path.data.image_name
|
||||
console.log(that.carinfo)
|
||||
}
|
||||
});
|
||||
},
|
||||
delfn(){
|
||||
that.carinfo.cover =''
|
||||
},
|
||||
select(e){
|
||||
const tempFilePaths = e.tempFilePaths;
|
||||
const imgUrl=tempFilePaths[0]
|
||||
this.uploadfn(imgUrl)
|
||||
},
|
||||
// 搜索处理函数
|
||||
handleSearch() {
|
||||
var that = this
|
||||
if (this.searchKeyword) {
|
||||
console.log(this.searchKeyword)
|
||||
this.filteredOptions = this.brandList.filter((item) => item.name.includes(this.searchKeyword));
|
||||
|
||||
console.log(this.filteredOptions)
|
||||
} else {
|
||||
// 如果搜索框为空,显示全部数据
|
||||
this.filteredOptions = this.brandList;
|
||||
}
|
||||
},
|
||||
// 选择选项
|
||||
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);
|
||||
},
|
||||
getbrand(){
|
||||
request({
|
||||
url:'brand',
|
||||
method:'get',
|
||||
}).then(res => {
|
||||
var list = res.data.data
|
||||
this.brandList = list
|
||||
this.filteredOptions = list;
|
||||
this.brandname = list[0].name
|
||||
this.carinfo.brand = list[0].id
|
||||
this.getmodel(this.carinfo.brand)
|
||||
// this.brandList = [list]
|
||||
})
|
||||
},
|
||||
getenergy(){
|
||||
request({
|
||||
url:'energy',
|
||||
method:'get',
|
||||
}).then(res => {
|
||||
var list = res.data.data
|
||||
this.energyList = [list]
|
||||
this.energy = list[0].name
|
||||
this.carinfo.energy = list[0].id
|
||||
})
|
||||
},
|
||||
getmodel(brand_id){
|
||||
request({
|
||||
url:'models',
|
||||
method:'get',
|
||||
data:{
|
||||
brand_id:brand_id
|
||||
}
|
||||
}).then(res => {
|
||||
var list = res.data.data
|
||||
this.modelList = [list]
|
||||
if(list.length>0){
|
||||
this.model = list[0].name
|
||||
this.carinfo.model = list[0].id
|
||||
}else{
|
||||
this.model =''
|
||||
this.carinfo.model =''
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
gettypes(){
|
||||
request({
|
||||
url:'types',
|
||||
method:'get'
|
||||
}).then(res => {
|
||||
var list = res.data.data
|
||||
this.typesList = [list]
|
||||
this.type = list[0].name
|
||||
this.carinfo.type = list[0].id
|
||||
})
|
||||
},
|
||||
getlocation(){
|
||||
request({
|
||||
url:'location/presets',
|
||||
method:'get'
|
||||
}).then(res => {
|
||||
var list = res.data.data
|
||||
this.locationList = [list]
|
||||
this.location = list[0].name
|
||||
this.carinfo.location = list[0].id
|
||||
console.log(this.locationList)
|
||||
})
|
||||
},
|
||||
draftadd(){
|
||||
if(uni.getStorageSync('draftid')){
|
||||
request({
|
||||
url:'draft/update/'+uni.getStorageSync('draftid'),
|
||||
method:'post',
|
||||
data:this.carinfo
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
})
|
||||
}else{
|
||||
request({
|
||||
url:'draft/add',
|
||||
method:'post',
|
||||
data:this.carinfo
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
if(res.data.code ==0){
|
||||
uni.setStorageSync('draftid', res.data.data.id);
|
||||
}
|
||||
console.log(res.data)
|
||||
})
|
||||
}
|
||||
},
|
||||
changeHandler(){
|
||||
this.showbrand = false; // 关闭弹窗
|
||||
this.brandname = this.selectedLabel
|
||||
this.carinfo.brand = this.actives
|
||||
this.getmodel(this.actives)
|
||||
},
|
||||
energyChange(val){
|
||||
this.carinfo.energy = val.value[0].energy_id
|
||||
this.energy = val.value[0].name
|
||||
this.showenergy = false
|
||||
},
|
||||
typesChange(val){
|
||||
this.carinfo.type = val.value[0].energy_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({})
|
||||
},
|
||||
nextFn(){
|
||||
if(this.carinfo.name==''){
|
||||
uni.showToast({
|
||||
title:this.$t('message'),
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
const carinfo = JSON.stringify(this.carinfo);
|
||||
uni.setStorageSync('carinfo', carinfo);
|
||||
uni.navigateTo({
|
||||
url: '/pages/carinfo/info'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.uniui-right{
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
}
|
||||
.red{
|
||||
color: red;
|
||||
}
|
||||
.content{
|
||||
margin: 20px 12px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.zw{
|
||||
height: 120px;
|
||||
}
|
||||
.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: 120px;
|
||||
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;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,700 @@
|
||||
<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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" 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="/static/image/img.png" mode="" class="addimg"></image>
|
||||
</uni-file-picker>
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<movable-area class="movable-area">
|
||||
<movable-view class="movable-view" :x="x" :y="y" direction="all">
|
||||
<view class="index" @tap="draftadd" >
|
||||
<image v-if="i18locale=='zh'" src="/static/image/cg.png" mode="widthFix">
|
||||
<image v-if="i18locale=='en'" src="/static/image/cge.png" mode="widthFix">
|
||||
<image v-if="i18locale=='ru'" src="/static/image/cgr.png" mode="widthFix">
|
||||
</view>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
</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 {
|
||||
x: 300, //x坐标
|
||||
y: 550, //y坐标
|
||||
carinfo:{},
|
||||
i18locale:uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):'zh',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const carinfo = uni.getStorageSync('carinfo');
|
||||
this.carinfo = JSON.parse(carinfo);
|
||||
console.log(this.carinfo)
|
||||
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
|
||||
this.x = windowWidth-70
|
||||
this.y = windowHeight-185
|
||||
},
|
||||
methods: {
|
||||
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){
|
||||
console.log(name)
|
||||
that.carinfo[name] =''
|
||||
},
|
||||
draftadd(){
|
||||
if(uni.getStorageSync('draftid')){
|
||||
request({
|
||||
url:'draft/update/'+uni.getStorageSync('draftid'),
|
||||
method:'post',
|
||||
data:this.carinfo
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
})
|
||||
}else{
|
||||
request({
|
||||
url:'draft/add',
|
||||
method:'post',
|
||||
data:this.carinfo
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
if(res.data.code ==0){
|
||||
uni.setStorageSync('draftid', res.data.data.id);
|
||||
}
|
||||
console.log(res.data)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
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({})
|
||||
},
|
||||
nextFn(){
|
||||
const carinfo = JSON.stringify(this.carinfo);
|
||||
uni.setStorageSync('carinfo', carinfo);
|
||||
uni.navigateTo({
|
||||
url: '/pages/carinfo/infomsg'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</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: 120px;
|
||||
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: 20px;
|
||||
color: #414141;
|
||||
margin-bottom: 40px;
|
||||
width: 110px;
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,187 @@
|
||||
<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="">
|
||||
<!-- <u--textarea v-model="carinfo.condition_desc" :placeholder="$t('carinfo.maginput')" ></u--textarea> -->
|
||||
<textarea auto-height v-model="carinfo.condition_desc" :placeholder="$t('carinfo.maginput')"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<movable-area class="movable-area">
|
||||
<movable-view class="movable-view" :x="x" :y="y" direction="all">
|
||||
<view class="index" @tap="draftadd" >
|
||||
<image v-if="i18locale=='zh'" src="/static/image/cg.png" mode="widthFix">
|
||||
<image v-if="i18locale=='en'" src="/static/image/cge.png" mode="widthFix">
|
||||
<image v-if="i18locale=='ru'" src="/static/image/cgr.png" mode="widthFix">
|
||||
</view>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
</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 {
|
||||
x: 310, //x坐标
|
||||
y: 550, //y坐标
|
||||
carinfo:{},
|
||||
i18locale:uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):'zh',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const carinfo = uni.getStorageSync('carinfo');
|
||||
this.carinfo = JSON.parse(carinfo);
|
||||
console.log(this.carinfo)
|
||||
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
|
||||
this.x = windowWidth-70
|
||||
this.y = windowHeight-185
|
||||
},
|
||||
methods: {
|
||||
leftClick(){
|
||||
uni.navigateBack({})
|
||||
},
|
||||
draftadd(){
|
||||
if(uni.getStorageSync('draftid')){
|
||||
request({
|
||||
url:'draft/update/'+uni.getStorageSync('draftid'),
|
||||
method:'post',
|
||||
data:this.carinfo
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
})
|
||||
}else{
|
||||
request({
|
||||
url:'draft/add',
|
||||
method:'post',
|
||||
data:this.carinfo
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
if(res.data.code ==0){
|
||||
uni.setStorageSync('draftid', res.data.data.id);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
addFn(){
|
||||
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/index',// 替换为你要跳转的页面路径
|
||||
});
|
||||
}, 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: 120px;
|
||||
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>
|
||||
@@ -0,0 +1,382 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="conts">
|
||||
<image class="logo" src="/static/image/bghome.png"></image>
|
||||
|
||||
<view class="contop">
|
||||
<view class="tops">
|
||||
<view class="changeyy" @click="showlang = true">
|
||||
<image src="/static/image/change.png" mode=""></image>{{$t('home.langbtn')}}
|
||||
</view>
|
||||
</view>
|
||||
<text class="text">2025 USED CAR</text>
|
||||
<text class="cont">
|
||||
{{$t('home.title')}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="foot">
|
||||
<button class="btn" @click="addCar"> <image class="carimg" src="/static/image/car.png" mode=""></image> {{$t('home.addbtn')}}</button>
|
||||
</view>
|
||||
<view>
|
||||
<u-popup :show="show" :closeOnClickOverlay="false" :round="20" mode="center">
|
||||
<view class="popupcontent">
|
||||
<image class="log1" src="/static/image/log1.png"></image>
|
||||
<view class="title">{{$t('home.loginmsg')}}</view>
|
||||
<!-- <view class="yhxy">
|
||||
{{$t('home.loginmsg1')}}
|
||||
</view> -->
|
||||
<view class="yhxy">
|
||||
<checkbox-group name="" style="width: 28px;display: inline-block;">
|
||||
<label @tap="selfChangde()">
|
||||
<checkbox :checked="selfChecked" activeBackgroundColor="#3F435B" style="transform:scale(0.7);border-radius: 50%"/>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
{{$t('home.argin')}}<text class="xy" @click="gouser">{{$t('home.UserAgreement')}}</text>{{$t('home.and')}}<text class="xy" @click="goprivacy">{{$t('home.Privacy')}}</text>
|
||||
</view>
|
||||
<!-- <view class="yhxy">
|
||||
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="cent">
|
||||
<button class="btn1" @click="show = !show">{{$t('cancel')}}</button>
|
||||
<button v-if="selfChecked" class="btn" open-type="getPhoneNumber" @click="show = !show" @getphonenumber="getPhoneNumber">{{$t('login')}}</button>
|
||||
<button v-else class="btn" @click="loginbtn">{{$t('login')}}</button>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
<u-picker immediateChange="true" :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" @close="close('showlang')" :show="showlang" :columns="columns"
|
||||
@cancel="cancellang" @confirm="confirmlang" :title="$t('home.langbtn')" keyName="label"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request,showToast } from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello',
|
||||
selfChecked: false,
|
||||
home: this.$t('tabbar.home'),
|
||||
is_login:uni.getStorageSync('is_login'),
|
||||
show: false,
|
||||
showlang: false,
|
||||
columns: [
|
||||
[{
|
||||
label: this.$t('zh'),
|
||||
id: 'zh'
|
||||
}, {
|
||||
label: this.$t('en'),
|
||||
id: 'en'
|
||||
},{
|
||||
label: this.$t('ru'),
|
||||
id: 'ru'
|
||||
}]
|
||||
],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.mini_login()
|
||||
},
|
||||
onShow() {
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: this.$t('tabbar.home')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
text: this.$t('tabbar.mine')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
cancellang() {
|
||||
this.showlang = false
|
||||
},
|
||||
close(value){
|
||||
this[value] = false
|
||||
},
|
||||
//语言切换事件
|
||||
confirmlang(e) {
|
||||
var that = this
|
||||
this.$i18n.locale = e.value[0].id
|
||||
uni.setLocale(e.value[0].id)
|
||||
uni.setStorageSync('i18locale', e.value[0].id);
|
||||
console.log(uni.getLocale())
|
||||
this.columns =[
|
||||
[{
|
||||
label: this.$t('zh'),
|
||||
id: 'zh'
|
||||
}, {
|
||||
label: this.$t('en'),
|
||||
id: 'en'
|
||||
},{
|
||||
label: this.$t('ru'),
|
||||
id: 'ru'
|
||||
}]
|
||||
];
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: this.$t('tabbar.home')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
text: this.$t('tabbar.mine')
|
||||
})
|
||||
this.showlang = false
|
||||
var languages = e.value[0].id
|
||||
if(e.value[0].id=='zh'){
|
||||
languages= 'zh_CN'
|
||||
}
|
||||
request({
|
||||
url:'user/update',
|
||||
method:'POST',
|
||||
data:{
|
||||
language:languages
|
||||
}
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
})
|
||||
},
|
||||
goprivacy(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/agreement',// 替换为你要跳转的页面路径
|
||||
});
|
||||
},
|
||||
gouser(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/agreementuser',// 替换为你要跳转的页面路径
|
||||
});
|
||||
},
|
||||
addCar(){
|
||||
if(uni.getStorageSync('is_login')){
|
||||
uni.removeStorageSync('draftid')
|
||||
uni.removeStorageSync('carinfo')
|
||||
uni.navigateTo({
|
||||
url: '/pages/carinfo/index'
|
||||
});
|
||||
}else{
|
||||
this.show = true
|
||||
}
|
||||
},
|
||||
selfChangde(e) {
|
||||
this.selfChecked = !this.selfChecked;
|
||||
},
|
||||
loginbtn(){
|
||||
if(!this.selfChecked){
|
||||
uni.showToast({
|
||||
title:this.$t('home.arginimg'),
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
},
|
||||
getPhoneNumber(e) {
|
||||
|
||||
console.log(e.detail.code) // 动态令牌
|
||||
let that = this;
|
||||
request({
|
||||
url:'miniapp/phone',
|
||||
method:'POST',
|
||||
data:{
|
||||
phone_code: e.detail.code,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data.data)
|
||||
if (res.data.code == -1) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
|
||||
} else if (res.data.code == 0) {
|
||||
//返回数据接收成功
|
||||
uni.setStorageSync('is_login', true);
|
||||
uni.navigateTo({
|
||||
url: '/pages/carinfo/index'
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
mini_login() {
|
||||
let that = this;
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: loginRes => {
|
||||
console.log(loginRes);
|
||||
that.code = loginRes.code;
|
||||
// 2. 将用户登录code传递到后台置换用户SessionKey、OpenId等信息
|
||||
request({
|
||||
url:'miniapp/login',
|
||||
method:'POST',
|
||||
data:{
|
||||
code: loginRes.code
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data);
|
||||
uni.hideLoading()
|
||||
if (res.data.code == 0) {
|
||||
//存取session
|
||||
uni.setStorageSync('openid', res.data.data.openid);
|
||||
uni.setStorageSync('token', res.data.data.token);
|
||||
if(res.data.data.phone&&res.data.data.phone!=''&&res.data.data.phone!=null){
|
||||
uni.setStorageSync('is_login', true);
|
||||
}else{
|
||||
uni.setStorageSync('is_login', false);
|
||||
}
|
||||
console.log(uni.getStorageSync('is_login'))
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '获取 code 失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.changeyy {
|
||||
padding: 20rpx 30rpx;
|
||||
border-radius: 50px;
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
margin-bottom: 50rpx;
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
image {
|
||||
width: 14px;
|
||||
height: 12px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
/* height: 100vh; */
|
||||
width: 100%;
|
||||
background: #F9F9F9;
|
||||
height: 100%;
|
||||
}
|
||||
.logo{
|
||||
width: 100%;
|
||||
height: 1000rpx;
|
||||
}
|
||||
.conts{
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.contop{
|
||||
position: absolute;
|
||||
top: 6%;
|
||||
text-align: center;
|
||||
}
|
||||
.tops{
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
}
|
||||
.text{
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
background: linear-gradient(120deg, #B9773C 0%, #67450D 100%);
|
||||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
background-clip: text;
|
||||
display: inline-block;
|
||||
}
|
||||
.cont{
|
||||
background-image: linear-gradient(#4C392B, #0A0604);
|
||||
padding: 4px 28px;
|
||||
color: #FFEBCC;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
display: inline-block;
|
||||
margin-top: 12px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.foot{
|
||||
width: 87%;
|
||||
margin: 0px auto;
|
||||
text-align: center;
|
||||
}
|
||||
.btn{
|
||||
background-color: #3F435B;
|
||||
color: white;
|
||||
border-radius: 50px;
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.carimg{
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
vertical-align: sub;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.gobtn{
|
||||
color: #007aff !important;
|
||||
}
|
||||
.popupcontent{
|
||||
background: url(/static/image/log0.png);
|
||||
background-size: 100% 100%;
|
||||
padding: 26px 15px;
|
||||
text-align: center;
|
||||
background-repeat: no-repeat;
|
||||
.title{
|
||||
color: #333333;
|
||||
font-size: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
.log1{
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
}
|
||||
.yhxy{
|
||||
color: #999999;
|
||||
font-size: 12px;
|
||||
margin-bottom: 5px;
|
||||
.xy{
|
||||
color: #297EFF;
|
||||
}
|
||||
}
|
||||
.qxbtn{
|
||||
width: 99%;
|
||||
}
|
||||
.cent{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
padding: 0px 10px 20px;
|
||||
.btn1{
|
||||
background-color: #fff;
|
||||
border: 1px solid #3F435B;
|
||||
color: #3F435B;
|
||||
border-radius: 50px;
|
||||
width: 46%;
|
||||
margin: 10px 0px 20px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.btn{
|
||||
background-color: #3F435B;
|
||||
color: white;
|
||||
border-radius: 50px;
|
||||
width: 46%;
|
||||
margin: 10px 0px 20px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,367 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<image class="headimg" src="/static/image/mine/hbg.png" mode=""></image>
|
||||
<view class="content">
|
||||
<view class="contop">
|
||||
<view class="">
|
||||
<image class="userimg" :src="userinfo.avatar" mode=""></image>
|
||||
</view>
|
||||
<view class="right" @click="changinfo">
|
||||
<text>{{userinfo.nickname}}</text>
|
||||
<uni-icons type="right" size="18" color="#fff"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="conbot">
|
||||
<image class="timg" src="/static/image/mine/tbg.png" mode=""></image>
|
||||
<view class="logimg"><image src="/static/image/mine/gs.jpeg" mode=""></image></view>
|
||||
<view class="company">{{userinfo.company}}</view>
|
||||
<view class="tel">{{userinfo.phone}}</view>
|
||||
</view>
|
||||
|
||||
<view class="bottomCon">
|
||||
<view class="sonContent" @click="navTo('/pages/mine/mycarSource')">
|
||||
<image class="son-img-bg" src="/static/image/mine/icon1.png"></image>
|
||||
<span>{{$t('mine.Vehiclesource')}}</span>
|
||||
<uni-icons type="right" size="18"></uni-icons>
|
||||
</view>
|
||||
<view class="sonContent" @click="navTo('/pages/mine/drafts')">
|
||||
<image class="son-img-bg" src="/static/image/mine/icon2.png"></image>
|
||||
<span>{{$t('mine.drafts')}}</span>
|
||||
<uni-icons type="right" size="18"></uni-icons>
|
||||
</view>
|
||||
<view class="sonContent" @click="navTo('/pages/mine/soldList')">
|
||||
<image class="son-img-bg" src="/static/image/mine/icon3.png"></image>
|
||||
<span>{{$t('mine.Sold')}}</span>
|
||||
<uni-icons type="right" size="18"></uni-icons>
|
||||
</view>
|
||||
|
||||
<!-- <view class="sonContent1" @click="goout">
|
||||
<span>{{$t('button.exit')}}当前账号</span>
|
||||
</view> -->
|
||||
<!-- <button v-else="is_login" class="logobtn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">一键登录</button> -->
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view>
|
||||
<u-popup :show="show" :closeOnClickOverlay="false" :round="20" mode="center">
|
||||
<view class="popupcontent">
|
||||
<image class="log1" src="/static/image/log1.png"></image>
|
||||
<view class="title">{{$t('home.loginmsg')}}</view>
|
||||
<view class="yhxy">
|
||||
<checkbox-group name="" style="width: 28px;display: inline-block;">
|
||||
<label @tap="selfChangde()">
|
||||
<checkbox :checked="selfChecked" activeBackgroundColor="#3F435B" style="transform:scale(0.7);border-radius: 50%"/>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
{{$t('home.argin')}}<text class="xy" @click="gouser">{{$t('home.UserAgreement')}}</text>{{$t('home.and')}}<text class="xy" @click="goprivacy">{{$t('home.Privacy')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cent">
|
||||
<button class="btn1" @click="show = !show">{{$t('cancel')}}</button>
|
||||
<button v-if="selfChecked" class="btn" open-type="getPhoneNumber" @click="show = !show" @getphonenumber="getPhoneNumber">{{$t('login')}}</button>
|
||||
<button v-else class="btn" @click="loginbtn">{{$t('login')}}</button>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request,showToast } from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userinfo:'',
|
||||
selfChecked: false,
|
||||
is_login:uni.getStorageSync('is_login'),
|
||||
show: false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: this.$t('tabbar.home')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
text: this.$t('tabbar.mine')
|
||||
})
|
||||
this.getinfo()
|
||||
uni.removeStorageSync('carlistinfo')
|
||||
uni.removeStorageSync('newcarinfo')
|
||||
uni.removeStorageSync('edtcarinfo')
|
||||
},
|
||||
methods: {
|
||||
goprivacy(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/agreement',// 替换为你要跳转的页面路径
|
||||
});
|
||||
},
|
||||
gouser(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/agreementuser',// 替换为你要跳转的页面路径
|
||||
});
|
||||
},
|
||||
getinfo(){
|
||||
request({
|
||||
url:'user/info',
|
||||
method:'POST',
|
||||
}).then(res => {
|
||||
this.userinfo=res.data.data
|
||||
this.userinfo.company==null?this.userinfo.company='':this.userinfo.company=this.userinfo.company
|
||||
this.userinfo.phone==null?this.userinfo.phone='':this.userinfo.phone=this.userinfo.phone
|
||||
})
|
||||
},
|
||||
selfChangde(e) {
|
||||
this.selfChecked = !this.selfChecked;
|
||||
},
|
||||
loginbtn(){
|
||||
if(!this.selfChecked){
|
||||
uni.showToast({
|
||||
title:this.$t('home.arginimg'),
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
},
|
||||
getPhoneNumber(e) {
|
||||
console.log(e.detail.code) // 动态令牌
|
||||
let that = this;
|
||||
request({
|
||||
url:'miniapp/phone',
|
||||
method:'POST',
|
||||
data:{
|
||||
phone_code: e.detail.code,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data.data)
|
||||
if (res.data.code == -1) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
|
||||
} else if (res.data.code == 0) {
|
||||
//返回数据接收成功
|
||||
uni.showToast({
|
||||
title:this.$t('messagesucc'),
|
||||
icon: 'none'
|
||||
});
|
||||
uni.setStorageSync('is_login', true);
|
||||
setTimeout(function () {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/mine',// 替换为你要跳转的页面路径
|
||||
});
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
leftClick(){
|
||||
uni.navigateBack({})
|
||||
},
|
||||
changinfo(){
|
||||
if(uni.getStorageSync('is_login')){
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine/changinfo'
|
||||
});
|
||||
}else{
|
||||
this.show = true
|
||||
}
|
||||
|
||||
},
|
||||
navTo(url) {
|
||||
if(uni.getStorageSync('is_login')){
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
});
|
||||
}else{
|
||||
this.show = true
|
||||
}
|
||||
},
|
||||
goout(){
|
||||
uni.clearStorageSync();
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/index',// 替换为你要跳转的页面路径
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.headimg{
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
}
|
||||
.content{
|
||||
padding: 12px;
|
||||
margin-top: -320rpx;
|
||||
.contop{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 25px;
|
||||
font-size: 34rpx;
|
||||
color: white;
|
||||
.right{
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
||||
.conbot{
|
||||
position: relative;
|
||||
color: #F4C493;
|
||||
font-size: 32rpx;
|
||||
.logimg{
|
||||
position: absolute;
|
||||
top: 60rpx;
|
||||
left: 57rpx;
|
||||
image{
|
||||
width: 100rpx;
|
||||
height:100rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.company{
|
||||
position: absolute;
|
||||
top: 24%;
|
||||
left: 300rpx;
|
||||
}
|
||||
.tel{
|
||||
position: absolute;
|
||||
top: 57%;
|
||||
left: 300rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.slot-image {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
margin-right: 10px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.userimg{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.timg{
|
||||
width: 100%;
|
||||
height: 220rpx;
|
||||
}
|
||||
.bottomCon {
|
||||
margin-top: 40rpx;
|
||||
color: #000;
|
||||
font-weight: 400;
|
||||
// padding: 0 24rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
// border-radius: 22rpx;
|
||||
// background: #FFFFFF;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
|
||||
.sonTitle {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 36rpx;
|
||||
border-bottom: 2rpx solid #F3F3F3;
|
||||
}
|
||||
.sonContent1{
|
||||
background: #FFFFFF;
|
||||
border-radius: 22rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
padding: 32rpx 28rpx;
|
||||
color: #515151;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.sonContent {
|
||||
background: #FFFFFF;
|
||||
border-radius: 22rpx;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
// border-bottom: 2rpx solid #F3F3F3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
padding: 32rpx 28rpx;
|
||||
color: #000;
|
||||
margin-bottom: 10px;
|
||||
.son-img-bg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -20rpx;
|
||||
left: 12;
|
||||
}
|
||||
span {
|
||||
margin-left: 68rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.popupcontent{
|
||||
background: url(/static/image/log0.png);
|
||||
background-size: 100% 100%;
|
||||
padding: 26px 15px;
|
||||
text-align: center;
|
||||
background-repeat: no-repeat;
|
||||
.title{
|
||||
color: #333333;
|
||||
font-size: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
.log1{
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
}
|
||||
.yhxy{
|
||||
color: #999999;
|
||||
font-size: 12px;
|
||||
margin-bottom: 5px;
|
||||
.xy{
|
||||
color: #297EFF;
|
||||
}
|
||||
}
|
||||
.qxbtn{
|
||||
width: 99%;
|
||||
}
|
||||
.cent{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
padding: 0px 10px 20px;
|
||||
.btn1{
|
||||
background-color: #fff;
|
||||
border: 1px solid #3F435B;
|
||||
color: #3F435B;
|
||||
border-radius: 50px;
|
||||
width: 46%;
|
||||
margin: 10px 0px 20px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.btn{
|
||||
background-color: #3F435B;
|
||||
color: white;
|
||||
border-radius: 50px;
|
||||
width: 46%;
|
||||
margin: 10px 0px 20px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000"
|
||||
backgroundColor="#fff" :statusBar="true" title="隐私政策"></uni-nav-bar>
|
||||
<view class="contents">
|
||||
<view class="title">
|
||||
{{title}}
|
||||
</view>
|
||||
<view class="" v-html="content">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
request,
|
||||
showToast
|
||||
} from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
content: '',
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getcont()
|
||||
},
|
||||
methods: {
|
||||
leftClick() {
|
||||
uni.navigateBack({})
|
||||
},
|
||||
getcont() {
|
||||
request({
|
||||
url: 'agreement/privacy',
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
this.content = res.data.data.content
|
||||
this.title = res.data.data.title
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.contents {
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" title="用户服务协议"></uni-nav-bar>
|
||||
<view class="contents" >
|
||||
<view class="title">
|
||||
{{title}}
|
||||
</view>
|
||||
<view class="" v-html="content">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request,showToast } from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
content:'',
|
||||
title:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getcont()
|
||||
},
|
||||
methods: {
|
||||
leftClick(){
|
||||
uni.navigateBack({})
|
||||
},
|
||||
getcont(){
|
||||
request({
|
||||
url:'agreement/user',
|
||||
method:'get',
|
||||
}).then(res => {
|
||||
this.content = res.data.data.content
|
||||
this.title = res.data.data.title
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.contents{
|
||||
padding: 10px 12px;
|
||||
}
|
||||
.title{
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="logo" src="/static/image/bg.jpg"></image>
|
||||
|
||||
<view class="contop">
|
||||
<text class="text">2025 USED CAR</text>
|
||||
<text class="cont">
|
||||
河南合塑实业有限公司
|
||||
</text>
|
||||
</view>
|
||||
<view class="foot">
|
||||
<!-- <button v-if="is_login" class="btn" @click="mini_login">一键登录</button>
|
||||
<button v-else="is_login" class="btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">一键登录</button>
|
||||
<view class="check">
|
||||
<checkbox-group name="" style="width: 28px;">
|
||||
<label>
|
||||
<checkbox :checked="selfChecked" activeBackgroundColor="#3F435B" style="transform:scale(0.7);border-radius: 50%"/>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
我同意并遵守<text class="argeen" @click="gouser">《用户服务协议》</text>以及<text class="argeen" @click="goprivacy">《隐私政策》</text>
|
||||
</view> -->
|
||||
<view class="login-form-content">
|
||||
<uni-forms ref="loginForm" :modelValue="loginForm" :border="true" validateTrigger="submit"
|
||||
err-show-type="toast">
|
||||
<uni-forms-item name="username">
|
||||
<view style="margin-top: 20rpx;">
|
||||
<u-input v-model="loginForm.username" type="text" placeholder="请输入手机号" border="none" maxlength="11"
|
||||
:styles="{ backgroundColor: 'transparent' }" clearable>
|
||||
<template slot="prefix">
|
||||
<uni-icons type="person" size="20"></uni-icons>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item name="password">
|
||||
<view style="margin-top: 20rpx;">
|
||||
<u-input type="text" password v-model="loginForm.password" placeholder="请输入密码" border="none"
|
||||
maxlength="16" :styles="{ backgroundColor: 'transparent' }" clearable>
|
||||
<template slot="prefix">
|
||||
<uni-icons type="locked" size="20"></uni-icons>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item>
|
||||
<view class="register_forget_wrap">
|
||||
<view class="" @click="handleClickForgetPwd">
|
||||
<text>忘记密码?</text>
|
||||
</view>
|
||||
<view class="" @click="handleClickRegister">
|
||||
<text>立即注册</text>
|
||||
</view>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<view class="action-btn">
|
||||
<button class="btn" @click="mini_login">登录</button>
|
||||
</view>
|
||||
<view class="check">
|
||||
<checkbox-group name="" style="width: 28px;">
|
||||
<label>
|
||||
<checkbox :checked="selfChecked" activeBackgroundColor="#3F435B" style="transform:scale(0.6);border-radius: 50%"/>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
同意<text class="argeen" @click="gouser">《用户服务协议》</text>以及<text class="argeen" @click="goprivacy">《隐私政策》</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request,showToast } from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selfChecked: false,
|
||||
is_login:false,
|
||||
loginForm: {
|
||||
isChecked: false,
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
rules: {
|
||||
isChecked: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请阅读并勾选《用户服务协议》《隐私政策》',
|
||||
}, {
|
||||
validateFunction: (rule, value, data, callback) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (value) {
|
||||
resolve()
|
||||
} else {
|
||||
reject(new Error('请阅读并勾选《用户服务协议》《隐私政策》'))
|
||||
}
|
||||
})
|
||||
}
|
||||
}]
|
||||
},
|
||||
username: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请输入手机号',
|
||||
}, {
|
||||
validateFunction: (rule, value, data, callback) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (uni.$u.test.mobile(value)) {
|
||||
resolve()
|
||||
} else {
|
||||
reject(new Error('请输入正确的手机号'))
|
||||
}
|
||||
})
|
||||
}
|
||||
}]
|
||||
},
|
||||
password: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请输入密码',
|
||||
},{
|
||||
validateFunction: (rule, value, data, callback) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (value.length >= 8 && value.length <= 16) {
|
||||
resolve()
|
||||
} else {
|
||||
reject(new Error('密码是由8-16位数字、字母或字符组合请重新输入'))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isCheckedLoginBtn() {
|
||||
console.log(this.loginForm.username && this.loginForm.password)
|
||||
return this.loginForm.username && this.loginForm.password
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// this.Props.statusBarHeight = getApp().globalData.statusBarHeight
|
||||
// console.log(this.Props.statusBarHeight)
|
||||
// this.Props.capsuleTop = getApp().globalData.capsuleTop
|
||||
// this.getbg()
|
||||
},
|
||||
onShow() {
|
||||
// #ifdef MP-WEIXIN
|
||||
//小程序登录检测
|
||||
// this.mini_login()
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
this.is_login = true
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
// 点击忘记密码
|
||||
handleClickForgetPwd() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/forgetPwd'
|
||||
})
|
||||
},
|
||||
// 点击注册
|
||||
handleClickRegister() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/register'
|
||||
})
|
||||
},
|
||||
selfChangde(e) {
|
||||
this.selfChecked = !this.selfChecked;
|
||||
},
|
||||
goprivacy(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/agreement',// 替换为你要跳转的页面路径
|
||||
});
|
||||
},
|
||||
gouser(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/agreementuser',// 替换为你要跳转的页面路径
|
||||
});
|
||||
},
|
||||
getPhoneNumber(e) {
|
||||
console.log(e.detail.code) // 动态令牌
|
||||
let that = this;
|
||||
request({
|
||||
url:'miniapp/phone',
|
||||
// url:'customerLogin',
|
||||
method:'POST',
|
||||
data:{
|
||||
phone_code: e.detail.code,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data.data)
|
||||
if (res.data.code == -1) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
|
||||
} else if (res.data.code == 0) {
|
||||
//返回数据接收成功
|
||||
this.mini_login();
|
||||
}
|
||||
})
|
||||
},
|
||||
mini_login() {
|
||||
let that = this;
|
||||
// if(!this.selfChecked){
|
||||
// uni.showToast({
|
||||
// title:'请先勾选同意用户服务协议以及隐私政策',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return false
|
||||
// }
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: loginRes => {
|
||||
console.log(loginRes);
|
||||
that.code = loginRes.code;
|
||||
// 2. 将用户登录code传递到后台置换用户SessionKey、OpenId等信息
|
||||
request({
|
||||
url:'miniapp/login',
|
||||
method:'POST',
|
||||
data:{
|
||||
code: loginRes.code
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data);
|
||||
uni.hideLoading()
|
||||
if (res.data.code == 0) {
|
||||
//存取session
|
||||
uni.setStorageSync('openid', res.data.data.openid);
|
||||
uni.setStorageSync('token', res.data.data.token);
|
||||
if(res.data.data.phone&&res.data.data.phone!=''&&res.data.data.phone!=null){
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',// 替换为你要跳转的页面路径
|
||||
});
|
||||
this.is_login = true;
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '获取 code 失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
pd_login(openid) {
|
||||
let that = this;
|
||||
request({
|
||||
url:'miniapp/phone',
|
||||
method:'POST',
|
||||
data:{
|
||||
phone_code: openid
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data)
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',// 替换为你要跳转的页面路径
|
||||
});
|
||||
// if (res.data.code == -1) {
|
||||
// //unionid在数据库没有记录 记录就可以不需要操作
|
||||
// console.log('unionid在数据库没有记录 记录就可以不需要操作')
|
||||
// } else if (res.data.code == 0) {
|
||||
// var userid = res.data.data;
|
||||
// this.is_login = true;
|
||||
// this.getCard(openid);
|
||||
// }
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
>>>.uni-forms-item{
|
||||
padding: 5px 0px !important;
|
||||
}
|
||||
>>>checkbox .wx-checkbox-input {
|
||||
border-radius: 50% !important;
|
||||
border: 2rpx solid #3F435B !important;
|
||||
}
|
||||
|
||||
>>>checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border: 2rpx solid #3F435B !important;
|
||||
background-color:#3F435B !important;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
>>>checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
>>>uni-checkbox .uni-checkbox-input {
|
||||
margin-right: 0;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #3F435B;
|
||||
}
|
||||
>>>uni-checkbox .uni-checkbox-input:empty {
|
||||
border: 2rpx solid #3F435B;
|
||||
background-color: #5FFFFFF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
>>>uni-checkbox .uni-checkbox-input:not(:empty) {
|
||||
border: 2rpx solid #3F435B;
|
||||
background-color: #3F435B;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.argeen{
|
||||
color: #3F435B;
|
||||
}
|
||||
.content{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
background-color: white;
|
||||
}
|
||||
.logo{
|
||||
width: 100%;
|
||||
height: 830rpx;
|
||||
}
|
||||
.contop{
|
||||
position: absolute;
|
||||
top: 16%;
|
||||
text-align: center;
|
||||
}
|
||||
.text{
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
background: linear-gradient(120deg, #B9773C 0%, #67450D 100%);
|
||||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
background-clip: text;
|
||||
display: inline-block;
|
||||
}
|
||||
.cont{
|
||||
background-image: linear-gradient(#4C392B, #0A0604);
|
||||
padding: 4px 15px;
|
||||
color: #FFEBCC;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
display: inline-block;
|
||||
margin-top: 12px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.foot{
|
||||
width: 88%;
|
||||
margin: 0px auto;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.foot label{
|
||||
color: #929292;
|
||||
}
|
||||
.check{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.btn{
|
||||
background-color: #3F435B;
|
||||
color: white;
|
||||
border-radius: 50px;
|
||||
width: 100%;
|
||||
margin-bottom: 15px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
}
|
||||
.radio{
|
||||
color: #929292;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
.login-form-content {
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.register_forget_wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: #ff8f02;
|
||||
}
|
||||
|
||||
.login_btn {
|
||||
color: white;
|
||||
border-radius: 50px;
|
||||
width: 100%;
|
||||
margin-bottom: 40px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.action-btn{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,263 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="logo" src="/static/image/bg.jpg"></image>
|
||||
|
||||
<view class="contop">
|
||||
<text class="text">2025 USED CAR</text>
|
||||
<text class="cont">
|
||||
河南合塑实业有限公司
|
||||
</text>
|
||||
</view>
|
||||
<view class="foot">
|
||||
<button v-if="is_login" class="btn" @click="mini_login">一键登录</button>
|
||||
<button v-else="is_login" class="btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">一键登录</button>
|
||||
<view class="check">
|
||||
<checkbox-group name="" style="width: 28px;">
|
||||
<label>
|
||||
<checkbox :checked="selfChecked" activeBackgroundColor="#3F435B" style="transform:scale(0.7);border-radius: 50%"/>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
我同意并遵守<text class="argeen" @click="gouser">《用户服务协议》</text>以及<text class="argeen" @click="goprivacy">《隐私政策》</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request,showToast } from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selfChecked: false,
|
||||
is_login:false,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// this.Props.statusBarHeight = getApp().globalData.statusBarHeight
|
||||
// console.log(this.Props.statusBarHeight)
|
||||
// this.Props.capsuleTop = getApp().globalData.capsuleTop
|
||||
// this.getbg()
|
||||
},
|
||||
onShow() {
|
||||
// #ifdef MP-WEIXIN
|
||||
//小程序登录检测
|
||||
this.mini_login()
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
this.is_login = true
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
selfChangde(e) {
|
||||
this.selfChecked = !this.selfChecked;
|
||||
},
|
||||
goprivacy(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/agreement',// 替换为你要跳转的页面路径
|
||||
});
|
||||
},
|
||||
gouser(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/agreementuser',// 替换为你要跳转的页面路径
|
||||
});
|
||||
},
|
||||
getPhoneNumber(e) {
|
||||
console.log(e.detail.code) // 动态令牌
|
||||
let that = this;
|
||||
request({
|
||||
url:'miniapp/phone',
|
||||
// url:'customerLogin',
|
||||
method:'POST',
|
||||
data:{
|
||||
phone_code: e.detail.code,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data.data)
|
||||
if (res.data.code == -1) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
|
||||
} else if (res.data.code == 0) {
|
||||
//返回数据接收成功
|
||||
this.mini_login();
|
||||
}
|
||||
})
|
||||
},
|
||||
mini_login() {
|
||||
let that = this;
|
||||
// if(!this.selfChecked){
|
||||
// uni.showToast({
|
||||
// title:'请先勾选同意用户服务协议以及隐私政策',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return false
|
||||
// }
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: loginRes => {
|
||||
console.log(loginRes);
|
||||
that.code = loginRes.code;
|
||||
// 2. 将用户登录code传递到后台置换用户SessionKey、OpenId等信息
|
||||
request({
|
||||
url:'miniapp/login',
|
||||
method:'POST',
|
||||
data:{
|
||||
code: loginRes.code
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data);
|
||||
uni.hideLoading()
|
||||
if (res.data.code == 0) {
|
||||
//存取session
|
||||
uni.setStorageSync('openid', res.data.data.openid);
|
||||
uni.setStorageSync('token', res.data.data.token);
|
||||
if(res.data.data.phone&&res.data.data.phone!=''&&res.data.data.phone!=null){
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',// 替换为你要跳转的页面路径
|
||||
});
|
||||
this.is_login = true;
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '获取 code 失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
pd_login(openid) {
|
||||
let that = this;
|
||||
request({
|
||||
url:'miniapp/phone',
|
||||
method:'POST',
|
||||
data:{
|
||||
phone_code: openid
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data)
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',// 替换为你要跳转的页面路径
|
||||
});
|
||||
// if (res.data.code == -1) {
|
||||
// //unionid在数据库没有记录 记录就可以不需要操作
|
||||
// console.log('unionid在数据库没有记录 记录就可以不需要操作')
|
||||
// } else if (res.data.code == 0) {
|
||||
// var userid = res.data.data;
|
||||
// this.is_login = true;
|
||||
// this.getCard(openid);
|
||||
// }
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
>>>checkbox .wx-checkbox-input {
|
||||
border-radius: 50% !important;
|
||||
border: 2rpx solid #3F435B !important;
|
||||
}
|
||||
|
||||
>>>checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border: 2rpx solid #3F435B !important;
|
||||
background-color:#3F435B !important;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
>>>checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
>>>uni-checkbox .uni-checkbox-input {
|
||||
margin-right: 0;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #3F435B;
|
||||
}
|
||||
>>>uni-checkbox .uni-checkbox-input:empty {
|
||||
border: 2rpx solid #3F435B;
|
||||
background-color: #5FFFFFF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
>>>uni-checkbox .uni-checkbox-input:not(:empty) {
|
||||
border: 2rpx solid #3F435B;
|
||||
background-color: #3F435B;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.argeen{
|
||||
color: #3F435B;
|
||||
}
|
||||
.content{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
background-color: white;
|
||||
}
|
||||
.logo{
|
||||
width: 100%;
|
||||
height: 830rpx;
|
||||
}
|
||||
.contop{
|
||||
position: absolute;
|
||||
top: 16%;
|
||||
text-align: center;
|
||||
}
|
||||
.text{
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
background: linear-gradient(120deg, #B9773C 0%, #67450D 100%);
|
||||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
background-clip: text;
|
||||
display: inline-block;
|
||||
}
|
||||
.cont{
|
||||
background-image: linear-gradient(#4C392B, #0A0604);
|
||||
padding: 4px 15px;
|
||||
color: #FFEBCC;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
display: inline-block;
|
||||
margin-top: 12px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.foot{
|
||||
width: 88%;
|
||||
margin: 30px auto;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.foot label{
|
||||
color: #929292;
|
||||
}
|
||||
.check{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.btn{
|
||||
background-color: #3F435B;
|
||||
color: white;
|
||||
border-radius: 50px;
|
||||
width: 100%;
|
||||
margin-bottom: 40px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.radio{
|
||||
color: #929292;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user