Merge branch 'feature/mall_product_new'

pull/16/head
perry 2023-05-24 17:04:28 +08:00
commit cbed37d4f0
21 changed files with 475 additions and 145 deletions

View File

@ -60,4 +60,10 @@ public class OrderInfoResponse implements Serializable {
@Schema(description = "规格属性值")
private String sku;
@Schema(description = "购买东西的详细信息")
private String info;
private String productName;
}

View File

@ -72,7 +72,7 @@ public class StoreOrderDetailInfoResponse implements Serializable {
private BigDecimal deductionPrice;
@Schema(description = "优惠券id")
private Integer couponId;
private Long couponId;
@Schema(description = "优惠券金额")
private BigDecimal couponPrice;

View File

@ -63,6 +63,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.support.TransactionTemplate;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.math.BigDecimal;
@ -72,15 +73,15 @@ import java.util.stream.Collectors;
/**
* H5
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Service
public class OrderServiceImpl implements OrderService {
@ -140,6 +141,7 @@ public class OrderServiceImpl implements OrderService {
@Autowired
private StoreProductAttrValueService storeProductAttrValueService;
/**
*
*
@ -151,12 +153,27 @@ public class OrderServiceImpl implements OrderService {
public PageInfo<OrderDetailResponse> list(Integer type, PageParam pageRequest) {
PageHelper.startPage(pageRequest.getPageNo(), pageRequest.getPageSize());
LambdaQueryWrapper<StoreOrder> lambdaQueryWrapper = new LambdaQueryWrapper<>();
if(null != type){
if (null != type) {
lambdaQueryWrapper.eq(StoreOrder::getType, type);
}
lambdaQueryWrapper.orderByDesc(StoreOrder::getId);
List<StoreOrder> storeOrders = dao.selectList(lambdaQueryWrapper);
return new PageInfo<>(StoreOrderConvert.INSTANCE.convert(storeOrders));
PageInfo<OrderDetailResponse> orderDetailResponsePageInfo = new PageInfo<>(StoreOrderConvert.INSTANCE.convert(storeOrders));
if (!CollectionUtils.isEmpty(orderDetailResponsePageInfo.getList())) {
orderDetailResponsePageInfo.getList().forEach(e -> {
List<StoreOrderInfo> list = storeOrderInfoService.list(Wrappers.<StoreOrderInfo>lambdaQuery().eq(StoreOrderInfo::getOrderId, e.getId()));
if (!CollectionUtils.isEmpty(list)) {
List<OrderInfoResponse> orderInfoList = new ArrayList<>();
list.forEach(x -> {
OrderInfoResponse response = new OrderInfoResponse();
BeanUtils.copyProperties(x, response);
orderInfoList.add(response);
});
e.setOrderInfoList(orderInfoList);
}
});
}
return orderDetailResponsePageInfo;
}
/**
@ -167,13 +184,26 @@ public class OrderServiceImpl implements OrderService {
@Override
public StoreOrderDetailInfoResponse detailOrder(String orderId) {
StoreOrder storeOrder = storeOrderService.getByOderId(orderId);
return StoreOrderOneConvert.INSTANCE.convert(storeOrder);
List<StoreOrderInfo> list = storeOrderInfoService.list(Wrappers.<StoreOrderInfo>lambdaQuery().eq(StoreOrderInfo::getOrderId, storeOrder.getId()));
StoreOrderDetailInfoResponse convert = StoreOrderOneConvert.INSTANCE.convert(storeOrder);
if (!CollectionUtils.isEmpty(list)) {
List<OrderInfoResponse> orderInfoList = new ArrayList<>();
list.forEach(e -> {
OrderInfoResponse response = new OrderInfoResponse();
BeanUtils.copyProperties(e, response);
orderInfoList.add(response);
});
convert.setOrderInfoList(orderInfoList);
}
return convert;
}
/**
*
*
* @param dateLimit
* @param status String
* @param status String
* @return Integer
*/
private Long getCount(String dateLimit, String status, Integer type) {
@ -192,8 +222,9 @@ public class OrderServiceImpl implements OrderService {
/**
*
*
* @param dateLimit
* @param type
* @param type
* @return BigDecimal
*/
private BigDecimal getAmount(String dateLimit, String type) {
@ -217,8 +248,9 @@ public class OrderServiceImpl implements OrderService {
/**
* where
*
* @param queryWrapper QueryWrapper<StoreOrder>
* @param status String
* @param status String
*/
private void getStatusWhereNew(QueryWrapper<StoreOrder> queryWrapper, String status) {
if (StrUtil.isBlank(status)) {
@ -266,7 +298,7 @@ public class OrderServiceImpl implements OrderService {
break;
case Constants.ORDER_STATUS_REFUNDING: //退款中
queryWrapper.eq("paid", 1);
queryWrapper.in("refund_status", 1,3);
queryWrapper.in("refund_status", 1, 3);
queryWrapper.eq("is_del", 0);
break;
case Constants.ORDER_STATUS_REFUNDED: //已退款
@ -291,7 +323,7 @@ public class OrderServiceImpl implements OrderService {
* @return
*/
@Override
public OrderDataResponse orderData(String dateLimit, Integer type,String payType) {
public OrderDataResponse orderData(String dateLimit, Integer type, String payType) {
OrderDataResponse response = new OrderDataResponse();
if (type.equals(2)) {
type = null;
@ -307,7 +339,7 @@ public class OrderServiceImpl implements OrderService {
// 退款订单数量
response.setRefundCount(getCount(dateLimit, Constants.ORDER_STATUS_REFUNDED, type));
// 总消费钱数
response.setSumPrice(getAmount(dateLimit,payType));
response.setSumPrice(getAmount(dateLimit, payType));
// 未支付订单数量
response.setUnPaidCount(getCount(dateLimit, Constants.ORDER_STATUS_UNPAID, type));
// 待发货订单数量
@ -330,7 +362,8 @@ public class OrderServiceImpl implements OrderService {
/**
*
*@param orderNo
*
* @param orderNo
* @return 退
*/
private StoreOrder getInfoException(Integer orderNo) {
@ -342,6 +375,7 @@ public class OrderServiceImpl implements OrderService {
}
return storeOrder;
}
/**
*
*
@ -517,7 +551,7 @@ public class OrderServiceImpl implements OrderService {
*/
@Override
public Object expressOrder(String orderId) {
HashMap<String,Object> resultMap = new HashMap<>();
HashMap<String, Object> resultMap = new HashMap<>();
StoreOrder storeOrderPram = new StoreOrder();
storeOrderPram.setOrderId(orderId);
StoreOrder existOrder = storeOrderService.getByEntityOne(storeOrderPram);
@ -547,7 +581,7 @@ public class OrderServiceImpl implements OrderService {
orderInfo.put("info", cartInfos);
resultMap.put("order", orderInfo);
// resultMap.put("express", expressInfo);
// resultMap.put("express", expressInfo);
return resultMap;
}
@ -770,7 +804,7 @@ public class OrderServiceImpl implements OrderService {
//用户剩余积分
//用户剩余经验
// 缓存订单
String key = user.getId() + DateUtils.getNowTime().toString()+CrmebUtil.getUuid();
String key = user.getId() + DateUtils.getNowTime().toString() + CrmebUtil.getUuid();
redisUtil.set("user_order:" + key, JSONUtil.parseObj(orderInfoVo), Constants.ORDER_CASH_CONFIRM, TimeUnit.MINUTES);
MyRecord record = new MyRecord();
record.set("preOrderNo", key);
@ -779,6 +813,7 @@ public class OrderServiceImpl implements OrderService {
/**
*
*
* @param request
* @return OrderInfoVo
*/
@ -866,6 +901,7 @@ public class OrderServiceImpl implements OrderService {
/**
*
*
* @param detailRequest
* @return List<OrderInfoDetailVo>
*/
@ -935,8 +971,9 @@ public class OrderServiceImpl implements OrderService {
/**
*
*
* @param request
* @param user
* @param user
* @return List<OrderInfoDetailVo>
*/
private List<OrderInfoDetailVo> validatePreOrderShopping(PreOrderRequest request, MemberUserRespDTO user) {
@ -991,6 +1028,7 @@ public class OrderServiceImpl implements OrderService {
});
return detailVoList;
}
/**
*
*
@ -1031,6 +1069,7 @@ public class OrderServiceImpl implements OrderService {
/**
*
*
* @param request
* @return ComputedOrderPriceResponse
*/
@ -1137,7 +1176,7 @@ public class OrderServiceImpl implements OrderService {
orderRequest.setRealName(userAddress.getRealName());
orderRequest.setPhone(userAddress.getPhone());
userAddressStr = userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getDetail();
}else if (orderRequest.getShippingType() == 2) { // 到店自提
} else if (orderRequest.getShippingType() == 2) { // 到店自提
if (StringUtils.isBlank(orderRequest.getRealName()) || StringUtils.isBlank(orderRequest.getPhone())) {
throw new ServiceException("请填写姓名和电话");
}
@ -1150,7 +1189,7 @@ public class OrderServiceImpl implements OrderService {
// if (ObjectUtil.isNull(systemStore) || systemStore.getIsDel() || !systemStore.getIsShow()) {
// throw new ServiceException("暂无门店无法选择门店自提");
// }
verifyCode = CrmebUtil.randomCount(1111111111,999999999)+"";
verifyCode = CrmebUtil.randomCount(1111111111, 999999999) + "";
//userAddressStr = systemStore.getName();
}
@ -1292,7 +1331,7 @@ public class OrderServiceImpl implements OrderService {
storeOrder.setType(1);// 视频号订单
}
// StoreCouponUser storeCouponUser = new StoreCouponUser();
// StoreCouponUser storeCouponUser = new StoreCouponUser();
// 优惠券修改
// if (storeOrder.getCouponId() > 0) {
// storeCouponUser = storeCouponUserService.getById(storeOrder.getCouponId());
@ -1304,12 +1343,12 @@ public class OrderServiceImpl implements OrderService {
// 扣减库存
// 需要根据是否活动商品,扣减不同的库存
// 普通商品
for (MyRecord skuRecord : skuRecordList) {
// 普通商品口库存
storeProductService.operationStock(skuRecord.getInt("productId"), skuRecord.getInt("num"), "sub");
// 普通商品规格扣库存
//storeProductAttrValueService.operationStock(skuRecord.getInt("attrValueId"), skuRecord.getInt("num"), "sub", Constants.PRODUCT_TYPE_NORMAL);
}//
for (MyRecord skuRecord : skuRecordList) {
// 普通商品口库存
storeProductService.operationStock(skuRecord.getInt("productId"), skuRecord.getInt("num"), "sub");
// 普通商品规格扣库存
//storeProductAttrValueService.operationStock(skuRecord.getInt("attrValueId"), skuRecord.getInt("num"), "sub", Constants.PRODUCT_TYPE_NORMAL);
}//
storeOrderService.create(storeOrder);
storeOrderInfos.forEach(info -> info.setOrderId(storeOrder.getId()));
@ -1337,7 +1376,7 @@ public class OrderServiceImpl implements OrderService {
redisUtil.lPush(Constants.ORDER_AUTO_CANCEL_KEY, storeOrder.getOrderId());
// TODO 发送后台管理员下单提醒通知短信
// sendAdminOrderNotice(storeOrder.getOrderId());
// sendAdminOrderNotice(storeOrder.getOrderId());
MyRecord record = new MyRecord();
record.set("orderNo", storeOrder.getOrderId());
@ -1346,6 +1385,7 @@ public class OrderServiceImpl implements OrderService {
/**
*
*
* @param orderInfoVo Vo
* @return List<MyRecord>
* skuRecord
@ -1392,6 +1432,7 @@ public class OrderServiceImpl implements OrderService {
}
return recordList;
}
/**
*
*

View File

@ -239,3 +239,6 @@ wx:
port: 6369 # 端口
database: 16 # 数据库索引
password: 20221122@dev # 密码,建议生产环境开启
phone:
query-url: http://phone.cyywl.top/cyywl-phone-query-api/
token: eyIwLnR5cCI6IkpXVCIsImFsZyI6IkhTNTEyIn0

View File

@ -143,6 +143,15 @@ export function shippingRegion(data) {
})
}
// 物流运费模板指定不配送
export function shippingNodelivery(data) {
return request({
url: 'admin/express/shipping/no_delivery/list',
method: 'get',
params: { ...data }
})
}
// 物流运费模板新增
export function shippingSave(data) {
return request({

View File

@ -168,6 +168,7 @@
import * as logistics from '@/api/cremb/logistics'
import { Loading } from 'element-ui'
import {Debounce} from '@/utils/validate'
import {shippingNodelivery} from "@/api/cremb/logistics";
const defaultRole = {
name: '',
type: 1,
@ -357,6 +358,10 @@ export default {
if (info.appoint) {
this.shippingFree()
}
//
if(info.noDelivery){
this.shippingNodelivery()
}
}).catch(res => {
// console.integralLog(res)
this.$message.error(res.message)
@ -379,10 +384,24 @@ export default {
shippingFree() {
logistics.shippingFree({ tempId: this.tempId }).then(res => {
res.data.forEach((item, index) => {
item.title = JSON.parse(item.title)
item.city_ids = item.title
// item.title = JSON.parse(item.title)
item.city_ids = item.cityId.split(',')
})
this.ruleForm.free = res.data
console.log(this.ruleForm.free )
})
},
//
shippingNodelivery() {
logistics.shippingNodelivery({ tempId: this.tempId }).then(res => {
res.data.forEach((item, index) => {
// item.title = JSON.parse(item.title)
item.city_ids = item.cityId.split(',')
})
this.ruleForm.noDelivery = res.data
console.log(this.ruleForm.noDelivery )
})
},
removeChild(list){
@ -443,9 +462,7 @@ export default {
}
this.ruleForm.region.forEach((el, index) => {
if(el.city_ids.length > 0){
el.cityId = el.city_ids.map(item => {
return item[2]
}).join(',')
el.cityId = JSON.stringify(el.city_ids)
}else{
el.cityId = 'all'
}
@ -467,9 +484,7 @@ export default {
if (this.ruleForm.appoint) {
this.ruleForm.free.forEach((el, index) => {
if(el.city_ids.length > 0){
el.cityId = el.city_ids.map(item => {
return item[2]
}).join(',')
el.cityId = JSON.stringify(el.city_ids)
}else{
el.cityId = 'all'
}

View File

@ -186,7 +186,7 @@
if (this.$store.getters.isLogin) {
this.setRefreshToken()
}
}, 60000)
}, 600000)
},
//
isQRCode() {

View File

@ -15,6 +15,20 @@ export function memberOrderInfo(){
return request.get('api/order/member/memberOrderInfo', {})
}
/**
* 查询权益档位信息
*/
export function query(phone){
return request.get(`shop/refund-fee-record/query?phone=${phone}`, {})
}
/**
* 查询档位返费信息
*/
export function memberQuery(reportId){
return request.get(`shop/refund-fee-record/query-item?reportId=${reportId}`, {})
}
/**
* 根据手机号查询档次信息
*/

View File

@ -216,7 +216,7 @@
width: 100%;
border-radius: 16rpx 16rpx 0 0;
background-color: #fff;
padding-bottom: 4%;
padding-bottom: 100rpx;
z-index: 99;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transform: translate3d(0, 100%, 0);
@ -256,7 +256,7 @@
}
.payment .item .left {
width: 610rpx;
width: 600rpx;
}
.payment .item .left .text {

View File

@ -10,6 +10,18 @@
// }
}
},
{
"path": "pages/member_loding/index",
"style": {
"navigationBarTitleText": "会员"
}
},
{
"path": "pages/member_detail/index",
"style": {
"navigationBarTitleText": "权益明细"
}
},
{
"path": "pages/member_equity/index",
"style": {
@ -577,27 +589,28 @@
// {
// "pagePath": "pages/index/index",
// "iconPath": "static/images/tabbar/nav_icon_shop.png",
// "selectedIconPath": "static/images/1-002.png",
// "selectedIconPath": "static/images/tabbar/nav_icon_shop_active.png",
// "text": "商城"
// },
// {
// "pagePath": "pages/goods_cate/goods_cate",
// "iconPath": "static/images/tabbar/nav_icon_sort.png",
// "selectedIconPath": "static/images/2-002.png",
// "text": "分类"
// },
{
"pagePath": "pages/member_application/index",
"iconPath": "static/images/2-001.png",
"iconPath": "static/images/tabbar/nav_icon_member.png",
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
"text": "会员申请"
},
{
"pagePath": "pages/member_equity/index",
"iconPath": "static/images/2-001.png",
"iconPath": "static/images/tabbar/nav_icon_member.png",
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
"text": "会员申请",
"visible":false
},
{
"pagePath": "pages/goods_cate/goods_cate",
"iconPath": "static/images/tabbar/nav_icon_sort.png",
"selectedIconPath": "static/images/tabbar/nav_icon_sort_active.png",
"text": "分类"
},
// {
// "pagePath": "pages/order_addcart/order_addcart",

View File

@ -105,7 +105,7 @@
</block>
</view> -->
<!-- 优品推荐 -->
<view class="superior borRadius14" if='good_list.length' id="past2">
<!-- <view class="superior borRadius14" if='good_list.length' id="past2">
<view class="title acea-row row-center-wrapper">
<image src="../../static/images/xzuo.png"></image>
<view class="titleTxt">优品推荐</view>
@ -133,10 +133,10 @@
</view>
</view>
</swiper-item>
<!-- <view class="swiper-pagination" slot="pagination"></view> -->
<view class="swiper-pagination" slot="pagination"></view>
</swiper>
</view>
</view>
</view> -->
</view>
</view>
<view class='product-intro' id="past3">
@ -167,11 +167,11 @@
</view>
<!-- #endif -->
<block v-if="type === 'normal'">
<view @click="setCollect" class='item'>
<!-- <view @click="setCollect" class='item'>
<view class='iconfont icon-shoucang1' v-if="userCollect"></view>
<view class='iconfont icon-shoucang' v-else></view>
<view>收藏</view>
</view>
</view> -->
<navigator open-type='switchTab' class="animated item" :class="animated==true?'bounceIn':''"
url='/pages/order_addcart/order_addcart' hover-class="none">
<view class='iconfont icon-gouwuche1'>
@ -954,9 +954,9 @@
} else {
obj.type = "";
}
getCoupons(obj).then(res => {
that.$set(that.coupon, 'list', res.data);
});
// getCoupons(obj).then(res => {
// that.$set(that.coupon, 'list', res.data);
// });
},
tabCouponType(type) {
this.$set(this.coupon, 'type', type);

View File

@ -27,6 +27,7 @@
<image src='../../static/images/memberTitle.png'></image>
</view>
<view class="privilege-list">
<view class="privilege-item" v-for="(item,index) in 4" :key="index">
<image src='../../static/images/vip1.png'></image>
<text class="privilege-text">
@ -37,13 +38,10 @@
</view>
<paymentMember :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :payInfo="payInfo">
</paymentMember>
<button class="box-submit" @click="goPay"></button>
<u-navbar leftIcon="" title="会员申请">
<view class="u-nav-slot" slot="right">
<u-icon name="more-dot-fill" size="50" @click="show = true"></u-icon>
<u-action-sheet @select="handleSelect" :actions="list" :title="title" :show="show" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="show=false" :safeAreaInsetBottom="true"></u-action-sheet>
</view>
</u-navbar>
<view style="display: flex; justify-content: space-between; margin-top: 4%;">
<button class="box-submit" @click="goPay"></button>
<button class="box-others" @click="handleOther"></button>
</view>
</view>
</template>
@ -60,18 +58,16 @@
},
data() {
return {
title:'管理',
list: [
{
name:'购买记录',
fontSize:'28'
},
{
name:'为他人充值',
fontSize:'28'
},
],
show: false,
// list: [
// {
// name:'',
// fontSize:'28'
// },
// {
// name:'',
// fontSize:'28'
// },
// ],
memberData: [],
payInfo: {
userPhone: '',
@ -96,16 +92,17 @@
form: {
phone: ''
},
show:true,
ref:null
};
},
async onLoad() {
uni.showLoading({
title: '加载中',
mask: true
});
try{
uni.showLoading({
title: '加载中',
mask: true
});
const res = await memberGradeInfo()
if(res.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
@ -120,9 +117,6 @@
index: 0,
pagePath: '/pages/member_application/index'
})
uni.switchTab({
url:'/pages/member_application/index'
})
}
this.memberData = res.data
} finally{
@ -130,7 +124,11 @@
}
},
methods: {
handleOther(){
uni.navigateTo({
url:'/pages/member_others/index'
})
},
handleSelect(value){
switch (value.name){
case "购买记录":
@ -225,15 +223,14 @@
<style lang="scss" scoped>
.box {
margin-top: 10%;
position: relative;
padding: 207rpx 40rpx 30rpx 40rpx;
padding: 207rpx 40rpx 0 40rpx;
min-height: 100vh;
background: url(../../static/images/bg.png);
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
overflow: hidden;
.u-nav-slot{
::v-deep .u-popup__content{
padding-bottom: 20% !important;
@ -253,7 +250,6 @@
.box-member {
box-shadow: 0px 0px 15px -5px #000;
width: 100%;
border-radius: 20px;
box-sizing: border-box;
border: 1px solid transparent;
background-image: linear-gradient(#FFD55D, #FD752F),
@ -290,7 +286,7 @@
}
.member-list {
margin: 83rpx 30rpx 30rpx 30rpx;
margin: 53rpx 30rpx 20rpx 30rpx;
position: relative;
.member-item {
@ -302,11 +298,11 @@
border-radius: 20rpx;
.member-image {
width: 104rpx;
height: 104rpx;
width: 100rpx;
height: 100rpx;
border-radius: 35rpx;
background: linear-gradient(#FFEBB2, #FDCB3B);
padding: 20rpx;
padding: 16rpx;
image {
width: 100%;
@ -413,7 +409,7 @@
box-shadow: 0px 0px 15px -5px #000;
border-radius: 36rpx;
width: 100%;
margin-top: 12%;
margin-top: 9%;
border-radius: 20px;
box-sizing: border-box;
border: 1px solid transparent;
@ -454,7 +450,7 @@
}
.privilege-list {
margin: 84rpx 10rpx 40rpx 10rpx;
margin: 54rpx 10rpx 10rpx 10rpx;
display: flex;
justify-content: space-between;
@ -464,7 +460,7 @@
align-items: center;
justify-content: space-between;
background: #fff;
padding: 16rpx 16rpx;
padding: 6rpx 16rpx;
border-radius: 20rpx;
margin: 0 10rpx;
@ -486,9 +482,9 @@
}
}
.box-submit {
background: linear-gradient(#FFC82B, #FD7A32);
margin-top: 127rpx;
.box-others {
width: 46%;
background: linear-gradient(#ff6672, #d60338);
display: flex;
justify-content: center;
align-items: center;
@ -497,5 +493,18 @@
color: #fff;
font-size: 32rpx;
}
.box-submit {
width: 46%;
background: linear-gradient(#FFC82B, #FD7A32);
display: flex;
justify-content: center;
align-items: center;
height: 87rpx;
border-radius: 44rpx;
color: #fff;
font-size: 32rpx;
}
}
</style>

View File

@ -0,0 +1,111 @@
<template>
<view class="box">
<view class="list-item" v-for="(item,index) in memberData" :key="index">
<view class="item-title">
<view class="item-phone">
<view></view>
<text>{{item.tradeTime}}</text>
</view>
<view style="margin-right: 20rpx;">{{item.businessName}}</view>
</view>
<view class="item-text">
<text>{{list[list.findIndex((i) => item.gear == i.name)].value}} </text>
<text>交易金额{{item.money}}</text>
</view>
</view>
<u-navbar autoBack title="权益明细"></u-navbar>
</view>
</template>
<script>
import {
memberQuery
} from '@/api/member.js';
import { Debounce } from '@/utils/validate.js'
export default {
name: "member_record",
data() {
return {
list: [
{
value:'240',
img:'../../static/images/member240.png',
name:'360'
},
{
value:'400',
img:'../../static/images/member400.png',
name:'600'
},
{
value:'960',
img:'../../static/images/member960.png',
name:'900'
},
],
memberData:[]
};
},
async onLoad(options) {
const res = await memberQuery(options.reportId)
this.memberData = res.data
},
methods: {
}
};
</script>
<style lang="scss" scoped>
.box {
padding: 20% 40rpx;
.box-seach{
padding: 10% 40rpx;
width: 100%;
position: fixed;
top: 3%;
left: 0;
}
.list-item{
margin-bottom: 26rpx;
padding: 30rpx 16rpx 25rpx 16rpx;
background: #FDF0F1;
border-radius: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.item-title{
display: flex;
justify-content: space-between;
.item-phone{
display: flex;
align-items: center;
font-size: 30rpx;
color: #E91D51;
view{
border-radius: 3rpx;
margin-right: 10rpx;
width: 5rpx;
height: 12rpx;
background: #E91D51;
}
}
button{
padding: 6rpx ;
font-size: 26rpx;
background: rgb(22,155,213);
color: #fff;
}
}
.item-text{
padding: 34rpx 12rpx;
background: #fff;
margin-top: 20rpx;
display: flex;
justify-content: space-between;
font-size: 30rpx;
}
}
}
</style>

View File

@ -8,8 +8,18 @@
<text>会员积分{{memberDetail.integral}}</text>
</view>
<text>再升1级即可获得XX等6项权益</text>
<view class="left-button">
<view class="left-shopping" @click="handleRouter('购买记录')">
<text>购买记录</text>
<image src="../../static/images/shopping-right.png" ></image>
</view>
<view class="left-others" @click="handleRouter('为他人充值')">
为他人充值
<image src="../../static/images/others-right.png" ></image>
</view>
</view>
</view>
<view class="member-right">
<view class="member-right">
<image src='../../static/images/vipStar.png'></image>
<text>会员等级{{vipData.findIndex((item) => item == memberDetail.grade) +1}}</text>
<button @click="handleRenew"></button>
@ -23,47 +33,43 @@
</view>
<text class="equity-look">查看权益></text>
</view>
<view class="equity-item" v-for="(item,index) in 3" :key="index">
<view class="equity-item" v-for="(item,index) in equityData" :key="index">
<view class="equity-grade">
<image src='../../static/images/member240.png'></image>
<text>办理日期2021.12.30</text>
<image :src='list[list.findIndex((i) => item.gear == i.name)].img'></image>
<text>办理日期{{item.startTime}}</text>
</view>
<view class="equity-money">
<view class="money-box money-completed">
<text>已返回金额</text>
<view>
<text class="money-text">80</text>
<text class="money-detailed">查看明细></text>
<text class="money-text">{{item.totalMoney}}</text>
<text class="money-detailed" @click="handleDetailed(item.reportId)">></text>
</view>
</view>
<view class="money-box money-treat">
<text>已返回金额</text>
<text class="money-text">80</text>
<text>带返还金额 () </text>
<text class="money-text">{{list[list.findIndex((i) => item.gear == i.name)].name-item.totalMoney}}</text>
</view>
<view class="money-box money-term">
<text>已返回金额</text>
<text class="money-text">80</text>
<text>带返还期额</text>
<text class="money-text">{{item.frequency}}x12</text>
</view>
<view class="money-box money-time">
<text>已返回金额</text>
<text class="money-text">80</text>
</view>
</view>
</view>
</view>
<u-navbar leftIcon="" title="会员申请">
<view class="u-nav-slot" slot="right">
<u-icon name="more-dot-fill" size="50" @click="show = true"></u-icon>
<u-action-sheet @select="handleSelect" :actions="list" :title="title" :show="show" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="show=false" :safeAreaInsetBottom="true"></u-action-sheet>
</view>
</u-navbar>
</view>
<text>返费结束时间</text>
<text class="money-text">{{item.endTime}}</text>
</view>
</view>
</view>
</view>
<u-navbar leftIcon="" title="会员申请"></u-navbar>
</view>
</template>
<script>
import {
memberHeadInfo,
memberGradeInfo
memberGradeInfo,
query
} from '@/api/member.js';
import {
mapGetters
@ -72,20 +78,24 @@
name: "member_application",
data() {
return {
title:'管理',
list: [
{
name:'购买记录',
fontSize:'28'
img:'../../static/images/member240.png',
name:'360'
},
{
name:'为他人充值',
fontSize:'28'
img:'../../static/images/member400.png',
name:'600'
},
{
img:'../../static/images/member960.png',
name:'900'
},
],
vipData:['普通会员','中级会员','高级会员'],
show: false,
memberDetail:{}
memberDetail:{},
equityData:[]
};
},
computed: mapGetters(['userInfo']),
@ -96,9 +106,6 @@
index: 0,
pagePath: '/pages/member_equity/index'
})
uni.switchTab({
url:'/pages/member_equity/index'
})
}else{
uni.setTabBarItem({
index: 0,
@ -108,18 +115,25 @@
url:'/pages/member_application/index'
})
}
const res = await memberHeadInfo()
this.memberDetail = res.data
// this.userInfo.mobile
const equity = await query(13668261228)
this.equityData = equity.data
},
methods: {
handleDetailed(reportId){
uni.navigateTo({
url:`/pages/member_detail/index?reportId=${reportId}`,
})
},
handleRenew(){
uni.navigateTo({
url:'/pages/member_renew/index'
})
},
handleSelect(value){
switch (value.name){
handleRouter(value){
switch (value){
case "购买记录":
uni.navigateTo({
url:'/pages/member_record/index'
@ -165,7 +179,7 @@
// padding: 20rpx 20rpx 30rpx 20rpx;
display: flex;
justify-content: space-between;
line-height: 50rpx;
.member-left {
display: flex;
flex-direction: column;
@ -187,6 +201,43 @@
display: flex;
justify-content: space-between;
}
.left-button{
display: flex;
justify-content: space-between;
margin-top: 10rpx;
image{
width: 24rpx;
height: 24rpx;
margin-left: 13rpx;
}
.left-shopping{
display: flex;
align-items: center;
justify-content: center;
width: 204rpx;
height: 61rpx;
background: #F8EFF0;
border: 1px solid #F783B0;
border-radius: 30rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
.left-others{
background-image: url("../../static/images/others-button.png");
background-size: 204rpx 61rpx;
display: flex;
align-items: center;
justify-content: center;
width: 204rpx;
height: 61rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
}
.member-right {

View File

@ -0,0 +1,52 @@
<template>
</template>
<script>
import {
memberGradeInfo
} from '@/api/member.js';
export default {
name: "member_loding",
data() {
return {
};
},
async onLoad() {
try{
uni.showLoading({
title: '加载中'
});
const res = await memberGradeInfo()
if(res.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_equity/index'
})
uni.switchTab({
url:'/pages/member_equity/index'
})
}else{
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_application/index'
})
uni.switchTab({
url:'/pages/member_application/index'
})
}
} finally{
uni.hideLoading();
}
},
methods: {
}
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -508,7 +508,7 @@
.box-submit {
background: linear-gradient(#FFC82B, #FD7A32);
margin-top: 127rpx;
margin-top: 9%;
display: flex;
justify-content: center;
align-items: center;

View File

@ -461,7 +461,7 @@ import store from '@/store/index';
.box-submit {
background: linear-gradient(#FFC82B, #FD7A32);
margin-top: 127rpx;
margin-top: 9%;
display: flex;
justify-content: center;
align-items: center;

View File

@ -65,14 +65,20 @@
},
onReady() {},
methods: {
downImage() {
async downImage() {
const that = this
uni.showLoading({
title: '生成海报中',
mask: true
});
that.isHideBtn = true
htmlToImage.toJpeg(document.getElementById('poster-wrap'), {
for(let i = 0; i<3; i++){
await htmlToImage.toPng(document.getElementById('poster-wrap'), {
quality: 0.95,
cacheBust: true
});
}
htmlToImage.toPng(document.getElementById('poster-wrap'), {
quality: 0.95,
cacheBust: true
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB