From 0fcd135b9f541d346fa15ef5cde2e2afc13ef9e3 Mon Sep 17 00:00:00 2001
From: Hong <1470048117@qq.com>
Date: Sat, 15 Jun 2024 19:11:50 +0800
Subject: [PATCH] =?UTF-8?q?6.15(=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/carShop/car/car.js | 9 +
api/showroom/showroom.js | 7 +
api/system/config.js | 20 +++
manifest.json | 4 +-
pages/carShop/mine/car_info_list/car_form.vue | 168 ++++++++++++++++--
.../mine/car_info_list/car_info_list.vue | 12 +-
pages/carShop/order/car_rental/car_submit.vue | 62 +++----
pages/carShop/order/car_sell/sell_submit.vue | 42 +++--
.../examine_contract/examine_contract.vue | 12 +-
pages/common/textview/index.vue | 26 ++-
pages/driver/mine/about_us/about_us.vue | 4 +-
pages/driver/mine/my_user/my_user.vue | 8 +-
pages/driver/showroom/carRental/index.vue | 8 +-
.../showroom/confirmOrder/confirmOrder.vue | 67 +++----
14 files changed, 336 insertions(+), 113 deletions(-)
diff --git a/api/carShop/car/car.js b/api/carShop/car/car.js
index 5409f44..43e6b90 100644
--- a/api/carShop/car/car.js
+++ b/api/carShop/car/car.js
@@ -16,6 +16,15 @@ export function allBrandModelList() {
})
}
+
+//获取购车方案列表 /api/front/car/buy/way/all/list
+export function allCarBuyWayList() {
+ return request({
+ 'url': '/api/front/car/buy/way/all/list',
+ 'method': 'get',
+ })
+}
+
//根据品牌,车型,动力获取车辆信息/api/front/car/getInfo
export function getCarInfo(params) {
return request({
diff --git a/api/showroom/showroom.js b/api/showroom/showroom.js
index 32be503..bd93807 100644
--- a/api/showroom/showroom.js
+++ b/api/showroom/showroom.js
@@ -10,6 +10,13 @@ export function getProductList(params) {
params
})
}
+//获取订车须知 api/front/agreement/car/buy/notice
+export function getCarBuyNotice(id) {
+ return request({
+ 'url': `/api/front/agreement/car/buy/notice `,
+ 'method': 'get',
+ })
+}
// 租车列表 /api/front/car/information/user/list
export function getInformationList(params) {
return request({
diff --git a/api/system/config.js b/api/system/config.js
index eb5b06d..6575adf 100644
--- a/api/system/config.js
+++ b/api/system/config.js
@@ -10,6 +10,16 @@ export function dutyCategory() {
})
}
+/**
+ * 获取购车方案详情
+ */
+export function getCarBuyWayInfo(id) {
+ return request({
+ 'url': `/api/front/car/buy/way/info/${id}`,
+ 'method': 'get'
+ })
+}
+
/**
* 获取邀请规则
*/
@@ -40,6 +50,16 @@ export function getRentalRule() {
})
}
+/**
+ * 获取租车用户协议 /api/front/agreement/user/rental/rule
+ */
+export function getAgreementApplication() {
+ return request({
+ 'url': '/api/front/agreement/application',
+ 'method': 'get'
+ })
+}
+
/**
* 获取用户协议
*/
diff --git a/manifest.json b/manifest.json
index fc2980e..d3c6910 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "滴友之家",
"appid" : "__UNI__F2BE74F",
"description" : "",
- "versionName" : "1.3.9",
- "versionCode" : 139,
+ "versionName" : "1.4.0",
+ "versionCode" : 140,
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
diff --git a/pages/carShop/mine/car_info_list/car_form.vue b/pages/carShop/mine/car_info_list/car_form.vue
index bac8ea3..52c902f 100644
--- a/pages/carShop/mine/car_info_list/car_form.vue
+++ b/pages/carShop/mine/car_info_list/car_form.vue
@@ -8,7 +8,8 @@
-
+
商品
助力
@@ -40,6 +41,18 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -51,10 +64,16 @@
全款
- 租卖灵活
+ 租买灵活
+
+
+
+
全款
@@ -121,7 +140,7 @@
-
@@ -178,6 +197,21 @@
+
+
+
+
提交
@@ -199,7 +233,8 @@
addInformationCreate,
getInformationInfo,
getTagAllList,
- addInformationEdit
+ addInformationEdit,
+ allCarBuyWayList
} from "@/api/carShop/car/car.js"
import {
autoAgeList
@@ -207,6 +242,12 @@
export default {
data() {
return {
+ //购车方案
+ carBuyWayShow: false,
+ //购车方案列表
+ carBuyList: [],
+ //轮播图
+ imageList: [],
//租期
leaseTermShow: false,
monthRentName: '',
@@ -257,12 +298,38 @@
},
// 汽车信息
carInfo: {
- type: '1'
+ type: '1',
+ carBuyWayName:''
}
};
},
watch: {},
methods: {
+ //去查看购车方案
+ navBuyWayFn(item){
+ uni.navigateTo({
+ url:`/pages/common/textview/index?title=购车方案&carBuyWayId=${item.id}`
+ })
+ },
+ //选择购车方案
+ actBuyWayFn(item){
+ this.carInfo.carBuyWayName = item.name
+ this.carInfo.carBuyWayId = item.id
+ this.carBuyWayShow = false
+ },
+ //购车方案
+ carBuyWayClose(e) {
+ console.log(e);
+ this.carBuyWayShow = false
+ },
+ //购车方案打开
+ carBuyWayOpen(e) {
+ console.log(e);
+ allCarBuyWayList().then(res => {
+ console.log(res);
+ this.carBuyList = res.data.list
+ })
+ },
//点击完成
confirmFn(e) {
e.preventDefault();
@@ -289,7 +356,8 @@
rentalPrice: this.model1.userInfo.rentalPrice,
tagId: arr.join(','),
event: this.model1.userInfo.event,
- depositMoney: this.model1.userInfo.depositMoney
+ depositMoney: this.model1.userInfo.depositMoney,
+ productImage: this.imageList.join(',')
}).then(res => {
uni.redirectTo({
url: `/pages/carShop/mine/car_info_list/particulars?type=2`
@@ -299,7 +367,8 @@
let obj = {
id: this.carInfo.id,
stock: this.carInfo.stock,
- depositPrice: this.carInfo.depositPrice
+ depositPrice: this.carInfo.depositPrice,
+ carBuyWayId: this.carInfo.carBuyWayId
}
console.log(obj);
addcarEdit(obj).then(res => {
@@ -327,7 +396,8 @@
tagId: arr.join(','),
carAge: this.carData.carAge,
event: this.model1.userInfo.event,
- depositMoney: this.model1.userInfo.depositMoney
+ depositMoney: this.model1.userInfo.depositMoney,
+ productImage: this.imageList.join(',')
}
addInformationCreate(obj).then(res => {
uni.redirectTo({
@@ -339,7 +409,8 @@
carSellerProductId: this.carInfo.id,
stock: this.carInfo.stock,
type: this.carInfo.type == 1 ? 0 : 1,
- depositPrice: this.carInfo.depositPrice
+ depositPrice: this.carInfo.depositPrice,
+ carBuyWayId:this.carInfo.carBuyWayId
}
console.log(obj);
addcarPulish(obj).then(res => {
@@ -379,13 +450,13 @@
},
//监听是否选择品牌,车型,动力
carDataWatchFn() {
- let isFieldsEmpty1 = this.carData.brandId !== '' && this.carData.modelId !== ''
+ let isFieldsEmpty1 = this.carData.brandId !== '' && this.carData.modelId !== ''
let isFieldsEmpty2 = this.carData.powerType !== '' && this.carData.isHelp !== ''
- console.log(isFieldsEmpty1,isFieldsEmpty2);
- if (isFieldsEmpty1&&isFieldsEmpty2) {
+ console.log(isFieldsEmpty1, isFieldsEmpty2);
+ if (isFieldsEmpty1 && isFieldsEmpty2) {
if (this.type == 1) {
informationCarInfo(this.carData).then(res => {
- console.log('租车模版',res.data);
+ console.log('租车模版', res.data);
if (res.data) {
this.carInfo = res.data
} else {
@@ -457,7 +528,24 @@
})
//获取标签列表
this.getTagAllListFn()
- }
+ },
+ //传图片
+ uploadImage() {
+ this.$util.uploadImageOne({
+ count: 9,
+ sizeType: ['compressed'],
+ sourceType: ['album', 'camera'],
+ dir: 'crmebimage/public/product/'
+ }, null, res => {
+ console.log(res);
+ this.imageList.push(res.data)
+ uni.hideLoading();
+ });
+ },
+ /**删除图片*/
+ DelPic(index) {
+ this.imageList.splice(index, 1)
+ },
},
onReady() {
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
@@ -472,6 +560,8 @@
if (this.type == 1) {
getInformationInfo(options.id).then(res => {
console.log(res.data);
+ this.imageList=res.data.productImage.split(',')
+ this.endLabelList=res.data.tags
this.model1.userInfo = res.data
this.model1.userInfo.powerName = res.data.powerType == 0 ? '纯电' : res.data
.powerType == 1 ? '油电' : '油'
@@ -493,6 +583,7 @@
this.carInfo.type = String(res.data.type == 1 ? 2 : 1)
this.carInfo.stock = res.data.stock
this.carInfo.id = res.data.id
+ this.carInfo.carBuyWayName=res.data.carBuyWayName
})
}
@@ -508,6 +599,53 @@
background: #f5f5f5;
}
+ .popup-buy-way {
+ height: 1000rpx;
+ padding: 32rpx 0;
+ .popup-buy-way-title {
+ margin-left: 32rpx;
+ }
+
+ .popup-buy-way-list {
+ height: 800rpx;
+
+ .buy-way-list {
+ width: 750rpx;
+ padding: 32rpx 24rpx;
+ border-bottom: 1rpx solid rgba(0, 0, 0, 0.09);
+ }
+ }
+ }
+
+ .form-item {
+ // border: 1px solid red;
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+
+ .upload-bg {
+ width: 112rpx;
+ height: 112rpx;
+ border-radius: 8rpx;
+ }
+
+ .image-box {
+ position: relative;
+ margin-right: 24rpx;
+ margin-bottom: 24rpx;
+ width: 112rpx;
+ height: 112rpx;
+ }
+
+ .reduce {
+ position: absolute;
+ top: -20rpx;
+ right: -20rpx;
+ width: 40rpx;
+ height: 40rpx;
+ }
+ }
+
.car-box {
padding-bottom: 160rpx;
}
@@ -543,7 +681,7 @@
.uoload-image {
width: 100%;
text-align: flex-end;
-
+
image {
width: 112rpx;
height: 112rpx;
diff --git a/pages/carShop/mine/car_info_list/car_info_list.vue b/pages/carShop/mine/car_info_list/car_info_list.vue
index 5d6ac5d..ecdf60a 100644
--- a/pages/carShop/mine/car_info_list/car_info_list.vue
+++ b/pages/carShop/mine/car_info_list/car_info_list.vue
@@ -43,7 +43,7 @@
¥{{item.rentalPrice}} /月
- {{item.carSellerProduct?item.carSellerProduct.title:'-'}}
+ {{item.carSellerProduct?item.carSellerProduct.title:'-'}}
全款价格: {{item.carSellerProduct?item.carSellerProduct.minGuidePrice:'0'}}元
@@ -236,12 +236,12 @@
this.isShow = this.carRentalValue ? true : false
obj.isShow = this.isShow
getAttrList(obj).then(res => {
+ console.log(res.data);
this.$refs.paging.complete(res.data.list);
})
} else {
obj.activityType = this.carRentalValue
getInformationList(obj).then(res => {
- console.log(res.data);
this.$refs.paging.complete(res.data.list);
})
}
@@ -254,7 +254,13 @@
page {
background: #f5f5f5;
}
-
+ .title-one{
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 1; /* 控制显示的行数 */
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
.car-info-search {
position: relative;
height: 104rpx;
diff --git a/pages/carShop/order/car_rental/car_submit.vue b/pages/carShop/order/car_rental/car_submit.vue
index 165ff21..7e8ea4c 100644
--- a/pages/carShop/order/car_rental/car_submit.vue
+++ b/pages/carShop/order/car_rental/car_submit.vue
@@ -74,17 +74,14 @@
-
-
-
-
-
+
+
+
+
+
@@ -121,7 +118,9 @@
carNo: "",
unbindTime: ''
},
- carInfo: {}
+ carInfo: {},
+ //合同列表
+ imageList: [],
}
},
computed: {},
@@ -156,15 +155,15 @@
methods: {
// 提交
submit() {
- let obj={
- id:this.formData.id,
- contractUrl:this.formData.contractUrl,
- carNo:this.formData.carNo,
- vinId:this.formData.vinId
+ let obj = {
+ id: this.formData.id,
+ contractUrl: this.imageList.join(','),
+ carNo: this.formData.carNo,
+ vinId: this.formData.vinId
}
- getProductOrderCar(obj).then(res=>{
+ getProductOrderCar(obj).then(res => {
uni.redirectTo({
- url:`/pages/carShop/order/car_rental/rental_particulars?id=${this.formData.id}`
+ url: `/pages/carShop/order/car_rental/rental_particulars?id=${this.formData.id}`
})
})
},
@@ -264,10 +263,10 @@
},
// 上传
- upload(name, key, type) {
+ upload(name) {
if (name === 'image') {
this.formData.type = 1
- this.getImage(key);
+ this.getImage();
} else if (name == 'all') {
} else {
@@ -276,7 +275,7 @@
}
},
//传图片
- getImage(key) {
+ getImage() {
this.$util.uploadImageOne({
count: 9,
sizeType: ['compressed'],
@@ -284,7 +283,7 @@
dir: 'crmebimage/public/product/'
}, null, res => {
console.log(res);
- this.formData[key] = res.data
+ this.imageList.push(res.data)
this.videoOrImage = false
uni.hideLoading();
});
@@ -318,8 +317,8 @@
});
},
/**删除图片*/
- DelPic(key) {
- this.formData[key] = ''
+ DelPic(index) {
+ this.imageList.splice(index,1)
},
},
}
@@ -340,8 +339,13 @@
// border: 1px solid red;
width: 100%;
display: flex;
- justify-content: flex-end;
- align-items: center;
+ flex-wrap: wrap;
+
+ .upload-bg {
+ width: 112rpx;
+ height: 112rpx;
+ border-radius: 8rpx;
+ }
}
.image-box {
@@ -351,11 +355,7 @@
width: 112rpx;
height: 112rpx;
- .upload-bg {
- width: 112rpx;
- height: 112rpx;
- border-radius: 8rpx;
- }
+
.reduce {
position: absolute;
diff --git a/pages/carShop/order/car_sell/sell_submit.vue b/pages/carShop/order/car_sell/sell_submit.vue
index 69a7ec0..406087c 100644
--- a/pages/carShop/order/car_sell/sell_submit.vue
+++ b/pages/carShop/order/car_sell/sell_submit.vue
@@ -50,17 +50,15 @@
-
-
-
-
+
+
+
+
-
+
+
@@ -78,7 +76,9 @@
export default {
data() {
return {
- formData: {}
+ formData: {},
+ //合同列表
+ imageList:[]
}
},
computed: {
@@ -88,7 +88,7 @@
//提交
submit(){
let obj={
- contractUrl:this.formData.contractUrl,
+ contractUrl:this.imageList.join(','),
orderNo:this.formData.orderNo,
vinId:this.formData.vinId
}
@@ -106,19 +106,19 @@
//传图片
getImage(key) {
this.$util.uploadImageOne({
- count: 1,
+ count: 9,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
dir: 'crmebimage/public/product/'
}, null, res => {
- this.formData[key] = res.data
+ this.imageList.push(res.data)
this.videoOrImage = false
uni.hideLoading();
});
},
/**删除图片*/
- DelPic(key) {
- this.formData[key] = ''
+ DelPic(index) {
+ this.imageList.splice(index,1)
},
},
onLoad(options) {
@@ -141,11 +141,15 @@
}
.form-item {
- // border: 1px solid red;
width: 100%;
display: flex;
- justify-content: flex-end;
- align-items: center;
+ flex-wrap: wrap;
+
+ .upload-bg {
+ width: 112rpx;
+ height: 112rpx;
+ border-radius: 8rpx;
+ }
}
.image-box {
diff --git a/pages/carShop/order/examine_contract/examine_contract.vue b/pages/carShop/order/examine_contract/examine_contract.vue
index f1130e7..d384b10 100644
--- a/pages/carShop/order/examine_contract/examine_contract.vue
+++ b/pages/carShop/order/examine_contract/examine_contract.vue
@@ -1,6 +1,6 @@
-
+
暂无合同
@@ -16,21 +16,27 @@
export default {
data() {
return {
- formData: {}
+ formData: {},
+ //合同列表
+ imgaeList:[]
};
},
onLoad(options) {
- //type 1:用户租车订单 2:车商买车订单
+ console.log('optionsoptionsoptionsoptionsoptions',options);
+ //type 1:用户租车订单 2:买车订单 3:车商租车订单
if (options.type == 1) {
getInformationOrderDealer(options.id).then(res => {
+ this.imgaeList=res.data.contractUrl.split(',')
this.formData = res.data
})
} else if (options.type == 2) {
getProductOrderDetail(options.id).then(res => {
+ this.imgaeList=res.data.contractUrl.split(',')
this.formData = res.data
})
} else {
getProductOrderInfo(options.id).then(res => {
+ this.imgaeList=res.data.contractUrl.split(',')
this.formData = res.data
})
}
diff --git a/pages/common/textview/index.vue b/pages/common/textview/index.vue
index 9eacd3b..502e26f 100644
--- a/pages/common/textview/index.vue
+++ b/pages/common/textview/index.vue
@@ -12,7 +12,9 @@
getInviteRule,
getAboutusinfo,
getClockRule,
- getRentalRule
+ getRentalRule,
+ getCarBuyWayInfo,
+ getAgreementApplication
} from '@/api/system/config.js'
import {
articleInfo
@@ -33,16 +35,34 @@
if (options.title == '隐私政策') this.getPrivacyPolicy()
//天天打卡
if (options.title == '规则详情') this.getClockRuleFn()
- if (options.title == '租车协议') this.getRentalRuleFn()
+ if (options.title == '租卖协议') this.getRentalRuleFn()
+ if (options.title == '应用介绍') this.getAgreementApplicationFn()
+ if (options.title == '购车方案') {
+ this.getCarBuyWayInfoFn(options.carBuyWayId)
+ }
if (options.id) {
articleInfo(options.id).then(res => {
- console.log(res);
this.title = res.data.title
this.content = res.data.content
})
}
},
methods: {
+ //获取应用介绍
+ getAgreementApplicationFn(){
+ getAgreementApplication().then(res => {
+ console.log(res);
+ this.content = JSON.parse(res.data).agreement
+ })
+ },
+ //获取购车方案详情
+ getCarBuyWayInfoFn(id){
+ getCarBuyWayInfo(id).then(res=>{
+ console.log(res);
+ this.title= res.data.name
+ this.content = res.data.content
+ })
+ },
//获取租车协议
getRentalRuleFn(){
getRentalRule().then(res => {
diff --git a/pages/driver/mine/about_us/about_us.vue b/pages/driver/mine/about_us/about_us.vue
index b0399e9..f3f7c34 100644
--- a/pages/driver/mine/about_us/about_us.vue
+++ b/pages/driver/mine/about_us/about_us.vue
@@ -1,10 +1,10 @@
-
+
-
+
应用介绍
diff --git a/pages/driver/mine/my_user/my_user.vue b/pages/driver/mine/my_user/my_user.vue
index bd390d0..266082f 100644
--- a/pages/driver/mine/my_user/my_user.vue
+++ b/pages/driver/mine/my_user/my_user.vue
@@ -169,15 +169,19 @@
},
//传图片
getImage(type) {
+ this.type=type
this.$util.uploadImageOne({
count: 1,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
dir: 'crmebimage/public/product/'
}, null, res => {
+ console.log(this.type);
if (this.type == 'avatar') {
+ console.log('更换头像');
this.userInfo.avatar = res.data
} else {
+ console.log('更换背景');
this.userInfo.backGround = res.data
}
this.updataUser()
@@ -250,10 +254,10 @@
this.$toast({
title: '修改成功'
})
- this.getUserInfo()
+ // this.getUserInfo()
this.$store.dispatch('GetInfo')
}).catch(err => {
- // console.log('修改失败', err);
+ console.log('修改失败', err);
}).finally(() => {
this.close()
uni.hideLoading()
diff --git a/pages/driver/showroom/carRental/index.vue b/pages/driver/showroom/carRental/index.vue
index e3d4adb..593d2a3 100644
--- a/pages/driver/showroom/carRental/index.vue
+++ b/pages/driver/showroom/carRental/index.vue
@@ -409,9 +409,7 @@
if(res.data.sliderImage){
this.branner = res.data.sliderImage.split(',')
}
- if(res.data.subplotImage){
- this.brannerTwo=res.data.subplotImage.split(',')
- }
+
})
},
//确认订单 pages/driver/showroom/confirmOrder/confirmOrder
@@ -441,6 +439,10 @@
if (res.data.replyResponse.pics) {
this.carDealerData.replyResponse.pics = this.carDealerData.replyResponse.pics.split(',')
}
+ //弹出层轮播图
+ if(res.data.productImage){
+ this.brannerTwo=res.data.productImage.split(',')
+ }
})
},
//拨打电话
diff --git a/pages/driver/showroom/confirmOrder/confirmOrder.vue b/pages/driver/showroom/confirmOrder/confirmOrder.vue
index 4fb62f3..fbd8e51 100644
--- a/pages/driver/showroom/confirmOrder/confirmOrder.vue
+++ b/pages/driver/showroom/confirmOrder/confirmOrder.vue
@@ -116,31 +116,6 @@
-
- 购车方案
-
-
-
- 购车方案
-
-
- 租买灵活方案
-
-
-
-
-
- 全款
-
-
- 金融
-
-
- 租买灵活
-
-
购买信息
@@ -167,6 +142,31 @@
+
+ 购车方案
+
+
+
+ 购车方案
+
+
+ 租买灵活方案
+
+
+
+
+
+ 全款
+
+
+ 金融
+
+
+ 租买灵活
+
+
车主(车辆所有人)信息
@@ -251,7 +251,7 @@
定车须知
- 这里是订车须知详情内容,后台可编辑这里是订车须知详情内容,后台可编辑
+ {{carBuyNoticeTitle}}
@@ -263,7 +263,7 @@
请仔细阅读并勾选租车《用户协议》
+ class="text-agree color-primary">《租卖协议》
{
+ this.carBuyNoticeTitle=res.data
+ console.log('订车须知',res.data);
+ })
},
}