Browse Source

1,修改代码

master
1263428893@qq.com 4 months ago
parent
commit
17499c8f66
13 changed files with 405 additions and 135 deletions
  1. +5
    -1
      common/api.js
  2. +2
    -2
      common/config.js
  3. +10
    -5
      config.js
  4. +6
    -2
      pages.json
  5. +37
    -2
      pages/home/index.vue
  6. +3
    -3
      pages/user/index.vue
  7. +41
    -23
      pages_subpack/apply/index.vue
  8. +54
    -13
      pages_subpack/category/index.vue
  9. +24
    -10
      pages_subpack/detail/index.vue
  10. +20
    -13
      pages_subpack/person/index.vue
  11. +114
    -54
      pages_subpack/release/index.vue
  12. +53
    -6
      pages_subpack/release/list.vue
  13. +36
    -1
      pages_subpack/spare/index.vue

+ 5
- 1
common/api.js View File

@ -31,7 +31,7 @@ export const queryNewsList = (params) => http.get('/carrent-admin/api/news/query
// 新闻资讯-根据id获取新闻详情
export const queryNewsById = (params) => http.get('/carrent-admin/api/news/queryNewsById', {params:params})
// 寻车申请-添加申请
export const addApply = (params) => http.get('/carrent-admin/api/apply/addApply', {params:params})
export const addApply = (params) => http.post('/carrent-admin/api/apply/addApply', params)
// 寻车申请-申请列表
export const queryApplyList = (params) => http.get('/carrent-admin/api/apply/queryApplyList', {params:params})
@ -87,3 +87,7 @@ export const queryCategoryList = (params) => http.get('/carrent-admin/api/config
export const queryAuthenticationPerson = (params) => http.get('/carrent-admin/api/user/queryAuthenticationPerson', {params:params})
// 查询企业实名
export const queryAuthenticationCompany = (params) => http.get('/carrent-admin/api/company/queryAuthenticationCompany', {params:params})
// 商品信息-车辆信息删除
export const deleteGoods = (params) => http.post('/carrent-admin/api/goods/deleteGoods', params)

+ 2
- 2
common/config.js View File

@ -1,5 +1,5 @@
module.exports = {
baseUrl:"https://carrentadmin.augcl.com"
// baseUrl:"https://carrentadmin.augcl.com"
// baseUrl:"http://augcl.natapp1.cc"
baseUrl:"https://carrentadmin.jthj8.com"
}

+ 10
- 5
config.js View File

@ -22,17 +22,22 @@ const config = {
const defaultConfig = {
mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
aliOss : {
url : 'https://tennis-oss.xzaiyp.top/',
// url : 'https://tennis-oss.xzaiyp.top/',
url:"https://image.jthj8.com/",
config : {
//桶的地址
region: 'oss-cn-guangzhou',
//id
accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
// accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
accessKeyId:"LTAI5tMJitfHeQ8jNAikvEu7",
//密钥
accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
// accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
accessKeySecret:"GodE2mPZiW2WhiMtEkPhNNOThLlSRj",
//桶的名字
bucket: 'zhuoqiu-image',
endpoint:'oss-cn-guangzhou.aliyuncs.com',
// bucket: 'zhuoqiu-image',
bucket:"jthj8",
// endpoint:'oss-cn-guangzhou.aliyuncs.com',
endpoint:"oss-cn-guangzhou.aliyuncs.com"
}
},
}


+ 6
- 2
pages.json View File

@ -84,7 +84,9 @@
"navigationBarTitleText": "寻车列表",
"navigationStyle":"default",
"navigationBarBackgroundColor": "#669A32",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
}
},
{
@ -165,7 +167,9 @@
"navigationBarTitleText": "发布列表",
"navigationStyle":"default",
"navigationBarBackgroundColor": "#669A32",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
}
},
{


+ 37
- 2
pages/home/index.vue View File

@ -49,7 +49,7 @@
<view class="se-c-black se-fs-24 se-fw-6 se-mt-10">
{{ items.goodsName }}
</view>
<view class="se-flex se-flex-ff-rw se-mt-10" v-if="items.cartypeId!='1867039853005877250'">
<view class="se-flex se-flex-ff-rw se-mt-10" v-if="items.categoryoneName!='环卫设备及配件'">
<view class="se-tag">
{{items.brand}}
</view>
@ -62,7 +62,7 @@
</view>
<view class="se-flex se-flex-h-sb se-w-p-100 se-pt-20">
<view class="se-fs-24 se-display-ib">
<text class="se-c-orange se-fs-26 se-fw-6"><text class="se-fs-24"></text>{{items.price}}<text class="se-fs-24"></text><text class="se-fs-24" v-if="items.cartypeId=='1875536807086256130'">/</text></text>
<text class="se-c-orange se-fs-26 se-fw-6"><text class="se-fs-24"></text>{{items.price | getPersonAuthentication}}<text class="se-fs-24"></text><text class="se-fs-24" v-if="items.cartypeId=='1875536807086256130'">/</text></text>
</view>
<view class="se-display-ib se-bgc-orange se-px-15 se-br-40 se-flex-h-c se-h-40 se-lh-40 se-ta-c se-fs-22 se-c-white se-b">
<text>查看详情</text>
@ -131,6 +131,20 @@
console.info(share)
return share
},
filters:{
getPersonAuthentication(price){
let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus")
if(companyAuthenticationStatus==1){
return price
}
let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus")
if (personAuthenticationStatus != 1){
return '***';
}
return price
}
},
methods:{
onQueryModuleList(){
const that = this;
@ -155,6 +169,26 @@
console.info(event)
},
onDetail(event){
let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus")
if(companyAuthenticationStatus==1){
uni.navigateTo({
url:"/pages_subpack/detail/index?goodsId="+event.id
})
return;
}
let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus")
if (personAuthenticationStatus != 1){
return uni.showModal({
title:"未认证",
showCancel:false,
content:"立即前往认证",
success() {
uni.navigateTo({
url:"/pages/identity/index?userStatus=1"
})
}
})
}
uni.navigateTo({
url:"/pages_subpack/detail/index?goodsId="+event.id
})
@ -246,6 +280,7 @@
onPageList(){
let that = this
let params={
status:1,
pageNo:that.pageNo,
pageSize:that.pageSize,
}


+ 3
- 3
pages/user/index.vue View File

@ -167,15 +167,15 @@
},
onRelease(){
let that = this
if (that.companyAuthenticationStatus == 1 || that.personAuthenticationStatus == 1){
if (that.companyAuthenticationStatus == 1){
uni.navigateTo({
url:"/pages_subpack/release/list"
})
}else{
uni.showModal({
title:"未实名认证",
title:"未企业认证",
showCancel:false,
content:"立即前往实名认证",
content:"立即前往认证",
success() {
that.onIdentity()
}


+ 41
- 23
pages_subpack/apply/index.vue View File

@ -18,10 +18,13 @@
<u-form-item label="车辆型号" prop="model">
<u--input v-model="form.model" placeholder="请填写车辆型号"></u--input>
</u-form-item>
<u-form-item label="年限" prop="date" @click="showDate=true">
<u--input border="bottom" v-model="form.date" disabled placeholder="请填写年限"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<template v-if="form.cartypeName!='新车'">
<u-form-item label="年限" prop="date" @click="showDate=true" >
<u--input border="bottom" v-model="form.date" disabled placeholder="请填写年限"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
</template>
<u-form-item label="公里数" prop="distance">
<u--input v-model="form.distance" placeholder="请填写公里数"></u--input>
</u-form-item>
@ -57,14 +60,16 @@
@select="categoryTwoSelect"
>
</u-action-sheet>
<u-datetime-picker
<u-picker :show="showDate" :columns="columns" @confirm="onConfirm"
@cancel="onCancel"></u-picker>
<!-- <u-datetime-picker
:maxDate="maxDate"
:show="showDate"
v-model="date"
mode="date"
@confirm="onConfirm"
@cancel="onCancel"
></u-datetime-picker>
></u-datetime-picker> -->
</view>
</template>
@ -80,6 +85,7 @@
},
data() {
return {
columns:[['2025', '2024', '2023', '2022', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012', '2011', '2010', '2009', '2008', '2007', '2006', '2005', '2004', '2003', '2002', '2001', '2000']],
maxDate:startOfYesterday,
categoryTwoList:[],
categoryList:[],
@ -118,14 +124,16 @@
trigger: ['blur', 'change']
}
],
date:[
{
type: 'string',
required: true,
message: '请填写时间',
trigger: ['blur', 'change']
}
],
// date:[
// {
// validator: (rule, value, callback) => {
// console.info(this.form.cartypeName)
// return this.form.cartypeName=='' ? false : callback(new Error(''))
// },
// message: '',
// trigger: ['blur', 'change']
// }
// ],
distance:[
{
type: 'string',
@ -162,7 +170,7 @@
}
},
onLoad(options) {
this.onQueryTypeList()
// this.onQueryTypeList()
this.onQueryCategoryList()
},
watch: {
@ -175,6 +183,9 @@
this.categoryTwoList =event.carrentCategorytwoList
this.form.categorytwoId = ""
this.form.categorytwoName = ""
if(this.form.cartypeName=='新车'){
this.form.date = ""
}
},
onQueryCategoryList(){
let that = this
@ -192,16 +203,19 @@
})
},
onCancel(){
this.form.date = '';
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.form.date = e.value[0];
this.showDate = false
// 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
},
categoryTwoSelect(event){
this.form.categorytwoId = event.id
@ -221,16 +235,20 @@
this.onAddApply()
// uni.$u.toast('')
}).catch(errors => {
console.info(errors)
// uni.$u.toast('')
})
},
onAddApply(){
let that = this
if(that.form.cartypeName!='新车' && !that.form.date){
return uni.$u.toast('请选择时间')
}
let params={
cartypeId:that.form.cartypeId,
categoryoneId:that.form.cartypeId,
categorytwoId:that.form.categorytwoId,
model:that.form.model,
carTime:that.form.date,
carTime:Number(that.form.date),
mileage:that.form.distance,
name:that.form.contacts,
phone:that.form.phone,


+ 54
- 13
pages_subpack/category/index.vue View File

@ -29,7 +29,7 @@
<view class="se-c-black se-fs-24 se-fw-6 se-mt-10">
{{ items.goodsName }}
</view>
<view class="se-flex se-flex-ff-rw se-mt-10" v-if="items.cartypeId!='1867039853005877250'">
<view class="se-flex se-flex-ff-rw se-mt-10" v-if="items.categoryoneName!='环卫设备及配件'">
<view class="se-tag">
{{items.brand}}
</view>
@ -42,7 +42,7 @@
</view>
<view class="se-flex se-flex-h-sb se-w-p-100 se-pt-20">
<view class="se-fs-24 se-display-ib">
<text class="se-c-orange se-fs-26 se-fw-6"><text class="se-fs-24"></text>{{items.price}}<text class="se-fs-24"></text><text class="se-fs-24" v-if="items.cartypeId=='1875536807086256130'">/</text></text>
<text class="se-c-orange se-fs-26 se-fw-6"><text class="se-fs-24"></text>{{items.price | getPersonAuthentication}}<text class="se-fs-24"></text><text class="se-fs-24" v-if="items.cartypeId=='1875536807086256130'">/</text></text>
</view>
<view class="se-display-ib se-bgc-orange se-px-15 se-br-40 se-flex-h-c se-h-40 se-lh-40 se-ta-c se-fs-22 se-c-white se-b">
<text>查看详情</text>
@ -53,13 +53,15 @@
<u-empty v-if="list && list.length==0" mode="list"></u-empty>
<u-action-sheet :actions="categoryTwoList" @select="selectCategoryTwoClick" title="分类" :show="categoryTwoShow" @close="categoryTwoClose"></u-action-sheet>
<u-action-sheet :actions="mileageList" @select="selectMileageClick" title="公里数" :show="mileageShow" @close="MileageClose"></u-action-sheet>
<u-datetime-picker
<!-- <u-datetime-picker
:show="showDate"
v-model="date"
mode="date"
@confirm="onConfirm"
@cancel="onCancel"
></u-datetime-picker>
></u-datetime-picker> -->
<u-picker :show="showDate" :columns="columns" @confirm="onConfirm"
@cancel="onCancel"></u-picker>
</view>
</template>
@ -68,6 +70,7 @@
export default{
data(){
return{
columns:[["全部",'2025', '2024', '2023', '2022', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012', '2011', '2010', '2009', '2008', '2007', '2006', '2005', '2004', '2003', '2002', '2001', '2000']],
mileageShow:false,
showDate:false,
goodsName:null,
@ -104,6 +107,19 @@
that.pageNo = that.pageNo + 1
that.onPageList()
},
filters:{
getPersonAuthentication(price){
let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus")
if(companyAuthenticationStatus==1){
return price
}
let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus")
if (personAuthenticationStatus != 1){
return '***';
}
return price
}
},
methods:{
onCancel(){
this.goodsTime=""
@ -111,13 +127,15 @@
this.onPageList()
},
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.goodsTime = `${year}-${month}-${day}`;
this.goodsTime = e.value[0];
this.showDate = false
// 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.goodsTime = `${year}-${month}-${day}`;
// this.showDate = false
this.pageNo = 1
this.onPageList()
},
@ -162,7 +180,8 @@
// queryCategoryTwoList(params).then(response=>{
console.info("queryCategoryTwoList",response)
if(response.result.length>0){
that.categoryTwoList = response.result[0].carrentCategorytwoList
let arr = [{id:null,name:"全部"}]
that.categoryTwoList = arr.concat(response.result[0].carrentCategorytwoList)
}
}).catch(error=>{
@ -177,7 +196,8 @@
response.result.forEach(items=>{
items.name = items.mileage
})
that.mileageList = response.result
let arr = [{id:null,name:"全部"}]
that.mileageList = arr.concat(response.result)
}).catch(error=>{
})
@ -189,10 +209,11 @@
onPageList(){
let that = this
let params={
status:1,
cartypeId:that.id,
categorytwoId:that.categorytwoId,
mileage:that.mileageName,
goodsTime:that.goodsTime,
goodsTime:that.goodsTime!='全部'?that.goodsTime:'',
goodsName:that.goodsName,
pageNo:that.pageNo,
pageSize:that.pageSize,
@ -242,6 +263,26 @@
})
},
onDetail(event){
let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus")
if(companyAuthenticationStatus==1){
uni.navigateTo({
url:"/pages_subpack/detail/index?goodsId="+event.id
})
return;
}
let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus")
if (personAuthenticationStatus != 1){
return uni.showModal({
title:"未认证",
showCancel:false,
content:"立即前往认证",
success() {
uni.navigateTo({
url:"/pages/identity/index?userStatus=1"
})
}
})
}
uni.navigateTo({
url:"/pages_subpack/detail/index?goodsId="+event.id
})


+ 24
- 10
pages_subpack/detail/index.vue View File

@ -9,11 +9,12 @@
{{detail.goodsName}}
</view>
<view class="se-display-ib se-c-red se-fs-32 se-br-8 se-px-10 se-py-5">
{{detail.price}}<text class="se-fs-24"></text><text class="se-fs-24" v-if="detail.cartypeId=='1875536807086256130'">/</text>
{{detail.price | getPersonAuthentication}}<text class="se-fs-24"></text><text class="se-fs-24" v-if="detail.categoryoneName=='环卫设备及配件'">/</text>
</view>
</view>
<view class="se-pr-30 se-flex se-flex-v-c">
<text>销售量{{detail.views}}+</text>
<text v-if="detail.categoryoneName==`环卫设备及配件`">销售量{{detail.views}}+</text>
<text v-else>浏览量{{detail.views}}+</text>
<!-- <button style="justify-content: center;" class="se-w-140 se-flex se-flex-ai-c se-h-60 se-lh-60 se-fs-22 se-bgc-green se-c-white se-py-0 se-br-30 se-px-20 se-m-0" open-type="share">
<uv-icon name="share" color="#fff"></uv-icon>
<text class="se-fs-20 se-pl-5">分享</text>
@ -27,26 +28,26 @@
{{detail.model}}
</view>
</view>
<view class="se-flex se-flex-ai-c se-pt-10" v-if="detail.cartypeId!='1867039853005877250'">
<view class="se-flex se-flex-ai-c se-pt-10" v-if="detail.categoryoneName!='环卫设备及配件'">
<text>品牌名:</text>
<view class="se-tag">
{{detail.brand}}
</view>
</view>
<view class="se-flex se-flex-ai-c se-pt-10" v-if="detail.cartypeId!='1867039853005877250'">
<view class="se-flex se-flex-ai-c se-pt-10" v-if="detail.categoryoneName!='环卫设备及配件'">
<text>公里数:</text>
<view class="se-tag">
{{detail.mileage}}公里
</view>
</view>
<view class="se-flex se-flex-ai-c se-pt-10" v-if="detail.cartypeId!='1867039853005877250'">
<view class="se-flex se-flex-ai-c se-pt-10" v-if="detail.categoryoneName!='环卫设备及配件'">
<text>时间:</text>
<view class="se-tag">
{{detail.goodsTime}}
</view>
</view>
</view>
<template v-if="detail.imageFronts && detail.imageFronts.length>0 && detail.cartypeId!='1867039853005877250'">
<template v-if="detail.imageFronts && detail.imageFronts.length>0 && detail.categoryoneName!='环卫设备及配件'">
<view class="se-mt-20 se-bgc-white se-px-20 se-py-10 se-ta-l se-c-black se-py-20 se-flex se-flex-ai-c se-fs-24">
<text>车辆照片:</text>
</view>
@ -54,7 +55,7 @@
<image v-for="(items,indexs) in detail.imageFronts" :key="indexs" @click="previewImage(detail.imageFronts,items)" class="se-w-220 se-h-180 se-bgc-f5 se-br-5 se-mr-10 se-mb-10" :src="items" mode=""></image>
</view>
</template>
<template v-if="detail.imageBacks && detail.imageBacks.length>0 && detail.cartypeId!='1867039853005877250'">
<template v-if="detail.imageBacks && detail.imageBacks.length>0 && detail.categoryoneName!='环卫设备及配件'">
<view class="se-mt-20 se-bgc-white se-px-20 se-py-10 se-ta-l se-c-black se-py-20 se-flex se-flex-ai-c se-fs-24">
<text>车辆照片:</text>
</view>
@ -62,7 +63,7 @@
<image v-for="(items,indexs) in detail.imageBacks" :key="indexs" @click="previewImage(detail.imageBacks,items)" class="se-w-220 se-h-180 se-bgc-f5 se-br-5 se-mr-10 se-mb-10" :src="items" mode=""></image>
</view>
</template>
<template v-if="detail.imageLefts && detail.imageLefts.length>0 && detail.cartypeId!='1867039853005877250'">
<template v-if="detail.imageLefts && detail.imageLefts.length>0 && detail.categoryoneName!='环卫设备及配件'">
<view class="se-mt-20 se-bgc-white se-px-20 se-py-10 se-ta-l se-c-black se-py-20 se-flex se-flex-ai-c se-fs-24">
<text>车辆照片:</text>
</view>
@ -70,7 +71,7 @@
<image v-for="(items,indexs) in detail.imageLefts" :key="indexs" @click="previewImage(detail.imageLefts,items)" class="se-w-220 se-h-180 se-bgc-f5 se-br-5 se-mr-10 se-mb-10" :src="items" mode=""></image>
</view>
</template>
<template v-if="detail.imageRights && detail.imageRights.length>0 && detail.cartypeId!='1867039853005877250'">
<template v-if="detail.imageRights && detail.imageRights.length>0 && detail.categoryoneName!='环卫设备及配件'">
<view class="se-mt-20 se-bgc-white se-px-20 se-py-10 se-ta-l se-c-black se-py-20 se-flex se-flex-ai-c se-fs-24">
<text>车辆照片:</text>
</view>
@ -78,7 +79,7 @@
<image v-for="(items,indexs) in detail.imageRights" :key="indexs" @click="previewImage(detail.imageRights,items)" class="se-w-220 se-h-180 se-bgc-f5 se-br-5 se-mr-10 se-mb-10" :src="items" mode=""></image>
</view>
</template>
<template v-if="detail.imageCabs && detail.imageCabs.length>0 && detail.cartypeId!='1867039853005877250'">
<template v-if="detail.imageCabs && detail.imageCabs.length>0 && detail.categoryoneName!='环卫设备及配件'">
<view class="se-mt-20 se-bgc-white se-px-20 se-py-10 se-ta-l se-c-black se-py-20 se-flex se-flex-ai-c se-fs-24">
<text>车辆照片驾驶室:</text>
</view>
@ -233,6 +234,19 @@
console.info(share)
return share
},
filters:{
getPersonAuthentication(price){
let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus")
if(companyAuthenticationStatus==1){
return price
}
let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus")
if (personAuthenticationStatus != 1){
return '***';
}
return price
}
},
methods:{
previewImage(urls, current) {
uni.previewImage({


+ 20
- 13
pages_subpack/person/index.vue View File

@ -9,15 +9,18 @@
<u-form-item label="姓名" prop="name">
<u--input v-model="form.name" :readonly="status==1?true:false" placeholder="请输入姓名名称"></u--input>
</u-form-item>
<u-form-item label="身份证号码" prop="idCard">
<!-- <u-form-item label="身份证号码" prop="idCard">
<u--input v-model="form.idCard" :readonly="status==1?true:false" placeholder="请输入身份证号码"></u--input>
</u-form-item>
</u-form-item> -->
<u-form-item label="联系电话" prop="mobile">
<u--input v-model="form.mobile" :readonly="status==1?true:false" placeholder="请输入联系方式"></u--input>
</u-form-item>
<u-form-item label="所属单位" prop="company">
<u--input v-model="form.company" :readonly="status==1?true:false" placeholder="请输入所属单位(选填)"></u--input>
</u-form-item>
</view>
</view>
<view class="se-p-20">
<!-- <view class="se-p-20">
<view class="se-px-20 se-pb-20 se-bgc-white se-br-10 se-fs-20">
<u-form-item prop="fileList" labelWidth="2">
<view class="se-flex se-flex-v-sa">
@ -34,7 +37,7 @@
</view>
</u-form-item>
</view>
</view>
</view> -->
<view class="se-px-20 se-pt-20" v-if="status!=1">
<view class="se-px-20 se-pb-80 se-fs-20 se-flex">
<view @click="submit"
@ -56,6 +59,7 @@
name: '',
idCard:'',
mobile: '',
company:'',
fileList:[]
},
rules: {
@ -127,17 +131,18 @@
let params={}
queryAuthenticationPerson(params).then(response=>{
let result = response.result
let list =[]
response.result.cerImage.split(',').forEach(item=>{
list.push({
url: item
})
})
// let list =[]
// response.result.cerImage.split(',').forEach(item=>{
// list.push({
// url: item
// })
// })
this.form={
name: result.name,
mobile: result.phone,
idCard:result.cerNo,
fileList:list,
company:result.company,
fileList:[],
}
}).catch(error=>{
@ -155,11 +160,13 @@
onAddUser(){
let that = this
let params={
cerImage:that.form.fileList.map(item => item.url).join(','),
// cerImage:that.form.fileList.map(item => item.url).join(','),
cerImage:[],
cerNo:that.form.idCard,
id:uni.getStorageSync('userInfo').id,
name:that.form.name,
phone:that.form.mobile
phone:that.form.mobile,
company:that.form.company
}
addUser(params).then(response=>{
uni.$u.toast(response.result)


+ 114
- 54
pages_subpack/release/index.vue View File

@ -41,27 +41,27 @@
<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--input border="bottom" type="number" 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>
<u--input v-model="form.price" type="number" placeholder="请填写价格"></u--input>
<div slot="right" class="se-c-green"> <text v-if="form.cartypeName=='租赁车辆'">/</text> </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--input v-model="form.contacts" type="text" 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--input v-model="form.views" type="number" placeholder="请填写浏览量"></u--input>
</u-form-item>
<u-form-item prop="fileCarList" labelWidth="0">
<view class="se-flex se-flex-v-sa">
@ -132,22 +132,23 @@
<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>
<text>提交订单</text>
</view>
</view>
</view>
</u-form-item>
</u--form>
<u-datetime-picker
<u-picker :show="showDate" :columns="columns" @confirm="onConfirm"
@cancel="onCancel"></u-picker>
<!-- <u-datetime-picker
:maxDate="maxDate"
:show="showDate"
v-model="date"
mode="date"
mode="year"
@confirm="onConfirm"
@cancel="onCancel"
></u-datetime-picker>
></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>
@ -158,7 +159,7 @@
const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime();
const startOfYesterday = startOfToday - 24 * 60 * 60 * 1000;
import { queryTypeList,addGoods,queryCategoryOneList,queryCategoryTwoList,queryCategoryList } from "@/common/api.js"
import { queryTypeList,addGoods,queryCategoryOneList,queryCategoryTwoList,queryCategoryList,queryGoodsById } from "@/common/api.js"
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
export default {
components:{
@ -166,6 +167,8 @@
},
data() {
return {
id:null,
columns:[['2025', '2024', '2023', '2022', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012', '2011', '2010', '2009', '2008', '2007', '2006', '2005', '2004', '2003', '2002', '2001', '2000']],
maxDate:startOfYesterday,
actions:[],
showType:false,
@ -237,12 +240,14 @@
// }
// ],//
// 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"
// }
// {
// status:1,
// url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
// },
// {
// status:0,
// url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
// }
// ],//
// introduce:` "Toyota Corolla 2024"
// 轿SUVMPV
@ -279,7 +284,6 @@
rules: {
typeId:[
{
type: 'string',
required: true,
message: '请选择类型',
trigger: ['blur', 'change']
@ -287,7 +291,6 @@
],
goodsName:[
{
type: 'string',
required: true,
message: '请填写标题',
trigger: ['blur', 'change']
@ -295,7 +298,6 @@
],
brand:[
{
type: 'string',
required: true,
message: '请填写品牌',
trigger: ['blur', 'change']
@ -303,7 +305,6 @@
],
model:[
{
type: 'string',
required: true,
message: '请填写型号',
trigger: ['blur', 'change']
@ -311,7 +312,6 @@
],
area:[
{
type: 'string',
required: true,
message: '请选择所在地区',
trigger: ['blur', 'change']
@ -319,7 +319,6 @@
],
date:[
{
type: 'string',
required: true,
message: '请填写时间',
trigger: ['blur', 'change']
@ -327,7 +326,6 @@
],
mileage:[
{
type: 'string',
required: true,
message: '请填写公里数',
trigger: ['blur', 'change']
@ -335,23 +333,20 @@
],
price:[
{
type: 'string',
required: true,
message: '请填写价格',
trigger: ['blur', 'change']
trigger: ['blur']
}
],
inventory:[
{
type: 'string',
required: true,
message: '请填写库存',
trigger: ['blur', 'change']
trigger: ['blur']
}
],
contacts:[
{
type: 'string',
required: true,
message: '请填写联系人',
trigger: ['blur', 'change']
@ -359,7 +354,6 @@
],
phone:[
{
type: 'string',
required: true,
message: '请填写联系电话',
trigger: ['blur', 'change']
@ -367,10 +361,9 @@
],
views:[
{
type: 'string',
required: true,
message: '请填写浏览量',
trigger: ['blur', 'change']
trigger: ['blur']
}
],
fileCarList:[
@ -450,24 +443,79 @@
}
},
onLoad(options) {
let that = this
if(options.id){
that.id = options.id
that.getQueryGoodsById()
}else{
that.onQueryCategoryList()
}
// this.onQueryTypeList()
// this.onQueryCategoryOneList()
// this.onQueryCategoryTwoList()
this.onQueryCategoryList()
},
watch: {
// "form.categorytwoId": function (newVal, oldVal) {
// if (newVal) {
// this.$nextTick(() => {
// this.form.categorytwoName = this.categoryTwoList
// .filter((item) => item.id == newVal)
// .map((item) => item.name)
// .join('');
// });
// }
// }
},
methods: {
getQueryGoodsById(){
let that = this
queryGoodsById({goodsId:that.id}).then(response=>{
let items = response.result;
console.info("queryGoodsById",response)
that.form.cartypeId=items.cartypeId
that.form.categorytwoId=items.categorytwoId
that.form.categorytwoName=items.categorytwoName
that.form.goodsName=items.goodsName
that.form.brand=items.brand
that.form.model=items.model
that.form.area=items.area
that.form.latitude=items.latitude
that.form.date=String(items.goodsTime)
that.form.inventory=String(items.inventory)
that.form.mileage=String(items.mileage)
that.form.contacts=items.userName
that.form.phone=items.phone
that.form.price=String(items.price)
that.form.views=String(items.views)
that.form.introduce=items.detail
that.form.fileCarList=items.image.split(',').map((url) => ({ url }))
that.form.fileBackList=items.imageBack.split(',').map((url) => ({ url }))
that.form.fileCabList=items.imageCab.split(',').map((url) => ({ url }))
that.form.fileFrontList=items.imageFront.split(',').map((url) => ({ url }))
that.form.fileLeftList=items.imageLeft.split(',').map((url) => ({ url }))
that.form.fileRightList=items.imageRight.split(',').map((url) => ({ url }))
that.onQueryCategoryList()
// this.$refs.uForm.setRules(this.rules)
}).catch(error=>{
})
},
onQueryCategoryList(){
let that = this
queryCategoryList({}).then(response=>{
console.info("queryCategoryList",response)
if(response.result.length>0){
that.categoryList = response.result
that.form.cartypeId = response.result[0].id
that.form.cartypeName = response.result[0].name
that.categoryTwoList = response.result[0].carrentCategorytwoList
if(!that.id){
that.form.cartypeId = response.result[0].id
that.form.cartypeName = response.result[0].name
that.categoryTwoList = response.result[0].carrentCategorytwoList
}else{
that.categoryTwoList = response.result.find(item => item.id == that.form.cartypeId).carrentCategorytwoList
}
}
}).catch(error=>{
@ -530,12 +578,14 @@
},
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.form.date = e.value[0];
this.showDate = false
// 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;
@ -661,7 +711,7 @@
})
},
onSubmit() {
// console.info(this.form)
console.info(this.form)
// uni.navigateTo({
// url:"/pages_subpack/success/index"
// })
@ -676,9 +726,8 @@
onAddGoods(){
let that = this
let params={
id:that.id?that.id:null,
cartypeId:that.form.cartypeId,
// categorytwoId:"1867040891523936258",
// cartypeId:that.form.typeId,
categorytwoId:that.form.categorytwoId,
goodsName:that.form.goodsName,//
brand:that.form.brand,//
@ -686,7 +735,7 @@
area:that.form.area,//
latitude:that.form.latitude,
longitude:that.form.longitude,
goodsTime:that.form.date,//
goodsTime:Number(that.form.date),//
inventory:that.form.inventory,//
mileage:that.form.mileage,//
userName:that.form.contacts,//
@ -701,19 +750,30 @@
imageRight:that.form.fileRightList.map(item => item.url).join(','),//()
detail:that.form.introduce,//
}
uni.showLoading({
title:"提交中..."
})
addGoods(params).then(response=>{
console.info('response',response)
uni.showToast({
title: response.message,
mask: false,
icon: 'none',
duration: 2000
})
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
uni.hideLoading()
if(that.id){
uni.navigateBack({
delta:1
})
},1500)
}else{
uni.showToast({
title: response.message,
mask: false,
icon: 'none',
duration: 2000
})
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
})
},1500)
}
}).catch(error=>{
})


+ 53
- 6
pages_subpack/release/list.vue View File

@ -2,12 +2,15 @@
<view class="se-p-20 se-pb-200">
<view v-if="list.length>0">
<view class="se-grid-2 se-pt-10">
<view class="items-box se-br-5 se-px-10" v-for="(items,indexs) in list" :key="indexs" @click="onDetail(items)">
<image class="se-w-p-100 se-h-200 se-bgc-f5 se-br-5 se-py-5" :src="items.images[0]" mode=""></image>
<view class="se-c-black se-fs-24 se-fw-6 se-mt-10">
<view class="items-box se-br-5 se-px-10 se-pos" v-for="(items,indexs) in list" :key="indexs">
<text class="se-status se-bgc-gray" v-if="items.status==2">未通过</text>
<text class="se-status se-bgc-blue" v-if="items.status==1">已通过</text>
<text class="se-status se-bgc-red" v-if="items.status==0">审核中</text>
<image class="se-w-p-100 se-h-200 se-bgc-f5 se-br-5 se-py-5" :src="items.images[0]" mode="" @click="onDetail(items)"></image>
<view class="se-c-black se-fs-24 se-fw-6 se-mt-10" @click="onDetail(items)">
{{ items.goodsName }}
</view>
<view class="se-flex se-flex-ff-rw se-mt-10" v-if="items.cartypeId!='1867039853005877250'">
<view class="se-flex se-flex-ff-rw se-mt-10" v-if="items.categoryoneName!='环卫设备及配件'" @click="onDetail(items)">
<view class="se-tag">
{{items.brand}}
</view>
@ -18,11 +21,15 @@
{{items.mileage}}公里
</view>
</view>
<view class="se-flex se-flex-h-sb se-w-p-100 se-pt-20">
<view class="se-flex se-flex-h-sb se-w-p-100 se-pt-20" @click="onDetail(items)">
<view class="se-fs-24 se-display-ib">
<text class="se-c-orange se-fs-26 se-fw-6"><text class="se-fs-24"></text>{{items.price}}<text class="se-fs-24"></text><text class="se-fs-24" v-if="items.cartypeId=='1875536807086256130'">/</text></text>
</view>
</view>
<view class="se-flex se-flex-h-sb se-w-p-100 se-pt-20">
<text class="se-fs-22 se-c-white se-br-5 se-bgc-red se-px-10 se-py-5 se-br-5" @click="onDel(items)">删除</text>
<text class="se-fs-22 se-c-white se-br-5 se-bgc-blue se-px-10 se-py-5 se-br-5" @click="onEdit(items)">修改</text>
</view>
</view>
</view>
<u-empty v-if="list && list.length==0" mode="list"></u-empty>
@ -38,7 +45,7 @@
</view>
</template>
<script>
import { queryGoodsList } from "@/common/api.js"
import { queryGoodsList,deleteGoods } from "@/common/api.js"
export default{
data(){
return{
@ -118,6 +125,33 @@
})
},
onDel(event){
let that = this
uni.showModal({
title:"温馨提示",
content:"确定删除当前数据?",
cancelText:"取消",
confirmText:"确定",
success:(res)=> {
console.info(res)
if(res.confirm==true){
deleteGoods({goodsId:event.id}).then(response=>{
uni.$u.toast('删除成功')
that.pageNo = 1
that.list = []
that.onPageList()
}).catch(error=>{
})
}
}
})
},
onEdit(event){
uni.navigateTo({
url:"/pages_subpack/release/index?id="+event.id
})
}
}
}
</script>
@ -132,6 +166,19 @@
box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0,0,0,0.05);
padding: 20rpx;
}
.se-status{
padding: 5rpx 10rpx;
border-radius: 5rpx 0 0 0;
border: 2rpx solid rgba(0,0,0,0.00);
font-size: 18rpx;
font-family: PingFang SC, PingFang SC-Bold;
font-weight: 700;
text-align: center;
color: #ffffff;
position: absolute;
left: 0px;
top: 0px;
}
.se-tag{
padding: 5rpx 10rpx;
background: #fff2df;


+ 36
- 1
pages_subpack/spare/index.vue View File

@ -25,7 +25,7 @@
</view> -->
<view class="se-flex se-flex-h-sb se-w-p-100 se-pt-20">
<view class="se-fs-24 se-display-ib">
<text class="se-c-orange se-fs-26 se-fw-6"><text class="se-fs-24"></text>{{items.price}}<text class="se-fs-24"></text><text class="se-fs-24" v-if="items.cartypeId=='1875536807086256130'">/</text></text>
<text class="se-c-orange se-fs-26 se-fw-6"><text class="se-fs-24"></text>{{items.price | getPersonAuthentication}}<text class="se-fs-24"></text><text class="se-fs-24" v-if="items.cartypeId=='1875536807086256130'">/</text></text>
</view>
</view>
</view>
@ -53,6 +53,20 @@
this.id = options.id
this.onQueryCategoryTwoList()
},
filters:{
getPersonAuthentication(price){
let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus")
if(companyAuthenticationStatus==1){
return price
}
let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus")
if (personAuthenticationStatus != 1){
return '***';
}
return price
}
},
methods:{
onItems(indexs,items){
this.current=indexs
@ -76,6 +90,7 @@
onPageList(){
let that = this
let params={
status:1,
cartypeId:that.id,
categorytwoId:that.categorytwoId,
pageNo:that.pageNo,
@ -126,6 +141,26 @@
})
},
onDetail(event){
let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus")
if(companyAuthenticationStatus==1){
uni.navigateTo({
url:"/pages_subpack/detail/index?goodsId="+event.id
})
return;
}
let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus")
if (personAuthenticationStatus != 1){
return uni.showModal({
title:"未认证",
showCancel:false,
content:"立即前往认证",
success() {
uni.navigateTo({
url:"/pages/identity/index?userStatus=1"
})
}
})
}
uni.navigateTo({
url:"/pages_subpack/detail/index?goodsId="+event.id
})


Loading…
Cancel
Save