Merge branch 'master' of https://gitee.com/nny_1/oilSystem
# Conflicts: # gasStation-uni/config.js # gasStation-uni/pages/index/index.vue
This commit is contained in:
commit
29b2f0f586
@ -44,6 +44,9 @@ public class Const {
|
||||
//机构公钥
|
||||
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://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_29_url = "https://fundwx.fuiou.com/withdraw";
|
||||
|
||||
//查询
|
||||
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";
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ public class Message {
|
||||
root.addElement(key).addText(value);
|
||||
}
|
||||
String reqBody = "<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"yes\"?>" + doc.getRootElement().asXML();
|
||||
System.out.println(reqBody);
|
||||
reqBody = URLEncoder.encode(reqBody, Const.charset);
|
||||
return reqBody;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 请求报文
|
||||
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);
|
||||
@ -90,16 +90,16 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
timer.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Map<String, String> orderQueryRes = queryOrder(map1);
|
||||
if(!orderQueryRes.get("msg").equals("unpaid")){
|
||||
timer.cancel();
|
||||
try {
|
||||
Map<String, String> orderQueryRes = queryOrder(map1);
|
||||
if(!orderQueryRes.get("msg").equals("unpaid")){
|
||||
timer.cancel();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
//定时器 立即开始 0.5s一次
|
||||
//定时器 不延时 立即开始 0.5s一次
|
||||
}, 0, 500);
|
||||
Thread.currentThread().interrupt();
|
||||
});
|
||||
@ -144,7 +144,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 请求报文
|
||||
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);
|
||||
@ -165,7 +165,8 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 修改油罐容量
|
||||
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);
|
||||
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);
|
||||
oilOrderService.addOilTracks(oilOrder, oilOrder.getStoreId());
|
||||
}
|
||||
@ -342,7 +343,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 请求报文
|
||||
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);
|
||||
|
||||
@ -375,7 +376,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 请求报文
|
||||
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);
|
||||
|
@ -103,8 +103,8 @@ public class Utils {
|
||||
Map<String, String> mapNew = paraFilter(map);
|
||||
|
||||
String preSignStr = createLinkString(mapNew);
|
||||
|
||||
return Sign.verify(preSignStr.getBytes(Const.charset), Const.INS_PUBLIC_KEY, sign);
|
||||
// System.out.println(Sign.verify(preSignStr.getBytes(Const.charset), Const.INS_PUBLIC_KEY, sign));
|
||||
return Sign.verify(preSignStr.getBytes(Const.charset), Const.INS_PUBLIC_KEYS, sign);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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.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.service.CardFavorableService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
@ -60,7 +60,7 @@ public class CardFavorableController extends BaseController {
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param cardFavorable 实体对象
|
||||
* @param cardFavorableDTO 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
@ -89,5 +89,21 @@ public class CardFavorableController extends BaseController {
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> 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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -3,10 +3,15 @@ package com.fuint.business.marketingActivity.cardFavorable.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.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.vo.CouponVO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (CardFavorableRecord)表数据库访问层
|
||||
@ -24,5 +29,11 @@ public interface CardFavorableRecordMapper extends BaseMapper<CardFavorableRecor
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -54,5 +54,55 @@
|
||||
</where>
|
||||
order by cfr.create_time DESC
|
||||
</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>
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
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.vo.CardFavorableVO;
|
||||
|
||||
@ -45,5 +46,13 @@ public interface CardFavorableService extends IService<CardFavorable> {
|
||||
* @return
|
||||
*/
|
||||
Boolean updateOneById(CardFavorableDTO cardFavorableDTO);
|
||||
|
||||
/**
|
||||
* 查询优惠券接口(小程序)
|
||||
* @param page
|
||||
* @param cardFavorable
|
||||
* @return
|
||||
*/
|
||||
IPage selectAllByCondition(Page page, CardFavorableDTOS cardFavorableDTOS);
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,15 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.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.entity.CardFavorable;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
||||
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.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@ -17,6 +21,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (CardFavorable)表服务实现类
|
||||
@ -29,6 +34,8 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
||||
|
||||
@Resource
|
||||
private StoreService storeService;
|
||||
@Resource
|
||||
private CardFavorableRecordMapper cardFavorableRecordMapper;
|
||||
/**
|
||||
* 新增数据
|
||||
* @param cardFavorableDTO
|
||||
@ -143,5 +150,21 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
@ -91,7 +91,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = timestamp+randomString;
|
||||
String orderNo = "2345"+timestamp+randomString;
|
||||
Integer staffId = nowAccountInfo.getStaffId();
|
||||
|
||||
hangBill.setStaffId(staffId);
|
||||
|
@ -214,7 +214,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = timestamp+randomString;
|
||||
String orderNo = "2345"+timestamp+randomString;
|
||||
|
||||
|
||||
Map<String,Object> orders = new HashMap<>();
|
||||
@ -390,7 +390,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = timestamp+randomString;
|
||||
String orderNo = "2345"+timestamp+randomString;
|
||||
|
||||
// 添加油品订单信息
|
||||
oilOrder.setOrderNo(orderNo);
|
||||
|
@ -46,7 +46,7 @@ public class ReturnRecordServiceImpl extends ServiceImpl<ReturnRecordMapper, Ret
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = "H"+timestamp+randomString;
|
||||
String orderNo = "2345"+"H"+timestamp+randomString;
|
||||
returnRecord.setOrderNo(orderNo);
|
||||
}
|
||||
baseMapper.insert(returnRecord);
|
||||
|
@ -973,7 +973,7 @@
|
||||
// 商品订单
|
||||
goodsOrder:"",
|
||||
// 支付方式
|
||||
payType:"CASH",
|
||||
payType:"WECHAT",
|
||||
// 油品订单金额
|
||||
oilAmount:0,
|
||||
// 商品订单金额
|
||||
|
@ -3,8 +3,10 @@ module.exports = {
|
||||
|
||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||
// 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.0.196:8080/',
|
||||
|
||||
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
|
@ -98,9 +98,6 @@
|
||||
<view class="juanniu" @click="goOil()">
|
||||
<view class="">一键加油</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<view style="height: 88px; width: 100%;"></view>
|
||||
</view>
|
||||
|
@ -58,9 +58,9 @@
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
/*uni.showLoading({
|
||||
//title: '加载中'
|
||||
});*/
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
request({
|
||||
url: 'business/marketingActivity/activeExchange/applet',
|
||||
method: 'get',
|
||||
@ -183,4 +183,4 @@
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -9,13 +9,19 @@
|
||||
</view>
|
||||
<!-- 顶部区域 -->
|
||||
<view class="top-lanmu">
|
||||
<view style="width: 90%;margin: 0 auto;">
|
||||
<view class="title-bai">{{myPoints}}</view>
|
||||
<view class="size-bai">
|
||||
<uni-icons type="location" color="#ffffff" size="16"></uni-icons>
|
||||
<text>{{storeName}}</text>
|
||||
<!-- <uni-icons type="right" color="#ffffff" size="16"></uni-icons> -->
|
||||
<view class="hby">
|
||||
<view class="">
|
||||
<view class="title-bai">{{myPoints}} <text style="font-size: 16px;">积分</text> </view>
|
||||
<view class="size-bai">
|
||||
<uni-icons type="location" color="#ffffff" size="16"></uni-icons>
|
||||
<text>{{storeName}}</text>
|
||||
<!-- <uni-icons type="right" color="#ffffff" size="16"></uni-icons> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="tp">
|
||||
<image src="../../static/imgs/hby.png" mode=""></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="box-bai">
|
||||
@ -44,49 +50,51 @@
|
||||
<view class="">我的订单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bai-center">
|
||||
<scroll-view scroll-x="true" class="tap-top">
|
||||
<view class="sz" @click="transferIndex(-1)">
|
||||
<view class="box" :class="{'xztap': 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 class="bai-center">
|
||||
<scroll-view scroll-x="true" class="tap-top">
|
||||
<view class="sz" @click="transferIndex(-1)">
|
||||
<view class="box" :class="{'xztap': qhindex === -1}">全部</view>
|
||||
<view class="gang" v-if="qhindex === -1"></view>
|
||||
</view>
|
||||
<view class="goods-title">
|
||||
{{item.giftName}}
|
||||
<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>
|
||||
<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>
|
||||
</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 class="goods-title">
|
||||
{{item.giftName}}
|
||||
</view>
|
||||
<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 class="hui-time">库存:{{item.remainingInventory === -1?"不限":item.remainingInventory}}
|
||||
<view class="anniux">
|
||||
<text>立即兑换</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="anniux">
|
||||
<text>立即兑换</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -247,22 +255,20 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
background: #f4f5f6;
|
||||
}
|
||||
.content {}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding-top: 88px;
|
||||
background: #f4f5f6;
|
||||
background: linear-gradient(180deg, #ff5c28 0%, #ff5c28 20%, #ffd8d8 37%, #ffd8d8 100%);
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.my-header {
|
||||
width: 100%;
|
||||
height: 88px;
|
||||
background: #1678ff;
|
||||
background: #ff5c28;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@ -283,8 +289,9 @@
|
||||
|
||||
.top-lanmu {
|
||||
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;
|
||||
padding-top: 1px;
|
||||
}
|
||||
@ -301,6 +308,7 @@
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
font-size: 14px;
|
||||
margin-top: 0px;
|
||||
|
||||
}
|
||||
|
||||
@ -339,7 +347,7 @@
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
margin-top: 75px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.tap-top {
|
||||
@ -375,10 +383,11 @@
|
||||
}
|
||||
|
||||
.gang {
|
||||
width: 128rpx;
|
||||
width: 38rpx;
|
||||
height: 8rpx;
|
||||
background: #1678ff;
|
||||
background: #ff5c28;
|
||||
border-radius: 14rpx;
|
||||
|
||||
}
|
||||
|
||||
.wrap-box {
|
||||
@ -448,4 +457,22 @@
|
||||
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>
|
@ -16,14 +16,14 @@
|
||||
<view class="">{{item.name}}</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="huiz">¥120</view>
|
||||
<view class="cbai">优惠券</view>
|
||||
<view class="huiz">¥{{item.couponAmount}}</view>
|
||||
<view class="cbai">{{item.couponType}}</view>
|
||||
</view>
|
||||
<view class="right-box">
|
||||
<view class="title">新用户专享5折券</view>
|
||||
<view class="hui-size">部分产品可用、满240可用、此券定期可用...</view>
|
||||
<view class="title">{{item.couponName}}</view>
|
||||
<view class="hui-size">{{item.couponContent}}</view>
|
||||
<view class="dis-bt">
|
||||
<view class="hui-size">有效期:2023-11-30</view>
|
||||
<view class="anniu">
|
||||
@ -39,9 +39,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../utils/request";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cardsList: [],
|
||||
query: {
|
||||
couponType: '',
|
||||
useStatus: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
title: '',
|
||||
tabindex: 0,
|
||||
tapList: [{
|
||||
@ -71,16 +80,48 @@
|
||||
|
||||
components: {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.getGiftRecords()
|
||||
},
|
||||
methods: {
|
||||
click(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) {
|
||||
// useStatus
|
||||
this.tabindex = index
|
||||
console.log(index);
|
||||
this.cardsList = []
|
||||
this.query.useStatus = index
|
||||
this.getGiftRecords()
|
||||
|
||||
|
||||
},
|
||||
goback() {
|
||||
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;
|
||||
color: #8179ff;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -73,6 +73,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="height: 340px; width: 100%;"></view>
|
||||
<view class="bottom-box">
|
||||
<view class="bottom-bai-box">
|
||||
|
BIN
gasStation-uni/static/imgs/hby.png
Normal file
BIN
gasStation-uni/static/imgs/hby.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 133 KiB |
Loading…
Reference in New Issue
Block a user