Merge branch 'feature/mall_product' of http://117.33.142.185:3000/zenghuapei/cyywl_server into feature/mall_product
commit
99f1fb5e33
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.shop.controller.admin.notify;
|
|||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
||||
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
||||
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
||||
|
@ -115,6 +116,7 @@ public class WxPayNotifyController {
|
|||
* @return:
|
||||
*/
|
||||
@PostMapping("/refund_notify")
|
||||
@TenantIgnore
|
||||
public String wxPayRefundNotify(@RequestBody String jsonData, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
// 支付结果通用通知文档: https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7
|
||||
// 支付成功结果通知
|
||||
|
@ -134,18 +136,22 @@ public class WxPayNotifyController {
|
|||
BigDecimal payerTotal = NumberUtil.div(result.getAmount().getPayerTotal() + "", "100", 2);
|
||||
// 处理相关逻辑
|
||||
RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getOrderId, result.getOutTradeNo()));
|
||||
if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) {
|
||||
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal);
|
||||
return "failure";
|
||||
if(orderDO!=null){
|
||||
if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) {
|
||||
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal);
|
||||
return "failure";
|
||||
}
|
||||
orderDO.setRefundStatus(2);
|
||||
orderDO.setPaid(2);
|
||||
rechargeOrderMapper.updateById(orderDO);
|
||||
//删除提报记录
|
||||
phoneRecordService.deletePhoneGear(orderDO.getOrderId());
|
||||
//删除本地提报记录
|
||||
phoneRecordService.deletePhoneRecord(orderDO.getId());
|
||||
// 修改订单状态
|
||||
// 写入
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
}
|
||||
orderDO.setRefundStatus(2);
|
||||
orderDO.setPaid(2);
|
||||
rechargeOrderMapper.updateById(orderDO);
|
||||
//删除提报记录
|
||||
phoneRecordService.deletePhoneGear(orderDO.getOrderId());
|
||||
// 修改订单状态
|
||||
// 写入
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
return "success";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -32,7 +32,7 @@ public class RechargeOrderBaseVO {
|
|||
|
||||
@Schema(description = "用户id", required = true, example = "28969")
|
||||
@NotNull(message = "用户id不能为空")
|
||||
private Integer uid;
|
||||
private Long uid;
|
||||
|
||||
@Schema(description = "用户姓名", required = true, example = "张三")
|
||||
@NotNull(message = "用户姓名不能为空")
|
||||
|
|
|
@ -22,7 +22,7 @@ public class RechargeOrderExportReqVO {
|
|||
private Long tenantId;
|
||||
|
||||
@Schema(description = "用户id", example = "28969")
|
||||
private Integer uid;
|
||||
private Long uid;
|
||||
|
||||
@Schema(description = "用户姓名", example = "张三")
|
||||
private String realName;
|
||||
|
|
|
@ -24,7 +24,7 @@ public class RechargeOrderPageReqVO extends PageParam {
|
|||
private Long tenantId;
|
||||
|
||||
@Schema(description = "用户id", example = "28969")
|
||||
private Integer uid;
|
||||
private Long uid;
|
||||
|
||||
@Schema(description = "用户姓名", example = "张三")
|
||||
private String realName;
|
||||
|
|
|
@ -37,42 +37,4 @@ import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.E
|
|||
@Slf4j
|
||||
public class AppPhoneRecordController {
|
||||
|
||||
@Resource
|
||||
private PhoneRecordService phoneRecordService;
|
||||
|
||||
|
||||
@Value("${phone.query-url}")
|
||||
private String phoneUrl;
|
||||
|
||||
@Value("${phone.token}")
|
||||
private String token;
|
||||
|
||||
|
||||
@PostMapping("test")
|
||||
public CommonResult<Boolean> test(@RequestBody List<PhoneRecordAdd> data){
|
||||
String result = HttpRequest.post(phoneUrl+"query/createReport")
|
||||
.header("token",token)
|
||||
.body(JSONObject.toJSONString(data))
|
||||
.execute()
|
||||
.body();
|
||||
JSONObject resultJson = JSONObject.parseObject(result);
|
||||
log.info("提报新增返回结果{}",JSONObject.toJSONString(resultJson));
|
||||
if("0000".equals(resultJson.get("code"))){
|
||||
return success(null);
|
||||
}
|
||||
return success(null);
|
||||
}
|
||||
@PostMapping("delete")
|
||||
public CommonResult<Boolean> delete(@RequestBody String data){
|
||||
String result = HttpRequest.post(phoneUrl+"query/deleteReport?orderNo="+data)
|
||||
.header("token",token)
|
||||
.execute()
|
||||
.body();
|
||||
JSONObject resultJson = JSONObject.parseObject(result);
|
||||
log.info("删除返回结果{}",JSONObject.toJSONString(resultJson));
|
||||
if("0000".equals(resultJson.get("code"))){
|
||||
return success(null);
|
||||
}
|
||||
return success(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class StoreProductLog implements Serializable {
|
|||
private Integer productId;
|
||||
|
||||
@Schema(description= "用户ID")
|
||||
private Integer uid;
|
||||
private Long uid;
|
||||
|
||||
@Schema(description= "是否浏览")
|
||||
private Boolean visitNum;
|
||||
|
|
|
@ -70,5 +70,5 @@ public interface StoreOrderMapper extends BaseMapperX<StoreOrder> {
|
|||
* @param uid 用户uid
|
||||
* @param spreadId 推广人uid
|
||||
*/
|
||||
OrderBrokerageData getBrokerageData(@Param("uid") Integer uid, @Param("spreadId") Integer spreadId);
|
||||
OrderBrokerageData getBrokerageData(@Param("uid") Long uid, @Param("spreadId") Integer spreadId);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public interface StoreOrderService extends IService<StoreOrder> {
|
|||
* @param pageParamRequest 分页参数
|
||||
* @return 订单结果列表
|
||||
*/
|
||||
List<StoreOrder> getUserOrderList(Integer uid, Integer status, PageParam pageParamRequest);
|
||||
List<StoreOrder> getUserOrderList(Long uid, Integer status, PageParam pageParamRequest);
|
||||
/**
|
||||
* 创建订单
|
||||
* @param storeOrder 订单参数
|
||||
|
@ -141,21 +141,21 @@ public interface StoreOrderService extends IService<StoreOrder> {
|
|||
* @param seckillId 秒杀商品id
|
||||
* @return 用户当天的秒杀商品订单数量
|
||||
*/
|
||||
List<StoreOrder> getUserCurrentDaySecKillOrders(Integer uid, Integer seckillId);
|
||||
List<StoreOrder> getUserCurrentDaySecKillOrders(Long uid, Integer seckillId);
|
||||
|
||||
/**
|
||||
* 获取用户当前的砍价订单
|
||||
* @param uid 用户uid
|
||||
* @return 用户当前的砍价订单
|
||||
*/
|
||||
List<StoreOrder> getUserCurrentBargainOrders(Integer uid, Integer bargainId);
|
||||
List<StoreOrder> getUserCurrentBargainOrders(Long uid, Integer bargainId);
|
||||
|
||||
/**
|
||||
* 获取用户当前的拼团订单
|
||||
* @param uid 用户uid
|
||||
* @return 用户当前的拼团订单
|
||||
*/
|
||||
List<StoreOrder> getUserCurrentCombinationOrders(Integer uid, Integer combinationId);
|
||||
List<StoreOrder> getUserCurrentCombinationOrders(Long uid, Integer combinationId);
|
||||
|
||||
StoreOrder getByOderId(String orderId);
|
||||
|
||||
|
@ -206,7 +206,7 @@ public interface StoreOrderService extends IService<StoreOrder> {
|
|||
* @param uid 用户uid
|
||||
* @return Integer
|
||||
*/
|
||||
Long getOrderCountByUid(Integer uid);
|
||||
Long getOrderCountByUid(Long uid);
|
||||
|
||||
/**
|
||||
* 获取用户总消费金额
|
||||
|
@ -220,7 +220,7 @@ public interface StoreOrderService extends IService<StoreOrder> {
|
|||
* @param uid 用户uid
|
||||
* @return Integer
|
||||
*/
|
||||
Long getOrderCountByUidAndDate(Integer uid, String date);
|
||||
Long getOrderCountByUidAndDate(Long uid, String date);
|
||||
|
||||
/**
|
||||
* 获取用户消费金额(时间)
|
||||
|
@ -380,7 +380,7 @@ public interface StoreOrderService extends IService<StoreOrder> {
|
|||
* @param uid 用户uid
|
||||
* @param spreadId 推广人uid
|
||||
*/
|
||||
OrderBrokerageData getBrokerageData(Integer uid, Integer spreadId);
|
||||
OrderBrokerageData getBrokerageData(Long uid, Integer spreadId);
|
||||
|
||||
/**
|
||||
* 会员充值
|
||||
|
|
|
@ -231,7 +231,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
* @return 订单结果列表
|
||||
*/
|
||||
@Override
|
||||
public List<StoreOrder> getUserOrderList(Integer uid, Integer status, PageParam pageParamRequest) {
|
||||
public List<StoreOrder> getUserOrderList(Long uid, Integer status, PageParam pageParamRequest) {
|
||||
PageHelper.startPage(pageParamRequest.getPageNo(), pageParamRequest.getPageSize());
|
||||
LambdaQueryWrapper<StoreOrder> lqw = new LambdaQueryWrapper<>();
|
||||
orderUtil.statusApiByWhere(lqw, status);
|
||||
|
@ -541,7 +541,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
* @return 用户当天的秒杀商品订单数量
|
||||
*/
|
||||
@Override
|
||||
public List<StoreOrder> getUserCurrentDaySecKillOrders(Integer uid, Integer seckillId) {
|
||||
public List<StoreOrder> getUserCurrentDaySecKillOrders(Long uid, Integer seckillId) {
|
||||
String dayStart = DateUtils.nowDateTime(Constants.DATE_FORMAT_START);
|
||||
String dayEnd = DateUtils.nowDateTime(Constants.DATE_FORMAT_END);
|
||||
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();
|
||||
|
@ -560,7 +560,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
* @return 用户当前的砍价订单
|
||||
*/
|
||||
@Override
|
||||
public List<StoreOrder> getUserCurrentBargainOrders(Integer uid, Integer bargainId) {
|
||||
public List<StoreOrder> getUserCurrentBargainOrders(Long uid, Integer bargainId) {
|
||||
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StoreOrder::getUid, uid);
|
||||
lqw.eq(StoreOrder::getBargainId, bargainId);
|
||||
|
@ -576,7 +576,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
* @return 用户当前的拼团订单
|
||||
*/
|
||||
@Override
|
||||
public List<StoreOrder> getUserCurrentCombinationOrders(Integer uid, Integer combinationId) {
|
||||
public List<StoreOrder> getUserCurrentCombinationOrders(Long uid, Integer combinationId) {
|
||||
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StoreOrder::getUid, uid);
|
||||
lqw.eq(StoreOrder::getCombinationId, combinationId);
|
||||
|
@ -724,7 +724,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
* @return Integer
|
||||
*/
|
||||
@Override
|
||||
public Long getOrderCountByUid(Integer uid) {
|
||||
public Long getOrderCountByUid(Long uid) {
|
||||
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StoreOrder::getPaid, true);
|
||||
lqw.eq(StoreOrder::getIsDel, false);
|
||||
|
@ -759,7 +759,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
* @return Integer
|
||||
*/
|
||||
@Override
|
||||
public Long getOrderCountByUidAndDate(Integer uid, String date) {
|
||||
public Long getOrderCountByUidAndDate(Long uid, String date) {
|
||||
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StoreOrder::getPaid, true);
|
||||
lqw.eq(StoreOrder::getIsDel, false);
|
||||
|
@ -1165,7 +1165,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
* @param spreadId 推广人uid
|
||||
*/
|
||||
@Override
|
||||
public OrderBrokerageData getBrokerageData(Integer uid, Integer spreadId) {
|
||||
public OrderBrokerageData getBrokerageData(Long uid, Integer spreadId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -1226,7 +1226,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
}catch (Exception e) {
|
||||
log.error("删除提报记录异常{}",e);
|
||||
}
|
||||
|
||||
//删除本地提报记录
|
||||
phoneRecordService.deletePhoneRecord(orderDO.getId());
|
||||
// 表示退款
|
||||
} else {
|
||||
// 表示支付
|
||||
|
|
|
@ -53,7 +53,7 @@ public interface StoreProductRelationService extends IService<StoreProductRelati
|
|||
* @param uid 用户uid
|
||||
* @return 收藏数量
|
||||
*/
|
||||
Integer getCollectCountByUid(Integer uid);
|
||||
Integer getCollectCountByUid(Long uid);
|
||||
|
||||
/**
|
||||
* 根据商品Id取消收藏
|
||||
|
|
|
@ -159,7 +159,7 @@ public class StoreProductRelationServiceImpl extends ServiceImpl<StoreProductRel
|
|||
* @return 收藏数量
|
||||
*/
|
||||
@Override
|
||||
public Integer getCollectCountByUid(Integer uid) {
|
||||
public Integer getCollectCountByUid(Long uid) {
|
||||
LambdaQueryWrapper<StoreProductRelation> lqr = Wrappers.lambdaQuery();
|
||||
lqr.eq(StoreProductRelation::getUid, uid);
|
||||
lqr.eq(StoreProductRelation::getType,"collect");
|
||||
|
|
|
@ -3,6 +3,22 @@
|
|||
<mapper namespace="cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesFreeMapper">
|
||||
|
||||
<select id="getListGroup" resultType="cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesFreeRespVO" parameterType="integer">
|
||||
SELECT group_concat(`city_id`) AS city_id, province_id, title, `number`, price, uniqid FROM eb_shipping_templates_free where temp_id = #{tempId, jdbcType=INTEGER} GROUP BY `uniqid`,id ORDER BY id ASC
|
||||
SELECT
|
||||
city_id, province_id, title, `number`, price, uniqid
|
||||
FROM
|
||||
eb_shipping_templates_free es
|
||||
JOIN
|
||||
(
|
||||
SELECT
|
||||
MAX(id) id
|
||||
FROM
|
||||
eb_shipping_templates_free
|
||||
where
|
||||
temp_id = #{tempId, jdbcType=INTEGER}
|
||||
GROUP BY
|
||||
`uniqid`
|
||||
ORDER BY id ASC
|
||||
) a
|
||||
ON a.id = es.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -3,6 +3,22 @@
|
|||
<mapper namespace="cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesNoDeliveryMapper">
|
||||
|
||||
<select id="getList" resultType="cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO" parameterType="integer">
|
||||
SELECT group_concat(`city_id`) AS city_id, province_id, title, uniqid FROM eb_shipping_templates_no_delivery WHERE temp_id = #{tempId, jdbcType=INTEGER} GROUP BY `uniqid`,id ORDER BY id ASC
|
||||
SELECT
|
||||
city_id, province_id, title, uniqid
|
||||
FROM
|
||||
eb_shipping_templates_no_delivery es
|
||||
JOIN
|
||||
(
|
||||
SELECT
|
||||
MAX(id) id
|
||||
FROM
|
||||
eb_shipping_templates_no_delivery
|
||||
where
|
||||
temp_id = #{tempId, jdbcType=INTEGER}
|
||||
GROUP BY
|
||||
`uniqid`
|
||||
ORDER BY id ASC
|
||||
) a
|
||||
ON a.id = es.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -3,6 +3,22 @@
|
|||
<mapper namespace="cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesRegionMapper">
|
||||
|
||||
<select id="getListGroup" resultType="cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesRegionRespVO" parameterType="integer">
|
||||
SELECT group_concat(`city_id`) AS city_id, province_id, `first`, first_price, title, `renewal`, renewal_price, uniqid FROM eb_shipping_templates_region where temp_id = #{tempId, jdbcType=INTEGER} GROUP BY `uniqid`,id ORDER BY id ASC
|
||||
SELECT
|
||||
city_id, province_id, `first`, first_price, title, `renewal`, renewal_price, uniqid
|
||||
FROM
|
||||
eb_shipping_templates_region es
|
||||
JOIN
|
||||
(
|
||||
SELECT
|
||||
MAX(id) id
|
||||
FROM
|
||||
eb_shipping_templates_region
|
||||
where
|
||||
temp_id = #{tempId, jdbcType=INTEGER}
|
||||
GROUP BY
|
||||
`uniqid`
|
||||
ORDER BY id ASC
|
||||
) a
|
||||
ON a.id = es.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -375,7 +375,7 @@ export default {
|
|||
logistics.shippingRegion({ tempId: this.tempId }).then(res => {
|
||||
res.data.forEach((item, index) => {
|
||||
// item.title = JSON.parse(item.title)
|
||||
item.city_ids = item.title
|
||||
item.city_ids = JSON.parse(item.title)
|
||||
})
|
||||
this.ruleForm.region = res.data
|
||||
})
|
||||
|
@ -385,10 +385,9 @@ export default {
|
|||
logistics.shippingFree({ tempId: this.tempId }).then(res => {
|
||||
res.data.forEach((item, index) => {
|
||||
// item.title = JSON.parse(item.title)
|
||||
item.city_ids = item.cityId.split(',')
|
||||
item.city_ids = JSON.parse(item.title)
|
||||
})
|
||||
this.ruleForm.free = res.data
|
||||
console.log(this.ruleForm.free )
|
||||
|
||||
})
|
||||
},
|
||||
|
@ -397,11 +396,9 @@ export default {
|
|||
logistics.shippingNodelivery({ tempId: this.tempId }).then(res => {
|
||||
res.data.forEach((item, index) => {
|
||||
// item.title = JSON.parse(item.title)
|
||||
item.city_ids = item.cityId.split(',')
|
||||
item.city_ids = JSON.parse(item.title)
|
||||
})
|
||||
this.ruleForm.noDelivery = res.data
|
||||
console.log(this.ruleForm.noDelivery )
|
||||
|
||||
})
|
||||
},
|
||||
removeChild(list){
|
||||
|
@ -462,9 +459,11 @@ export default {
|
|||
}
|
||||
this.ruleForm.region.forEach((el, index) => {
|
||||
if(el.city_ids.length > 0){
|
||||
el.cityId = JSON.stringify(el.city_ids)
|
||||
el.title = JSON.stringify(el.city_ids)
|
||||
el.cityId = el.city_ids.join(",")
|
||||
}else{
|
||||
el.cityId = 'all'
|
||||
el.title = 0
|
||||
}
|
||||
})
|
||||
param.shippingTemplatesRegionRespVOList = this.ruleForm.region
|
||||
|
@ -484,9 +483,11 @@ export default {
|
|||
if (this.ruleForm.appoint) {
|
||||
this.ruleForm.free.forEach((el, index) => {
|
||||
if(el.city_ids.length > 0){
|
||||
el.cityId = JSON.stringify(el.city_ids)
|
||||
el.title = JSON.stringify(el.city_ids)
|
||||
el.cityId = el.city_ids.join(",")
|
||||
}else{
|
||||
el.cityId = 'all'
|
||||
el.title = 0
|
||||
}
|
||||
})
|
||||
param.shippingTemplatesFreeRespVOList = this.ruleForm.free
|
||||
|
@ -504,13 +505,10 @@ export default {
|
|||
// })
|
||||
}
|
||||
if (this.ruleForm.noDelivery) {
|
||||
param.shippingTemplatesNoDeliveryRespVOS = [{
|
||||
cityId:[],
|
||||
}]
|
||||
this.ruleForm.noRegion.forEach((item,index) => {
|
||||
param.shippingTemplatesNoDeliveryRespVOS[0].cityId.push(item[2])
|
||||
})
|
||||
param.shippingTemplatesNoDeliveryRespVOS[0].cityId = param.shippingTemplatesNoDeliveryRespVOS[0].cityId.join(",")
|
||||
param.shippingTemplatesNoDeliveryRespVOS = {
|
||||
title:JSON.stringify(this.ruleForm.noRegion),
|
||||
cityId:this.ruleForm.noRegion.join(','),
|
||||
}
|
||||
}
|
||||
if (this.type === 0) {
|
||||
logistics.shippingSave(param).then(res => {
|
||||
|
|
|
@ -216,7 +216,7 @@
|
|||
width: 100%;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
background-color: #fff;
|
||||
padding-bottom: 100rpx;
|
||||
padding-bottom: 20%;
|
||||
z-index: 99;
|
||||
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
"navigationBarTitleText": "权益明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member_back/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "话费返回"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member_equity/index",
|
||||
"style": {
|
||||
|
|
|
@ -1,30 +1,16 @@
|
|||
<template>
|
||||
<view class="box">
|
||||
<view class="box-member">
|
||||
<view class="member-left">
|
||||
<text class="left-title">{{memberDetail.grade}}</text>
|
||||
<view class="left-info">
|
||||
<text>{{userInfo.mobile}}</text>
|
||||
<text>会员积分:{{memberDetail.integral}}</text>
|
||||
</view>
|
||||
<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 class="list-item" >
|
||||
<view class="item-title">
|
||||
<view class="item-phone">
|
||||
<view></view>
|
||||
<text>充值号码:{{memberDetail.userPhone}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="member-right">
|
||||
<image src='../../static/images/vipStar.png'></image>
|
||||
<text>会员等级{{vipData.findIndex((item) => item == memberDetail.grade) +1}}级</text>
|
||||
<button @click="handleRenew">立即续费</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text>充值档次:{{memberDetail.grade}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-equity">
|
||||
<view class="equity-text">
|
||||
<view >
|
||||
|
@ -61,7 +47,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-navbar leftIcon="" title="会员申请"></u-navbar>
|
||||
<u-navbar leftIcon="" title="话费返回情况"></u-navbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -81,15 +67,15 @@
|
|||
list: [
|
||||
{
|
||||
img:'../../static/images/member240.png',
|
||||
name:'360'
|
||||
name:360
|
||||
},
|
||||
{
|
||||
img:'../../static/images/member400.png',
|
||||
name:'600'
|
||||
name:600
|
||||
},
|
||||
{
|
||||
img:'../../static/images/member960.png',
|
||||
name:'900'
|
||||
name:900
|
||||
},
|
||||
],
|
||||
vipData:['普通会员','中级会员','高级会员'],
|
||||
|
@ -99,24 +85,8 @@
|
|||
};
|
||||
},
|
||||
computed: mapGetters(['userInfo']),
|
||||
async onLoad() {
|
||||
const resful = await memberGradeInfo()
|
||||
if(resful.data.some((item) => !!parseInt(item.isExist))){
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
pagePath: '/pages/member_equity/index'
|
||||
})
|
||||
}else{
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
pagePath: '/pages/member_application/index'
|
||||
})
|
||||
uni.switchTab({
|
||||
url:'/pages/member_application/index'
|
||||
})
|
||||
}
|
||||
const res = await memberHeadInfo()
|
||||
this.memberDetail = res.data
|
||||
async onLoad(options) {
|
||||
this.memberDetail = options
|
||||
const equity = await query(this.userInfo.mobile)
|
||||
this.equityData = equity.data
|
||||
},
|
||||
|
@ -153,7 +123,7 @@
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
margin-bottom: 30%;
|
||||
padding: 40rpx 20rpx;
|
||||
margin-top: 10%;
|
||||
background: #fff;
|
||||
height: 100vh;
|
||||
|
@ -162,116 +132,52 @@
|
|||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
|
||||
.u-nav-slot{
|
||||
::v-deep .u-popup__content{
|
||||
padding-bottom: 20% !important;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.box-member {
|
||||
padding: 36rpx 40rpx;
|
||||
.list-item{
|
||||
margin-bottom: 10%;
|
||||
padding: 30rpx 16rpx 25rpx 16rpx;
|
||||
background: #FDF0F1;
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
// padding: 20rpx 20rpx 30rpx 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
line-height: 50rpx;
|
||||
.member-left {
|
||||
.item-title{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 69%;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
|
||||
.left-title {
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.left-info {
|
||||
.item-phone{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
color: #E91D51;
|
||||
view{
|
||||
border-radius: 3rpx;
|
||||
margin-right: 10rpx;
|
||||
width: 5rpx;
|
||||
height: 12rpx;
|
||||
background: #E91D51;
|
||||
}
|
||||
}
|
||||
.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;
|
||||
}
|
||||
button{
|
||||
padding: 6rpx ;
|
||||
font-size: 26rpx;
|
||||
background: rgb(22,155,213);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.member-right {
|
||||
.item-text{
|
||||
padding: 34rpx 12rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 22%;
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-top: 10rpx;
|
||||
padding: 7rpx 16rpx;
|
||||
background: #F22E60;
|
||||
border-image: linear-gradient(0deg, #A8052E, #FFFFFF) 10 10;
|
||||
border-radius: 18rpx;
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.box-equity {
|
||||
// border-radius: 20rpx;
|
||||
width: 100%;
|
||||
padding: 0 40rpx;
|
||||
background: url(../../static/images/memberEquity.png);
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
<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 class="member-right">
|
||||
<image src='../../static/images/vipStar.png'></image>
|
||||
<text>会员等级{{vipData.findIndex((item) => item == memberDetail.grade) +1}}级</text>
|
||||
<text>会员等级{{vipData.findIndex((item) => item == parseInt(memberDetail.grade)) +1}}级</text>
|
||||
<button @click="handleRenew">立即续费</button>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -47,11 +47,11 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="money-box money-treat">
|
||||
<text>带返还金额 (元) </text>
|
||||
<text>待返还金额 (元) </text>
|
||||
<text class="money-text">{{list[list.findIndex((i) => item.gear == i.name)].name-item.totalMoney}}</text>
|
||||
</view>
|
||||
<view class="money-box money-term">
|
||||
<text>带返还期额</text>
|
||||
<text>待返还期额</text>
|
||||
<text class="money-text">{{item.frequency}}x12</text>
|
||||
</view>
|
||||
<view class="money-box money-time">
|
||||
|
@ -81,15 +81,15 @@
|
|||
list: [
|
||||
{
|
||||
img:'../../static/images/member240.png',
|
||||
name:'360'
|
||||
name:360
|
||||
},
|
||||
{
|
||||
img:'../../static/images/member400.png',
|
||||
name:'600'
|
||||
name:600
|
||||
},
|
||||
{
|
||||
img:'../../static/images/member960.png',
|
||||
name:'900'
|
||||
name:900
|
||||
},
|
||||
],
|
||||
vipData:['普通会员','中级会员','高级会员'],
|
||||
|
@ -257,11 +257,11 @@
|
|||
}
|
||||
|
||||
button {
|
||||
border-radius: 18rpx;
|
||||
margin-top: 10rpx;
|
||||
padding: 7rpx 16rpx;
|
||||
background: #F22E60;
|
||||
border-image: linear-gradient(0deg, #A8052E, #FFFFFF) 10 10;
|
||||
border-radius: 18rpx;
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
memberGradeInfo,
|
||||
memberByHomeGradeInfo
|
||||
} from '@/api/member.js';
|
||||
import paymentMember from '@/components/paymentMember';
|
||||
|
@ -120,11 +119,11 @@
|
|||
mask: true
|
||||
});
|
||||
try{
|
||||
const res = await memberGradeInfo()
|
||||
this.memberData = res.data
|
||||
const res = await memberByHomeGradeInfo()
|
||||
this.memberData = res.data
|
||||
} finally{
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'form.confirmPhone' (){
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
<view class="box-seach">
|
||||
<u-search placeholder="按手机号搜索查询" v-model="keyword" border-color="#F94B78" height="70" margin="0 0 35rpx 0" placeholder-color="#9C9C9C" bg-color="#fff" :show-action="false"></u-search>
|
||||
</view>
|
||||
<view class="list-item" v-for="(item,index) in memberData" :key="index">
|
||||
<view class="list-item" v-for="(item,index) in memberData" :key="index" @click.stop="handleBack(item)">
|
||||
<view class="item-title">
|
||||
<view class="item-phone">
|
||||
<view></view>
|
||||
<text>充值号码:{{item.userPhone}}</text>
|
||||
</view>
|
||||
<button v-show="item.bool" @click="handleService(item.orderId)">申请退款</button>
|
||||
<button v-show="item.bool" @click.stop="handleService(item.orderId)">申请退款</button>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text>充值档次:{{item.grade}}</text>
|
||||
|
@ -34,23 +34,13 @@
|
|||
};
|
||||
},
|
||||
async onLoad() {
|
||||
let milliseconds = 2 * 3600 * 1000 // 7200000 毫秒
|
||||
let timestamp = new Date().getTime()
|
||||
const res = await memberOrderInfo()
|
||||
const arr = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
bool:item.createTime+milliseconds>timestamp
|
||||
}
|
||||
})
|
||||
this.memberData = arr
|
||||
await this.getList()
|
||||
},
|
||||
watch:{
|
||||
keyword :Debounce (function (){
|
||||
this.memberData.sort((a,b) =>{
|
||||
let aIndex = this.keyword.indexOf(a.userPhone)
|
||||
let bIndex = this.keyword.indexOf(b.userPhone)
|
||||
console.log(aIndex,bIndex)
|
||||
if(aIndex > bIndex) return -1
|
||||
if(aIndex < bIndex) return 1
|
||||
if(a.userPhone == b.userPhone){
|
||||
|
@ -64,8 +54,29 @@
|
|||
},1000)
|
||||
},
|
||||
methods: {
|
||||
handleBack(item){
|
||||
uni.navigateTo({
|
||||
url:`/pages/member_back/index?userPhone=${item.userPhone}&grade=${item.grade}`
|
||||
})
|
||||
},
|
||||
async getList(){
|
||||
let milliseconds = 2 * 3600 * 1000 // 7200000 毫秒
|
||||
let timestamp = new Date().getTime()
|
||||
const res = await memberOrderInfo()
|
||||
const arr = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
bool:item.createTime+milliseconds>timestamp
|
||||
}
|
||||
})
|
||||
this.memberData = arr
|
||||
},
|
||||
async handleService(orderId){
|
||||
await memberApplyRefund({orderId})
|
||||
this.$util.Tips({
|
||||
title: '申请成功'
|
||||
});
|
||||
await this.getList()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -75,7 +86,13 @@
|
|||
.box {
|
||||
margin-top: 10%;
|
||||
padding: 20% 40rpx;
|
||||
height: 100vh;
|
||||
background: url(../../static/images/memberBg.png);
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
.box-seach{
|
||||
z-index: 999;
|
||||
padding: 10% 40rpx;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
if (!that.mobile) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.mobile)) return that.$util.Tips({
|
||||
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if (!that.captcha) return that.$util.Tips({
|
||||
|
@ -156,7 +156,7 @@
|
|||
if (!that.mobile) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.mobile)) return that.$util.Tips({
|
||||
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if (!that.captcha) return that.$util.Tips({
|
||||
|
@ -204,7 +204,7 @@
|
|||
if (!that.mobile) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.mobile)) return that.$util.Tips({
|
||||
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
await registerVerify(that.mobile, 1)
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
if (!this.registerForm.mobile) return this.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.registerForm.mobile)) return this.$util.Tips({
|
||||
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[1-25-9])\d{8}$/g.test(this.registerForm.mobile)) return this.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if(this.checked.length === 0) return this.$util.Tips({
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if (!that.captcha) return that.$util.Tips({
|
||||
|
@ -114,7 +114,7 @@
|
|||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
await registerVerify(that.account, 3)
|
||||
|
|
Loading…
Reference in New Issue