Merge branch 'feature/mall_product_new'
commit
cbed37d4f0
|
@ -60,4 +60,10 @@ public class OrderInfoResponse implements Serializable {
|
||||||
|
|
||||||
@Schema(description = "规格属性值")
|
@Schema(description = "规格属性值")
|
||||||
private String sku;
|
private String sku;
|
||||||
|
|
||||||
|
@Schema(description = "购买东西的详细信息")
|
||||||
|
private String info;
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class StoreOrderDetailInfoResponse implements Serializable {
|
||||||
private BigDecimal deductionPrice;
|
private BigDecimal deductionPrice;
|
||||||
|
|
||||||
@Schema(description = "优惠券id")
|
@Schema(description = "优惠券id")
|
||||||
private Integer couponId;
|
private Long couponId;
|
||||||
|
|
||||||
@Schema(description = "优惠券金额")
|
@Schema(description = "优惠券金额")
|
||||||
private BigDecimal couponPrice;
|
private BigDecimal couponPrice;
|
||||||
|
|
|
@ -63,6 +63,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.support.TransactionTemplate;
|
import org.springframework.transaction.support.TransactionTemplate;
|
||||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -72,15 +73,15 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* H5端订单操作
|
* H5端订单操作
|
||||||
* +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||||
* +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
||||||
* +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||||
* +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
* | Author: CRMEB Team <admin@crmeb.com>
|
* | Author: CRMEB Team <admin@crmeb.com>
|
||||||
* +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class OrderServiceImpl implements OrderService {
|
public class OrderServiceImpl implements OrderService {
|
||||||
|
@ -140,6 +141,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StoreProductAttrValueService storeProductAttrValueService;
|
private StoreProductAttrValueService storeProductAttrValueService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单列表
|
* 订单列表
|
||||||
*
|
*
|
||||||
|
@ -151,12 +153,27 @@ public class OrderServiceImpl implements OrderService {
|
||||||
public PageInfo<OrderDetailResponse> list(Integer type, PageParam pageRequest) {
|
public PageInfo<OrderDetailResponse> list(Integer type, PageParam pageRequest) {
|
||||||
PageHelper.startPage(pageRequest.getPageNo(), pageRequest.getPageSize());
|
PageHelper.startPage(pageRequest.getPageNo(), pageRequest.getPageSize());
|
||||||
LambdaQueryWrapper<StoreOrder> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<StoreOrder> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
if(null != type){
|
if (null != type) {
|
||||||
lambdaQueryWrapper.eq(StoreOrder::getType, type);
|
lambdaQueryWrapper.eq(StoreOrder::getType, type);
|
||||||
}
|
}
|
||||||
lambdaQueryWrapper.orderByDesc(StoreOrder::getId);
|
lambdaQueryWrapper.orderByDesc(StoreOrder::getId);
|
||||||
List<StoreOrder> storeOrders = dao.selectList(lambdaQueryWrapper);
|
List<StoreOrder> storeOrders = dao.selectList(lambdaQueryWrapper);
|
||||||
return new PageInfo<>(StoreOrderConvert.INSTANCE.convert(storeOrders));
|
PageInfo<OrderDetailResponse> orderDetailResponsePageInfo = new PageInfo<>(StoreOrderConvert.INSTANCE.convert(storeOrders));
|
||||||
|
if (!CollectionUtils.isEmpty(orderDetailResponsePageInfo.getList())) {
|
||||||
|
orderDetailResponsePageInfo.getList().forEach(e -> {
|
||||||
|
List<StoreOrderInfo> list = storeOrderInfoService.list(Wrappers.<StoreOrderInfo>lambdaQuery().eq(StoreOrderInfo::getOrderId, e.getId()));
|
||||||
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
List<OrderInfoResponse> orderInfoList = new ArrayList<>();
|
||||||
|
list.forEach(x -> {
|
||||||
|
OrderInfoResponse response = new OrderInfoResponse();
|
||||||
|
BeanUtils.copyProperties(x, response);
|
||||||
|
orderInfoList.add(response);
|
||||||
|
});
|
||||||
|
e.setOrderInfoList(orderInfoList);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return orderDetailResponsePageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -167,13 +184,26 @@ public class OrderServiceImpl implements OrderService {
|
||||||
@Override
|
@Override
|
||||||
public StoreOrderDetailInfoResponse detailOrder(String orderId) {
|
public StoreOrderDetailInfoResponse detailOrder(String orderId) {
|
||||||
StoreOrder storeOrder = storeOrderService.getByOderId(orderId);
|
StoreOrder storeOrder = storeOrderService.getByOderId(orderId);
|
||||||
return StoreOrderOneConvert.INSTANCE.convert(storeOrder);
|
List<StoreOrderInfo> list = storeOrderInfoService.list(Wrappers.<StoreOrderInfo>lambdaQuery().eq(StoreOrderInfo::getOrderId, storeOrder.getId()));
|
||||||
|
StoreOrderDetailInfoResponse convert = StoreOrderOneConvert.INSTANCE.convert(storeOrder);
|
||||||
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
List<OrderInfoResponse> orderInfoList = new ArrayList<>();
|
||||||
|
list.forEach(e -> {
|
||||||
|
OrderInfoResponse response = new OrderInfoResponse();
|
||||||
|
BeanUtils.copyProperties(e, response);
|
||||||
|
orderInfoList.add(response);
|
||||||
|
});
|
||||||
|
convert.setOrderInfoList(orderInfoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
return convert;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取订单总数
|
* 获取订单总数
|
||||||
|
*
|
||||||
* @param dateLimit 时间端
|
* @param dateLimit 时间端
|
||||||
* @param status String 状态
|
* @param status String 状态
|
||||||
* @return Integer
|
* @return Integer
|
||||||
*/
|
*/
|
||||||
private Long getCount(String dateLimit, String status, Integer type) {
|
private Long getCount(String dateLimit, String status, Integer type) {
|
||||||
|
@ -192,8 +222,9 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取订单金额
|
* 获取订单金额
|
||||||
|
*
|
||||||
* @param dateLimit 时间端
|
* @param dateLimit 时间端
|
||||||
* @param type 支付类型
|
* @param type 支付类型
|
||||||
* @return BigDecimal
|
* @return BigDecimal
|
||||||
*/
|
*/
|
||||||
private BigDecimal getAmount(String dateLimit, String type) {
|
private BigDecimal getAmount(String dateLimit, String type) {
|
||||||
|
@ -217,8 +248,9 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据订单状态获取where条件
|
* 根据订单状态获取where条件
|
||||||
|
*
|
||||||
* @param queryWrapper QueryWrapper<StoreOrder> 表达式
|
* @param queryWrapper QueryWrapper<StoreOrder> 表达式
|
||||||
* @param status String 类型
|
* @param status String 类型
|
||||||
*/
|
*/
|
||||||
private void getStatusWhereNew(QueryWrapper<StoreOrder> queryWrapper, String status) {
|
private void getStatusWhereNew(QueryWrapper<StoreOrder> queryWrapper, String status) {
|
||||||
if (StrUtil.isBlank(status)) {
|
if (StrUtil.isBlank(status)) {
|
||||||
|
@ -266,7 +298,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
break;
|
break;
|
||||||
case Constants.ORDER_STATUS_REFUNDING: //退款中
|
case Constants.ORDER_STATUS_REFUNDING: //退款中
|
||||||
queryWrapper.eq("paid", 1);
|
queryWrapper.eq("paid", 1);
|
||||||
queryWrapper.in("refund_status", 1,3);
|
queryWrapper.in("refund_status", 1, 3);
|
||||||
queryWrapper.eq("is_del", 0);
|
queryWrapper.eq("is_del", 0);
|
||||||
break;
|
break;
|
||||||
case Constants.ORDER_STATUS_REFUNDED: //已退款
|
case Constants.ORDER_STATUS_REFUNDED: //已退款
|
||||||
|
@ -291,7 +323,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
* @return 订单状态数据量
|
* @return 订单状态数据量
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OrderDataResponse orderData(String dateLimit, Integer type,String payType) {
|
public OrderDataResponse orderData(String dateLimit, Integer type, String payType) {
|
||||||
OrderDataResponse response = new OrderDataResponse();
|
OrderDataResponse response = new OrderDataResponse();
|
||||||
if (type.equals(2)) {
|
if (type.equals(2)) {
|
||||||
type = null;
|
type = null;
|
||||||
|
@ -307,7 +339,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
// 退款订单数量
|
// 退款订单数量
|
||||||
response.setRefundCount(getCount(dateLimit, Constants.ORDER_STATUS_REFUNDED, type));
|
response.setRefundCount(getCount(dateLimit, Constants.ORDER_STATUS_REFUNDED, type));
|
||||||
// 总消费钱数
|
// 总消费钱数
|
||||||
response.setSumPrice(getAmount(dateLimit,payType));
|
response.setSumPrice(getAmount(dateLimit, payType));
|
||||||
// 未支付订单数量
|
// 未支付订单数量
|
||||||
response.setUnPaidCount(getCount(dateLimit, Constants.ORDER_STATUS_UNPAID, type));
|
response.setUnPaidCount(getCount(dateLimit, Constants.ORDER_STATUS_UNPAID, type));
|
||||||
// 待发货订单数量
|
// 待发货订单数量
|
||||||
|
@ -330,7 +362,8 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询单条订单
|
* 查询单条订单
|
||||||
*@param orderNo 订单编号
|
*
|
||||||
|
* @param orderNo 订单编号
|
||||||
* @return 退款理由集合
|
* @return 退款理由集合
|
||||||
*/
|
*/
|
||||||
private StoreOrder getInfoException(Integer orderNo) {
|
private StoreOrder getInfoException(Integer orderNo) {
|
||||||
|
@ -342,6 +375,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
}
|
}
|
||||||
return storeOrder;
|
return storeOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单删除
|
* 订单删除
|
||||||
*
|
*
|
||||||
|
@ -517,7 +551,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object expressOrder(String orderId) {
|
public Object expressOrder(String orderId) {
|
||||||
HashMap<String,Object> resultMap = new HashMap<>();
|
HashMap<String, Object> resultMap = new HashMap<>();
|
||||||
StoreOrder storeOrderPram = new StoreOrder();
|
StoreOrder storeOrderPram = new StoreOrder();
|
||||||
storeOrderPram.setOrderId(orderId);
|
storeOrderPram.setOrderId(orderId);
|
||||||
StoreOrder existOrder = storeOrderService.getByEntityOne(storeOrderPram);
|
StoreOrder existOrder = storeOrderService.getByEntityOne(storeOrderPram);
|
||||||
|
@ -547,7 +581,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
orderInfo.put("info", cartInfos);
|
orderInfo.put("info", cartInfos);
|
||||||
|
|
||||||
resultMap.put("order", orderInfo);
|
resultMap.put("order", orderInfo);
|
||||||
// resultMap.put("express", expressInfo);
|
// resultMap.put("express", expressInfo);
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -770,7 +804,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
//用户剩余积分
|
//用户剩余积分
|
||||||
//用户剩余经验
|
//用户剩余经验
|
||||||
// 缓存订单
|
// 缓存订单
|
||||||
String key = user.getId() + DateUtils.getNowTime().toString()+CrmebUtil.getUuid();
|
String key = user.getId() + DateUtils.getNowTime().toString() + CrmebUtil.getUuid();
|
||||||
redisUtil.set("user_order:" + key, JSONUtil.parseObj(orderInfoVo), Constants.ORDER_CASH_CONFIRM, TimeUnit.MINUTES);
|
redisUtil.set("user_order:" + key, JSONUtil.parseObj(orderInfoVo), Constants.ORDER_CASH_CONFIRM, TimeUnit.MINUTES);
|
||||||
MyRecord record = new MyRecord();
|
MyRecord record = new MyRecord();
|
||||||
record.set("preOrderNo", key);
|
record.set("preOrderNo", key);
|
||||||
|
@ -779,6 +813,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验预下单商品信息
|
* 校验预下单商品信息
|
||||||
|
*
|
||||||
* @param request 预下单请求参数
|
* @param request 预下单请求参数
|
||||||
* @return OrderInfoVo
|
* @return OrderInfoVo
|
||||||
*/
|
*/
|
||||||
|
@ -866,6 +901,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 再次下单预下单校验
|
* 再次下单预下单校验
|
||||||
|
*
|
||||||
* @param detailRequest 请求参数
|
* @param detailRequest 请求参数
|
||||||
* @return List<OrderInfoDetailVo>
|
* @return List<OrderInfoDetailVo>
|
||||||
*/
|
*/
|
||||||
|
@ -935,8 +971,9 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购物车预下单校验
|
* 购物车预下单校验
|
||||||
|
*
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
* @param user 用户
|
* @param user 用户
|
||||||
* @return List<OrderInfoDetailVo>
|
* @return List<OrderInfoDetailVo>
|
||||||
*/
|
*/
|
||||||
private List<OrderInfoDetailVo> validatePreOrderShopping(PreOrderRequest request, MemberUserRespDTO user) {
|
private List<OrderInfoDetailVo> validatePreOrderShopping(PreOrderRequest request, MemberUserRespDTO user) {
|
||||||
|
@ -991,6 +1028,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
});
|
});
|
||||||
return detailVoList;
|
return detailVoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载预下单信息
|
* 加载预下单信息
|
||||||
*
|
*
|
||||||
|
@ -1031,6 +1069,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算订单价格
|
* 计算订单价格
|
||||||
|
*
|
||||||
* @param request 计算订单价格请求对象
|
* @param request 计算订单价格请求对象
|
||||||
* @return ComputedOrderPriceResponse
|
* @return ComputedOrderPriceResponse
|
||||||
*/
|
*/
|
||||||
|
@ -1137,7 +1176,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
orderRequest.setRealName(userAddress.getRealName());
|
orderRequest.setRealName(userAddress.getRealName());
|
||||||
orderRequest.setPhone(userAddress.getPhone());
|
orderRequest.setPhone(userAddress.getPhone());
|
||||||
userAddressStr = userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getDetail();
|
userAddressStr = userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getDetail();
|
||||||
}else if (orderRequest.getShippingType() == 2) { // 到店自提
|
} else if (orderRequest.getShippingType() == 2) { // 到店自提
|
||||||
if (StringUtils.isBlank(orderRequest.getRealName()) || StringUtils.isBlank(orderRequest.getPhone())) {
|
if (StringUtils.isBlank(orderRequest.getRealName()) || StringUtils.isBlank(orderRequest.getPhone())) {
|
||||||
throw new ServiceException("请填写姓名和电话");
|
throw new ServiceException("请填写姓名和电话");
|
||||||
}
|
}
|
||||||
|
@ -1150,7 +1189,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
// if (ObjectUtil.isNull(systemStore) || systemStore.getIsDel() || !systemStore.getIsShow()) {
|
// if (ObjectUtil.isNull(systemStore) || systemStore.getIsDel() || !systemStore.getIsShow()) {
|
||||||
// throw new ServiceException("暂无门店无法选择门店自提");
|
// throw new ServiceException("暂无门店无法选择门店自提");
|
||||||
// }
|
// }
|
||||||
verifyCode = CrmebUtil.randomCount(1111111111,999999999)+"";
|
verifyCode = CrmebUtil.randomCount(1111111111, 999999999) + "";
|
||||||
//userAddressStr = systemStore.getName();
|
//userAddressStr = systemStore.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1292,7 +1331,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
storeOrder.setType(1);// 视频号订单
|
storeOrder.setType(1);// 视频号订单
|
||||||
}
|
}
|
||||||
|
|
||||||
// StoreCouponUser storeCouponUser = new StoreCouponUser();
|
// StoreCouponUser storeCouponUser = new StoreCouponUser();
|
||||||
// 优惠券修改
|
// 优惠券修改
|
||||||
// if (storeOrder.getCouponId() > 0) {
|
// if (storeOrder.getCouponId() > 0) {
|
||||||
// storeCouponUser = storeCouponUserService.getById(storeOrder.getCouponId());
|
// storeCouponUser = storeCouponUserService.getById(storeOrder.getCouponId());
|
||||||
|
@ -1304,12 +1343,12 @@ public class OrderServiceImpl implements OrderService {
|
||||||
// 扣减库存
|
// 扣减库存
|
||||||
// 需要根据是否活动商品,扣减不同的库存
|
// 需要根据是否活动商品,扣减不同的库存
|
||||||
// 普通商品
|
// 普通商品
|
||||||
for (MyRecord skuRecord : skuRecordList) {
|
for (MyRecord skuRecord : skuRecordList) {
|
||||||
// 普通商品口库存
|
// 普通商品口库存
|
||||||
storeProductService.operationStock(skuRecord.getInt("productId"), skuRecord.getInt("num"), "sub");
|
storeProductService.operationStock(skuRecord.getInt("productId"), skuRecord.getInt("num"), "sub");
|
||||||
// 普通商品规格扣库存
|
// 普通商品规格扣库存
|
||||||
//storeProductAttrValueService.operationStock(skuRecord.getInt("attrValueId"), skuRecord.getInt("num"), "sub", Constants.PRODUCT_TYPE_NORMAL);
|
//storeProductAttrValueService.operationStock(skuRecord.getInt("attrValueId"), skuRecord.getInt("num"), "sub", Constants.PRODUCT_TYPE_NORMAL);
|
||||||
}//
|
}//
|
||||||
|
|
||||||
storeOrderService.create(storeOrder);
|
storeOrderService.create(storeOrder);
|
||||||
storeOrderInfos.forEach(info -> info.setOrderId(storeOrder.getId()));
|
storeOrderInfos.forEach(info -> info.setOrderId(storeOrder.getId()));
|
||||||
|
@ -1337,7 +1376,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
redisUtil.lPush(Constants.ORDER_AUTO_CANCEL_KEY, storeOrder.getOrderId());
|
redisUtil.lPush(Constants.ORDER_AUTO_CANCEL_KEY, storeOrder.getOrderId());
|
||||||
|
|
||||||
// TODO 发送后台管理员下单提醒通知短信
|
// TODO 发送后台管理员下单提醒通知短信
|
||||||
// sendAdminOrderNotice(storeOrder.getOrderId());
|
// sendAdminOrderNotice(storeOrder.getOrderId());
|
||||||
|
|
||||||
MyRecord record = new MyRecord();
|
MyRecord record = new MyRecord();
|
||||||
record.set("orderNo", storeOrder.getOrderId());
|
record.set("orderNo", storeOrder.getOrderId());
|
||||||
|
@ -1346,6 +1385,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验商品库存(生成订单)
|
* 校验商品库存(生成订单)
|
||||||
|
*
|
||||||
* @param orderInfoVo 订单详情Vo
|
* @param orderInfoVo 订单详情Vo
|
||||||
* @return List<MyRecord>
|
* @return List<MyRecord>
|
||||||
* skuRecord 扣减库存对象
|
* skuRecord 扣减库存对象
|
||||||
|
@ -1392,6 +1432,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
}
|
}
|
||||||
return recordList;
|
return recordList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取支付配置
|
* 获取支付配置
|
||||||
*
|
*
|
||||||
|
|
|
@ -239,3 +239,6 @@ wx:
|
||||||
port: 6369 # 端口
|
port: 6369 # 端口
|
||||||
database: 16 # 数据库索引
|
database: 16 # 数据库索引
|
||||||
password: 20221122@dev # 密码,建议生产环境开启
|
password: 20221122@dev # 密码,建议生产环境开启
|
||||||
|
phone:
|
||||||
|
query-url: http://phone.cyywl.top/cyywl-phone-query-api/
|
||||||
|
token: eyIwLnR5cCI6IkpXVCIsImFsZyI6IkhTNTEyIn0
|
|
@ -143,6 +143,15 @@ export function shippingRegion(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 物流运费模板指定不配送
|
||||||
|
export function shippingNodelivery(data) {
|
||||||
|
return request({
|
||||||
|
url: 'admin/express/shipping/no_delivery/list',
|
||||||
|
method: 'get',
|
||||||
|
params: { ...data }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 物流运费模板新增
|
// 物流运费模板新增
|
||||||
export function shippingSave(data) {
|
export function shippingSave(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -168,6 +168,7 @@
|
||||||
import * as logistics from '@/api/cremb/logistics'
|
import * as logistics from '@/api/cremb/logistics'
|
||||||
import { Loading } from 'element-ui'
|
import { Loading } from 'element-ui'
|
||||||
import {Debounce} from '@/utils/validate'
|
import {Debounce} from '@/utils/validate'
|
||||||
|
import {shippingNodelivery} from "@/api/cremb/logistics";
|
||||||
const defaultRole = {
|
const defaultRole = {
|
||||||
name: '',
|
name: '',
|
||||||
type: 1,
|
type: 1,
|
||||||
|
@ -357,6 +358,10 @@ export default {
|
||||||
if (info.appoint) {
|
if (info.appoint) {
|
||||||
this.shippingFree()
|
this.shippingFree()
|
||||||
}
|
}
|
||||||
|
// 指定不包邮
|
||||||
|
if(info.noDelivery){
|
||||||
|
this.shippingNodelivery()
|
||||||
|
}
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
// console.integralLog(res)
|
// console.integralLog(res)
|
||||||
this.$message.error(res.message)
|
this.$message.error(res.message)
|
||||||
|
@ -379,10 +384,24 @@ export default {
|
||||||
shippingFree() {
|
shippingFree() {
|
||||||
logistics.shippingFree({ tempId: this.tempId }).then(res => {
|
logistics.shippingFree({ tempId: this.tempId }).then(res => {
|
||||||
res.data.forEach((item, index) => {
|
res.data.forEach((item, index) => {
|
||||||
item.title = JSON.parse(item.title)
|
// item.title = JSON.parse(item.title)
|
||||||
item.city_ids = item.title
|
item.city_ids = item.cityId.split(',')
|
||||||
})
|
})
|
||||||
this.ruleForm.free = res.data
|
this.ruleForm.free = res.data
|
||||||
|
console.log(this.ruleForm.free )
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 包邮
|
||||||
|
shippingNodelivery() {
|
||||||
|
logistics.shippingNodelivery({ tempId: this.tempId }).then(res => {
|
||||||
|
res.data.forEach((item, index) => {
|
||||||
|
// item.title = JSON.parse(item.title)
|
||||||
|
item.city_ids = item.cityId.split(',')
|
||||||
|
})
|
||||||
|
this.ruleForm.noDelivery = res.data
|
||||||
|
console.log(this.ruleForm.noDelivery )
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
removeChild(list){
|
removeChild(list){
|
||||||
|
@ -443,9 +462,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.ruleForm.region.forEach((el, index) => {
|
this.ruleForm.region.forEach((el, index) => {
|
||||||
if(el.city_ids.length > 0){
|
if(el.city_ids.length > 0){
|
||||||
el.cityId = el.city_ids.map(item => {
|
el.cityId = JSON.stringify(el.city_ids)
|
||||||
return item[2]
|
|
||||||
}).join(',')
|
|
||||||
}else{
|
}else{
|
||||||
el.cityId = 'all'
|
el.cityId = 'all'
|
||||||
}
|
}
|
||||||
|
@ -467,9 +484,7 @@ export default {
|
||||||
if (this.ruleForm.appoint) {
|
if (this.ruleForm.appoint) {
|
||||||
this.ruleForm.free.forEach((el, index) => {
|
this.ruleForm.free.forEach((el, index) => {
|
||||||
if(el.city_ids.length > 0){
|
if(el.city_ids.length > 0){
|
||||||
el.cityId = el.city_ids.map(item => {
|
el.cityId = JSON.stringify(el.city_ids)
|
||||||
return item[2]
|
|
||||||
}).join(',')
|
|
||||||
}else{
|
}else{
|
||||||
el.cityId = 'all'
|
el.cityId = 'all'
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@
|
||||||
if (this.$store.getters.isLogin) {
|
if (this.$store.getters.isLogin) {
|
||||||
this.setRefreshToken()
|
this.setRefreshToken()
|
||||||
}
|
}
|
||||||
}, 60000)
|
}, 600000)
|
||||||
},
|
},
|
||||||
// 是否扫码跳转
|
// 是否扫码跳转
|
||||||
isQRCode() {
|
isQRCode() {
|
||||||
|
|
|
@ -15,6 +15,20 @@ export function memberOrderInfo(){
|
||||||
return request.get('api/order/member/memberOrderInfo', {})
|
return request.get('api/order/member/memberOrderInfo', {})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询权益档位信息
|
||||||
|
*/
|
||||||
|
export function query(phone){
|
||||||
|
return request.get(`shop/refund-fee-record/query?phone=${phone}`, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询档位返费信息
|
||||||
|
*/
|
||||||
|
export function memberQuery(reportId){
|
||||||
|
return request.get(`shop/refund-fee-record/query-item?reportId=${reportId}`, {})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据手机号查询档次信息
|
* 根据手机号查询档次信息
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -216,7 +216,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 16rpx 16rpx 0 0;
|
border-radius: 16rpx 16rpx 0 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding-bottom: 4%;
|
padding-bottom: 100rpx;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||||
transform: translate3d(0, 100%, 0);
|
transform: translate3d(0, 100%, 0);
|
||||||
|
@ -256,7 +256,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment .item .left {
|
.payment .item .left {
|
||||||
width: 610rpx;
|
width: 600rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment .item .left .text {
|
.payment .item .left .text {
|
||||||
|
|
|
@ -10,6 +10,18 @@
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/member_loding/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "会员"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/member_detail/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "权益明细"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/member_equity/index",
|
"path": "pages/member_equity/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -577,27 +589,28 @@
|
||||||
// {
|
// {
|
||||||
// "pagePath": "pages/index/index",
|
// "pagePath": "pages/index/index",
|
||||||
// "iconPath": "static/images/tabbar/nav_icon_shop.png",
|
// "iconPath": "static/images/tabbar/nav_icon_shop.png",
|
||||||
// "selectedIconPath": "static/images/1-002.png",
|
// "selectedIconPath": "static/images/tabbar/nav_icon_shop_active.png",
|
||||||
// "text": "商城"
|
// "text": "商城"
|
||||||
// },
|
// },
|
||||||
// {
|
|
||||||
// "pagePath": "pages/goods_cate/goods_cate",
|
|
||||||
// "iconPath": "static/images/tabbar/nav_icon_sort.png",
|
|
||||||
// "selectedIconPath": "static/images/2-002.png",
|
|
||||||
// "text": "分类"
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
"pagePath": "pages/member_application/index",
|
"pagePath": "pages/member_application/index",
|
||||||
"iconPath": "static/images/2-001.png",
|
"iconPath": "static/images/tabbar/nav_icon_member.png",
|
||||||
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
|
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
|
||||||
"text": "会员申请"
|
"text": "会员申请"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/member_equity/index",
|
"pagePath": "pages/member_equity/index",
|
||||||
"iconPath": "static/images/2-001.png",
|
"iconPath": "static/images/tabbar/nav_icon_member.png",
|
||||||
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
|
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
|
||||||
"text": "会员申请",
|
"text": "会员申请",
|
||||||
"visible":false
|
"visible":false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/goods_cate/goods_cate",
|
||||||
|
"iconPath": "static/images/tabbar/nav_icon_sort.png",
|
||||||
|
"selectedIconPath": "static/images/tabbar/nav_icon_sort_active.png",
|
||||||
|
"text": "分类"
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// "pagePath": "pages/order_addcart/order_addcart",
|
// "pagePath": "pages/order_addcart/order_addcart",
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
</block>
|
</block>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- 优品推荐 -->
|
<!-- 优品推荐 -->
|
||||||
<view class="superior borRadius14" if='good_list.length' id="past2">
|
<!-- <view class="superior borRadius14" if='good_list.length' id="past2">
|
||||||
<view class="title acea-row row-center-wrapper">
|
<view class="title acea-row row-center-wrapper">
|
||||||
<image src="../../static/images/xzuo.png"></image>
|
<image src="../../static/images/xzuo.png"></image>
|
||||||
<view class="titleTxt">优品推荐</view>
|
<view class="titleTxt">优品推荐</view>
|
||||||
|
@ -133,10 +133,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<!-- <view class="swiper-pagination" slot="pagination"></view> -->
|
<view class="swiper-pagination" slot="pagination"></view>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='product-intro' id="past3">
|
<view class='product-intro' id="past3">
|
||||||
|
@ -167,11 +167,11 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<block v-if="type === 'normal'">
|
<block v-if="type === 'normal'">
|
||||||
<view @click="setCollect" class='item'>
|
<!-- <view @click="setCollect" class='item'>
|
||||||
<view class='iconfont icon-shoucang1' v-if="userCollect"></view>
|
<view class='iconfont icon-shoucang1' v-if="userCollect"></view>
|
||||||
<view class='iconfont icon-shoucang' v-else></view>
|
<view class='iconfont icon-shoucang' v-else></view>
|
||||||
<view>收藏</view>
|
<view>收藏</view>
|
||||||
</view>
|
</view> -->
|
||||||
<navigator open-type='switchTab' class="animated item" :class="animated==true?'bounceIn':''"
|
<navigator open-type='switchTab' class="animated item" :class="animated==true?'bounceIn':''"
|
||||||
url='/pages/order_addcart/order_addcart' hover-class="none">
|
url='/pages/order_addcart/order_addcart' hover-class="none">
|
||||||
<view class='iconfont icon-gouwuche1'>
|
<view class='iconfont icon-gouwuche1'>
|
||||||
|
@ -954,9 +954,9 @@
|
||||||
} else {
|
} else {
|
||||||
obj.type = "";
|
obj.type = "";
|
||||||
}
|
}
|
||||||
getCoupons(obj).then(res => {
|
// getCoupons(obj).then(res => {
|
||||||
that.$set(that.coupon, 'list', res.data);
|
// that.$set(that.coupon, 'list', res.data);
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
tabCouponType(type) {
|
tabCouponType(type) {
|
||||||
this.$set(this.coupon, 'type', type);
|
this.$set(this.coupon, 'type', type);
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
<image src='../../static/images/memberTitle.png'></image>
|
<image src='../../static/images/memberTitle.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="privilege-list">
|
<view class="privilege-list">
|
||||||
|
|
||||||
<view class="privilege-item" v-for="(item,index) in 4" :key="index">
|
<view class="privilege-item" v-for="(item,index) in 4" :key="index">
|
||||||
<image src='../../static/images/vip1.png'></image>
|
<image src='../../static/images/vip1.png'></image>
|
||||||
<text class="privilege-text">
|
<text class="privilege-text">
|
||||||
|
@ -37,13 +38,10 @@
|
||||||
</view>
|
</view>
|
||||||
<paymentMember :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :payInfo="payInfo">
|
<paymentMember :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :payInfo="payInfo">
|
||||||
</paymentMember>
|
</paymentMember>
|
||||||
<button class="box-submit" @click="goPay">立即充值</button>
|
<view style="display: flex; justify-content: space-between; margin-top: 4%;">
|
||||||
<u-navbar leftIcon="" title="会员申请">
|
<button class="box-submit" @click="goPay">立即充值</button>
|
||||||
<view class="u-nav-slot" slot="right">
|
<button class="box-others" @click="handleOther">代他人充值</button>
|
||||||
<u-icon name="more-dot-fill" size="50" @click="show = true"></u-icon>
|
</view>
|
||||||
<u-action-sheet @select="handleSelect" :actions="list" :title="title" :show="show" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="show=false" :safeAreaInsetBottom="true"></u-action-sheet>
|
|
||||||
</view>
|
|
||||||
</u-navbar>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -60,18 +58,16 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title:'管理',
|
// list: [
|
||||||
list: [
|
// {
|
||||||
{
|
// name:'购买记录',
|
||||||
name:'购买记录',
|
// fontSize:'28'
|
||||||
fontSize:'28'
|
// },
|
||||||
},
|
// {
|
||||||
{
|
// name:'为他人充值',
|
||||||
name:'为他人充值',
|
// fontSize:'28'
|
||||||
fontSize:'28'
|
// },
|
||||||
},
|
// ],
|
||||||
],
|
|
||||||
show: false,
|
|
||||||
memberData: [],
|
memberData: [],
|
||||||
payInfo: {
|
payInfo: {
|
||||||
userPhone: '',
|
userPhone: '',
|
||||||
|
@ -96,16 +92,17 @@
|
||||||
form: {
|
form: {
|
||||||
phone: ''
|
phone: ''
|
||||||
},
|
},
|
||||||
|
show:true,
|
||||||
|
ref:null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
async onLoad() {
|
async onLoad() {
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
try{
|
try{
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
const res = await memberGradeInfo()
|
const res = await memberGradeInfo()
|
||||||
if(res.data.some((item) => !!parseInt(item.isExist))){
|
if(res.data.some((item) => !!parseInt(item.isExist))){
|
||||||
uni.setTabBarItem({
|
uni.setTabBarItem({
|
||||||
|
@ -120,9 +117,6 @@
|
||||||
index: 0,
|
index: 0,
|
||||||
pagePath: '/pages/member_application/index'
|
pagePath: '/pages/member_application/index'
|
||||||
})
|
})
|
||||||
uni.switchTab({
|
|
||||||
url:'/pages/member_application/index'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
this.memberData = res.data
|
this.memberData = res.data
|
||||||
} finally{
|
} finally{
|
||||||
|
@ -130,7 +124,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOther(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/member_others/index'
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSelect(value){
|
handleSelect(value){
|
||||||
switch (value.name){
|
switch (value.name){
|
||||||
case "购买记录":
|
case "购买记录":
|
||||||
|
@ -225,15 +223,14 @@
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.box {
|
.box {
|
||||||
margin-top: 10%;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 207rpx 40rpx 30rpx 40rpx;
|
padding: 207rpx 40rpx 0 40rpx;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: url(../../static/images/bg.png);
|
background: url(../../static/images/bg.png);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
|
overflow: hidden;
|
||||||
.u-nav-slot{
|
.u-nav-slot{
|
||||||
::v-deep .u-popup__content{
|
::v-deep .u-popup__content{
|
||||||
padding-bottom: 20% !important;
|
padding-bottom: 20% !important;
|
||||||
|
@ -253,7 +250,6 @@
|
||||||
.box-member {
|
.box-member {
|
||||||
box-shadow: 0px 0px 15px -5px #000;
|
box-shadow: 0px 0px 15px -5px #000;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 20px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
background-image: linear-gradient(#FFD55D, #FD752F),
|
background-image: linear-gradient(#FFD55D, #FD752F),
|
||||||
|
@ -290,7 +286,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-list {
|
.member-list {
|
||||||
margin: 83rpx 30rpx 30rpx 30rpx;
|
margin: 53rpx 30rpx 20rpx 30rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.member-item {
|
.member-item {
|
||||||
|
@ -302,11 +298,11 @@
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
||||||
.member-image {
|
.member-image {
|
||||||
width: 104rpx;
|
width: 100rpx;
|
||||||
height: 104rpx;
|
height: 100rpx;
|
||||||
border-radius: 35rpx;
|
border-radius: 35rpx;
|
||||||
background: linear-gradient(#FFEBB2, #FDCB3B);
|
background: linear-gradient(#FFEBB2, #FDCB3B);
|
||||||
padding: 20rpx;
|
padding: 16rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -413,7 +409,7 @@
|
||||||
box-shadow: 0px 0px 15px -5px #000;
|
box-shadow: 0px 0px 15px -5px #000;
|
||||||
border-radius: 36rpx;
|
border-radius: 36rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 12%;
|
margin-top: 9%;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
|
@ -454,7 +450,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.privilege-list {
|
.privilege-list {
|
||||||
margin: 84rpx 10rpx 40rpx 10rpx;
|
margin: 54rpx 10rpx 10rpx 10rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
|
@ -464,7 +460,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 16rpx 16rpx;
|
padding: 6rpx 16rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
margin: 0 10rpx;
|
margin: 0 10rpx;
|
||||||
|
|
||||||
|
@ -486,9 +482,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-submit {
|
.box-others {
|
||||||
background: linear-gradient(#FFC82B, #FD7A32);
|
width: 46%;
|
||||||
margin-top: 127rpx;
|
background: linear-gradient(#ff6672, #d60338);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -497,5 +493,18 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.box-submit {
|
||||||
|
width: 46%;
|
||||||
|
background: linear-gradient(#FFC82B, #FD7A32);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 87rpx;
|
||||||
|
border-radius: 44rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -0,0 +1,111 @@
|
||||||
|
<template>
|
||||||
|
<view class="box">
|
||||||
|
<view class="list-item" v-for="(item,index) in memberData" :key="index">
|
||||||
|
<view class="item-title">
|
||||||
|
<view class="item-phone">
|
||||||
|
<view></view>
|
||||||
|
<text>{{item.tradeTime}}</text>
|
||||||
|
</view>
|
||||||
|
<view style="margin-right: 20rpx;">{{item.businessName}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-text">
|
||||||
|
<text>【{{list[list.findIndex((i) => item.gear == i.name)].value}}】元 档</text>
|
||||||
|
<text>交易金额:{{item.money}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-navbar autoBack title="权益明细"></u-navbar>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
memberQuery
|
||||||
|
} from '@/api/member.js';
|
||||||
|
import { Debounce } from '@/utils/validate.js'
|
||||||
|
export default {
|
||||||
|
name: "member_record",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
value:'240',
|
||||||
|
img:'../../static/images/member240.png',
|
||||||
|
name:'360'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value:'400',
|
||||||
|
img:'../../static/images/member400.png',
|
||||||
|
name:'600'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value:'960',
|
||||||
|
img:'../../static/images/member960.png',
|
||||||
|
name:'900'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
memberData:[]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
async onLoad(options) {
|
||||||
|
const res = await memberQuery(options.reportId)
|
||||||
|
this.memberData = res.data
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.box {
|
||||||
|
padding: 20% 40rpx;
|
||||||
|
.box-seach{
|
||||||
|
padding: 10% 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
top: 3%;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.list-item{
|
||||||
|
margin-bottom: 26rpx;
|
||||||
|
padding: 30rpx 16rpx 25rpx 16rpx;
|
||||||
|
background: #FDF0F1;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
.item-title{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.item-phone{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #E91D51;
|
||||||
|
view{
|
||||||
|
border-radius: 3rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
width: 5rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
background: #E91D51;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
button{
|
||||||
|
padding: 6rpx ;
|
||||||
|
font-size: 26rpx;
|
||||||
|
background: rgb(22,155,213);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-text{
|
||||||
|
padding: 34rpx 12rpx;
|
||||||
|
background: #fff;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -8,8 +8,18 @@
|
||||||
<text>会员积分:{{memberDetail.integral}}</text>
|
<text>会员积分:{{memberDetail.integral}}</text>
|
||||||
</view>
|
</view>
|
||||||
<text>再升1级即可获得【XX】等6项权益</text>
|
<text>再升1级即可获得【XX】等6项权益</text>
|
||||||
|
<view class="left-button">
|
||||||
|
<view class="left-shopping" @click="handleRouter('购买记录')">
|
||||||
|
<text>购买记录</text>
|
||||||
|
<image src="../../static/images/shopping-right.png" ></image>
|
||||||
|
</view>
|
||||||
|
<view class="left-others" @click="handleRouter('为他人充值')">
|
||||||
|
为他人充值
|
||||||
|
<image src="../../static/images/others-right.png" ></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="member-right">
|
<view class="member-right">
|
||||||
<image src='../../static/images/vipStar.png'></image>
|
<image src='../../static/images/vipStar.png'></image>
|
||||||
<text>会员等级{{vipData.findIndex((item) => item == memberDetail.grade) +1}}级</text>
|
<text>会员等级{{vipData.findIndex((item) => item == memberDetail.grade) +1}}级</text>
|
||||||
<button @click="handleRenew">立即续费</button>
|
<button @click="handleRenew">立即续费</button>
|
||||||
|
@ -23,47 +33,43 @@
|
||||||
</view>
|
</view>
|
||||||
<text class="equity-look">查看权益></text>
|
<text class="equity-look">查看权益></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="equity-item" v-for="(item,index) in 3" :key="index">
|
<view class="equity-item" v-for="(item,index) in equityData" :key="index">
|
||||||
<view class="equity-grade">
|
<view class="equity-grade">
|
||||||
<image src='../../static/images/member240.png'></image>
|
<image :src='list[list.findIndex((i) => item.gear == i.name)].img'></image>
|
||||||
<text>办理日期:2021.12.30</text>
|
<text>办理日期:{{item.startTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="equity-money">
|
<view class="equity-money">
|
||||||
<view class="money-box money-completed">
|
<view class="money-box money-completed">
|
||||||
<text>已返回金额(元)</text>
|
<text>已返回金额(元)</text>
|
||||||
<view>
|
<view>
|
||||||
<text class="money-text">80</text>
|
<text class="money-text">{{item.totalMoney}}</text>
|
||||||
<text class="money-detailed">查看明细></text>
|
<text class="money-detailed" @click="handleDetailed(item.reportId)">查看明细></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-box money-treat">
|
<view class="money-box money-treat">
|
||||||
<text>已返回金额(元)</text>
|
<text>带返还金额 (元) </text>
|
||||||
<text class="money-text">80</text>
|
<text class="money-text">{{list[list.findIndex((i) => item.gear == i.name)].name-item.totalMoney}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-box money-term">
|
<view class="money-box money-term">
|
||||||
<text>已返回金额(元)</text>
|
<text>带返还期额</text>
|
||||||
<text class="money-text">80</text>
|
<text class="money-text">{{item.frequency}}x12</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-box money-time">
|
<view class="money-box money-time">
|
||||||
<text>已返回金额(元)</text>
|
<text>返费结束时间</text>
|
||||||
<text class="money-text">80</text>
|
<text class="money-text">{{item.endTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-navbar leftIcon="" title="会员申请">
|
<u-navbar leftIcon="" title="会员申请"></u-navbar>
|
||||||
<view class="u-nav-slot" slot="right">
|
</view>
|
||||||
<u-icon name="more-dot-fill" size="50" @click="show = true"></u-icon>
|
|
||||||
<u-action-sheet @select="handleSelect" :actions="list" :title="title" :show="show" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="show=false" :safeAreaInsetBottom="true"></u-action-sheet>
|
|
||||||
</view>
|
|
||||||
</u-navbar>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
memberHeadInfo,
|
memberHeadInfo,
|
||||||
memberGradeInfo
|
memberGradeInfo,
|
||||||
|
query
|
||||||
} from '@/api/member.js';
|
} from '@/api/member.js';
|
||||||
import {
|
import {
|
||||||
mapGetters
|
mapGetters
|
||||||
|
@ -72,20 +78,24 @@
|
||||||
name: "member_application",
|
name: "member_application",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title:'管理',
|
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
name:'购买记录',
|
img:'../../static/images/member240.png',
|
||||||
fontSize:'28'
|
name:'360'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:'为他人充值',
|
img:'../../static/images/member400.png',
|
||||||
fontSize:'28'
|
name:'600'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
img:'../../static/images/member960.png',
|
||||||
|
name:'900'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
vipData:['普通会员','中级会员','高级会员'],
|
vipData:['普通会员','中级会员','高级会员'],
|
||||||
show: false,
|
show: false,
|
||||||
memberDetail:{}
|
memberDetail:{},
|
||||||
|
equityData:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: mapGetters(['userInfo']),
|
computed: mapGetters(['userInfo']),
|
||||||
|
@ -96,9 +106,6 @@
|
||||||
index: 0,
|
index: 0,
|
||||||
pagePath: '/pages/member_equity/index'
|
pagePath: '/pages/member_equity/index'
|
||||||
})
|
})
|
||||||
uni.switchTab({
|
|
||||||
url:'/pages/member_equity/index'
|
|
||||||
})
|
|
||||||
}else{
|
}else{
|
||||||
uni.setTabBarItem({
|
uni.setTabBarItem({
|
||||||
index: 0,
|
index: 0,
|
||||||
|
@ -108,18 +115,25 @@
|
||||||
url:'/pages/member_application/index'
|
url:'/pages/member_application/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await memberHeadInfo()
|
const res = await memberHeadInfo()
|
||||||
this.memberDetail = res.data
|
this.memberDetail = res.data
|
||||||
|
// this.userInfo.mobile
|
||||||
|
const equity = await query(13668261228)
|
||||||
|
this.equityData = equity.data
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleDetailed(reportId){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/member_detail/index?reportId=${reportId}`,
|
||||||
|
})
|
||||||
|
},
|
||||||
handleRenew(){
|
handleRenew(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/member_renew/index'
|
url:'/pages/member_renew/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSelect(value){
|
handleRouter(value){
|
||||||
switch (value.name){
|
switch (value){
|
||||||
case "购买记录":
|
case "购买记录":
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/member_record/index'
|
url:'/pages/member_record/index'
|
||||||
|
@ -165,7 +179,7 @@
|
||||||
// padding: 20rpx 20rpx 30rpx 20rpx;
|
// padding: 20rpx 20rpx 30rpx 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
line-height: 50rpx;
|
||||||
.member-left {
|
.member-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -187,6 +201,43 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
.left-button{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
image{
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
margin-left: 13rpx;
|
||||||
|
}
|
||||||
|
.left-shopping{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 204rpx;
|
||||||
|
height: 61rpx;
|
||||||
|
background: #F8EFF0;
|
||||||
|
border: 1px solid #F783B0;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
.left-others{
|
||||||
|
background-image: url("../../static/images/others-button.png");
|
||||||
|
background-size: 204rpx 61rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 204rpx;
|
||||||
|
height: 61rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-right {
|
.member-right {
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
memberGradeInfo
|
||||||
|
} from '@/api/member.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "member_loding",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
async onLoad() {
|
||||||
|
try{
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
const res = await memberGradeInfo()
|
||||||
|
if(res.data.some((item) => !!parseInt(item.isExist))){
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 0,
|
||||||
|
pagePath: '/pages/member_equity/index'
|
||||||
|
})
|
||||||
|
uni.switchTab({
|
||||||
|
url:'/pages/member_equity/index'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 0,
|
||||||
|
pagePath: '/pages/member_application/index'
|
||||||
|
})
|
||||||
|
uni.switchTab({
|
||||||
|
url:'/pages/member_application/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} finally{
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -508,7 +508,7 @@
|
||||||
|
|
||||||
.box-submit {
|
.box-submit {
|
||||||
background: linear-gradient(#FFC82B, #FD7A32);
|
background: linear-gradient(#FFC82B, #FD7A32);
|
||||||
margin-top: 127rpx;
|
margin-top: 9%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -461,7 +461,7 @@ import store from '@/store/index';
|
||||||
|
|
||||||
.box-submit {
|
.box-submit {
|
||||||
background: linear-gradient(#FFC82B, #FD7A32);
|
background: linear-gradient(#FFC82B, #FD7A32);
|
||||||
margin-top: 127rpx;
|
margin-top: 9%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -65,14 +65,20 @@
|
||||||
},
|
},
|
||||||
onReady() {},
|
onReady() {},
|
||||||
methods: {
|
methods: {
|
||||||
downImage() {
|
async downImage() {
|
||||||
const that = this
|
const that = this
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '生成海报中',
|
title: '生成海报中',
|
||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
that.isHideBtn = true
|
that.isHideBtn = true
|
||||||
htmlToImage.toJpeg(document.getElementById('poster-wrap'), {
|
for(let i = 0; i<3; i++){
|
||||||
|
await htmlToImage.toPng(document.getElementById('poster-wrap'), {
|
||||||
|
quality: 0.95,
|
||||||
|
cacheBust: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
htmlToImage.toPng(document.getElementById('poster-wrap'), {
|
||||||
quality: 0.95,
|
quality: 0.95,
|
||||||
cacheBust: true
|
cacheBust: true
|
||||||
})
|
})
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in New Issue