<template>
|
|
<view class="se-m-20 se-p-20 se-br-10">
|
|
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="80">
|
|
<u-form-item labelWidth="0">
|
|
<view class="se-fs-26 se-c-black se-pb-10">
|
|
请选择您要发布的车辆类型:
|
|
</view>
|
|
<view class="se-flex se-flex-ai-c se-flex-ff-rw">
|
|
<view class="se-py-10 se-px-30 se-fs-22 se-br-10 se-mr-15 se-mt-10" :class="item.id==form.typeId ? 'se-bgc-green se-c-white se-b-green' : 'se-b se-c-text'" @click="handleCartype(item)" v-for="(item,index) in actions" :key="index">
|
|
{{item.name}}
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
|
|
<!-- <u-form-item label="一级分类" prop="cartypeId" @click="handleCategoryOneChange()">
|
|
<u--input readonly v-model="form.cartypeName" placeholder="请选择一级分类" border="bottom"></u--input>
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
|
</u-form-item> -->
|
|
<u-form-item label="二级分类" prop="categorytwoId" @click="handleCategoryTwoChange()">
|
|
<u--input readonly v-model="form.categorytwoName" placeholder="请选择二级分类" border="bottom"></u--input>
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
|
</u-form-item>
|
|
<u-form-item label="标题" prop="goodsName">
|
|
<view class="se-flex se-flex-h-c">
|
|
<u--input v-model="form.goodsName" type="text" class="se-w-200" placeholder="请填写标题"></u--input>
|
|
</view>
|
|
</u-form-item>
|
|
<u-form-item label="品牌" prop="brand">
|
|
<view class="se-flex se-flex-h-c">
|
|
<u--input v-model="form.brand" type="text" class="se-w-200" placeholder="请填写品牌"></u--input>
|
|
</view>
|
|
</u-form-item>
|
|
<u-form-item label="型号" prop="model">
|
|
<view class="se-flex se-flex-h-c">
|
|
<u--input v-model="form.model" type="text" class="se-w-200" placeholder="请填写型号"></u--input>
|
|
</view>
|
|
</u-form-item>
|
|
|
|
<u-form-item label="区域" prop="area" @click="handleAreaChange()">
|
|
<u--input readonly v-model="form.area" placeholder="请选择地址" border="bottom"></u--input>
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
|
</u-form-item>
|
|
<u-form-item label="年限" prop="date" @click="showDate=true">
|
|
<u--input border="bottom" v-model="form.date" readonly placeholder="请填写年限"></u--input>
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
|
</u-form-item>
|
|
<u-form-item label="公里数" prop="mileage">
|
|
<u--input v-model="form.mileage" type="number" placeholder="请填写公里数"></u--input>
|
|
</u-form-item>
|
|
<u-form-item label="价格" prop="price">
|
|
<u--input v-model="form.price" placeholder="请填写价格"></u--input>
|
|
<div slot="right" class="se-c-green">¥</div>
|
|
</u-form-item>
|
|
<u-form-item label="库存" prop="inventory">
|
|
<u--input v-model="form.inventory" type="number" placeholder="请填写库存"></u--input>
|
|
</u-form-item>
|
|
<u-form-item label="联系人" prop="contacts">
|
|
<u--input v-model="form.contacts" placeholder="请填写联系人"></u--input>
|
|
</u-form-item>
|
|
<u-form-item label="联系人电话" prop="phone">
|
|
<u--input v-model="form.phone" type="number" placeholder="请填写电话"></u--input>
|
|
</u-form-item>
|
|
<u-form-item label="浏览量" prop="views">
|
|
<u--input v-model="form.views" placeholder="请填写浏览量"></u--input>
|
|
</u-form-item>
|
|
<u-form-item prop="fileCarList" labelWidth="0">
|
|
<view class="se-flex se-flex-v-sa">
|
|
<view class="se-py-20 se-w-p-100 se-flex">
|
|
车辆照片
|
|
</view>
|
|
<view class="se-py-20 se-w-p-100">
|
|
<u-upload :fileList="form.fileCarList" @afterRead="afterCarFront" @delete="delCarFront" multiple :maxCount="5"></u-upload>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
<u-form-item prop="fileFrontList" labelWidth="0">
|
|
<view class="se-flex se-flex-v-sa">
|
|
<view class="se-py-20 se-w-p-100 se-flex">
|
|
车辆照片(前)
|
|
</view>
|
|
<view class="se-py-20 se-w-p-100">
|
|
<u-upload :fileList="form.fileFrontList" @afterRead="afterFront" @delete="delFront" multiple :maxCount="5"></u-upload>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
<u-form-item prop="fileBackList" labelWidth="0">
|
|
<view class="se-flex se-flex-v-sa">
|
|
<view class="se-py-20 se-w-p-100 se-flex">
|
|
车辆照片(后)
|
|
</view>
|
|
<view class="se-py-20 se-w-p-100">
|
|
<u-upload :fileList="form.fileBackList" @afterRead="afterBack" @delete="delBack" multiple :maxCount="5"></u-upload>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
<u-form-item prop="fileLeftList" labelWidth="0">
|
|
<view class="se-flex se-flex-v-sa">
|
|
<view class="se-py-20 se-w-p-100 se-flex">
|
|
车辆照片(左)
|
|
</view>
|
|
<view class="se-py-20 se-w-p-100">
|
|
<u-upload :fileList="form.fileLeftList" @afterRead="afterLeft" @delete="delLeft" multiple :maxCount="5"></u-upload>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
<u-form-item prop="fileRightList" labelWidth="0">
|
|
<view class="se-flex se-flex-v-sa">
|
|
<view class="se-py-20 se-w-p-100 se-flex">
|
|
车辆照片(右)
|
|
</view>
|
|
<view class="se-py-20 se-w-p-100">
|
|
<u-upload :fileList="form.fileRightList" @afterRead="afterRight" @delete="delRight" multiple :maxCount="5"></u-upload>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
<u-form-item prop="fileCabList" labelWidth="0">
|
|
<view class="se-flex se-flex-v-sa">
|
|
<view class="se-py-20 se-w-p-100 se-flex">
|
|
车辆照片(驾驶室)
|
|
</view>
|
|
<view class="se-py-20 se-w-p-100">
|
|
<u-upload :fileList="form.fileCabList" @afterRead="afterCab" @delete="delCab" multiple :maxCount="5"></u-upload>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
<u-form-item label="车辆介绍" labelPosition="top" prop="introduce">
|
|
<u--textarea v-model="form.introduce" class="se-mt-20" count
|
|
placeholder="请填写车辆介绍"></u--textarea>
|
|
</u-form-item>
|
|
<u-form-item>
|
|
<view class="se-px-20 se-pt-20">
|
|
<view class="se-px-20 se-pb-80 se-fs-20 se-flex">
|
|
<view @click="onSubmit"
|
|
class="se-mx-10 se-flex-1 se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-28 se-c-white se-bgc-green">
|
|
<text>发布订单</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
|
|
</u--form>
|
|
|
|
<u-datetime-picker
|
|
:show="showDate"
|
|
v-model="date"
|
|
mode="date"
|
|
@confirm="onConfirm"
|
|
@cancel="onCancel"
|
|
></u-datetime-picker>
|
|
<u-action-sheet :actions="categoryOneList" @select="selectCategoryOneClick" title="分类" :show="categoryOneShow" @close="categoryOneShow=false"></u-action-sheet>
|
|
<u-action-sheet :actions="categoryTwoList" @select="selectCategoryTwoClick" title="分类" :show="categoryTwoShow" @close="categoryTwoShow=false"></u-action-sheet>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { queryTypeList,addGoods,queryCategoryOneList,queryCategoryTwoList } from "@/common/api.js"
|
|
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
|
|
export default {
|
|
components:{
|
|
|
|
},
|
|
data() {
|
|
return {
|
|
actions:[],
|
|
showType:false,
|
|
showDate:false,
|
|
date:Number(new Date()),
|
|
categoryOneShow:false,
|
|
categoryOneList:[],
|
|
categoryTwoShow:false,
|
|
categoryTwoList:[],
|
|
form: {
|
|
typeId:"",//类型
|
|
cartypeId:"",//一级分类
|
|
cartypeName:"",//一级分类名称
|
|
categorytwoId:"",//二级分类
|
|
categorytwoName:"",//二级分类名称
|
|
goodsName:"驾驶式扫地机",//标题
|
|
brand:"大众",//品牌
|
|
model:"朗逸",//型号
|
|
area:"湖南省长沙市岳麓区含光路658号",//区域
|
|
latitude:"28.23586",
|
|
longitude:"112.931496",
|
|
address:'',
|
|
date:"2024-12-15",//时间
|
|
mileage:"2000",//距离
|
|
price:"210000",//价格
|
|
inventory:"5",//库存
|
|
contacts:"柳川",//联系人
|
|
phone:"13189698115",//联系人电话
|
|
views:"5",//浏览量
|
|
fileCarList:[
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
|
|
},
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
|
|
}
|
|
],//车辆照片
|
|
fileFrontList:[
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
|
|
},
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
|
|
}
|
|
],//车辆照片前
|
|
fileBackList:[
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
|
|
},
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
|
|
}
|
|
],//车辆照片后
|
|
fileLeftList:[
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
|
|
},
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
|
|
}
|
|
],//车辆照片左
|
|
fileRightList:[
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
|
|
},
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
|
|
}
|
|
],//车辆照片右
|
|
fileCabList:[
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
|
|
},
|
|
{
|
|
url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
|
|
}
|
|
],//车辆照片 驾驶室
|
|
introduce:`车型名称:车辆的品牌和型号,例如 "Toyota Corolla 2024"。
|
|
车辆类型:轿车、SUV、MPV、皮卡、跑车等。
|
|
价格区间:可选项,适用于市场推广。`,//车辆介绍
|
|
},
|
|
rules: {
|
|
typeId:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请选择类型',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
goodsName:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写标题',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
brand:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写品牌',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
model:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写型号',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
area:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请选择所在地区',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
date:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写时间',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
mileage:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写公里数',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
price:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写价格',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
inventory:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写库存',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
contacts:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写联系人',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
phone:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写联系电话',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
views:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请填写浏览量',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
fileCarList:[
|
|
{
|
|
validator: (rule, value, callback) => {
|
|
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
|
|
callback(new Error('照片不能为空'));
|
|
} else {
|
|
callback();
|
|
}
|
|
},
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
fileFrontList:[
|
|
{
|
|
validator: (rule, value, callback) => {
|
|
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
|
|
callback(new Error('照片不能为空'));
|
|
} else {
|
|
callback();
|
|
}
|
|
},
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
fileBackList:[
|
|
{
|
|
validator: (rule, value, callback) => {
|
|
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
|
|
callback(new Error('照片不能为空'));
|
|
} else {
|
|
callback();
|
|
}
|
|
},
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
fileLeftList:[
|
|
{
|
|
validator: (rule, value, callback) => {
|
|
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
|
|
callback(new Error('照片不能为空'));
|
|
} else {
|
|
callback();
|
|
}
|
|
},
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
fileRightList:[
|
|
{
|
|
validator: (rule, value, callback) => {
|
|
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
|
|
callback(new Error('照片不能为空'));
|
|
} else {
|
|
callback();
|
|
}
|
|
},
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
fileCabList:[
|
|
{
|
|
validator: (rule, value, callback) => {
|
|
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
|
|
callback(new Error('照片不能为空'));
|
|
} else {
|
|
callback();
|
|
}
|
|
},
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
|
|
}
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
this.onQueryTypeList()
|
|
this.onQueryCategoryOneList()
|
|
this.onQueryCategoryTwoList()
|
|
},
|
|
watch: {
|
|
|
|
},
|
|
methods: {
|
|
handleCategoryOneChange(){
|
|
console.info('handleCategoryOneChange')
|
|
this.categoryOneShow = true
|
|
},
|
|
selectCategoryOneClick(event){
|
|
console.info(event)
|
|
this.form.cartypeId = event.id
|
|
this.form.cartypeName = event.name
|
|
this.categoryOneShow = false
|
|
},
|
|
onQueryCategoryOneList(){
|
|
let that = this
|
|
let params = {}
|
|
queryCategoryOneList(params).then(response=>{
|
|
console.info("queryCategoryOneList",response)
|
|
that.categoryOneList = response.result.records
|
|
}).catch(error=>{
|
|
|
|
})
|
|
},
|
|
handleCategoryTwoChange(){
|
|
console.info('handleCategoryTwoChange')
|
|
this.categoryTwoShow = true
|
|
},
|
|
selectCategoryTwoClick(event){
|
|
console.info("selectCategoryTwoClick",event)
|
|
this.form.categorytwoId = event.id
|
|
this.form.categorytwoName = event.name
|
|
this.categoryTwoShow = false
|
|
},
|
|
onQueryCategoryTwoList(){
|
|
let that = this
|
|
let params = {
|
|
categoryoneId:"1867039853005877250"
|
|
}
|
|
queryCategoryTwoList(params).then(response=>{
|
|
console.info("queryCategoryTwoList",response)
|
|
that.categoryTwoList = response.result.records
|
|
}).catch(error=>{
|
|
|
|
})
|
|
},
|
|
onQueryTypeList(){
|
|
queryTypeList({}).then(response=>{
|
|
console.info("queryTypeList",response)
|
|
this.actions = response.result.records
|
|
this.form.typeId = response.result.records[0].id
|
|
}).catch(error=>{
|
|
|
|
})
|
|
},
|
|
onCancel(){
|
|
this.showDate = false
|
|
},
|
|
onConfirm(e){
|
|
console.info('e',e)
|
|
const date = new Date(e.value);
|
|
const year = date.getFullYear();
|
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
const day = String(date.getDate()).padStart(2, '0');
|
|
this.form.date = `${year}-${month}-${day}`;
|
|
this.showDate = false
|
|
},
|
|
handleAreaChange(){
|
|
const that = this;
|
|
wx.chooseLocation({
|
|
// type: 'wgs84',
|
|
success: function (res) {
|
|
const qqmapsdk = new QQMapWX({
|
|
key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' // 必填
|
|
});
|
|
uni.showLoading({
|
|
title:"获取中...."
|
|
})
|
|
qqmapsdk.reverseGeocoder({
|
|
location: {
|
|
latitude: res.latitude,
|
|
longitude: res.longitude
|
|
},
|
|
success: function(response) {
|
|
console.log('逆地理编码结果:', response);
|
|
uni.hideLoading()
|
|
that.form.longitude = response.result.location.lng
|
|
that.form.latitude = response.result.location.lat
|
|
that.form.area = response.result.address
|
|
},
|
|
fail: function(error) {
|
|
uni.hideLoading()
|
|
console.error('逆地理编码失败:', error);
|
|
}
|
|
});
|
|
}
|
|
})
|
|
// this.$refs.citySelectRef.open()
|
|
},
|
|
handleCartype(event){
|
|
this.form.typeId = event.id
|
|
},
|
|
// 照片
|
|
delCarFront(event) {
|
|
this.form.fileCarList.splice(event.index, 1)
|
|
},
|
|
async afterCarFront(e) {
|
|
console.info("e",e)
|
|
let self = this
|
|
e.file.forEach(file => {
|
|
self.$Oss.ossUpload(file.url).then(url => {
|
|
self.form.fileCarList.push({
|
|
url
|
|
})
|
|
})
|
|
})
|
|
},
|
|
// 前
|
|
delFront(event) {
|
|
this.form.fileFrontList.splice(event.index, 1)
|
|
},
|
|
async afterFront(e) {
|
|
let self = this
|
|
e.file.forEach(file => {
|
|
self.$Oss.ossUpload(file.url).then(url => {
|
|
self.form.fileFrontList.push({
|
|
url
|
|
})
|
|
})
|
|
})
|
|
},
|
|
// 后
|
|
delBack(event) {
|
|
this.form.fileBackList.splice(event.index, 1)
|
|
},
|
|
async afterBack(e) {
|
|
let self = this
|
|
e.file.forEach(file => {
|
|
self.$Oss.ossUpload(file.url).then(url => {
|
|
self.form.fileBackList.push({
|
|
url
|
|
})
|
|
})
|
|
})
|
|
},
|
|
// 左
|
|
delLeft(event) {
|
|
this.form.fileLeftList.splice(event.index, 1)
|
|
},
|
|
async afterLeft(e) {
|
|
let self = this
|
|
e.file.forEach(file => {
|
|
self.$Oss.ossUpload(file.url).then(url => {
|
|
self.form.fileLeftList.push({
|
|
url
|
|
})
|
|
})
|
|
})
|
|
},
|
|
// 左
|
|
delRight(event) {
|
|
this.form.fileRightList.splice(event.index, 1)
|
|
},
|
|
async afterRight(e) {
|
|
let self = this
|
|
e.file.forEach(file => {
|
|
self.$Oss.ossUpload(file.url).then(url => {
|
|
self.form.fileRightList.push({
|
|
url
|
|
})
|
|
})
|
|
})
|
|
},
|
|
// 车辆照片(驾驶室)
|
|
delCab(event) {
|
|
this.form.fileCabList.splice(event.index, 1)
|
|
},
|
|
async afterCab(e) {
|
|
let self = this
|
|
e.file.forEach(file => {
|
|
self.$Oss.ossUpload(file.url).then(url => {
|
|
self.form.fileCabList.push({
|
|
url
|
|
})
|
|
})
|
|
})
|
|
},
|
|
onSubmit() {
|
|
// console.info(this.form)
|
|
// uni.navigateTo({
|
|
// url:"/pages_subpack/success/index"
|
|
// })
|
|
this.$refs.uForm.validate().then(res => {
|
|
// uni.$u.toast('校验通过')
|
|
this.onAddGoods()
|
|
}).catch(errors => {
|
|
console.info(errors)
|
|
// uni.$u.toast('校验失败')
|
|
})
|
|
},
|
|
onAddGoods(){
|
|
let that = this
|
|
let params={
|
|
// cartypeId:that.form.cartypeId,
|
|
// categorytwoId:"1867040891523936258",
|
|
cartypeId:that.form.typeId,
|
|
categorytwoId:that.form.categorytwoId,
|
|
goodsName:that.form.goodsName,//商品名称
|
|
brand:that.form.brand,//品牌
|
|
model:that.form.model,//型号
|
|
area:that.form.area,//所在区域
|
|
latitude:that.form.latitude,
|
|
longitude:that.form.longitude,
|
|
goodsTime:that.form.date,//时间
|
|
inventory:that.form.inventory,//库存
|
|
mileage:that.form.mileage,//公里数
|
|
userName:that.form.contacts,//联系人
|
|
phone:that.form.phone,//联系人电话
|
|
price:that.form.price,//商品价格
|
|
views:that.form.views,//浏览量
|
|
image:that.form.fileCarList.map(item => item.url).join(','),//商品图片
|
|
imageBack:that.form.fileBackList.map(item => item.url).join(','),//车辆照片(后)
|
|
imageCab:that.form.fileCabList.map(item => item.url).join(','),//车辆照片(驾驶室)
|
|
imageFront:that.form.fileFrontList.map(item => item.url).join(','),//车辆照片(前)
|
|
imageLeft:that.form.fileLeftList.map(item => item.url).join(','),//车辆照片(左)
|
|
imageRight:that.form.fileRightList.map(item => item.url).join(','),//车辆照片(右)
|
|
detail:that.form.introduce,//车辆介绍
|
|
}
|
|
addGoods(params).then(response=>{
|
|
console.info('response',response)
|
|
uni.showToast({
|
|
title: response.message,
|
|
mask: false,
|
|
icon: 'none',
|
|
duration: 2000
|
|
})
|
|
}).catch(error=>{
|
|
|
|
})
|
|
}
|
|
},
|
|
onReady() {
|
|
this.$refs.uForm.setRules(this.rules)
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
page {
|
|
background-color: transparent;
|
|
forced-color-adjust: none;
|
|
}
|
|
</style>
|