From cfb12b40e0164cc28bc66d25c80c56da497ce121 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Wed, 25 Sep 2024 16:17:44 +0800 Subject: [PATCH] 9.25 --- fuintAdmin/src/assets/styles/element-ui.scss | 11 +++++++ .../MtUserExpressAddressController.java | 1 + .../mapper/MtUserExpressAddressMapper.java | 3 +- .../impl/MtUserExpressAddressServiceImpl.java | 10 ++++-- gasStation-uni/pagesHome/order/order.vue | 32 +++++++++---------- 5 files changed, 36 insertions(+), 21 deletions(-) diff --git a/fuintAdmin/src/assets/styles/element-ui.scss b/fuintAdmin/src/assets/styles/element-ui.scss index 7a437847a..1f30b7fb7 100644 --- a/fuintAdmin/src/assets/styles/element-ui.scss +++ b/fuintAdmin/src/assets/styles/element-ui.scss @@ -124,3 +124,14 @@ .el-pagination.is-background .el-pager li:hover{ color: #FF9655 !important;/*hover时候的文字颜色*/ } + +/* 修改选中状态的背景色 */ +.el-radio .el-radio__input.is-checked .el-radio__inner { + background-color: #FF9655; /* 你想要的任何颜色 */ + border-color: #FF9655; +} + +/* 修改选中状态的文字颜色 */ +.el-radio .el-radio__input.is-checked+ .el-radio__label { + color: #FF9655 !important; /* 文字颜色 */ +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/MtUserExpressAddressController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/MtUserExpressAddressController.java index 339ac6fec..d3b3bcf83 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/MtUserExpressAddressController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/MtUserExpressAddressController.java @@ -89,6 +89,7 @@ public class MtUserExpressAddressController extends BaseController { /** * 查询默认快递地址 */ + @GetMapping("getDefault") public ResponseObject getDefault() { return getSuccessResult(this.mtUserExpressAddressService.getDefault()); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/MtUserExpressAddressMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/MtUserExpressAddressMapper.java index 8812c70a8..02bb415d8 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/MtUserExpressAddressMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/MtUserExpressAddressMapper.java @@ -1,5 +1,6 @@ package com.fuint.business.userManager.mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.business.userManager.entity.MtUserExpressAddress; @@ -14,7 +15,7 @@ import java.util.List; * @author makejava * @since 2023-11-09 09:31:12 */ -public interface MtUserExpressAddressMapper { +public interface MtUserExpressAddressMapper extends BaseMapper { /** * 通过ID查询单条数据 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/MtUserExpressAddressServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/MtUserExpressAddressServiceImpl.java index 216c269a4..565354ea4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/MtUserExpressAddressServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/MtUserExpressAddressServiceImpl.java @@ -1,8 +1,10 @@ package com.fuint.business.userManager.service.impl; import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.fuint.business.userManager.entity.MtUserExpressAddress; import com.fuint.business.userManager.mapper.MtUserExpressAddressMapper; import com.fuint.business.userManager.service.MtUserExpressAddressService; @@ -21,7 +23,7 @@ import java.util.List; * @since 2023-11-09 09:31:33 */ @Service("mtUserExpressAddressService") -public class MtUserExpressAddressServiceImpl implements MtUserExpressAddressService { +public class MtUserExpressAddressServiceImpl extends ServiceImpl implements MtUserExpressAddressService { @Resource private MtUserExpressAddressMapper mtUserExpressAddressMapper; @@ -101,8 +103,10 @@ public class MtUserExpressAddressServiceImpl implements MtUserExpressAddressServ @Override public MtUserExpressAddress getDefault() { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); - - return null; + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("user_id", nowAccountInfo.getId()); + queryWrapper.eq("if_default", "1"); + return baseMapper.selectOne(queryWrapper); } @Override diff --git a/gasStation-uni/pagesHome/order/order.vue b/gasStation-uni/pagesHome/order/order.vue index 428c69148..6c7244c9d 100644 --- a/gasStation-uni/pagesHome/order/order.vue +++ b/gasStation-uni/pagesHome/order/order.vue @@ -13,16 +13,16 @@ --> - + - 收货人姓名 + {{addrInfo.name || '--'}} - 13583028521 + {{addrInfo.mobile || '--'}} @@ -145,7 +145,7 @@ { text: '快递配送' } - ] + ], } }, @@ -174,27 +174,24 @@ uni.$emit('unChooseAddr') // 当地址信息为空是查询地址 - if (!this.addrInfo.address) { - this.getAddr() + if (!this.addrInfo) { + // 查询默认预留信息 + this.getAddress() } - + console.log(this.addrInfo,181); this.transferIndex(0) // 根据storeId查询店铺信息 this.getInfoByStoreId() // 查询剩余积分 this.getUserInfoList() - - }, - - - - methods: { - - goAddress(){ - uni.navigateTo({ - url:'/pagesHome/Address/Address' + getAddress() { + request({ + url: "/business/userManager/mtUserExpressAddress/getDefault", + method: 'get', + }).then((res) => { + this.addrInfo = res.data }) }, // 创建订单并 付款 @@ -722,6 +719,7 @@ .hui-time { font-size: 14px; color: #666666; + margin-left: 10px; } .dis-box {