Compare commits

..

3 Commits

Author SHA1 Message Date
xvv
50426fa947 9.24 2024-09-24 15:48:05 +08:00
xvv
55efb218b5 Merge remote-tracking branch 'origin/main'
# Conflicts:
2024-09-24 15:47:49 +08:00
xvv
da47068e17 9.24 2024-09-24 15:47:31 +08:00
26 changed files with 127 additions and 643 deletions

View File

@ -114,11 +114,6 @@ public class FleetInfo extends BaseEntity implements Serializable {
*/ */
private Date updateTime; private Date updateTime;
/**
* 车队负责人id
*/
private Integer userId;
/** /**
* 单次充值金额 * 单次充值金额
*/ */

View File

@ -126,10 +126,5 @@ public class FleetMember extends BaseEntity implements Serializable {
*/ */
private Date updateTime; private Date updateTime;
/**
* 用户ID
*/
private Integer userId;
} }

View File

@ -1,7 +1,6 @@
package com.fuint.business.fleet.service.impl; package com.fuint.business.fleet.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -18,26 +17,15 @@ import com.fuint.business.fleet.vo.FleetInfoVo;
import com.fuint.business.member.entity.LJStaff; import com.fuint.business.member.entity.LJStaff;
import com.fuint.business.member.service.ILJStaffService; import com.fuint.business.member.service.ILJStaffService;
import com.fuint.business.store.mapper.MtStoreMapper; import com.fuint.business.store.mapper.MtStoreMapper;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.entity.MtInvitation;
import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.mapper.MtInvitationMapper;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.common.dto.AccountInfo; import com.fuint.common.dto.AccountInfo;
import com.fuint.common.service.MemberService;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import com.fuint.repository.mapper.MtUserMapper; import com.fuint.repository.mapper.MtUserMapper;
import com.fuint.repository.model.MtUser; import com.fuint.repository.model.MtUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Random;
/** /**
@ -61,19 +49,6 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo>
@Autowired @Autowired
private MtStoreMapper mtStoreMapper; private MtStoreMapper mtStoreMapper;
@Resource
private MtInvitationMapper mtInvitationMapper;
@Resource
LJUserGradeService ljUserGradeService;
@Resource
private UserBalanceService userBalanceService;
@Resource
private ILJStoreService iljStoreService;
@Override @Override
public IPage<FleetInfoVo> queryPage(Page page, FleetInfoVo fleetInfo) { public IPage<FleetInfoVo> queryPage(Page page, FleetInfoVo fleetInfo) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
@ -123,51 +98,14 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo>
*/ */
@Override @Override
public int insert(FleetInfo fleetInfo) { public int insert(FleetInfo fleetInfo) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
FleetInfo fleetInfo1 = selectByName(fleetInfo.getFleetName()); FleetInfo fleetInfo1 = selectByName(fleetInfo.getFleetName());
if (ObjectUtil.isNotEmpty(fleetInfo1)){ if (ObjectUtil.isNotEmpty(fleetInfo1)){
return 0; return 0;
} }
//判断当前车队负责人是否存在账号 AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
.eq(MtUser::getMobile, fleetInfo.getMobile())
.last("limit 1"));
if (ObjectUtil.isEmpty(mtUser)) {
mtUser = new MtUser();
mtUser.setUserNo(editUserNo());
mtUser.setMobile(fleetInfo.getMobile());
mtUser.setName(fleetInfo.getFleetLeader());
mtUser.setDescription("车队信息自动注册");
mtUser.setCreateTime(DateUtil.date());
mtUserMapper.insert(mtUser);
//注册完成后再查询一次
mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
.eq(MtUser::getMobile, fleetInfo.getMobile())
.last("limit 1"));
createVaseInfo(mtUser, nowAccountInfo.getStoreId().toString(), fleetInfo.getStaffId(), null);
}
fleetInfo.setUserId(mtUser.getId());
fleetInfo.setStoreId(nowAccountInfo.getStoreId()); fleetInfo.setStoreId(nowAccountInfo.getStoreId());
fleetInfo.setChainStoreId(nowAccountInfo.getChainStoreId()); fleetInfo.setChainStoreId(nowAccountInfo.getChainStoreId());
int insert = baseMapper.insert(fleetInfo); return baseMapper.insert(fleetInfo);
if (insert > 0) {
// fleet_member表新增一条记录
FleetInfo fleetInfo2 = baseMapper.selectOne(new LambdaQueryWrapper<FleetInfo>()
.eq(FleetInfo::getUserId, mtUser.getId()));
FleetMember fleetMember = new FleetMember();
BeanUtil.copyProperties(fleetInfo, fleetMember);
fleetMember.setFleetId(fleetInfo2.getId());
fleetMember.setUserId(mtUser.getId());
fleetMember.setMobile(fleetInfo.getMobile());
fleetMember.setName(fleetInfo.getFleetLeader());
return fleetMemberMapper.insert(fleetMember);
}
return 0;
} }
/** /**
@ -232,86 +170,4 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo>
fleetInfoUniVo.setStoreName(mtStoreMapper.selectById(storeId).getName()); fleetInfoUniVo.setStoreName(mtStoreMapper.selectById(storeId).getName());
return fleetInfoUniVo; return fleetInfoUniVo;
} }
/**
* 创建用户的基础信息
*/
private void createVaseInfo (MtUser mtUser, String storeId,String staffId, String inviterId) {
LJStore store = iljStoreService.selectStoreByStoreId(Integer.parseInt(storeId));
// 根据userid和连锁店id查询是否存在对应的余额信息
UserBalance userBalance = userBalanceService.selectUserBalance(mtUser.getId(), store.getChainStoreId());
if (ObjectUtil.isEmpty(userBalance)) {
// 新增余额信息
UserBalance userBalanceAdd = new UserBalance();
userBalanceAdd.setMtUserId(mtUser.getId());
userBalanceAdd.setStoreId(Integer.parseInt(storeId));
userBalanceAdd.setChainStoreId(store.getChainStoreId());
userBalanceAdd.setCardBalance(0.0);
userBalanceAdd.setGiveAmount(0.0);
userBalanceAdd.setPoints(0);
userBalanceAdd.setUsedPoints(0);
userBalanceAdd.setGrowthValue(0);
userBalanceAdd.setConsumeNum(0);
userBalanceAdd.setUserStatus("0");
userBalanceAdd.setUserSource("门店扫码");
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
userBalanceAdd.setGradeId(ljUserGrade.getId());
}
// 新增会员余额信息
userBalanceService.insertUserBalance(userBalanceAdd);
}else {
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
userBalance.setGradeId(ljUserGrade.getId());
}
userBalanceService.updateUserBalance(userBalance);
}
// 查询关联表里面是否有信息 注册邀请
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUser.getId());
if (ObjectUtil.isEmpty(mtInvitation1)) {
MtInvitation mtInvitation = new MtInvitation();
mtInvitation.setUserId(mtUser.getId());
mtInvitation.setStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(staffId) && staffId !="") {
mtInvitation.setStaffId(Integer.parseInt(staffId));
}
if (ObjectUtil.isNotEmpty(inviterId) && inviterId !="") {
mtInvitation.setInviterId(Integer.parseInt(inviterId));
}
if (!ObjectUtil.isEmpty(store)){
mtInvitation.setChainStoreId(store.getChainStoreId());
}
mtInvitationMapper.insert(mtInvitation);
}
}
//生成用户编号
private String editUserNo() {
Random random = new Random();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 7; i++) {
sb.append(random.nextInt(10));
}
String digits = sb.toString();
int sum = 0;
for (int i = 0; i < digits.length(); i++) {
int digit = Integer.parseInt(String.valueOf(digits.charAt(i)));
if (i % 2 == 0) {
sum += digit;
} else {
sum += digit * 3;
}
}
int checksum = (10 - (sum % 10)) % 10;
String number = digits + checksum;
return number;
}
} }

View File

@ -1,6 +1,5 @@
package com.fuint.business.fleet.service.impl; package com.fuint.business.fleet.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -13,28 +12,13 @@ import com.fuint.business.fleet.mapper.FleetMemberMapper;
import com.fuint.business.fleet.service.FleetInfoService; import com.fuint.business.fleet.service.FleetInfoService;
import com.fuint.business.fleet.service.FleetMemberService; import com.fuint.business.fleet.service.FleetMemberService;
import com.fuint.business.fleet.vo.FleetMemberVo; import com.fuint.business.fleet.vo.FleetMemberVo;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.entity.MtInvitation;
import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.mapper.MtInvitationMapper;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.business.userManager.service.LJUserService; import com.fuint.business.userManager.service.LJUserService;
import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.vo.LJUserVo; import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.dto.AccountInfo; import com.fuint.common.dto.AccountInfo;
import com.fuint.common.service.impl.MemberServiceImpl;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import com.fuint.repository.mapper.MtUserMapper;
import com.fuint.repository.model.MtUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Random;
/** /**
* 车队成员(FleetMember)表服务实现类 * 车队成员(FleetMember)表服务实现类
* *
@ -48,19 +32,6 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
private LJUserService userService; private LJUserService userService;
@Autowired @Autowired
private FleetInfoService fleetInfoService; private FleetInfoService fleetInfoService;
@Autowired
private MtUserMapper mtUserMapper;
@Resource
private MtInvitationMapper mtInvitationMapper;
@Resource
LJUserGradeService ljUserGradeService;
@Resource
private UserBalanceService userBalanceService;
@Resource
private ILJStoreService iljStoreService;
@Override @Override
public IPage<FleetMemberVo> queryPage(Page page, FleetMemberVo fleetMember) { public IPage<FleetMemberVo> queryPage(Page page, FleetMemberVo fleetMember) {
@ -101,34 +72,16 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
*/ */
@Override @Override
public int insert(FleetMember fleetMember) { public int insert(FleetMember fleetMember) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
FleetMember fleetMember1 = queryByMobile(fleetMember.getMobile()); FleetMember fleetMember1 = queryByMobile(fleetMember.getMobile());
if (ObjectUtil.isNotEmpty(fleetMember1)) { if (ObjectUtil.isNotEmpty(fleetMember1)) {
return 0; return 0;
} }
// LJUserVo user = userService.selectUserByMobileAndChantStoreId(fleetMember.getMobile()); LJUserVo user = userService.selectUserByMobileAndChantStoreId(fleetMember.getMobile());
//判断当前车队负责人是否存在账号 if (ObjectUtil.isEmpty(user)){
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>() return 2;
.eq(MtUser::getMobile, fleetMember.getMobile())
.last("limit 1"));
if (ObjectUtil.isEmpty(mtUser)){
//注册用户
mtUser = new MtUser();
mtUser.setUserNo(editUserNo());
mtUser.setMobile(fleetMember.getMobile());
mtUser.setName(fleetMember.getName());
mtUser.setDescription("车队成员自动注册");
mtUser.setCreateTime(DateUtil.date());
mtUserMapper.insert(mtUser);
//注册完成后再查询一次
mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
.eq(MtUser::getMobile, fleetMember.getMobile())
.last("limit 1"));
createVaseInfo(mtUser, nowAccountInfo.getStoreId().toString(), null, null);
} }
fleetMember.setUserId(mtUser.getId()); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
fleetMember.setStoreId(nowAccountInfo.getStoreId()); fleetMember.setStoreId(nowAccountInfo.getStoreId());
fleetMember.setChainStoreId(nowAccountInfo.getChainStoreId()); fleetMember.setChainStoreId(nowAccountInfo.getChainStoreId());
return baseMapper.insert(fleetMember); return baseMapper.insert(fleetMember);
@ -191,84 +144,4 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
fleetMember.setIfLogOff("1"); fleetMember.setIfLogOff("1");
return baseMapper.updateById(fleetMember); return baseMapper.updateById(fleetMember);
} }
/**
* 创建用户的基础信息
*/
private void createVaseInfo (MtUser mtUser, String storeId,String staffId, String inviterId) {
LJStore store = iljStoreService.selectStoreByStoreId(Integer.parseInt(storeId));
// 根据userid和连锁店id查询是否存在对应的余额信息
UserBalance userBalance = userBalanceService.selectUserBalance(mtUser.getId(), store.getChainStoreId());
if (ObjectUtil.isEmpty(userBalance)) {
// 新增余额信息
UserBalance userBalanceAdd = new UserBalance();
userBalanceAdd.setMtUserId(mtUser.getId());
userBalanceAdd.setStoreId(Integer.parseInt(storeId));
userBalanceAdd.setChainStoreId(store.getChainStoreId());
userBalanceAdd.setCardBalance(0.0);
userBalanceAdd.setGiveAmount(0.0);
userBalanceAdd.setPoints(0);
userBalanceAdd.setUsedPoints(0);
userBalanceAdd.setGrowthValue(0);
userBalanceAdd.setConsumeNum(0);
userBalanceAdd.setUserStatus("0");
userBalanceAdd.setUserSource("门店扫码");
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
userBalanceAdd.setGradeId(ljUserGrade.getId());
}
// 新增会员余额信息
userBalanceService.insertUserBalance(userBalanceAdd);
}else {
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
userBalance.setGradeId(ljUserGrade.getId());
}
userBalanceService.updateUserBalance(userBalance);
}
// 查询关联表里面是否有信息 注册邀请
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUser.getId());
if (ObjectUtil.isEmpty(mtInvitation1)) {
MtInvitation mtInvitation = new MtInvitation();
mtInvitation.setUserId(mtUser.getId());
mtInvitation.setStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(staffId) && staffId !="") {
mtInvitation.setStaffId(Integer.parseInt(staffId));
}
if (ObjectUtil.isNotEmpty(inviterId) && inviterId !="") {
mtInvitation.setInviterId(Integer.parseInt(inviterId));
}
if (!ObjectUtil.isEmpty(store)){
mtInvitation.setChainStoreId(store.getChainStoreId());
}
mtInvitationMapper.insert(mtInvitation);
}
}
//生成用户编号
private String editUserNo() {
Random random = new Random();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 7; i++) {
sb.append(random.nextInt(10));
}
String digits = sb.toString();
int sum = 0;
for (int i = 0; i < digits.length(); i++) {
int digit = Integer.parseInt(String.valueOf(digits.charAt(i)));
if (i % 2 == 0) {
sum += digit;
} else {
sum += digit * 3;
}
}
int checksum = (10 - (sum % 10)) % 10;
String number = digits + checksum;
return number;
}
} }

View File

@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser; import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponUserService; import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponUserService;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo;
import com.fuint.framework.web.BaseController; import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject; import com.fuint.framework.web.ResponseObject;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -89,13 +88,5 @@ public class CardCouponUserController extends BaseController {
public ResponseObject delete(@RequestParam("idList") List<Long> idList) { public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
return getSuccessResult(this.cardCouponUserService.removeByIds(idList)); return getSuccessResult(this.cardCouponUserService.removeByIds(idList));
} }
@GetMapping("queryPage")
public ResponseObject queryPage(CardCouponUserVo cardCouponUserVo,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize) {
Page page =new Page(pageNo,pageSize);
return getSuccessResult(cardCouponUserService.queryPage(page, cardCouponUserVo));
}
} }

View File

@ -1,10 +1,7 @@
package com.fuint.business.marketingActivity.cardCoupon.mapper; package com.fuint.business.marketingActivity.cardCoupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; 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.marketingActivity.cardCoupon.entity.CardCouponUser; import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO; import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -30,13 +27,5 @@ public interface CardCouponUserMapper extends BaseMapper<CardCouponUser> {
* @return java.util.List<com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO> * @return java.util.List<com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO>
**/ **/
List<CardCouponVO> selectAllList(@Param("storeId") Integer storeId,@Param("userId") Integer userId,@Param("nowDate") String nowDate); List<CardCouponVO> selectAllList(@Param("storeId") Integer storeId,@Param("userId") Integer userId,@Param("nowDate") String nowDate);
/**
* 小程序查询优惠券列表信息
* @param page
* @param cardCouponUserVo
* @return
*/
IPage<CardCouponUserVo> queryPage(Page page,@Param("entity") CardCouponUserVo cardCouponUserVo);
} }

View File

@ -16,17 +16,4 @@
AND cc.`type` != '2' AND cc.`type` != '2'
AND main.start_time &lt;= #{nowDate} AND main.end_time &gt;= #{nowDate} AND main.start_time &lt;= #{nowDate} AND main.end_time &gt;= #{nowDate}
</select> </select>
<select id="queryPage" resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo">
SELECT ccu.*,cc.`name` couponName,cc.type,cc.use_condition FROM card_coupon_user ccu
LEFT JOIN card_coupon cc ON ccu.card_coupon_id = cc.id
<where>
ccu.mt_user_id = #{entity.mtUserId}
<if test="entity.storeId != null and entity.storeId != ''">
and ccu.store_id = #{entity.storeId}
</if>
<if test="entity.status != null and entity.status != ''">
and ccu.status = #{entity.status}
</if>
</where>
</select>
</mapper> </mapper>

View File

@ -1,10 +1,7 @@
package com.fuint.business.marketingActivity.cardCoupon.service; package com.fuint.business.marketingActivity.cardCoupon.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser; import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO; import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
import io.swagger.models.auth.In; import io.swagger.models.auth.In;
@ -36,13 +33,5 @@ public interface CardCouponUserService extends IService<CardCouponUser> {
* @return java.util.List<com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO> * @return java.util.List<com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO>
**/ **/
List<CardCouponVO> selectAllList(Integer storeId, Integer userId, Date nowDate); List<CardCouponVO> selectAllList(Integer storeId, Integer userId, Date nowDate);
/**
* 小程序分页查询优惠券信息列表
* @param page
* @param cardCouponUserVo
* @return
*/
IPage<CardCouponUserVo> queryPage(Page page,CardCouponUserVo cardCouponUserVo);
} }

View File

@ -3,18 +3,13 @@ package com.fuint.business.marketingActivity.cardCoupon.service.impl;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon; import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper; import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser; import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponService; import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponService;
import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponUserService; import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponUserService;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO; import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -34,29 +29,27 @@ public class CardCouponUserServiceImpl extends ServiceImpl<CardCouponUserMapper,
private CardCouponService cardCouponService; private CardCouponService cardCouponService;
@Autowired @Autowired
private CardCouponUserMapper cardCouponUserMapper; private CardCouponUserMapper cardCouponUserMapper;
/** /**
* 判断用户是否还能领取该优惠卷 * 判断用户是否还能领取该优惠卷
*
* @param couponId 优惠卷id * @param couponId 优惠卷id
* @param userId 用户主键 * @param userId 用户主键
* @return true false 不能 * @return true false 不能
*/ */
@Override @Override
public boolean userCanGet(Integer couponId, Integer userId) { public boolean userCanGet(Integer couponId, Integer userId) {
CardCoupon cardCoupon = cardCouponService.getById(couponId); CardCoupon cardCoupon = cardCouponService.getById(couponId);
if (cardCoupon.getTfTotal() <= cardCoupon.getTfGetNum()) { if (cardCoupon.getTfTotal()<=cardCoupon.getTfGetNum()){
//领取数量大于策略中的送出总量 //领取数量大于策略中的送出总量
return false; return false;
} }
String nowDate = DateUtil.format(new Date(), "yyyy-MM-dd"); String nowDate = DateUtil.format(new Date(), "yyyy-MM-dd");
LambdaQueryWrapper<CardCouponUser> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<CardCouponUser> queryWrapper =new LambdaQueryWrapper<>();
queryWrapper.eq(CardCouponUser::getCardCouponId, couponId).eq(CardCouponUser::getMtUserId, userId); queryWrapper.eq(CardCouponUser::getCardCouponId,couponId).eq(CardCouponUser::getMtUserId,userId);
List<CardCouponUser> list = this.list(queryWrapper); List<CardCouponUser> list = this.list(queryWrapper);
if (CollectionUtil.isEmpty(list)) { if (CollectionUtil.isEmpty(list)){
list = new ArrayList<>(); list =new ArrayList<>();
} }
if (list.size() >= cardCoupon.getGetNumLimit()) { if (list.size()>=cardCoupon.getGetNumLimit()){
//当前用户领取已到达上限 //当前用户领取已到达上限
return false; return false;
} }
@ -79,71 +72,7 @@ public class CardCouponUserServiceImpl extends ServiceImpl<CardCouponUserMapper,
**/ **/
@Override @Override
public List<CardCouponVO> selectAllList(Integer storeId, Integer userId, Date nowDate) { public List<CardCouponVO> selectAllList(Integer storeId, Integer userId, Date nowDate) {
return cardCouponUserMapper.selectAllList(storeId, userId, DateUtil.formatDate(nowDate)); return cardCouponUserMapper.selectAllList(storeId,userId, DateUtil.formatDate(nowDate));
}
@Override
public IPage<CardCouponUserVo> queryPage(Page page, CardCouponUserVo cardCouponUserVo) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
cardCouponUserVo.setMtUserId(nowAccountInfo.getId());
IPage<CardCouponUserVo> cardCouponUserVoIPage = baseMapper.queryPage(page, cardCouponUserVo);
for (CardCouponUserVo record : cardCouponUserVoIPage.getRecords()) {
// 未使用
if (record.getStatus().equals("0")) {
if (record.getType().equals("1")) {
record.setBgImg("http://47.94.122.58:83/coup1.png");
}
if (record.getType().equals("2")) {
record.setBgImg("http://47.94.122.58:83/coup5.png");
}
if (record.getType().equals("3")) {
record.setBgImg("http://47.94.122.58:83/coup2.png");
}
if (record.getType().equals("4")) {
record.setBgImg("http://47.94.122.58:83/coup3.png");
}
if (record.getType().equals("5")) {
record.setBgImg("http://47.94.122.58:83/coup4.png");
}
}
// 已核销
if (record.getStatus().equals("1")) {
if (record.getType().equals("1")) {
record.setBgImg("http://47.94.122.58:83/youp1.png");
}
if (record.getType().equals("2")) {
record.setBgImg("http://47.94.122.58:83/youp5.png");
}
if (record.getType().equals("3")) {
record.setBgImg("http://47.94.122.58:83/youp2.png");
}
if (record.getType().equals("4")) {
record.setBgImg("http://47.94.122.58:83/youp3.png");
}
if (record.getType().equals("5")) {
record.setBgImg("http://47.94.122.58:83/youp4.png");
}
}
// 已过期
if (record.getStatus().equals("2")) {
if (record.getType().equals("1")) {
record.setBgImg("http://47.94.122.58:83/qoup1.png");
}
if (record.getType().equals("2")) {
record.setBgImg("http://47.94.122.58:83/qoup5.png");
}
if (record.getType().equals("3")) {
record.setBgImg("http://47.94.122.58:83/qoup2.png");
}
if (record.getType().equals("4")) {
record.setBgImg("http://47.94.122.58:83/qoup3.png");
}
if (record.getType().equals("5")) {
record.setBgImg("http://47.94.122.58:83/qoup4.png");
}
}
}
return cardCouponUserVoIPage;
} }
} }

View File

@ -1,26 +0,0 @@
package com.fuint.business.marketingActivity.cardCoupon.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
import lombok.Data;
@Data
public class CardCouponUserVo extends CardCouponUser {
/**
* 优惠券名称
*/
private String couponName;
/**
* 卡券类型 1代金券2兑换券3折扣券4油品立减券5单品代金券
*/
private String type;
/**
* 使用条件
*/
private String useCondition;
/**
* 背景图
*/
@TableField(exist = false)
private String bgImg;
}

View File

@ -32,8 +32,8 @@ public class MtUserCarNoController extends BaseController {
* @return * @return
*/ */
@GetMapping @GetMapping
public ResponseObject list(Integer storeId){ public ResponseObject list(){
return getSuccessResult(mtUserCarNoService.getCarNoList(storeId)); return getSuccessResult(mtUserCarNoService.getCarNoList());
} }
/** /**

View File

@ -33,9 +33,6 @@ public class MtUserCarNo implements Serializable {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
@ApiModelProperty(value = "所属商户")
private Integer storeId;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private Integer userId; private Integer userId;

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.userManager.mapper.MtUserCarNoMapper">
</mapper>

View File

@ -20,7 +20,7 @@ public interface IMtUserCarNoService extends IService<MtUserCarNo> {
* *
* @return * @return
*/ */
List<MtUserCarNo> getCarNoList(Integer storeId); List<MtUserCarNo> getCarNoList();
/** /**
* 新增用户车牌号 * 新增用户车牌号

View File

@ -31,11 +31,10 @@ public class MtUserCarNoServiceImpl extends ServiceImpl<MtUserCarNoMapper, MtUse
* @return * @return
*/ */
@Override @Override
public List<MtUserCarNo> getCarNoList(Integer storeId) { public List<MtUserCarNo> getCarNoList() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
return baseMapper.selectList(new LambdaQueryWrapper<MtUserCarNo>() return baseMapper.selectList(new LambdaQueryWrapper<MtUserCarNo>()
.eq(MtUserCarNo::getUserId, nowAccountInfo.getId()) .eq(MtUserCarNo::getUserId, nowAccountInfo.getId()));
.eq(MtUserCarNo::getStoreId, storeId));
} }
/** /**

View File

@ -309,8 +309,8 @@
{ {
"path": "invite/invite", "path": "invite/invite",
"style": { "style": {
"navigationBarTitleText": "邀请有礼", "navigationBarTitleText": "邀请有礼"
"navigationStyle": "custom"
} }
}, },
{ {

View File

@ -7,29 +7,24 @@
<view class="my-icons"></view> <view class="my-icons"></view>
</view> </view>
<!-- 顶部区域 --> <!-- 顶部区域 -->
<view class="box-xianze" v-for="(item,index) in 3" :key="index"> <view class="box-xianze" v-for="(item,index) in dataList" :key="index">
<view class="" @click="choose(item)"> <view class="box-left" @click="choose(item)">
<view style="display: flex;align-items: center;margin-bottom: 5px;"> <view style="display: flex;align-items: center;margin-bottom: 5px;">
<view class="">{{item.address || '地址'}}</view> <view v-if="item.ifDefault == 1" class="tapl">默认</view>
<view class=""> {{item.name || '名称'}}</view> <view class="">{{item.address}}</view>
<view class=""> {{item.mobile || '手机号'}}</view> </view>
<view style="display: flex;align-items: center; font-size: 14px; color: #666666;">
<view class=""> {{item.name}}</view>
<view class=""> {{item.mobile}}</view>
</view> </view>
</view> </view>
<view class="box-xia"> <view class="box-right" @click="goedit(item)">
<view class="box-left"> <u-icon name="edit-pen-fill" size="22"></u-icon>
<u-checkbox v-model="checked" shape="circle" label="默认信息"></u-checkbox>
</view>
<view class="box-right" @click="goedit(item)">
<u-icon name="edit-pen-fill" size="12"></u-icon>
<view>编辑</view>
<u-icon name="trash" size="12"></u-icon>
<view>删除</view>
</view>
</view> </view>
</view> </view>
<view class="bottom-anniu" @click="goedit()"> <view class="bottom-anniu" @click="goedit()">
<view class="">新增预留信息</view> <view class="">新增收货地址</view>
</view> </view>
</view> </view>
@ -45,7 +40,7 @@
return { return {
title: '', title: '',
dataList: '', dataList: '',
checked: false,
} }
}, },
onShow() { onShow() {
@ -127,18 +122,18 @@
.bottom-anniu { .bottom-anniu {
width: 90%; width: 90%;
height: 40px; height: 50px;
display: flex; display: flex;
align-items: center; align-items: center;
background: #FF9655; background: #1678ff;
color: white; color: white;
justify-content: center; justify-content: center;
position: fixed; position: fixed;
bottom: 40px; bottom: 15px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
border-radius: 50px; border-radius: 8px;
} }
@ -148,17 +143,20 @@
margin: 10px auto; margin: 10px auto;
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
display: flex;
justify-content: space-between;
} }
.box-left {} .box-left {
width: 85%;
}
.box-right { .box-right {
width: 60%; width: 15px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: center;
font-size: 14px;
color: #333333;
} }
.tapl { .tapl {
@ -172,10 +170,4 @@
border: 1px solid #1678ff; border: 1px solid #1678ff;
font-size: 14px; font-size: 14px;
} }
.box-xia {
display: flex;
justify-content: space-between;
margin-top: 20px;
}
</style> </style>

View File

@ -34,18 +34,18 @@
<view class="hui-time"> <view class="hui-time">
<view style="color: #FC1708; font-size: 14px;"> <view style="color: #FC1708; font-size: 14px;">
<span <span
v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}积分</span> v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}</span>
<span v-if="item.exchangeMethod == '积分+金额'">+</span> <span v-if="item.exchangeMethod == '积分+金额'">+</span>
<span <span
v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span> v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span>
<!-- <span>积分</span> --> <span>积分</span>
</view> </view>
</view> </view>
<view style="display: flex;align-items: center;justify-content: space-between;"> <view style="display: flex;align-items: center;justify-content: space-between;">
<view class="hui_"> <view class="hui_">
{{item.market || 0}} 3.5
</view> </view>
<view class="anniux"> <view class="anniux">
<text v-if="!item.remainingInventory || item.remainingInventory==0" <text v-if="!item.remainingInventory || item.remainingInventory==0"
@ -109,7 +109,7 @@
methods: { methods: {
transferIndex(index, categoryId) { transferIndex(index, categoryId) {
this.qhindex = index this.qhindex = index
if (!categoryId) { if (categoryId == undefined || categoryId == null) {
this.query.categoryId = '' this.query.categoryId = ''
} else { } else {
this.query.categoryId = categoryId this.query.categoryId = categoryId
@ -139,9 +139,6 @@
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.integralGiftList = res.data.records this.integralGiftList = res.data.records
console.log(res.data, 142);
}else{
this.integralGiftList = []
} }
}) })
}, },
@ -496,4 +493,4 @@
color: #999; color: #999;
text-decoration: line-through text-decoration: line-through
} }
</style> </style>

View File

@ -6,14 +6,13 @@
<view class="">积分余额</view> <view class="">积分余额</view>
<view class="d-s">{{cardBalance.points || 0}}<u-icon name="arrow-right"></u-icon> </view> <view class="d-s">{{cardBalance.points || 0}}<u-icon name="arrow-right"></u-icon> </view>
</view> </view>
<view class="f-box" v-for="(item,index) in integralGiftList" :key="index" @click="goDetails(item)"> <view class="f-box" v-for="(item,index) in 3" :key="index" @click="goDetails()">
<view class="f-top">{{item.storeName}}可用</view> <view class="f-top">中建锦绣二期站可用</view>
<view class="f-bs"> <view class="f-bs">
<image v-if="item.coverImage" :src="baseUrl+item.coverImage" mode="aspectFit" style="width: 60px; height: 60px; "></image> <image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<image v-else src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<view class="r-box"> <view class="r-box">
<view class=""> <view class="">
<view class="m_">{{item.giftName}}</view> <view class="m_">虚拟</view>
<view class="p_">300ml瓶装</view> <view class="p_">300ml瓶装</view>
<view class="q_">兑换券</view> <view class="q_">兑换券</view>
</view> </view>
@ -27,21 +26,15 @@
</view> </view>
</view> </view>
</view> </view>
<u-empty v-if="integralGiftList.length == 0" style="margin: 5px auto;" mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import config from '@/config'
import request from '../../utils/request' import request from '../../utils/request'
export default { export default {
data() { data() {
return { return {
baseUrl: config.baseUrl,
query: { query: {
chainStoreId: '', chainStoreId: '',
couponType: '', couponType: '',
@ -50,66 +43,13 @@
pageSize: 10 pageSize: 10
}, },
cardBalance: {}, cardBalance: {},
queryParam: {
storeId: uni.getStorageSync('storeId'),
status: '启用',
categoryId: '',
giftName: '',
deliveryMethod: '',
page: 1,
pageSize: 30
},
integralGiftList:[],
total:0
}
},
onPullDownRefresh() {
//
this.queryParam = {
storeId: uni.getStorageSync('storeId'),
status: '启用',
categoryId: '',
giftName: '',
deliveryMethod: '',
page: 1,
pageSize: 30
}
this.getIntegralGiftList()
uni.stopPullDownRefresh()
},
onReachBottom() {
//
if (this.queryParam.page >= this.total) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.queryParam.page++
this.getIntegralGiftList()
} }
}, },
onShow() { onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId'); this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getUserBalance() this.getUserBalance()
this.getIntegralGiftList()
}, },
methods: { methods: {
//
getIntegralGiftList() {
request({
url: 'business/integral/integralGift/queryByPageByStoreId',
method: 'get',
params: this.queryParam
}).then((res) => {
if (res.code == 200) {
this.integralGiftList = res.data.records
this.total = res.data.total
console.log(res,100);
}
})
},
// //
getUserBalance() { getUserBalance() {
request({ request({
@ -127,7 +67,7 @@
url: '/pagesMy/integral/integral' url: '/pagesMy/integral/integral'
}) })
}, },
goDetails(data) { goDetails() {
uni.navigateTo({ uni.navigateTo({
url: '/pagesHome/PointsRedemption/details' url: '/pagesHome/PointsRedemption/details'
}) })

View File

@ -12,20 +12,13 @@
</view> </view>
<view class="bai-box"> <view class="bai-box">
<view class="box-title">{{goodsInfo.giftName}}</view> <view class="box-title">{{goodsInfo.giftName}}</view>
<view class="price_num"> <view class="price_num">100积分</view>
<span
v-if="goodsInfo.exchangeMethod == '积分' || goodsInfo.exchangeMethod == '积分+金额' || goodsInfo.exchangeMethod == '积分+加钱购'">{{goodsInfo.exchangePoints}}积分</span>
<span v-if="goodsInfo.exchangeMethod == '积分+金额'">+</span>
<span
v-if="goodsInfo.exchangeMethod == '金额' || goodsInfo.exchangeMethod == '积分+金额'">{{goodsInfo.exchangeAmount}}</span>
</view>
<view class="dt-box"> <view class="dt-box">
<view class="hui_"> <view class="hui_">
{{goodsInfo.market}} 3.5
</view> </view>
<view class="or_size" v-if="goodsInfo.deliveryMethod"> <view class="or_size">
{{JSON.parse(goodsInfo.deliveryMethod)}} 门店自提
</view> </view>
</view> </view>
</view> </view>
@ -71,7 +64,6 @@
} }
}) })
uni.$emit('un') uni.$emit('un')
console.log(this.goodsInfo,67);
}, },
methods: { methods: {

View File

@ -163,7 +163,6 @@
} }
}) })
uni.$emit('un') uni.$emit('un')
console.log(this.goodsInfo,166);
// storeId // storeId
this.getInfoByStoreId() this.getInfoByStoreId()
}, },

View File

@ -1,42 +1,41 @@
<template> <template>
<view class="content"> <view class="content">
<view class="container"> <view class="container">
<view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" color="#ffffff" size="16"></uni-icons>
</view>
<view class="my-text">邀请有礼</view>
<view class="my-icons"></view>
</view>
<view class="faimg"> <view class="faimg">
<view class="box-img"> <view class="box-img">
<image src="../../static/imgs/fmbj.png" mode="aspectFit"></image> <image src="../../static/new/top_.png" mode="aspectFit"></image>
</view> </view>
<view class="hbbox">
<view class="h-box">
<view class="or-box">
<view class="max-size">{{allAmount}}</view>
<view class="min-size">优惠券总额</view>
</view>
<view class="or-box">
<view class="max-size">{{this.activeRecommendRecordsList.length || 0}}</view>
<view class="min-size">邀请人数</view>
</view>
</view>
<view class="x-box">
<view class="l-naniu" @click="open">
<u-icon name="grid" color="#FCDB5A" size="18"></u-icon>
<text>面对面邀请</text>
</view>
<view class="r-naniu">
<u-icon name="share-fill" color="#E9312F" size="18"></u-icon>
<button class="qiangzhi" open-type="share"> </view>
<text>分享给好友</text> <view class="hbbox">
</button> <view class="h-box">
</view> <view class="or-box">
<image src="../../static/new/fxrwm.png" mode=""></image>
<view class="min-size">分享二维码</view>
</view>
<view class="or-box">
<image src="../../static/new/jljl.png" mode=""></image>
<view class="min-size">奖励记录</view>
</view> </view>
</view> </view>
<view class="or-aniu">
立即分享
</view>
<view class="x-box">
<view class="l-naniu" @click="open">
<u-icon name="grid" color="#FCDB5A" size="18"></u-icon>
<text>面对面邀请</text>
</view>
<view class="r-naniu">
<u-icon name="share-fill" color="#E9312F" size="18"></u-icon>
<button class="qiangzhi" open-type="share">
<text>分享给好友</text>
</button>
</view>
</view>
</view> </view>
<!-- 顶部区域 --> <!-- 顶部区域 -->
@ -67,7 +66,7 @@
<w-qrcode :options="options"></w-qrcode> <w-qrcode :options="options"></w-qrcode>
</view> </view>
</u-popup> </u-popup>
</view> </view>
</view> </view>
@ -99,10 +98,10 @@
} }
}, },
onLoad() { onLoad() {
let codes = 'https://oilapi.youkerr.com/oily?storeId=' + uni.getStorageSync('storeId') + // let codes = 'https://oilapi.youkerr.com/oily?storeId=' + uni.getStorageSync('storeId') +
'&userId=' + uni.getStorageSync('userId') + '&type=yaoqingyouli' // '&userId=' + uni.getStorageSync('userId') + '&type=yaoqingyouli'
console.log(codes); // console.log(codes);
this.query.storeId = uni.getStorageSync("storeId"); // this.query.storeId = uni.getStorageSync("storeId");
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
if (res.from === 'button') { // if (res.from === 'button') { //
@ -154,7 +153,7 @@
return { return {
title: '来个油惠', title: '来个油惠',
path: '/pages/index/index?storeId=' + uni.getStorageSync('storeId') + '&userId=' + uni path: '/pages/index/index?storeId=' + uni.getStorageSync('storeId') + '&userId=' + uni
.getStorageSync('userId') + '&type=yaoqingyouli' .getStorageSync('userId') + '&type=yaoqingyouli'
} }
}, },
@ -206,40 +205,20 @@
<style scoped lang="scss"> <style scoped lang="scss">
.content { .content {
background: #2F72F7; background: #F9F9F9;
} }
.container { .container {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
padding-top: 88px;
} }
.my-header {
width: 100%;
height: 88px;
background: #2F72F7;
display: flex;
align-items: center;
justify-content: space-between;
color: #ffffff;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
.box-img { .box-img {
width: 100%; width: 100%;
height: 400px; height: 200px;
image { image {
width: 100%; width: 100%;
@ -248,15 +227,11 @@
} }
.hbbox { .hbbox {
width: 90%; width: 95%;
margin: 0px auto; margin: 0px auto;
height: 200px; height: 200px;
background: url('http://47.95.206.185:83/axb.png')center no-repeat;
background-size: 100% 100%;
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
bottom: -172px;
} }
@ -265,23 +240,32 @@
} }
.or-box { .or-box {
width: 142px; width: 49%;
height: 72px; height: 55px;
background: #FFF4E4; background: #fff;
border-radius: 8px; border-radius: 8px;
margin: 5px; margin: 5px;
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;
padding-top: 14px;
display: flex;
align-items: center;
justify-content: center;
image {
width: 35px;
height: 35px;
margin-right: 15px;
}
} }
.h-box { .h-box {
width: 100%; width: 100%;
padding: 10px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: space-between;
padding-top: 5px; padding-top: 5px;
} }
@ -414,6 +398,17 @@
padding: 15px; padding: 15px;
} }
.or-aniu {
width: 95%;
height: 40px;
border-radius: 50px;
display: flex;
align-items: center;
justify-content: center;
background: #FF9655;
color: #fff;
}
button { button {
/* 清除默认边框 */ /* 清除默认边框 */
border: 0; border: 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB