# Conflicts:
#	gasStation-uni/config.js
#	gasStation-uni/pages/index/index.vue
This commit is contained in:
wangh 2023-12-14 13:40:31 +08:00
commit 29b2f0f586
23 changed files with 329 additions and 88 deletions

View File

@ -44,6 +44,9 @@ public class Const {
//机构公钥 //机构公钥
public static String INS_PUBLIC_KEY=""; public static String INS_PUBLIC_KEY="";
//富友回调公钥
public static String INS_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCj1SsMt4S9SMcNpXrcQ9ET4hHdX0UX/1RTdD9GzxzSDwTEsLQuUNaX0VP8NQ7NWvMdgCYnST74oV81ht0GQd3aax6fyXjDETYC5tq0sHkJxwtiynTcssPBjM2LipTeY6Sv8cUS1MPnvRX2Cs1RXkB8ZdUp9dCaNnTxFOPJGB1E4wIDAQAB";
//异步通知(回调地址) //异步通知(回调地址)
// public static String notify_url = "https://www.fuint.cn/fuint-application/clientApi/pay/aliPayCallback"; // public static String notify_url = "https://www.fuint.cn/fuint-application/clientApi/pay/aliPayCallback";
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify"; public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
@ -64,7 +67,15 @@ public class Const {
public static String fuiou_28_url = "https://fundwx.fuiou.com/queryFeeAmt"; public static String fuiou_28_url = "https://fundwx.fuiou.com/queryFeeAmt";
//提现 //提现
public static String fuiou_29_url = "https://fundwx.fuiou.com/withdraw"; public static String fuiou_29_url = "https://fundwx.fuiou.com/withdraw";
//查询 //查询
public static String fuiou_30_url = "https://fundwx.fuiou.com/commonQuery"; public static String fuiou_30_url = "https://fundwx.fuiou.com/commonQuery";
// 生产地址 扫码
public static String fuiou_31_url = "https://spay-cloud.fuioupay.com/micropay";
//生产地址 公众号/服务窗/小程序统一下单
public static String fuiou_32_url = "https://spay-cloud.fuioupay.com/wxPreCreate";
//生产地址 退款
public static String fuiou_33_url = "https://spay-cloud.fuioupay.com/commonRefund";
//生产地址 查询
public static String fuiou_34_url = "https://spay-cloud.fuioupay.com/commonQuery";
} }

View File

@ -27,6 +27,7 @@ public class Message {
root.addElement(key).addText(value); root.addElement(key).addText(value);
} }
String reqBody = "<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"yes\"?>" + doc.getRootElement().asXML(); String reqBody = "<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"yes\"?>" + doc.getRootElement().asXML();
System.out.println(reqBody);
reqBody = URLEncoder.encode(reqBody, Const.charset); reqBody = URLEncoder.encode(reqBody, Const.charset);
return reqBody; return reqBody;
} }

View File

@ -78,7 +78,7 @@ public class FyPayServiceImpl implements FyPayService {
// 请求报文 // 请求报文
String reqBody = Message.requestMsg(map); String reqBody = Message.requestMsg(map);
// 响应报文 // 响应报文
String rspXml = Message.responseMsg(reqBody,Const.fuiou_22_url); String rspXml = Message.responseMsg(reqBody,Const.fuiou_31_url);
//响应报文验签 //响应报文验签
Map<String, String> resMap = Utils.xmlStr2Map(rspXml); Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
@ -90,16 +90,16 @@ public class FyPayServiceImpl implements FyPayService {
timer.schedule(new TimerTask() { timer.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
try { try {
Map<String, String> orderQueryRes = queryOrder(map1); Map<String, String> orderQueryRes = queryOrder(map1);
if(!orderQueryRes.get("msg").equals("unpaid")){ if(!orderQueryRes.get("msg").equals("unpaid")){
timer.cancel(); timer.cancel();
}
} catch (Exception e) {
throw new RuntimeException(e);
} }
} catch (Exception e) {
throw new RuntimeException(e);
} }
} //定时器 不延时 立即开始 0.5s一次
//定时器 立即开始 0.5s一次
}, 0, 500); }, 0, 500);
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
}); });
@ -144,7 +144,7 @@ public class FyPayServiceImpl implements FyPayService {
// 请求报文 // 请求报文
String reqBody = Message.requestMsg(map); String reqBody = Message.requestMsg(map);
// 响应报文 // 响应报文
String rspXml = Message.responseMsg(reqBody,Const.fuiou_30_url); String rspXml = Message.responseMsg(reqBody,Const.fuiou_34_url);
//响应报文验签 //响应报文验签
Map<String, String> reqMap = Utils.xmlStr2Map(rspXml); Map<String, String> reqMap = Utils.xmlStr2Map(rspXml);
@ -165,7 +165,8 @@ public class FyPayServiceImpl implements FyPayService {
// 修改油罐容量 // 修改油罐容量
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class); List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);
if (jsonObjects.size()<=1) { if (jsonObjects.size()<=1) {
Integer tankId = Integer.valueOf(jsonObjects.get(1).get("tankId").toString());
Integer tankId = Integer.valueOf(jsonObjects.get(0).get("tankId").toString());
oilOrder.setTankId(tankId); oilOrder.setTankId(tankId);
oilOrderService.addOilTracks(oilOrder, oilOrder.getStoreId()); oilOrderService.addOilTracks(oilOrder, oilOrder.getStoreId());
} }
@ -342,7 +343,7 @@ public class FyPayServiceImpl implements FyPayService {
// 请求报文 // 请求报文
String reqBody = Message.requestMsg(map); String reqBody = Message.requestMsg(map);
// 响应报文 // 响应报文
String rspXml = Message.responseMsg(reqBody,Const.fuiou_23_url); String rspXml = Message.responseMsg(reqBody,Const.fuiou_32_url);
//响应报文验签 //响应报文验签
Map<String, String> resMap = Utils.xmlStr2Map(rspXml); Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
@ -375,7 +376,7 @@ public class FyPayServiceImpl implements FyPayService {
// 请求报文 // 请求报文
String reqBody = Message.requestMsg(map); String reqBody = Message.requestMsg(map);
// 响应报文 // 响应报文
String rspXml = Message.responseMsg(reqBody,Const.fuiou_24_url); String rspXml = Message.responseMsg(reqBody,Const.fuiou_33_url);
//响应报文验签 //响应报文验签
Map<String, String> resMap = Utils.xmlStr2Map(rspXml); Map<String, String> resMap = Utils.xmlStr2Map(rspXml);

View File

@ -103,8 +103,8 @@ public class Utils {
Map<String, String> mapNew = paraFilter(map); Map<String, String> mapNew = paraFilter(map);
String preSignStr = createLinkString(mapNew); String preSignStr = createLinkString(mapNew);
// System.out.println(Sign.verify(preSignStr.getBytes(Const.charset), Const.INS_PUBLIC_KEY, sign));
return Sign.verify(preSignStr.getBytes(Const.charset), Const.INS_PUBLIC_KEY, sign); return Sign.verify(preSignStr.getBytes(Const.charset), Const.INS_PUBLIC_KEYS, sign);
} }
/** /**

View File

@ -2,9 +2,9 @@ package com.fuint.business.marketingActivity.cardFavorable.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTO; import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTO;
import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTOS;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
import com.fuint.framework.web.BaseController; import com.fuint.framework.web.BaseController;
@ -60,7 +60,7 @@ public class CardFavorableController extends BaseController {
/** /**
* 新增数据 * 新增数据
* *
* @param cardFavorable 实体对象 * @param cardFavorableDTO 实体对象
* @return 新增结果 * @return 新增结果
*/ */
@PostMapping @PostMapping
@ -89,5 +89,21 @@ public class CardFavorableController extends BaseController {
public ResponseObject delete(@RequestParam("idList") List<Long> idList) { public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
return getSuccessResult(this.cardFavorableService.removeByIds(idList)); return getSuccessResult(this.cardFavorableService.removeByIds(idList));
} }
/**
*查询优惠券接口(小程序端)
* @param pageNo
* @param pageSize
* @param cardFavorable
* @return
*/
@GetMapping("applet")
public ResponseObject selectAllByCondition(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFuelDiesel") CardFavorableDTOS cardFavorableDTOS) {
Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardFavorableService.selectAllByCondition(page,cardFavorableDTOS));
}
} }

View File

@ -0,0 +1,13 @@
package com.fuint.business.marketingActivity.cardFavorable.dto;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
import lombok.Data;
import java.io.Serializable;
@Data
public class CardFavorableDTOS extends CardFavorable implements Serializable {
private String couponType;
private Integer useStatus;
}

View File

@ -0,0 +1,11 @@
package com.fuint.business.marketingActivity.cardFavorable.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class QueryDTO implements Serializable {
//券名称
private String couponName;
}

View File

@ -3,10 +3,15 @@ package com.fuint.business.marketingActivity.cardFavorable.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.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTOS;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.vo.CouponVO;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO; import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
/** /**
* (CardFavorableRecord)表数据库访问层 * (CardFavorableRecord)表数据库访问层
@ -24,5 +29,11 @@ public interface CardFavorableRecordMapper extends BaseMapper<CardFavorableRecor
IPage<CardFavorableRecordVO> getCardFavorableList(@Param("page")Page page,@Param("cardFavorableRecord") CardFavorableRecord cardFavorableRecord); IPage<CardFavorableRecordVO> getCardFavorableList(@Param("page")Page page,@Param("cardFavorableRecord") CardFavorableRecord cardFavorableRecord);
/**
* 查询优惠券接口(小程序)
* @param cardFavorableDTOS
*/
// List<CouponVO> selectAllByCondition(Integer id);
IPage<CouponVO> selectAllByCondition(@Param("page") Page page, @Param("cardFavorableDTOS") CardFavorableDTOS cardFavorableDTOS);
} }

View File

@ -54,5 +54,55 @@
</where> </where>
order by cfr.create_time DESC order by cfr.create_time DESC
</select> </select>
<select id="selectAllByCondition" resultType="com.fuint.business.marketingActivity.cardFavorable.vo.CouponVO">
SELECT
card_favorables.couponType,
card_favorables.couponName,
card_favorables.id,
card_favorables.couponAmount,
card_favorables.couponContent
from
(SELECT
'优惠券' AS couponType,
cf.NAME couponName ,cf.id id,cf.discount_amount couponAmount,cf.satisfied_amount couponContent
FROM
card_favorable cf
LEFT JOIN card_favorable_record cfr ON cf.id = cfr.card_favorable_id
WHERE
cfr.mt_user_id = #{cardFavorableDTOS.id} UNION ALL
SELECT
'兑换券' AS couponType,
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent
FROM
card_exchange_record cer
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
WHERE
cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 0 UNION ALL
SELECT
'洗车券' AS couponType,
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent
FROM
card_exchange_record cer
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
WHERE
cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 1 UNION ALL
SELECT
'洗车卡' AS couponType,
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent
FROM
card_exchange_record cer
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
WHERE
cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 2) AS card_favorables
<where>
<if test="cardFavorableDTOS.couponType != null">
and card_favorables.couponType = #{cardFavorableDTOS.couponType}
</if>
</where>
</select>
</mapper> </mapper>

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.cardFavorable.dto.CardFavorableDTO; import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTO;
import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTOS;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO; import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO;
@ -45,5 +46,13 @@ public interface CardFavorableService extends IService<CardFavorable> {
* @return * @return
*/ */
Boolean updateOneById(CardFavorableDTO cardFavorableDTO); Boolean updateOneById(CardFavorableDTO cardFavorableDTO);
/**
* 查询优惠券接口(小程序)
* @param page
* @param cardFavorable
* @return
*/
IPage selectAllByCondition(Page page, CardFavorableDTOS cardFavorableDTOS);
} }

View File

@ -5,11 +5,15 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.cardFavorable.dto.CardFavorableDTO; import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTO;
import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTOS;
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableMapper; import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableMapper;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO; import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO;
import com.fuint.business.marketingActivity.cardFavorable.vo.CouponVO;
import com.fuint.business.store.service.StoreService; import com.fuint.business.store.service.StoreService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -17,6 +21,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* (CardFavorable)表服务实现类 * (CardFavorable)表服务实现类
@ -29,6 +34,8 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
@Resource @Resource
private StoreService storeService; private StoreService storeService;
@Resource
private CardFavorableRecordMapper cardFavorableRecordMapper;
/** /**
* 新增数据 * 新增数据
* @param cardFavorableDTO * @param cardFavorableDTO
@ -143,5 +150,21 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
} }
return updateById(cardFavorable); return updateById(cardFavorable);
} }
/**
* 查询优惠券接口(小程序)
* @param page
* @param cardFavorable
* @return
*/
@Override
public IPage selectAllByCondition(Page page, CardFavorableDTOS cardFavorableDTOS) {
//获取登录用户id
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer id = nowAccountInfo.getId();
cardFavorableDTOS.setId(id);
IPage<CouponVO> couponVOS = cardFavorableRecordMapper.selectAllByCondition(page,cardFavorableDTOS);
return couponVOS;
}
} }

View File

@ -0,0 +1,27 @@
package com.fuint.business.marketingActivity.cardFavorable.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class CouponVO implements Serializable {
//券id
private Integer id;
//券类型
private String couponType;
//券金额
private String couponAmount;
//券名称
private String couponName;
//券内容
private String couponContent;
//使用状态 0:未使用 1已使用 2已失效
private String useStatus;
//券有效期
private String couponTime;
//券开始时间
private String startTime;
//券结束时间
private String endTime;
}

View File

@ -91,7 +91,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String timestamp = dateFormat.format(new Date()); String timestamp = dateFormat.format(new Date());
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6); String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
String orderNo = timestamp+randomString; String orderNo = "2345"+timestamp+randomString;
Integer staffId = nowAccountInfo.getStaffId(); Integer staffId = nowAccountInfo.getStaffId();
hangBill.setStaffId(staffId); hangBill.setStaffId(staffId);

View File

@ -214,7 +214,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String timestamp = dateFormat.format(new Date()); String timestamp = dateFormat.format(new Date());
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6); String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
String orderNo = timestamp+randomString; String orderNo = "2345"+timestamp+randomString;
Map<String,Object> orders = new HashMap<>(); Map<String,Object> orders = new HashMap<>();
@ -390,7 +390,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String timestamp = dateFormat.format(new Date()); String timestamp = dateFormat.format(new Date());
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6); String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
String orderNo = timestamp+randomString; String orderNo = "2345"+timestamp+randomString;
// 添加油品订单信息 // 添加油品订单信息
oilOrder.setOrderNo(orderNo); oilOrder.setOrderNo(orderNo);

View File

@ -46,7 +46,7 @@ public class ReturnRecordServiceImpl extends ServiceImpl<ReturnRecordMapper, Ret
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String timestamp = dateFormat.format(new Date()); String timestamp = dateFormat.format(new Date());
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6); String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
String orderNo = "H"+timestamp+randomString; String orderNo = "2345"+"H"+timestamp+randomString;
returnRecord.setOrderNo(orderNo); returnRecord.setOrderNo(orderNo);
} }
baseMapper.insert(returnRecord); baseMapper.insert(returnRecord);

View File

@ -973,7 +973,7 @@
// //
goodsOrder:"", goodsOrder:"",
// //
payType:"CASH", payType:"WECHAT",
// //
oilAmount:0, oilAmount:0,
// //

View File

@ -3,8 +3,10 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api', // baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://192.168.0.196:8080/', // baseUrl: 'http://192.168.0.196:8080/',
baseUrl: 'http://192.168.1.6:8008/', // baseUrl: 'http://192.168.1.6:8008/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc', // baseUrl: 'http://192.168.1.5:8002/cdJdc',
baseUrl: 'http://192.168.0.196:8080/',
imagesUrl: 'http://www.nuoyunr.com/lananRsc', imagesUrl: 'http://www.nuoyunr.com/lananRsc',
// 应用信息 // 应用信息
appInfo: { appInfo: {

View File

@ -98,9 +98,6 @@
<view class="juanniu" @click="goOil()"> <view class="juanniu" @click="goOil()">
<view class="">一键加油</view> <view class="">一键加油</view>
</view> </view>
</view> </view>
<view style="height: 88px; width: 100%;"></view> <view style="height: 88px; width: 100%;"></view>
</view> </view>

View File

@ -58,9 +58,9 @@
}) })
}, },
getData() { getData() {
/*uni.showLoading({ uni.showLoading({
//title: '' title: '加载中'
});*/ });
request({ request({
url: 'business/marketingActivity/activeExchange/applet', url: 'business/marketingActivity/activeExchange/applet',
method: 'get', method: 'get',
@ -183,4 +183,4 @@
position: fixed; position: fixed;
top: 0px; top: 0px;
} }
</style> </style>

View File

@ -9,13 +9,19 @@
</view> </view>
<!-- 顶部区域 --> <!-- 顶部区域 -->
<view class="top-lanmu"> <view class="top-lanmu">
<view style="width: 90%;margin: 0 auto;"> <view class="hby">
<view class="title-bai">{{myPoints}}</view> <view class="">
<view class="size-bai"> <view class="title-bai">{{myPoints}} <text style="font-size: 16px;">积分</text> </view>
<uni-icons type="location" color="#ffffff" size="16"></uni-icons> <view class="size-bai">
<text>{{storeName}}</text> <uni-icons type="location" color="#ffffff" size="16"></uni-icons>
<!-- <uni-icons type="right" color="#ffffff" size="16"></uni-icons> --> <text>{{storeName}}</text>
<!-- <uni-icons type="right" color="#ffffff" size="16"></uni-icons> -->
</view>
</view> </view>
<view class="tp">
<image src="../../static/imgs/hby.png" mode=""></image>
</view>
</view> </view>
<view class="box-bai"> <view class="box-bai">
@ -44,49 +50,51 @@
<view class="">我的订单</view> <view class="">我的订单</view>
</view> </view>
</view> </view>
</view> <view class="bai-center">
<view class="bai-center"> <scroll-view scroll-x="true" class="tap-top">
<scroll-view scroll-x="true" class="tap-top"> <view class="sz" @click="transferIndex(-1)">
<view class="sz" @click="transferIndex(-1)"> <view class="box" :class="{'xztap': qhindex === -1}">全部</view>
<view class="box" :class="{'xztap': qhindex === -1}">全部</view> <view class="gang" v-if="qhindex === -1"></view>
<view class="gang" v-if="qhindex === -1"></view>
</view>
<view class="sz" v-for="(item, index) in categoryList" :key="index"
@click="transferIndex(index,item.id)">
<view class="box" :class="{'xztap': qhindex === index}">{{item.categoryName}}</view>
<view class="gang" v-if="qhindex === index"></view>
</view>
</scroll-view>
<view class="wrap-box">
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
@click="godetails(item)">
<view class="goods-img">
<image :src="baseUrl+item.coverImage" mode=""></image>
</view> </view>
<view class="goods-title"> <view class="sz" v-for="(item, index) in categoryList" :key="index"
{{item.giftName}} @click="transferIndex(index,item.id)">
<view class="box" :class="{'xztap': qhindex === index}">{{item.categoryName}}</view>
<view class="gang" v-if="qhindex === index"></view>
</view> </view>
<view class="good-red"> </scroll-view>
<view style="display: flex;align-items: center;"> <view class="wrap-box">
<view class="bi" v-if="item.exchangeMethod != '金额'"> <view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
<image src="../../static/imgs/jb.png" mode=""></image> @click="godetails(item)">
</view> <view class="goods-img">
<view style="color: #FC1708;font-weight: bold;"> <image :src="baseUrl+item.coverImage" mode=""></image>
<span </view>
v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}</span> <view class="goods-title">
<span v-if="item.exchangeMethod == '积分+金额'">+</span> {{item.giftName}}
<span </view>
v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span> <view class="good-red">
<view style="display: flex;align-items: center;">
<view class="bi" v-if="item.exchangeMethod != '金额'">
<image src="../../static/imgs/jb.png" mode=""></image>
</view>
<view style="color: #FC1708;font-weight: bold;">
<span
v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}</span>
<span v-if="item.exchangeMethod == '积分+金额'">+</span>
<span
v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span>
</view>
</view>
<view class="hui-time">
库存:{{item.remainingInventory === -1?"不限":item.remainingInventory}}
</view> </view>
</view> </view>
<view class="hui-time">库存:{{item.remainingInventory === -1?"不限":item.remainingInventory}} <view class="anniux">
<text>立即兑换</text>
</view> </view>
</view> </view>
<view class="anniux">
<text>立即兑换</text>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -247,22 +255,20 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content { .content {}
background: #f4f5f6;
}
.container { .container {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-top: 88px; padding-top: 88px;
background: #f4f5f6; background: linear-gradient(180deg, #ff5c28 0%, #ff5c28 20%, #ffd8d8 37%, #ffd8d8 100%);
padding-bottom: 40px; padding-bottom: 40px;
} }
.my-header { .my-header {
width: 100%; width: 100%;
height: 88px; height: 88px;
background: #1678ff; background: #ff5c28;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -283,8 +289,9 @@
.top-lanmu { .top-lanmu {
width: 100%; width: 100%;
height: 100px;
background: linear-gradient(180deg, #1678ff 0%, #3e8dfd 57%, #f4f5f6 100%);
// background: linear-gradient(180deg, #ff5c28 0%, #ff5c28 57%, #ffd8d8 100%);
box-sizing: border-box; box-sizing: border-box;
padding-top: 1px; padding-top: 1px;
} }
@ -301,6 +308,7 @@
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
font-size: 14px; font-size: 14px;
margin-top: 0px;
} }
@ -339,7 +347,7 @@
margin: 0 auto; margin: 0 auto;
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 10px;
margin-top: 75px; margin-top: 15px;
} }
.tap-top { .tap-top {
@ -375,10 +383,11 @@
} }
.gang { .gang {
width: 128rpx; width: 38rpx;
height: 8rpx; height: 8rpx;
background: #1678ff; background: #ff5c28;
border-radius: 14rpx; border-radius: 14rpx;
} }
.wrap-box { .wrap-box {
@ -448,4 +457,22 @@
height: 100%; height: 100%;
} }
} }
.hby {
width: 90%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
}
.tp {
width: 200px;
height: 120px;
image {
width: 100%;
height: 100%;
}
}
</style> </style>

View File

@ -16,14 +16,14 @@
<view class="">{{item.name}}</view> <view class="">{{item.name}}</view>
</view> </view>
</view> </view>
<view class="card-box" v-for="(item,index) in 3" :key="index"> <view class="card-box" v-for="(item,index) in cardsList" :key="index">
<view class="left-img"> <view class="left-img">
<view class="huiz">120</view> <view class="huiz">{{item.couponAmount}}</view>
<view class="cbai">优惠券</view> <view class="cbai">{{item.couponType}}</view>
</view> </view>
<view class="right-box"> <view class="right-box">
<view class="title">新用户专享5折券</view> <view class="title">{{item.couponName}}</view>
<view class="hui-size">部分产品可用满240可用此券定期可用...</view> <view class="hui-size">{{item.couponContent}}</view>
<view class="dis-bt"> <view class="dis-bt">
<view class="hui-size">有效期2023-11-30</view> <view class="hui-size">有效期2023-11-30</view>
<view class="anniu"> <view class="anniu">
@ -39,9 +39,18 @@
</template> </template>
<script> <script>
import request from "../../utils/request";
export default { export default {
data() { data() {
return { return {
cardsList: [],
query: {
couponType: '',
useStatus: 0,
pageNo: 1,
pageSize: 10
},
title: '', title: '',
tabindex: 0, tabindex: 0,
tapList: [{ tapList: [{
@ -71,16 +80,48 @@
components: { components: {
},
onShow() {
this.getGiftRecords()
}, },
methods: { methods: {
click(item) { click(item) {
console.log('item', item); console.log('item', item);
this.cardsList = []
if (item.name == "全部") {
this.query.couponType = ''
this.getGiftRecords()
} else {
this.query.couponType = item.name
console.log(this.query.couponType);
this.getGiftRecords()
}
}, },
gettabingex(index) { gettabingex(index) {
// useStatus
this.tabindex = index this.tabindex = index
console.log(index);
this.cardsList = []
this.query.useStatus = index
this.getGiftRecords()
}, },
goback() { goback() {
uni.navigateBack() uni.navigateBack()
},
getGiftRecords() {
request({
url: 'business/marketingActivity/cardFavorable/applet',
method: 'get',
params: this.query
}).then(res => {
console.log(res)
if (res.code == 200) {
this.cardsList = res.data.records
}
})
} }
} }
} }
@ -222,4 +263,4 @@
background: #ecf5ff !important; background: #ecf5ff !important;
color: #8179ff; color: #8179ff;
} }
</style> </style>

View File

@ -73,6 +73,7 @@
</view> </view>
</view> </view>
</view> </view>
<view style="height: 340px; width: 100%;"></view> <view style="height: 340px; width: 100%;"></view>
<view class="bottom-box"> <view class="bottom-box">
<view class="bottom-bai-box"> <view class="bottom-bai-box">

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB