This commit is contained in:
cun-nan 2024-09-25 16:17:44 +08:00
parent 563bb48cea
commit cfb12b40e0
5 changed files with 36 additions and 21 deletions

View File

@ -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; /* 文字颜色 */
}

View File

@ -89,6 +89,7 @@ public class MtUserExpressAddressController extends BaseController {
/**
* 查询默认快递地址
*/
@GetMapping("getDefault")
public ResponseObject getDefault() {
return getSuccessResult(this.mtUserExpressAddressService.getDefault());
}

View File

@ -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<MtUserExpressAddress> {
/**
* 通过ID查询单条数据

View File

@ -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<MtUserExpressAddressMapper,MtUserExpressAddress> 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

View File

@ -13,16 +13,16 @@
<view class="gang" v-if="qhindex == index"></view>
</view>
</scroll-view> -->
<view class="box-bai" v-if="qhindex == 0" @click="goAddress()">
<view class="box-bai" v-if="qhindex == 0" @click="goAdd()">
<view class="dis">
<view class="boximg">
<image src="../../static/imgs/telicon.png"
style="width: 30px; height: 30px;margin-right: 10px; "></image>
</view>
<view style="display: flex;align-items: center;">
<view class="">收货人姓名</view>
<view class="">{{addrInfo.name || '--'}}</view>
<view class="hui-time">
13583028521
{{addrInfo.mobile || '--'}}
</view>
</view>
@ -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 {