积分抵扣、霸王餐、优惠券分享新增

This commit is contained in:
GaoHao
2024-11-07 15:02:44 +08:00
parent bec723cd69
commit 7b81e2ffb0
29 changed files with 2375 additions and 887 deletions

View File

@@ -37,7 +37,6 @@
},
onShow: function() {
// 获取导航栏信息
wx.getSystemInfo({
success: res => {
this.globalData.systemInfo = res;
@@ -150,7 +149,7 @@
}
page {
background-color: #F9F9F9;
background-color: #F6F6F6!important;
}
text {

View File

@@ -71,7 +71,7 @@ export default {
paymemeberIn(data) { //充值
return uni.api.post("/pay/memeberIn", data);
},
orderorderList(data) { //订单列表
return uni.api.get("/order/orderList", data);
@@ -285,5 +285,76 @@ export default {
cancelTakeNumber(data) {
return uni.api.post("/callTable/cancel", data, false);
},
/**
* 积分-基本设置-获取店铺设置
* @param {Object} param
*/
shopSettingInfo(shopId) {
return uni.api.get(`/api/points/basic-setting/${shopId}`);
},
/**
* 积分-兑换商品列表
* @param {Object} param
*/
pointsGoodsList(param) {
return uni.api.get("/api/points/goods-setting/page", param);
},
/**
* 积分-生成订单
* @param {Object} data
*/
pointsCreateOrder(data) {
return uni.api.post("/api/points/exchange-record/create", data);
},
/**
* 积分-支付订单
* @param {Object} data
*/
pointsPayOrder(data) {
return uni.api.post("/api/points/exchange-record/pay", data);
},
/**
* 积分-取消订单
* @param {Object} data
*/
pointsCancelOrder(data) {
return uni.api.post("/api/points/exchange-record/cancel", data);
},
/**
* 积分-001-会员积分账户信息
* @param {Object} param
*/
memberPointsInfo(memberId) {
return uni.api.get(`/api/points/member-points/${memberId}`, );
},
/**
* 积分-明细列表
* @param {Object} param
*/
memberPointsLogList(param) {
return uni.api.get("/api/points/member-points-log/page", param);
},
/**
* 积分-兑换记录-列表
* @param {Object} param
*/
exchangeRecordList(param) {
return uni.api.get("/api/points/exchange-record/page", param);
},
/**
* 积分-获取订单可用积分及抵扣金额
* @param {Object} param
*/
calcUsablePoints(param) {
return uni.api.get("/api/points/member-points/calc-usable-points", param);
},
}

View File

@@ -12,14 +12,15 @@
radius='10'
@change="e => current = e.current"
@click="swiperClick"
bgColor="transparent" height='720'
bgColor="transparent" height="920"
>
<view slot="indicator" class="indicator">
<!-- <view slot="indicator" class="indicator"> -->
<!-- <view class="indicator__dot" v-for="(item, index) in carousel" :key="index"
:class="[index === current && 'indicator__dot--active']"
:style="[index === current && {'width':16+'px'}]">
</view> -->
</view>
<!-- </view> -->
</u-swiper>
</view>
@@ -207,7 +208,8 @@
justify-content: center;
align-items: center;
.swiperBox{
width: 80%;
width: 85%;
margin-top: 50rpx;
margin-bottom: 50rpx;
}
.swiper__wrapper__item__wrapper__image{

View File

@@ -6,10 +6,10 @@ const proxyApi = "/api"
// const proxyApi = 'http://192.168.1.15:9888/cashierService' // 王伟
// const proxyApi = 'http://192.168.1.27:9888/cashierService' // 帆哥
// const proxyApiwws = 'ws://192.168.1.15:9888/netty' // 测试
// const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
// const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 线上
const proxyApiwws = 'wss://cashier.sxczgkj.cn/netty' // 线上
const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
// const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 线上
// const proxyApiwws = 'wss://cashier.sxczgkj.cn/netty' // 线上
// #endif
// #ifdef H5

View File

@@ -260,6 +260,7 @@ const getUserInfo = function (successCallback, failCallback) {
},
fail: (err) => {}
});
}
});
@@ -269,23 +270,23 @@ const getUserInfo = function (successCallback, failCallback) {
// #ifdef MP-ALIPAY
return new Promise((resolve, reject) => {
my.getAuthCode({
scopes: 'auth_user',
success: (data) => {
scopes: 'auth_base',
success: async (data) => {
console.log(data)
// 支付宝小程序环境
my.getAuthUserInfo({
success: async (infoRes) => {
// my.getAuthUserInfo({
// success: async (infoRes) => {
let res = await Api.userwxlogin({
code: data.authCode, //临时登录凭证
rawData: JSON.stringify(infoRes),
// rawData: JSON.stringify(infoRes),
source: 'alipay'
})
if (res.code == 0) {
resolve(res)
}
},
fail: (err) => {}
});
// },
// fail: (err) => {}
// });
}
});
})

View File

@@ -125,7 +125,6 @@ async function request(options) {
uni.cache.set('storage:offset-time', offset, -1)
return await request(options)
} else {
console.log(options)
uni.showToast({
title: res.message || res.msg || res.error,
icon: "none",

View File

@@ -373,6 +373,63 @@
}
}
]
},
{
"root": "pagesPoints",
"pages": [
{
"path": "index/index",
"style": {
"navigationBarTitleText": "积分商城",
"navigationBarBackgroundColor": "#E9B183"
}
},
{
"path": "goodsDetail/index",
"style": {
"navigationBarTitleText": "商品详情"
}
},
{
"path": "exchangeRecord/index",
"style": {
"navigationBarTitleText": "兑换记录"
}
},
{
"path": "exchangeRecordDetail/index",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "IntegralDetail/index",
"style": {
"navigationBarTitleText": "积分明细"
}
},
{
"path": "confirm_order/index",
"style": {
"navigationBarTitleText": "确认订单",
"navigationBarBackgroundColor": "#E9B183"
}
}
]
},
{
"root": "pagesInviteFriends",
"pages": [
{
"path": "index/index",
"style": {
"navigationBarTitleText": "邀请好友",
"navigationStyle": "custom"
}
}
]
}
],
"globalStyle": {

View File

@@ -91,6 +91,10 @@
})
},
memberindex(url) {
// uni.pro.navigateTo("/pagesInviteFriends/index/index", {
// shopId: uni.cache.get('shopId'),
// type: 'index',
// })
uni.pro.navigateTo(url, {
shopId: uni.cache.get('shopId'),
type: 'index',

View File

@@ -1,723 +0,0 @@
<template>
<view class="content">
<view class="location" @click="openLocation">
<image class="location_icon" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/location.png" mode="aspectFill"></image>
<view>{{ shopUserInfo.shopName }}</view>
<u-icon name="arrow-right" color="#575B66" size="28"></u-icon>
</view>
<view class="card_info flex-colum">
<view class="title">账户余额()</view>
<view class="card_info_con flex-between">
<view class="balance">{{shopUserInfo.amount || '0.00'}}</view>
<view class="card_info_con_right flex-end">
<view class ="card_info_con_right_item flex-colum" @click="handleClick(item)" v-for="(item,index) in cardManageList" :key="index">
<image class="card_info_con_right_item_icon" :src="item.icon" mode="aspectFill"></image>
<text class="card_info_con_right_item_text">{{item.name}}</text>
</view>
</view>
</view>
</view>
<view class="customAmount" v-if="shopUserInfo.isUser == 1">
<view class="customAmount_left">
<text class="customAmount_left_tip"></text>
<u-input
type="number"
v-model="amount"
inputAlign="left"
:placeholder="`充${amount}送${giftAmount}`"
:customStyle="{border: '0'}"
@input="amountChange"
></u-input>
</view>
<text class="customAmount_right">自定义金额</text>
</view>
<view class="rechargeList">
<view class="rechargeList_f" @click="clickinput(item,index)" v-for="(item,index) in listdata" :key="index">
<view class="rechargeList_item flex-colum " :class="index === inputshow?'active':''">
<view class="rechargeList_item_title">充值</view>
<view class="flex-colum-start">
<view class="rechargeList_item_amount"><text>{{item.amount}}</text></view>
<view class="rechargeList_item_gift" v-show="index === inputshow">
<image class="rechargeList_item_gift_bg" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/gift_icon.png" mode="aspectFill"></image>
<view class="rechargeList_item_gift_text">
<text>{{inputshow}}</text>
<text>{{ item.giftAmount }}</text>
</view>
</view>
<view class="rechargeList_item_handsel" v-show="index !== inputshow">赠送{{item.giftAmount}}</view>
</view>
</view>
</view>
</view>
<view class="gift" v-if="giftList && giftList.length > 0">
<view class="gift_title">您将获得</view>
<view class="gift_list">
<view class="gift_list_item" v-for="(item,index) in giftList" :key="index">
<text class="icon"></text>
<text class="text"> {{ item }} </text>
</view>
</view>
</view>
<view class="explain">
<view class="explain-top flex-between">
<text class="explain-top_title">适用门店</text>
<text class="shopName">{{ shopUserInfo.shopName }}</text>
</view>
<view class="explain_content">
<text class="explain_content_title">充值说明</text>
<text class="explain_content_text">1.充值金额1家门店可用</text>
<text class="explain_content_text">2.储值完成后不支持自助退款可联系商家处理</text>
<text class="explain_content_text">3.钱包余额不支持转赠不可提现长期有效</text>
</view>
</view>
<view class="rechargeBox">
<view class="agreement" @click="isProtocol = !isProtocol">
<u-checkbox-group >
<u-checkbox :checked="isProtocol" shape="circle" activeColor="#E3AD7F" @change="radioChange" size="35" iconSize="20">
</u-checkbox>
</u-checkbox-group>
<text>已同意</text>
<text class="agreement_text" @click.stop="viewProtocol">用户隐私协议</text>
<!-- <text class="agreement_text" @click="viewProtocol">用户储值协议</text> -->
<!-- <text class="agreement_text" @click="viewProtocol">用户授权协议</text> -->
</view>
<view class="recharge" @tap="$u.debounce(userbalancerechangesub, 500)">立即充值</view>
</view>
<registermember :show="memberOpen" :shopId="shopId" @getRegisterMember="getRegisterMember"></registermember>
</view>
</template>
<script>
import registermember from './components/registermember.vue'
export default {
components: {
registermember
},
data() {
return {
inputshow: 0,
memberOpen: false,
isProtocol: false,
listdata: [],
amount: 0,
giftAmount: 0,
userInfo: {},
shopUserInfo: null,
shopId: '',
giftList: [],
cardManageList: [
{name: "明细", url: "member/billDetails",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/detail.png"},
{name: "管理", url: "member/storedManage",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/manage.png"}
],
type: "",
}
},
async onLoad(options) {
// if ( e.type == 'list' || e.type == 'index') {
// this.shopId = e.shopId;
// this.init();
// }
uni.cache.set('forceUpdate',1)
// #ifdef MP-WEIXIN
if (options.q) {
this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId')
uni.cache.set('shopId',this.shopId)
this.tokenShow = false;
}
// #endif
// #ifdef MP-ALIPAY
if (getApp().globalData.shopId) { this.shopId = getApp().globalData.shopId }
uni.cache.set('shopId',this.shopId)
// #endif
if (options.shopId) {
this.shopId = options.shopId
uni.cache.set('shopId',this.shopId)
}
if (options.type) {
this.type = options.type
}
if ( options.amount ) { this.amount = options.amount; }
this.shopInfo();
this.paygetActive()
},
methods: {
/**
* 初始化
*/
async shopInfo() {
let res = await this.api.shopUserInfo({
shopId: this.shopId,
userId: uni.cache.get('userInfo').id,
})
if (res.code == 0) {
this.shopUserInfo = res.data;
uni.cache.remove('memberOpen',this.memberOpen)
if ( this.shopUserInfo.isVip == 0 ) {
this.memberOpen = true;
uni.cache.set('memberOpen',this.memberOpen)
}
} else {
let pages = getCurrentPages()
if ( pages.length > 1) {
uni.navigateBack()
} else {
setTimeout(res => {
uni.exitMiniProgram({
success: function() {
console.log('退出小程序成功');
},
fail: function(err) {
console.log('退出小程序失败', err);
}
})
}, 500)
}
}
this.$forceUpdate();
console.log(this.memberOpen)
},
/**
* 获取充值金额列表
*/
async paygetActive() {
let res = await this.api.paygetActive({
shopId: this.shopId,
page: 1,
pageSize: 99
})
try {
this.listdata = res.data.list;
this.giftList = this.listdata[0].gives;
this.giftAmount = this.listdata[0].giftAmount
if ( this.type == 'topUpActivity') {
this.amountChange()
} else {
this.amount = this.listdata[0].amount;
}
} catch (e) {
//TODO handle the exception
}
},
/**
* 监听金额修改
*/
amountChange () {
let item = this.listdata.filter(item=>this.amount==item.amount)
if ( item.length > 0 ) {
this.listdata.forEach((v,e)=>{
if ( this.amount == v.amount) {
this.inputshow = e;
this.clickinput(v,e)
}
})
} else {
this.inputshow = '';
this.giftList = [];
this.giftAmount = '';
}
},
/**
* 进入明细\管理
* @param {Object} e
*/
handleClick (item) {
uni.navigateTo({
url: `/pages/${item.url}?shopUserInfo=${JSON.stringify(this.shopUserInfo)}`
})
},
/**
* 查看协议
*/
viewProtocol (){
wx.openPrivacyContract({
success: () => {}, // 打开成功
fail: () => {}, // 打开失败
complete: () => {}
})
},
/**
* 是否同意协议
* @param {Object} n
*/
radioChange(n) {
this.isProtocol = n;
},
/**
* 注册会员卡
* @param {Object} e
*/
getRegisterMember (e) {
this.memberOpen = e;
this.shopInfo();
this.paygetActive()
},
/**
* 拉起地图
*/
openLocation () {
console.log('123');
uni.openLocation({
latitude: Number(this.shopUserInfo.lat), // 目的地的纬度,浮点数,范围为-90~90
longitude: Number(this.shopUserInfo.lng), // 目的地的经度,浮点数,范围为-180~180
scale: 18, // 缩放比例范围5~18
name: this.shopUserInfo.shopName, // 位置名
address: this.shopUserInfo.address, // 地址的详细说明
success() {
console.log('导航启动成功');
},
fail(error) {
console.log('导航启动失败', error);
if ( error.errMsg == "openLocation:fail invalid_coordinate") {
uni.showToast({
title: "门店经纬度无效",
icon: 'none'
});
}
}
});
},
/**
* 解析地址传参
* @param {Object} url
* @param {Object} name
*/
getQueryString(url, name) { //解码
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
var r = url.substr(1).match(reg)
if (r != null) {
return r[2]
}
return null;
},
/**
* 充值金额切换
* @param {Object} a
* @param {Object} b
*/
clickinput(a, b) {
this.inputshow = b;
this.giftList = a.gives;
this.amount = a.amount;
this.giftAmount = a.giftAmount;
},
/**
* 充值
*/
async userbalancerechangesub() {
let _this = this;
if (!this.isProtocol) {
uni.showToast({
title: '请勾选协议',
icon: 'none'
});
return false;
}
if (this.amount == null || this.amount == '') {
uni.showToast({
title: '金额不能为空',
icon: 'none'
});
return false;
}
if (this.amount <= 0) {
uni.showToast({
title: '金额必须大于0',
icon: 'none'
});
return false;
}
let res = await this.api.paymemeberIn({
shopId: this.shopId, // 判断显示哪家的作品,
amount: this.amount // 判断显示哪家的作品,
})
if (res.code == 0) {
uni.showLoading({
title: '加载中',
mask: true
})
// #ifdef MP-WEIXIN
uni.requestPayment({
provider: 'wxpay', //支付类型-固定值
partnerid: res.data.appId, // 微信支付商户号
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
nonceStr: res.data.nonceStr, // 随机字符串
package: res.data.package, // 固定值
signType: res.data.signType, //固定值
paySign: res.data.paySign, //签名
success: (res) => {
uni.showToast({
title: "支付成功"
})
uni.hideLoading()
let pages = getCurrentPages()
uni.requestSubscribeMessage({
tmplIds:["AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
complete() {
if ( _this.type && _this.type == "topUpActivity") {
uni.pro.navigateBack()
} else {
if ( pages.length > 1) {
_this.shopInfo()
} else {
setTimeout(res => {
uni.switchTab({
url: '/pages/index/index'
})
}, 500)
}
}
},
})
},
fail: (res) => {
uni.hideLoading()
}
});
uni.hideLoading()
// #endif
}
},
}
}
</script>
<style lang="scss">
page {
background: #F9F9F9;
}
.content {
padding: 16rpx 20rpx 245rpx 20rpx;
.location{
display: flex;
align-items: center;
background-color: #fff;
padding: 16rpx 28rpx 18rpx 28rpx;
margin-bottom: 32rpx;
border-radius: 12rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
.location_icon{
width: 20rpx;
height: 26rpx;
margin-right: 20rpx;
}
}
.card_info{
width: 100%;
height: 182rpx;
background: linear-gradient( 132deg, #D6B68D 0%, #E6D6BC 100%);
border-radius: 12rpx;
padding: 32rpx 28rpx;
align-items: initial;
margin-bottom: 26rpx;
.title{
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.card_info_con{
align-items: flex-end;
.balance{
font-weight: 400;
font-size: 48rpx;
color: #333333;
}
.card_info_con_right{
.card_info_con_right_item{
margin-left: 64rpx;
.card_info_con_right_item_icon{
width: 40rpx;
height: 36rpx;
margin-bottom: 5rpx;
}
.card_info_con_right_item_text{
font-weight: 400;
font-size: 24rpx;
color: #333333;
}
}
}
}
}
.customAmount{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
padding: 14rpx 16rpx;
background-color: #fff;
border-radius: 8rpx;
.customAmount_left{
width: 100%;
display: flex;
align-items: center;
.customAmount_left_tip{
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
input{
width: 100%;
font-weight: 500;
font-size: 24rpx;
color: #333;
padding-left: 16rpx;
}
}
.customAmount_right{
font-weight: 500;
font-size: 28rpx;
color: #666666;
flex-shrink: 0;
}
}
.rechargeList{
width: 100%;
display: flex;
flex-wrap: wrap;
.rechargeList_f{
width: 33.333%;
margin-bottom: 30rpx;
padding-right: 20rpx;
padding-left: 0;
.rechargeList_item{
border-radius: 0rpx 48rpx 0rpx 0rpx;
border: 4rpx solid #E5E5E5;
align-items: initial;
padding: 26rpx 22rpx;
justify-content: space-between;
position: relative;
.rechargeList_item_title{
margin-bottom: 20rpx;
}
.rechargeList_item_title,.rechargeList_item_handsel{
font-weight: 400;
font-size: 20rpx;
color: #999999;
}
.rechargeList_item_amount{
font-weight: bold;
font-size: 28rpx;
color: #666666;
text{
font-size: 44rpx;
font-weight: bold;
color: #666666;
}
}
.rechargeList_item_handsel{
}
.rechargeList_item_gift{
width: 92.52rpx;
height: 88.74rpx;
position: absolute;
top: 12rpx;
right: 12rpx;
.rechargeList_item_gift_bg{
width: 92.52rpx;
height: 88.74rpx;
position: absolute;
}
.rechargeList_item_gift_text{
width: 92.52rpx;
height: 88.74rpx;
position: absolute;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text:nth-child(1){
font-weight: bold;
font-size: 20rpx;
color: #fff;
}
text:nth-child(2){
font-weight: 400;
font-size: 24rpx;
color: #fff;
}
}
}
}
.rechargeList_item.active{
border: 4rpx solid #DCC19E;
background: linear-gradient( 133deg, #F9F6ED 0%, #FFFFFF 100%);
.rechargeList_item_title{
color: #F7664E;
margin-bottom: 47rpx;
}
.rechargeList_item_amount{
font-weight: bold;
font-size: 28rpx;
color: #FB604A;
text{
font-size: 44rpx;
font-weight: bold;
color: #FB604A;
}
}
}
}
.rechargeList_f:nth-child(3n-1){
padding-right: 10rpx;
padding-left: 10rpx;
}
.rechargeList_f:nth-child(3n){
padding-right: 0;
padding-left: 20rpx;
}
}
.gift{
display: flex;
flex-direction: column;
padding: 0 22rpx;
margin-bottom: 48rpx;
.gift_title{
font-weight: bold;
font-size: 32rpx;
color: #333333;
margin-bottom: 16rpx;
}
.gift_list{
display: flex;
flex-direction: column;
.gift_list_item{
display: flex;
align-items: center;
.icon{
width: 24rpx;
height: 24rpx;
border-radius: 50%;
background-color: #F7853D;
margin-right: 8rpx;
flex-shrink: 0;
}
.text{
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
}
}
.explain{
background-color: #fff;
border-radius: 12rpx;
display: flex;
flex-direction: column;
padding: 22rpx 24rpx;
margin-bottom: 30rpx;
.explain-top{
// align-items: center;
margin-bottom: 18rpx;
.explain-top_title{
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.shopName{
font-weight: 400;
font-size: 24rpx;
color: #333333;
}
}
.explain_content{
display: flex;
flex-direction: column;
.explain_content_title{
font-weight: bold;
font-size: 32rpx;
color: #333333;
margin-bottom: 20rpx;
}
.explain_content_text{
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-bottom: 14rpx;
}
}
}
.rechargeBox{
width: 100%;
padding: 0 28rpx 84rpx 28rpx;
background-color: #fff;
position: fixed;
left: 0;
bottom: 0;
.agreement{
display: flex;
align-items: center;
justify-content: center;
padding-top: 16rpx;
padding-bottom: 20rpx;
text{
font-size: 24rpx;
}
.agreement_text{
color: #E3AD7F;
}
}
.recharge {
width: 100%;
height: 90rpx;
line-height: 90rpx;
text-align: center;
font-weight: bold;
font-size: 36rpx;
color: #FFFFFF;
border-radius: 12rpx;
background: #E3AD7F;
}
}
}
</style>

View File

@@ -23,30 +23,32 @@
<view class="customAmount" v-if="shopUserInfo.isUser == 1">
<view class="customAmount_left">
<text class="customAmount_left_tip"></text>
<u-input
<input
type="number"
v-model="amount"
inputAlign="left"
:placeholder="`充${minNum}送${handselNum}`"
:placeholder="`充${amount}送${giftAmount}`"
:customStyle="{border: '0'}"
></u-input>
controlled="true"
@input="amountChange"
></input>
</view>
<text class="customAmount_right">自定义金额</text>
</view>
<view class="rechargeList">
<view class="rechargeList_f" @click="clickinput(item,index)" v-for="(item,index) in listdata" :key="index">
<view class="rechargeList_item flex-colum " :class="index == inputshow?'active':''">
<view class="rechargeList_item flex-colum " :class="index === inputshow?'active':''">
<view class="rechargeList_item_title">充值</view>
<view class="flex-colum-start">
<view class="rechargeList_item_amount"><text>{{item.minNum}}</text></view>
<view class="rechargeList_item_gift" v-show="index == inputshow">
<view class="rechargeList_item_amount"><text>{{item.amount}}</text></view>
<view class="rechargeList_item_gift" v-show="index === inputshow">
<image class="rechargeList_item_gift_bg" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/gift_icon.png" mode="aspectFill"></image>
<view class="rechargeList_item_gift_text">
<text></text>
<text>{{ item.handselNum }}</text>
<text>{{inputshow}}</text>
<text>{{ item.giftAmount }}</text>
</view>
</view>
<view class="rechargeList_item_handsel" v-show="index != inputshow">赠送{{item.handselNum}}</view>
<view class="rechargeList_item_handsel" v-show="index !== inputshow">赠送{{item.giftAmount}}</view>
</view>
</view>
@@ -108,8 +110,7 @@
isProtocol: false,
listdata: [],
amount: 0,
minNum: 0,
handselNum: 0,
giftAmount: 0,
userInfo: {},
shopUserInfo: null,
shopId: '',
@@ -118,33 +119,38 @@
{name: "明细", url: "member/billDetails",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/detail.png"},
{name: "管理", url: "member/storedManage",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/manage.png"}
],
type: "",
}
},
async onLoad(e) {
async onLoad(options) {
// if ( e.type == 'list' || e.type == 'index') {
// this.shopId = e.shopId;
// this.init();
// }
console.log(e)
uni.cache.set('forceUpdate',1)
if (e.q) {
this.shopId = this.getQueryString(decodeURIComponent(e.q), 'shopId')
// #ifdef MP-WEIXIN
if (options.q) {
this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId')
uni.cache.set('shopId',this.shopId)
this.tokenShow = false;
// 等待登录结果返回
// if (!uni.cache.get('token')) {
// await this.$onLaunched;
// }
this.shopInfo();
this.paygetActive()
} else{
this.shopId = e.shopId;
uni.cache.set('shopId',this.shopId)
this.shopInfo();
this.paygetActive()
}
// #endif
// #ifdef MP-ALIPAY
if (getApp().globalData.shopId) { this.shopId = getApp().globalData.shopId }
uni.cache.set('shopId',this.shopId)
// #endif
if (options.shopId) {
this.shopId = options.shopId
uni.cache.set('shopId',this.shopId)
}
if (options.type) {
this.type = options.type
}
if ( options.amount ) { this.amount = options.amount; }
this.shopInfo();
this.paygetActive()
},
methods: {
/**
@@ -193,20 +199,43 @@
let res = await this.api.paygetActive({
shopId: this.shopId,
page: 1,
pageSize: 10
pageSize: 99
})
try {
this.listdata = res.data.list;
this.giftList = this.listdata[0].gives;
this.amount = this.listdata[0].minNum;
this.minNum = this.listdata[0].minNum;
this.handselNum = this.listdata[0].handselNum
this.giftAmount = this.listdata[0].giftAmount
if ( this.type == 'topUpActivity') {
this.amountChange()
} else {
this.amount = this.listdata[0].amount;
}
} catch (e) {
//TODO handle the exception
}
},
/**
* 监听金额修改
*/
amountChange () {
let item = this.listdata.filter(item=>this.amount==item.amount)
if ( item.length > 0 ) {
this.listdata.forEach((v,e)=>{
if ( this.amount == v.amount) {
this.inputshow = e;
this.clickinput(v,e)
}
})
} else {
this.inputshow = '';
this.giftList = [];
this.giftAmount = '';
}
},
/**
* 进入明细\管理
* @param {Object} e
@@ -295,12 +324,10 @@
* @param {Object} b
*/
clickinput(a, b) {
console.log(a, b)
this.inputshow = b;
this.giftList = a.gives;
this.amount = a.minNum;
this.minNum = a.minNum;
this.handselNum = a.handselNum;
this.amount = a.amount;
this.giftAmount = a.giftAmount;
},
/**
@@ -315,6 +342,7 @@
});
return false;
}
console.log(this.amount)
if (this.amount == null || this.amount == '') {
uni.showToast({
title: '金额不能为空',
@@ -331,7 +359,13 @@
}
let res = await this.api.paymemeberIn({
shopId: this.shopId, // 判断显示哪家的作品,
amount: this.amount // 判断显示哪家的作品,
amount: this.amount ,// 判断显示哪家的作品,
// #ifdef MP-WEIXIN
payType: 'wechatPay',
// #endif
// #ifdef MP-ALIPAY
payType: 'aliPay',
// #endif
})
if (res.code == 0) {
uni.showLoading({
@@ -356,15 +390,20 @@
uni.requestSubscribeMessage({
tmplIds:["AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
complete() {
if ( pages.length > 1) {
_this.shopInfo()
if ( _this.type && _this.type == "topUpActivity") {
uni.pro.navigateBack()
} else {
setTimeout(res => {
uni.switchTab({
url: '/pages/index/index'
})
}, 500)
if ( pages.length > 1) {
_this.shopInfo()
} else {
setTimeout(res => {
uni.switchTab({
url: '/pages/index/index'
})
}, 500)
}
}
},
})
@@ -453,7 +492,7 @@
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
padding: 14rpx 16rpx;
padding: 22rpx 16rpx 22rpx 32rpx;
background-color: #fff;
border-radius: 8rpx;
.customAmount_left{

View File

@@ -108,12 +108,18 @@
shopId: item.shopId,
type: 'index',
})
} else if ( this.type && this.type == 'user_points') {
uni.pro.navigateTo('/pagesPoints/index/index', {
shopId: item.shopId,
type: 'member_list',
})
} else {
uni.pro.navigateTo('member/memberdetails', {
shopId: item.shopId
})
}
}
},

View File

@@ -24,8 +24,13 @@
<view class="price-wrap" style="padding-top: 0;" >
<view class="price">
<text class="i"></text>
<text class="num">{{ item.salePrice }}</text>
<text class="num" v-if="shopUserInfo.isVip ==1 && item.memberPrice>0" style="margin-right: 10rpx;">{{ item.memberPrice }}</text>
<text class="i" v-if="shopUserInfo.isVip ==1 && item.memberPrice>0" :class="{lineThrough: shopUserInfo.isVip ==1 && item.memberPrice>0}"></text>
<text class="num" :class="{lineThrough: shopUserInfo.isVip ==1 && item.memberPrice>0}">{{ item.salePrice }}</text>
</view>
<view class="operation-wrap">
<view class="btn" v-if="item.number" >
<u-icon name="minus-circle-fill" size="50"></u-icon>
@@ -82,7 +87,7 @@
},
data() {
return {
shopUserInfo: uni.cache.get('shopUserInfo')
}
},
@@ -297,6 +302,12 @@
}
.num {}
.lineThrough{
font-weight: normal;
text-decoration:line-through;
color: #999!important;
font-size: 24rpx!important;
}
}
.sku-wrap {

View File

@@ -11,7 +11,8 @@
</view>
<text class="i"></text>
<text class="num">{{cartLists.amount||'0.00'}}</text>
<text class="num" v-if="shopUserInfo.isVip == 1 && cartLists.memberAmount > 0">{{cartLists.memberAmount||'0.00'}}</text>
<text class="num" v-else >{{cartLists.amount||'0.00'}}</text>
</view>
<view class="btn" @tap="$u.debounce(orderdetail, 500)" >
<text class="t">去结算</text>
@@ -26,7 +27,7 @@
data() {
return {
shopUserInfo: uni.cache.get('shopUserInfo')
}
},
props:{

View File

@@ -61,7 +61,14 @@
<view v-if="item.isPauseSale != 0 || item.isSale == 0 " class="flex-between" style="margin-top: 32rpx;margin-bottom: 48rpx;">
<view class="panelfiveitemsex flex-between">
<view class="panelfiveitemsex_oen"><text>¥</text><text>{{item.lowPrice}}</text><text>/{{item.unitSnap}}</text></view>
<view class="panelfiveitemsex_oen">
<text class="tips">¥</text>
<text class="price" v-if="isVip ==1 && item.lowMemberPrice>0" style="margin-right: 10rpx;">{{item.lowMemberPrice}}</text>
<text class="tips" v-if="isVip ==1 && item.lowMemberPrice>0" :class="{lineThrough: isVip ==1 && item.lowMemberPrice>0}">¥</text>
<text class="price" :class="{lineThrough: isVip ==1 && item.lowMemberPrice>0}">{{item.lowPrice}}</text>
<text class="unit" v-if="!(isVip ==1 && item.lowMemberPrice>0)">/{{item.unitSnap}}</text>
</view>
</view>
<view class="panelfiveitemNum" >
@@ -73,8 +80,17 @@
</view>
<view v-else class="flex-between" style="margin-top: 32rpx;margin-bottom: 48rpx;">
<view class="panelfiveitemsex flex-between">
<view class="panelfiveitemsex_oen"><text>¥</text><text>{{item.lowPrice}}</text><text>/{{item.unitSnap}}</text></view>
<view class="panelfiveitemsex_oen">
<text class="tips">¥</text>
<text class="price" v-if="isVip ==1 && item.lowMemberPrice>0" style="margin-right: 10rpx;">{{item.lowMemberPrice}}</text>
<text class="tips" v-if="isVip ==1 && item.lowMemberPrice>0" :class="{lineThrough: isVip ==1 && item.lowMemberPrice>0}">¥</text>
<text class="price" :class="{lineThrough: isVip ==1 && item.lowMemberPrice>0}">{{item.lowPrice}}</text>
<text class="unit" v-if="!(isVip ==1 && item.lowMemberPrice>0)">/{{item.unitSnap}}</text>
</view>
</view>
<view v-if="item.suit > 1">
<view class="panelfiveitemNum">
<view class="sku-wrap flex-center" @click.stop="clickspecifications(item,index,index1)">
@@ -152,7 +168,13 @@
<view v-if="item1.isPauseSale != 0 || item1.isSale == 0 " class="flex-between">
<view class="money"><text class="money_num">{{ item1.lowPrice }}</text>/{{item1.unitSnap}}</view>
<view class="money">
<view></view>
<text class="money_num" v-if="isVip ==1 && item1.lowMemberPrice>0" style="margin-right: 10rpx;">{{ item1.lowMemberPrice }}</text>
<view v-if="isVip ==1 && item1.lowMemberPrice>0" :class="{lineThrough: isVip ==1 && item1.lowMemberPrice>0}"></view>
<text class="money_num" :class="{lineThrough: isVip ==1 && item1.lowMemberPrice>0}">{{ item1.lowPrice }}</text>
<text v-if="!(isVip ==1 && item1.lowMemberPrice>0)">/{{item1.unitSnap}}</text>
</view>
<view class="flex-end" >
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
<text class="t" v-if="item1.isSale == 0" >非可售时间</text>
@@ -161,7 +183,15 @@
</view>
</view>
<view v-else class="flex-between">
<view class="money"><text class="money_num">{{ item1.lowPrice }}</text>/{{item1.unitSnap}}</view>
<view class="money">
<view></view>
<text class="money_num" v-if="isVip ==1 && item1.lowMemberPrice>0" style="margin-right: 10rpx;">{{ item1.lowMemberPrice }}</text>
<view v-if="isVip ==1 && item1.lowMemberPrice>0" :class="{lineThrough: isVip ==1 && item1.lowMemberPrice>0}"></view>
<text class="money_num" :class="{lineThrough: isVip ==1 && item1.lowMemberPrice>0}">{{ item1.lowPrice }}</text>
<text v-if="!(isVip ==1 && item1.lowMemberPrice>0)">/{{item1.unitSnap}}</text>
</view>
<view v-if="item1.suit > 1">
<view class="flex-end" >
<view class="sku-wrap flex-center"
@@ -356,6 +386,8 @@
cartLists: {}, //购物车
cartLists_count: 0,
shopInfo: {}, //店铺信息
shopUserInfo: {},
isVip: null,
shopProductList: {}, //商品信息
specifications: {}, // 规格信息
querySpecList: [],
@@ -584,6 +616,7 @@
})
if (res.code == 0) {
this.shopUserInfo = res.data;
this.isVip = res.data.isVip;
uni.cache.set('shopUserInfo', res.data)
}
},
@@ -1321,33 +1354,27 @@
.panelfiveitemsex {
.panelfiveitemsex_oen {
text:nth-child(1) {
.tips {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #333333;
}
text:nth-child(2) {
.price {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: bold;
font-size: 36rpx;
color: #333333;
}
text:nth-child(3) {
.unit {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #333333;
}
text:nth-child(4) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #666666;
}
}
}
@@ -1900,7 +1927,8 @@
font-weight: bold;
font-size: 24rpx;
color: #333;
display: flex;
align-items: flex-end;
.money_num {
font-size: 28rpx;
color: #333;
@@ -1977,4 +2005,12 @@
}
}
.lineThrough{
font-weight: normal;
text-decoration:line-through;
color: #999!important;
font-size: 24rpx!important;
}
.money_num.lineThrough{
}
</style>

View File

@@ -37,7 +37,13 @@
<view v-if="item1.isPauseSale != 0 " class="flex-between" >
<view class="money"><text class="money_num">{{ item1.lowPrice }}</text>/{{item1.unitSnap}}</view>
<view class="money">
<view></view>
<text class="money_num" v-if="isVip ==1 && item1.lowMemberPrice>0" style="margin-right: 10rpx;">{{ item1.lowMemberPrice }}</text>
<view v-if="isVip ==1 && item1.lowMemberPrice>0" :class="{lineThrough: isVip ==1 && item1.lowMemberPrice>0}"></view>
<text class="money_num" :class="{lineThrough: isVip ==1 && item1.lowMemberPrice>0}">{{ item1.lowPrice }}</text>
<text v-if="!(isVip ==1 && item1.lowMemberPrice>0)">/{{item1.unitSnap}}</text>
</view>
<view class="flex-end" >
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
<text class="t" v-if="item1.isSale == 0" >非可售时间</text>
@@ -46,7 +52,13 @@
</view>
</view>
<view v-else class="flex-between">
<view class="money"><text class="money_num">{{ item1.lowPrice }}</text>/{{item1.unitSnap}}</view>
<view class="money">
<view></view>
<text class="money_num" v-if="isVip ==1 && item1.lowMemberPrice>0" style="margin-right: 10rpx;">{{ item1.lowMemberPrice }}</text>
<view v-if="isVip ==1 && item1.lowMemberPrice>0" :class="{lineThrough: isVip ==1 && item1.lowMemberPrice>0}"></view>
<text class="money_num" :class="{lineThrough: isVip ==1 && item1.lowMemberPrice>0}">{{ item1.lowPrice }}</text>
<text v-if="!(isVip ==1 && item1.lowMemberPrice>0)">/{{item1.unitSnap}}</text>
</view>
<view v-if="item1.suit > 1">
<view class="flex-end" >
<view class="sku-wrap flex-center"

View File

@@ -3,10 +3,10 @@
<view class="towcontent">
<view class="towcontentlistxitem flex-start">
<view class="towcontentlistxitembox flex-colum"
:class="tabIndex == index?'towcontentlistxitemboxopacity':''"
v-for="(item,index) in tabList" :key="index" @click="towcontentclick(index,item)">
:class="tabIndex == item.type?'towcontentlistxitemboxopacity':''"
v-for="(item,index) in tabList" :key="index" @click="towcontentclick(item)">
<text class="title">{{item.name}}</text>
<image v-if="tabIndex == index"
<image v-if="tabIndex == item.type"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dg.png" mode="widthFix">
</image>
</view>
@@ -74,10 +74,8 @@
export default {
data() {
return {
tabList: [{
name: '全部',
type: ''
},
tabList: [
{
name: '未使用',
type: '1'
@@ -87,13 +85,17 @@
type: '2'
}
],
tabIndex: 0,
tabIndex: 1,
list: [],
status: "",
status: 1,
type: "",
};
},
onLoad() {
onLoad(options) {
if (options.type) {
this.type = options.type;
}
this.getCouponList()
},
@@ -101,11 +103,10 @@
/**
* 切换类型
* @param {Object} index
* @param {Object} item
*/
towcontentclick(index, item) {
this.tabIndex = index;
towcontentclick(item) {
this.tabIndex = item.type;
this.status = item.type;
this.getCouponList()
},
@@ -115,7 +116,7 @@
*/
async getCouponList() {
try {
let res = await this.api.getUserConpons({
let res = await this.api.conponList({
userId: uni.cache.get('userInfo').id,
shopId: uni.cache.get('shopId'),
status: this.status
@@ -156,7 +157,7 @@
margin-top: 32rpx;
.towcontentlistxitembox {
width: 33%;
width: 50%;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
@@ -170,8 +171,6 @@
}
.towcontentlistxitemboxopacity {
width: 33%;
font-family: PingFang SC, PingFang SC;
font-weight: bold;
text{
color: #E3AD7F;

View File

@@ -57,7 +57,7 @@
teblist: [],
myAssetsList: [
{ name: "储值", type: "recharge", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/storedValue.png"},
// { name: "积分", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
{ name: "积分", type: "points", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
{ name: "优惠券", type: "my_coupon", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/coupon.png"},
// { name: "权益卡", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
],
@@ -121,6 +121,9 @@
if (res.code == 0) {
uni.cache.set('userInfo', res.data);
this.userInfo = res.data;
this.myAssetsList[0].num = res.data.balanceAll || "";
this.myAssetsList[1].num = res.data.pointsAll || "";
this.myAssetsList[2].num = res.data.couponAll || "";
}
},
@@ -180,9 +183,7 @@
}
switch (item.type) {
case 'my_order':
uni.switchTab({
url: '/pages/order/order'
});
uni.pro.switchTab('order/order')
break
case 'my_member':
uni.pro.navigateTo('member/list')
@@ -200,7 +201,19 @@
}
break
case 'my_coupon': //内部页面
case 'points': //积分
if (uni.cache.get('shopId') && uni.cache.get('token')) {
uni.pro.navigateTo('/pagesPoints/index/index', {
shopId: uni.cache.get('shopId'),
type: 'user',
})
} else{
uni.pro.navigateTo('member/list', {
type: 'user_points'
})
}
break;
case 'my_coupon': //优惠券
uni.pro.navigateTo('user/coupon')
break;
case 'my_info': //内部页面

View File

@@ -0,0 +1,295 @@
<template>
<view class="container">
<view class="me" v-if="status == 'me'">
<image class="topImg" mode="widthFix" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/InviteFriends/index_bg.png"></image>
<view class="contentBox">
<view class="content">
<view class="title">邀请1人可得双方各得10元优惠券</view>
<view class="btn">邀请好友</view>
<view class="label o">新用户获得</view>
<view class="card">
<view class="left">
<view class="num"><text></text>10.00</view>
<view class="mnum">100.00可用</view>
</view>
<view class="right">
<view class="rtitle">邀新10元优惠券×1</view>
<view class="time">领取后30天内有效</view>
</view>
</view>
<view class="label t">每邀请1个用户可获得</view>
<view class="card">
<view class="left">
<view class="num"><text></text>10.00</view>
<view class="mnum">100.00可用</view>
</view>
<view class="right">
<view class="rtitle">邀新10元优惠券×1</view>
<view class="time">领取后30天内有效</view>
</view>
</view>
</view>
<view class="number">
<view class="tab">
<view class="tabItem"
@click="tabClick(item)"
:class="{active:tabAcitve == item.type}"
v-for="(item,index) in tabList" :key="index"
>{{item.label}}{{item.num||0}}</view>
</view>
<view class="tabContent">
<viwe class="tabContent_item">
<view class="top">
<view class="name">草莓大福</view>
<view class="status">草莓大福</view>
</view>
<view class="time">2023-22-33 17:33:99</view>
</viwe>
</view>
</view>
</view>
</view>
<view class="he" v-else>
<image class="topImg" mode="widthFix" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/InviteFriends/draw_bg.png"></image>
<view class="contentBox">
<view class="content">
<view class="title">此用户已死勿Call</view>
<view class="label">[邀请你领取新人专享优惠券]</view>
<view class="card">
<view class="left">
<view class="num"><text></text>10.00</view>
<view class="mnum">100.00可用</view>
</view>
<view class="right">
<view class="rtitle">邀新10元优惠券×1</view>
<view class="time">领取后30天内有效</view>
</view>
</view>
<view class="btn">领券</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
status: "he",
tabList: [
{label: '已邀请', type: 1, num: 0},
{label: '无效' ,type: 2, num: 0}
],
tabAcitve: 1,
};
},
onLoad(options) {
},
onShow() {
},
methods: {
tabClick(item) {
this.tabAcitve = item.type;
},
/**
* 解码
* @param {Object} url
* @param {Object} name
*/
getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
var r = url.substr(1).match(reg)
if (r != null) {
return r[2]
}
return null;
},
}
};
</script>
<style scoped lang="scss">
.container{
.topImg{
width: 100%;
}
.contentBox{
padding: 0 20rpx;
}
.content{
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
position: relative;
padding: 0 24rpx 32rpx 24rpx;
.title{
font-weight: bold;
font-size: 32rpx;
color: #333333;
text-align: center;
height: 112rpx;
line-height: 112rpx;
}
.btn{
width: 100%;
height: 84rpx;
line-height: 84rpx;
text-align: center;
background: #E3AD7F;
border-radius: 12rpx 12rpx 12rpx 12rpx;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
margin: 0 auto;
}
.label{
font-weight: bold;
font-size: 32rpx;
color: #333333;
margin-bottom: 32rpx;
}
.label.o{
margin-top: 66rpx;
}
.label.t{
margin-top: 48rpx;
}
.card{
display: flex;
align-items: flex-start;
padding: 32rpx 32rpx;
background: #FCF9F4;
border-radius: 18rpx 18rpx 18rpx 18rpx;
border: 2rpx solid #333333;
.left{
border-right: 1rpx dashed #333;
padding-right: 34rpx;
margin-right: 46rpx;
.num{
font-weight: 500;
font-size: 56rpx;
color: #333333;
margin-bottom: 30rpx;
text{
font-size: 32rpx;
}
}
.mnum{
font-weight: 400;
font-size: 24rpx;
color: #666666;
}
}
.right{
.rtitle{
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-bottom: 16rpx;
}
.time{
font-weight: 400;
font-size: 24rpx;
color: #999999;
}
}
}
}
.me{
.content{
margin-top: -112rpx;
}
.number{
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
padding: 32rpx 24rpx 32rpx 24rpx;
.tab{
background: #333333;
border-radius: 12rpx 12rpx 12rpx 12rpx;
padding: 8rpx 16rpx;
display: flex;
align-items: center;
.tabItem{
width: 100%;
height: 100%;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
text-align: center;
padding: 8rpx 0;
}
.tabItem.active{
color: #333333;
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
.tabContent{
display: flex;
flex-direction: column;
padding-top: 32rpx;
.tabContent_item{
margin-bottom: 32rpx;
.top{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
color: #333333;
.name{
font-weight: bold;
}
.status{
}
}
.time{
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-top: 16rpx;
}
}
}
}
}
.he{
.content{
margin-top: -210rpx;
padding-top: 48rpx;
.title{
padding-left: 32rpx;
font-weight: 500;
font-size: 28rpx;
color: #666666;
text-align: left;
height: initial;
line-height: initial;
margin-bottom: 18rpx;
}
.label{
padding-left: 32rpx;
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
}
.btn{
margin-top: 64rpx;
}
}
}
</style>

View File

@@ -18,7 +18,7 @@
</view>
</view>
</view>
<u-radio activeColor="#E8AD7B" icon-size="36" size="36" :name="item.type">
<u-radio activeColor="#E8AD7B" :disabled="freeCheck&&index==0" icon-size="36" size="36" :name="item.type">
</u-radio>
</view>
@@ -58,10 +58,29 @@
amountVIP:{
type: Object
},
freeCheck: {
type: Boolean
}
},
watch: {
freeCheck(newVal,oldVal) {
if ( newVal ) {
// #ifdef MP-WEIXIN
this.radiovalue = 2
// #endif
// #ifdef MP-ALIPAY
this.radiovalue = 3
// #endif
let name = this.paymentMethodName[this.radiovalue-1].name;
this.$emit("groupChange",{type:this.radiovalue ,name: name })
}
}
},
mounted() {
console.log(this.amountVIP)
console.log(this.amountVIP)
// this.getAount();
},
methods: {
/**
@@ -70,6 +89,9 @@
*/
groupChange(type) {
console.log(type)
if ( this.freeCheck && type == 1 ) {
return;
}
this.radiovalue = type;
let name = this.paymentMethodName[type-1].name;
this.$emit("groupChange",{type:type ,name: name })
@@ -92,7 +114,6 @@
.paymentMethod{
box-sizing: border-box;
margin-top: 30rpx;
padding: 0 20rpx 220rpx 20rpx;
border-radius: 18rpx;
.paymentMethod_content{
background-color: #fff;

View File

@@ -4,10 +4,10 @@
<view class="rechargeFree_bg" @click="changeFree">
<view class="left">
<view class="icon">优惠</view>
<view class="text">充值消费2倍50本单立享免单</view>
<view class="text">充值消费{{freeDingConfig.rechargeTimes}}{{freeDingConfig.rechargeThreshold}}本单立享免单</view>
</view>
<u-checkbox-group iconPlacement="right" >
<u-checkbox v-model="rechargeFreeChecked" :checked="rechargeFreeChecked" @change="changeFree" activeColor="#E8AD7B" shape="circle" icon-size="36" size="36">
<u-checkbox :disabled="freeDisabled" v-model="rechargeFreeChecked" :checked="rechargeFreeChecked" @change="changeFree" activeColor="#E8AD7B" shape="circle" icon-size="36" size="36">
</u-checkbox>
</u-checkbox-group>
</view>
@@ -19,14 +19,34 @@
data() {
return {
rechargeFreeChecked: false,
disabled: false,
}
},
props:{
shopUserInfo:{
type: Object
},
freeDingConfig:{
type: Object
},
payAmount: {
type: Number
},
freeDisabled: {
type: Boolean
}
},
watch: {
freeDisabled (newVal) {
if ( this.payAmount < this.freeDingConfig.rechargeThreshold ) {
this.freeDisabled = true
}
}
},
mounted() {
if ( this.payAmount < this.freeDingConfig.rechargeThreshold ) {
this.freeDisabled = true
}
},
methods: {
@@ -34,7 +54,12 @@
* 监听是否免单
*/
changeFree ( e ) {
if ( this.freeDisabled ) {
return;
}
this.rechargeFreeChecked = !this.rechargeFreeChecked;
this.$emit("changeFree",this.rechargeFreeChecked)
}
}

View File

@@ -1,6 +1,6 @@
<template>
<!-- 充值活动 -->
<view class="topUp">
<view class="topUp" v-if="list.length > 0">
<view class="topUpActivity">
<view class="topUpActivity_title">充值更划算</view>
<view class="content">

View File

@@ -77,20 +77,35 @@
<view>{{(shopTableInfo.seatNum*storeInfo.tableFee).toFixed(2)}}</view>
</view>
</view>
<view class="favorable" v-for="(item,index) in favorable" :key="index">
<view class="favorable_left">
<image class="icon" :src="item.url" mode="aspectFill"/>
<text class="name"> {{ item.name }} </text>
<view v-for="(item,index) in favorable" :key="index" >
<view class="favorable" v-if="item.type!='points'" @click="goUrl(item)">
<view class="favorable_left">
<image class="icon" :src="item.url" mode="aspectFill"/>
<text class="name"> {{ item.name }} </text>
</view>
<view class="favorable_right" ><text class="favorable_right_text"></text> <u-icon name="arrow-right" color="#575B66" size="28"></u-icon></view>
</view>
<view class="favorable_right" v-if="item.type == 'points'" @click="isPointsChecked = !isPointsChecked">
<text class="favorable_right_text" style="color: #666;margin-right: 16rpx;">使用29积分抵扣29.00</text>
<u-checkbox-group iconPlacement="right">
<u-checkbox v-model="isPointsChecked" :checked="isPointsChecked" activeColor="#E8AD7B" shape="circle" icon-size="36" size="36">
</u-checkbox>
</u-checkbox-group>
<view class="favorable" v-else-if="item.type=='points'">
<view class="favorable_left">
<image class="icon" :src="item.url" mode="aspectFill"/>
<text class="name"> {{ item.name }} </text>
</view>
<view class="favorable_right" @click.stop="pointsChange">
<text class="favorable_right_text" style="color: #666;margin-right: 16rpx;" v-if="calcUsablePointsData.usable">
使用 {{ calcUsablePointsData.pointsNum}} 积分抵扣{{calcUsablePointsData.pointsNum/calcUsablePointsData.equivalentPoints}}
</text>
<text class="favorable_right_text" style="color: #666;margin-right: 16rpx;color: #DE4D3A;" v-else>
{{calcUsablePointsData.unusableReason}}
</text>
<u-checkbox-group iconPlacement="right" @change="pointsChange">
<u-checkbox v-model="isPointsChecked" :disabled="freeCheck||!calcUsablePointsData.usable" :checked="isPointsChecked" activeColor="#E8AD7B" shape="circle" icon-size="36" size="36">
</u-checkbox>
</u-checkbox-group>
</view>
</view>
<view class="favorable_right" v-else ><text class="favorable_right_text">暂无可用优惠券</text> <u-icon name="arrow-right" color="#575B66" size="28"></u-icon></view>
</view>
<view class="totalPrice">
<text style="margin-bottom: 5rpx;">小计</text>
<text class="totalPriceNum"> {{listinfo.payAmount}} </text>
@@ -107,12 +122,14 @@
</view>
<!-- 充值免单 -->
<!-- <rechargeFree ref="rechargeFree" :shopUserInfo="amountVIP" @changeFree="changeFree"></rechargeFree> -->
<rechargeFree v-if="freeDingConfig.enable == 1" ref="rechargeFree" :freeDisabled="freeDisabled" :payAmount="listinfo.payAmount" :freeDingConfig="freeDingConfig" :shopUserInfo="amountVIP" @changeFree="changeFree"></rechargeFree>
<!-- 充值活动 -->
<!-- <topUpActivity ref="topUpActivity" :shopUserInfo="amountVIP" ></topUpActivity> -->
<topUpActivity ref="topUpActivity" :shopUserInfo="amountVIP" ></topUpActivity>
<!-- 支付方式 -->
<paymentMethod ref="paymentMethod" :amountVIP="amountVIP" v-if="storeInfo.registerType == 'munchies'" @groupChange="groupChange"></paymentMethod>
<view style="padding: 0 20rpx;">
<paymentMethod ref="paymentMethod" :freeCheck="freeCheck" :amountVIP="amountVIP" v-if="storeInfo.registerType == 'munchies'" @groupChange="groupChange"></paymentMethod>
</view>
<view style="width: 100%;height: 200rpx;"> </view>
<view class="bottom">
<view class="bottom_left">
<text style="margin-bottom: 5rpx;">实付金额</text>
@@ -178,29 +195,33 @@
sendType: "table",
eatModel: [],
favorable: [
// { name: "优惠券", type: "coupon", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
{ name: "优惠券", type: "coupon", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
// { name: "团购优惠", type: "group", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/groupOffer.png"},
// { name: "积分抵扣", type: "points", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/points.png"},
{ name: "积分抵扣", type: "points", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/points.png" }
],
isPointsChecked: false,
rechargeFreeChecked: false,
calcUsablePointsData: null,
order: {
phone: "",
},
shopTableInfo: null,
freeDingConfig: null,
cartLists: [],
listinfo: {
details: [],
payAmount: 0,
name: "",
},
freeCheck: false,
freeDisabled: false,
totalPrice: 0, // 小计金额
totalAmount: 20, // 支付金额
remark: "", // 备注
radiovalue: 1, // 支付方式
ispws: false, // 输入支付密码
payPasswordShow: false,
amountVIP: null, // 会员信息
amountVIP: uni.cache.get('shopUserInfo'), // 会员信息
listinfoid: null,
paymentBtnText: "余额支付",
isSocket: false,
@@ -229,15 +250,15 @@
uni.$off('message')
}
},
onLoad(e) {
console.log(e)
this.storeInfo = JSON.parse(decodeURIComponent(e.storeInfo));
onLoad(options) {
if ( options.storeInfo ) {
this.storeInfo = JSON.parse(decodeURIComponent(options.storeInfo));
}
this.shopId = this.storeInfo.id;
this.listinfo.name = this.storeInfo.shopName;
this.listinfo.details = JSON.parse(e.cartLists).data;
this.listinfo.payAmount = JSON.parse(e.cartLists).amount;
if ( e.tableCode ) { this.tableCode = e.tableCode;}
this.listinfo.details = JSON.parse(options.cartLists).data;
this.cartLists = JSON.parse(options.cartLists);
if ( options.tableCode ) { this.tableCode = options.tableCode;}
if ( this.storeInfo.eatModel.indexOf("dine-in") != -1 ) {
this.eatModel = "dine-in";
this.is_type = 0;
@@ -255,8 +276,6 @@
} else {
this.handlemessage()
}
this.getAount()
this.is_typeList.map((item)=>{
console.log(this.storeInfo.eatModel.indexOf(item.val))
if ( this.storeInfo.eatModel.indexOf(item.val) != -1) {
@@ -265,14 +284,71 @@
})
},
methods: {
changeFree ( val ) {
console.log(val)
if ( val ) {
this.listinfo.payAmount = this.listinfo.payAmount*2
setPayAmount ( cartLists ) {
console.log(cartLists)
if ( this.amountVIP.isVip == 1 && cartLists.memberAmount > 0 ) {
this.listinfo.payAmount = (cartLists.memberAmount+(this.shopTableInfo.seatNum*this.storeInfo.tableFee)).toFixed(2)
} else {
this.listinfo.payAmount = this.listinfo.payAmount/2
this.listinfo.payAmount = (cartLists.amount+(this.shopTableInfo.seatNum*this.storeInfo.tableFee)).toFixed(2)
}
},
/**
* 免单状态监听
* @param {Object} val
*/
changeFree ( val ) {
this.freeCheck = val;
if ( val ) {
this.listinfo.payAmount = (this.listinfo.payAmount*this.freeDingConfig.rechargeTimes).toFixed(2)
} else {
this.listinfo.payAmount = (this.listinfo.payAmount/this.freeDingConfig.rechargeTimes).toFixed(2)
}
},
/**
* 积分状态监听
*/
pointsChange (){
if ( this.freeCheck || !this.calcUsablePointsData.usable) {
return;
}
this.isPointsChecked = !this.isPointsChecked
if ( this.isPointsChecked ) {
this.freeDisabled = true
this.listinfo.payAmount = (this.listinfo.payAmount-(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
} else {
this.freeDisabled = false
this.listinfo.payAmount = (Number(this.listinfo.payAmount)+(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
}
},
goUrl(item){
switch (item.type){
case 'coupon':
uni.pro.navigateTo('/pages/user/coupon', {
type: "confirm_order"
})
break;
}
},
/**
* 获取积分相关信息
*/
async getCalcUsablePoints() {
let params = {
memberId: this.amountVIP.id,
orderAmount: this.listinfo.payAmount,
}
let res = await this.api.calcUsablePoints(params)
this.calcUsablePointsData = res.data;
if ( this.calcUsablePointsData.usable && this.listinfo.payAmount >= this.calcUsablePointsData.minPaymentAmount) {
this.calcUsablePointsData.pointsNum = this.calcUsablePointsData.accountPoints >= this.calcUsablePointsData.maxUsablePoints ? this.calcUsablePointsData.maxUsablePoints : this.calcUsablePointsData.accountPoints
}
console.log(this.calcUsablePointsData)
},
/**
* 获取桌台码
@@ -306,8 +382,11 @@
if (this.tableCode) {params.code = this.tableCode}
if (this.shopId) {params.shopId = this.shopId}
let res = await this.api.productqueryShop(params)
this.freeDingConfig = res.data.freeDingConfig;
this.shopTableInfo = res.data.shopTableInfo;
this.storeInfo = res.data.storeInfo;
this.setPayAmount(this.cartLists)
this.getCalcUsablePoints()
},
/**
@@ -361,8 +440,7 @@
this.isSocket = true;
this.listinfoid = msg.data.id
this.listinfo.details = msg.data.detailList;
this.listinfo.payAmount = msg.data.amount;
this.setPayAmount(msg.data)
uni.$off('getMessage')
this.orderorderInfo(1)
}
@@ -374,7 +452,7 @@
this.orderorderInfo()
} else {
this.listinfo.details = msg.data;
this.listinfo.payAmount = msg.amount;
this.setPayAmount(msg)
}
}
@@ -392,7 +470,7 @@
this.orderorderInfo()
} else {
this.listinfo.details = msg.data;
this.listinfo.payAmount = msg.amount;
this.setPayAmount(msg)
}
this.isSocket = true;
break;
@@ -426,7 +504,7 @@
if ( this.shopTableInfo && this.shopTableInfo.seatNum ) { params.num = this.shopTableInfo.seatNum; }
let res = await this.api.choseEatModel(params)
this.listinfo.details = res.data.info;
this.listinfo.payAmount = res.data.amount;
this.setPayAmount(res.data)
},
/**
@@ -532,14 +610,18 @@
})
return;
}
let res = await this.api.creatOrder({
let params = {
"tableId": this.tableCode , //桌台码
"shopId": uni.cache.get('shopId'),
"userId": uni.cache.get('userInfo').id,
"sendType": this.sendType,
"remark": this.remark,
})
}
if ( this.calcUsablePointsData.pointsNum && this.calcUsablePointsData.pointsNum > 0) {
params.pointsNum = this.calcUsablePointsData.pointsNum;
}
let res = await this.api.creatOrder(params)
console.log(res)
this.listinfoid = res.data.id;
if ( this.storeInfo.registerType == 'restaurant') {
@@ -598,17 +680,36 @@
* 微信/支付宝支付
*/
async showpopupclickdds() {
let res;
if ( !this.freeCheck ) {
res = await this.api.orderPay({
orderId: this.listinfoid,
// #ifdef MP-WEIXIN
payType: 'wechatPay',
// #endif
// #ifdef MP-ALIPAY
payType: 'aliPay',
// #endif
// payType: this.radiovalue == 2 ? 'wechatPay' : 'aliPay'
}) //判断是否支付成功
} else {
res = await this.api.paymemeberIn({
shopId: uni.cache.get('shopId'),
amount: this.listinfo.payAmount,
orderld: this.listinfoid,
// #ifdef MP-WEIXIN
payType: 'wechatPay',
// #endif
// #ifdef MP-ALIPAY
payType: 'aliPay',
// #endif
// payType: this.radiovalue == 2 ? 'wechatPay' : 'aliPay'
}) //判断是否支付成功
}
let res = await this.api.orderPay({
orderId: this.listinfoid,
// #ifdef MP-WEIXIN
payType: 'wechatPay',
// #endif
// #ifdef MP-ALIPAY
payType: 'aliPay',
// #endif
// payType: this.radiovalue == 2 ? 'wechatPay' : 'aliPay'
}) //判断是否支付成功
if (res.code == 0) {
// 微信支付还是余额支付

View File

@@ -48,7 +48,7 @@
</view>
</view>
</view>
<view style="width: 100%;height: 200rpx;"> </view>
<u-popup :show="ispws" :round="20" mode="bottom" @close="ispws = false" height="500" :safeAreaInsetBottom="false">
<view class="pay-info-wrap">
<view class="info-wrap flex-between">

View File

@@ -0,0 +1,129 @@
<template>
<view class="container">
<view class="list">
<view class="listItem " v-for="(item,index) in list" :key="index">
<view class="top">
<view class="title">{{item.content}}</view>
<view class="num">{{item.floatPoints}}</view>
</view>
<view class="time">{{item.createTime}}</view>
</view>
</view>
<image
v-if="list.length <= 0 "
style="width: 402rpx;height: 442rpx;margin:240rpx auto 32rpx;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
mode="aspectFill"
/>
<u-loadmore :status="status" fontSize="28" color="#999" iconSize="28" style="margin-top: 32rpx;"/>
</view>
</template>
<script>
export default {
data() {
return {
query: {
page: 1,
size: 10,
},
list: [],
shopId: null,
shopUserInfo: uni.cache.get('shopUserInfo'),
status: "nomore" // loadmore nomore loading
};
},
onLoad(options) {
if ( options.shopId ) {
this.shopId = options.shopId;
}
},
onShow() {
this.getMemberPointsLogList()
},
onReachBottom() {
this.getMemberPointsLogList()
},
methods: {
/**
* 获取积分明细列表
*/
async getMemberPointsLogList() {
let res = await this.api.memberPointsLogList({
shopId: this.shopId,
memberId: this.shopUserInfo.id,
...this.query
})
if ( res.code == 0) {
if (res.data.pages < this.query.page) {
this.status = 'nomore'
if (this.query.page == 1 && res.data.list.length == 0) {
this.list = []
this.is_end = true
}
return false;
} else {
this.status = 'loading';
if (this.query.page == 1) {
this.list = res.data.list
} else {
this.list = [...this.list, ...res.data.list];
}
this.query.page = ++this.query.page;
if (this.query.page > res.data.pages) {
this.status = 'nomore';
} else {
this.status = 'loading';
}
}
}
}
}
};
</script>
<style scoped lang="scss">
.container{
padding: 16rpx 0;
}
.list{
background: #FFFFFF;
border-radius: 0rpx 0rpx 0rpx 0rpx;
.listItem{
display: flex;
flex-direction: column;
padding: 32rpx 20rpx;
border-bottom: 1rpx solid #E5E5E5;
.top{
display: flex;
justify-content: space-between;
align-items: center;
font-weight: bold;
color: #333333;
.title{
font-size: 28rpx;
}
.num{
font-size: 32rpx;
}
}
.time{
font-weight: normal;
font-size: 28rpx;
color: #999999;
margin-top: 16rpx;
}
}
.listItem:last-child{
border-bottom: none;
}
}
</style>

View File

@@ -0,0 +1,349 @@
<template>
<view class="container">
<view class="head_bg"></view>
<view class="shopInfo" v-if="goodsData.goodsCategory == 'physical'">
<view class="type">自取门店</view>
<view class="info">
<view class="shopName">{{shopUserInfo.shopName}}</view>
<view class="shopTel">{{shopUserInfo.telephone}}</view>
</view>
<view class="address">
<view style="width: 70%;">{{shopUserInfo.address}}</view>
<u-icon name="arrow-right" color="#595959" size="28"></u-icon>
</view>
</view>
<view class="orderInfo">
<view class="goods">
<image class="icon" :src="goodsData.goodsImageUrl" mode="aspectFill" />
<view class="info">
<view class="title">{{goodsData.goodsName}}</view>
<view class="numAll">
<view class="points">{{goodsData.requiredPoints}}积分</view>
<view class="num">X1</view>
</view>
</view>
</view>
<view class="cell">
<view class="label">使用积分</view>
<view class="value">{{goodsData.requiredPoints}}积分</view>
</view>
<view class="cell">
<view class="label"></view>
<view class="value">合计{{goodsData.extraPrice}}</view>
</view>
</view>
<view class="bom">
<view class="exchangeBtn" @click="pointsCreateOrder">确认兑换</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
query: {
page: 1,
size: 10,
},
shopId: null,
goodsData: null,
orderInfo: null,
shopUserInfo: uni.cache.get('shopUserInfo'),
};
},
onLoad(options) {
if ( options.shopId ) {
this.shopId = options.shopId;
}
if ( options.goodsData ) {
this.goodsData = JSON.parse(options.goodsData);
}
},
onShow() {
this.getExchangeRecordList();
},
onReachBottom() {
this.getExchangeRecordList()
},
methods: {
/**
* 获取兑换记录
*/
async getExchangeRecordList() {
let res = await this.api.exchangeRecordList({
shopId: this.shopId,
memberId: this.shopUserInfo.id,
...this.query
})
if ( res.code == 0) {
if (res.data.pages < this.query.page) {
this.status = 'nomore'
if (this.query.page == 1 && res.data.list.length == 0) {
this.list = []
this.is_end = true
}
return false;
} else {
this.status = 'loading';
if (this.query.page == 1) {
this.list = res.data.list
} else {
this.list = [...this.list, ...res.data.list];
}
this.query.page = ++this.query.page;
if (this.query.page > res.data.pages) {
this.status = 'nomore';
} else {
this.status = 'loading';
}
}
}
},
/**
* 确认兑换
*/
confirmExchange () {
if ( this.goodsData.extraPrice > 0 ) {
} else {
this.pointsCreateOrder()
}
},
/**
* 微信/支付宝支付
*/
async pointsPayOrder(orderInfo) {
let payType;
if ( this.goodsData.extraPrice > 0 ) {
// #ifdef MP-WEIXIN
payType = 'WECHAT';
// #endif
// #ifdef MP-ALIPAY
payType = 'ALIPAY';
// #endif
} else {
payType = 'POINTS'
}
let res = await this.api.pointsPayOrder({
id: orderInfo.id,
payType: payType,
openId: uni.cache.get('miniAppOpenId'),
}) //判断是否支付成功
if (res.code == 0) {
this.orderInfo = res.data;
let payInfo = JSON.parse(res.data.payInfo);
if ( payType == 'POINTS') {
uni.navigateTo({
url: `/pagesPoints/exchangeRecordDetail/index?shopId=${this.shopId}&orderInfo=${JSON.stringify(this.orderInfo)}`,
})
return;
}
// 微信支付还是余额支付
uni.requestPayment({
// #ifdef MP-WEIXIN
provider: 'wxpay', //支付类型-固定值
partnerid: payInfo.appId, // 微信支付商户号
timeStamp: payInfo.timeStamp, // 时间戳(单位:秒)
nonceStr: payInfo.nonceStr, // 随机字符串
package: payInfo.package, // 固定值
signType: payInfo.signType, //固定值
paySign: payInfo.paySign, //签名
// #endif
// #ifdef MP-ALIPAY
provider: 'alipay', //支付类型-固定值
orderInfo: res.data.tradeNo, // 微信支付商户号
// #endif
success: (res) => {
let _this = this
uni.showToast({
title: "支付成功"
})
uni.navigateTo({
url: `/pagesPoints/exchangeRecordDetail/index?shopId=${this.shopId}&orderInfo=${JSON.stringify(this.orderInfo)}`,
})
},
fail: async (err) => {
console.log(err)
let res = await this.api.pointsCancelOrder({
id: orderInfo.id,
}) //判断是否支付成功
uni.hideLoading()
}
});
}
},
/**
* 支付完成后请求
*/
async paymodfiyOrderInfo() {
let res = await this.api.paymodfiyOrderInfo({
orderId: this.listinfoid,
})
},
/**
* 生成兑换兑换
*/
async pointsCreateOrder () {
if (this.orderInfo) {
this.pointsPayOrder(this.orderInfo);
return;
}
let res = await this.api.pointsCreateOrder({
shopId: this.shopId,
pointsGoodsId: this.goodsData.id,
pickupMethod: "self",
memberId: this.shopUserInfo.id,
avatarUrl: this.shopUserInfo.headImg,
memberName: this.shopUserInfo.name,
mobile: this.shopUserInfo.telephone,
})
if (res.code == 0) {
this.orderInfo = res.data;
this.pointsPayOrder(res.data);
}
},
}
};
</script>
<style scoped lang="scss">
.container{
padding: 32rpx 20rpx;
.head_bg{
height: 256rpx;
background: linear-gradient(180deg, #E9B183 0%, #F5F5F500 100%);
position: absolute;
left: 0;
right: 0;
top: 0;
margin: auto;
}
.orderInfo,.shopInfo{
display: flex;
flex-direction: column;
background-color: #fff;
border-radius: 18rpx;
position: relative;
z-index: 2;
}
.shopInfo{
padding: 32rpx 24rpx 32rpx 24rpx;
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-bottom: 32rpx;
.type{
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.info{
display: flex;
align-items: center;
margin-top: 24rpx;
margin-bottom: 16rpx;
.shopName{
margin-right: 10rpx;
}
}
.address{
display: flex;
align-items: flex-start;
justify-content: space-between;
}
}
.orderInfo{
padding: 32rpx 24rpx 8rpx 24rpx;
.goods{
display: flex;
margin-bottom: 16rpx;
.icon{
width: 128rpx;
height: 128rpx;
border-radius: 10rpx;
margin-right: 16rpx;
flex-shrink: 0;
}
.info{
width: 100%;
display: flex;
flex-direction: column;
.title{
font-weight: bold;
font-size: 28rpx;
color: #333333;
margin-top: 5rpx;
}
.numAll{
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 500;
font-size: 24rpx;
margin-top: 32rpx;
.points{
color: #666;
}
.num{
color: #999;
}
}
}
}
.cell{
display: flex;
align-items: center;
justify-content: space-between;
border-top: 1rpx solid #E5E5E5;
padding: 24rpx 0;
.label{
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
.value{
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
}
}
.bom{
width: 100%;
position: fixed;
bottom: 0;
left: 0;
z-index: 9;
padding: 16rpx 28rpx 68rpx 28rpx;
display: flex;
justify-content: flex-end;
background-color: #fff;
.exchangeBtn{
width: 214rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
background: #E8AD7B;
border-radius: 34rpx 34rpx 34rpx 34rpx;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -0,0 +1,199 @@
<template>
<view class="container">
<view class="list">
<view class="listItem " v-for="(item,index) in list" :key="index">
<view class="head">
<view class="time">兑换时间{{item.createTime}}</view>
<!-- unpaid-待支付 waiting-待自取 done-已完成 cancel-已取消 -->
<view class="status">{{
item.status == 'unpaid' ? '待支付' :
item.status == 'waiting' ? '待自取' :
item.status == 'done' ? '已完成' :
item.status == 'cancel' ? '已取消' : ""
}}</view>
</view>
<view class="content">
<image class="thumbnail" :src="item.goodsImageUrl" mode="aspectFill" />
<view class="info">
<view class="title">{{item.pointsGoodsName}}</view>
<view class="numAll">
<view class="points">{{item.spendPoints}}积分</view>
<view class="num">X1</view>
</view>
</view>
</view>
<view class="bom">
<view class="detail" @click="goDetail(item)">查看详情</view>
</view>
</view>
</view>
<image
v-if="list.length <= 0 "
style="width: 402rpx;height: 442rpx;margin:240rpx auto 32rpx;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
mode="aspectFill"
/>
<u-loadmore :status="status" fontSize="28" color="#999" iconSize="28" />
</view>
</template>
<script>
export default {
data() {
return {
query: {
page: 1,
size: 10,
},
list: [],
shopId: null,
shopUserInfo: uni.cache.get('shopUserInfo'),
status: "nomore" // loadmore nomore loading
};
},
onLoad(options) {
if ( options.shopId ) {
this.shopId = options.shopId;
}
},
onShow() {
this.getExchangeRecordList();
},
onReachBottom() {
this.getExchangeRecordList()
},
methods: {
/**
* 获取兑换记录
*/
async getExchangeRecordList() {
let res = await this.api.exchangeRecordList({
shopId: this.shopId,
memberId: this.shopUserInfo.id,
...this.query
})
if ( res.code == 0) {
if (res.data.pages < this.query.page) {
this.status = 'nomore'
if (this.query.page == 1 && res.data.list.length == 0) {
this.list = []
this.is_end = true
}
return false;
} else {
this.status = 'loading';
if (this.query.page == 1) {
this.list = res.data.list
} else {
this.list = [...this.list, ...res.data.list];
}
this.query.page = ++this.query.page;
if (this.query.page > res.data.pages) {
this.status = 'nomore';
} else {
this.status = 'loading';
}
}
}
},
/**
* 查看详情
*/
goDetail(item) {
uni.navigateTo({
url: `/pagesPoints/exchangeRecordDetail/index?shopId=${this.shopId}&orderInfo=${JSON.stringify(item)}`,
})
}
}
};
</script>
<style scoped lang="scss">
.container{
}
.list{
// background: #FFFFFF;
// border-radius: 0rpx 0rpx 0rpx 0rpx;
padding: 32rpx 20rpx;
.listItem{
display: flex;
flex-direction: column;
padding: 32rpx 24rpx;
border-bottom: 1rpx solid #E5E5E5;
margin-bottom: 32rpx;
.head{
display: flex;
align-items: center;
justify-content: space-between;
.time{
font-weight: 400;
font-size: 24rpx;
color: #666666;
}
.status{
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
.content{
display: flex;
margin-top: 32rpx;
.thumbnail{
width: 128rpx;
height: 128rpx;
border-radius: 10rpx;
margin-right: 16rpx;
flex-shrink: 0;
}
.info{
width: 100%;
display: flex;
flex-direction: column;
.title{
font-weight: bold;
font-size: 28rpx;
color: #333333;
margin-top: 5rpx;
}
.numAll{
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 500;
font-size: 24rpx;
margin-top: 32rpx;
.points{
color: #666;
}
.num{
color: #999;
}
}
}
}
.bom{
display: flex;
justify-content: flex-end;
margin-top: 32rpx;
.detail{
padding: 8rpx 16rpx;
background-color: #343030;
border-radius: 10rpx 10rpx 10rpx 10rpx;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
}
}
}
}
</style>

View File

@@ -0,0 +1,375 @@
<template>
<view class="container">
<view class="card_box">
<view class="card_head_box">
<view class="card_head_item" v-for="(item,index) in 8" :key="index"></view>
</view>
<view class="card">
<!-- 订单头部 -->
<view class="top">
<view class="title">
<image class="icon" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/points/icon_order.png" mode="aspectFill" />
<view>自提凭证</view>
</view>
</view>
<view class="card_item" v-if="orderInfo.status == 'waiting'">
<view>
<view class="code">提货码{{orderInfo.couponCode}}</view>
<tki-qrcode ref="tkiQrcode" show :size="qrcodeSize"></tki-qrcode>
</view>
<view class="semicircle_icon" >
<view class="semicircle_left_icon"></view>
<view class="semicircle_right_icon"></view>
</view>
</view>
<view class="card_item status" v-else>
<view class="status_left">
<view class="status_title">已使用</view>
<view class="status_code">{{orderInfo.couponCode}}</view>
</view>
<view class="status_qrcode" >
<image class="qrcode" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/points/qrcode.png" mode="aspectFill" />
<image class="status" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/points/status.png" mode="aspectFill" />
</view>
</view>
<view class="total-wrap">
<view class="info">
<u-icon name="map" color="#666" size="28"></u-icon>
<view class="shopName">自取店{{ shopUserInfo.shopName }}</view>
<!-- <u-icon name="phone" color="#666" size="28"></u-icon> -->
<view class="phone">{{shopUserInfo.telephone}}</view>
</view>
<view class="address">
<view class="lable">门店地址</view>
<view>{{shopUserInfo.address}}</view>
</view>
</view>
</view>
</view>
<view class="product">
<image class="thumbnail" :src="orderInfo.goodsImageUrl" mode="aspectFill" />
<view class="product_info">
<view class="name">{{orderInfo.pointsGoodsName}}</view>
<view class="numBox"><view class="points">{{orderInfo.spendPoints}}积分</view><view class="num">X1</view></view>
</view>
<!-- <view class="productInfo"></view> -->
</view>
<view class="orderInfo">
<view class="row">
<text class="t">支付方式</text>
<text class="info">{{orderInfo.payMethod}}</text>
</view>
<view class="row">
<text class="t">兑换时间</text>
<text class="info">{{orderInfo.createTime}}</text>
</view>
<view class="row" @click="copyHandle(orderInfo.orderNo)">
<text class="t">订单编号</text>
<text class="info">{{orderInfo.orderNo}}</text>
</view>
</view>
</view>
</template>
<script>
import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
export default {
data() {
return {
qrcodeSize: 200,
shopId: null,
orderInfo: null,
shopUserInfo: uni.cache.get('shopUserInfo'),
}
},
onLoad(options) {
console.log(JSON.parse(options.orderInfo))
if ( options.shopId ) {
this.shopId = options.shopId;
this.orderInfo = JSON.parse(options.orderInfo);
}
},
mounted() {
this.setQrcode();
},
methods: {
setQrcode () {
this.$refs.tkiQrcode.setval(this.orderInfo.couponCode) //操作属性
},
/**
* 复制订单号
* @param {Object} e
*/
copyHandle(e) {
uni.setClipboardData({
data: e,
success() {
uni.showToast({
title: '复制成功',
icon: 'none'
});
}
});
},
}
}
</script>
<style lang="scss">
.container{
padding: 32rpx 20rpx;
}
.card_box{
background-color: #fff;
position: relative;
width: 100%;
height: 100%;
border-radius: 18rpx;
padding-bottom: 32rpx;
.card_head_box{
width: 100%;
display: flex;
justify-content: space-between;
position: absolute;
top: -22.5rpx;
padding: 0 44rpx;
.card_head_item{
width: 45rpx;
height: 45rpx;
background-color: #f9f9f9;
border-radius: 50%;
// box-shadow: inset 0rpx -13rpx 18rpx -16rpx rgba(87, 86, 86, 0.35);
}
}
.card {
// background-color: #fff;
border-radius: 20upx;
margin-bottom: 28upx;
position: relative;
.top{
padding: 0 34rpx;
}
.title{
font-weight: 500;
font-size: 24rpx;
color: #333333;
border-bottom: 2rpx dashed #E3E3E3;
padding-bottom: 36rpx;
padding-top: 50rpx;
display: flex;
align-items: center;
.icon{
width: 25.45rpx;
height: 28.53rpx;
margin-right: 16rpx;
}
}
.card_item{
display: flex;
flex-direction: column;
position: relative;
padding: 32rpx 34rpx 48rpx 34rpx;
border-bottom: 2rpx dashed #E3E3E3;
align-items: center;
.code{
font-weight: bold;
font-size: 28rpx;
color: #333333;
margin-bottom: 48rpx;
}
::v-deep.vue-ref{
display: flex;
justify-content: center;
}
.semicircle_icon{
width: 100%;
position: absolute;
bottom: -22.5rpx;
left: 0;
display: flex;
justify-content: space-between;
.semicircle_left_icon{
width: 45rpx;
height: 45rpx;
margin-left: -22.5rpx;
background-color: #f9f9f9;
border-radius: 50%;
// box-shadow: inset -20rpx 0rpx 22rpx -20rpx rgba(87, 86, 86, 0.35);
}
.semicircle_right_icon{
width: 45rpx;
height: 45rpx;
margin-right: -22.5rpx;
background-color: #f9f9f9;
border-radius: 50%;
// box-shadow: inset 13rpx 0rpx 16rpx -9rpx rgba(87, 86, 86, 0.35);
}
}
}
.card_item.status{
display: flex;
flex-direction: row;
justify-content: space-between;
.status_left{
display: flex;
flex-direction: column;
justify-content: space-between;
.status_title{
font-weight: bold;
font-size: 32rpx;
color: #333333;
margin-bottom: 24rpx;
}
.status_code{
text-decoration:line-through;
font-weight: bold;
font-size: 32rpx;
color: #999999;
}
}
.status_qrcode{
width: 112rpx;
height: 112rpx;
position: relative;
.qrcode{
width: 112rpx;
height: 112rpx;
}
.status{
width: 54.82rpx;
height: 48rpx;
position: absolute;
bottom: 0;
right: 0;
}
}
}
.total-wrap {
width: 100%;
display: flex;
flex-direction: column;
padding: 0 34rpx;
font-weight: bold;
font-size: 28rpx;
color: #333333;
margin-top: 38rpx;
.info{
display: flex;
align-items: center;
font-weight: bold;
font-size: 24rpx;
color: #333333;
.shopName{
margin-right: 5rpx;
margin-left: 16rpx;
}
.phone{
margin-left: 16rpx;
}
}
.address{
margin-left: 36rpx;
align-self: center;
display: flex;
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-top: 24rpx;
align-self: flex-start;
.lable{
flex-shrink: 0;
}
}
}
}
}
.product{
padding: 32rpx 34rpx;
background-color: #FFFFFF;
margin-top: 32rpx;
border-radius: 18rpx;
display: flex;
.thumbnail{
width: 152rpx;
height: 152rpx;
border-radius: 10rpx;
margin-right: 16rpx;
flex-shrink: 0;
}
.product_info{
width: 100%;
display: flex;
flex-direction: column;
margin-top: 15rpx;
.name{
font-weight: bold;
font-size: 24rpx;
color: #333333;
margin-bottom: 32rpx;
}
.numBox{
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 500;
font-size: 24rpx;
.points{
color: #F7853D;
}
.num{
color: #999999
}
}
}
}
.orderInfo{
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
margin-top: 32rpx;
padding: 32rpx 34rpx;
// box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
.row {
display: flex;
justify-content: space-between;
margin-bottom: 32rpx;
.t {
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
.info {
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
}
.row:last-child{
margin-bottom: none;
}
}
</style>

View File

@@ -0,0 +1,118 @@
<template>
<view class="container">
<view class="top">
<image class="goodsImageUrl" :src="goodsData.goodsImageUrl" mode="aspectFill"/>
<view class="title">{{goodsData.goodsName}}</view>
<view class="pointsNum">{{goodsData.requiredPoints}}<view class="f"> 积分</view></view>
</view>
<view class="h"></view>
<view class="bom">
<view class="title">商品详情</view>
<view class="goodsDescription">{{goodsData.goodsDescription}}</view>
</view>
<view class="btn" @click="exchange">立即兑换</view>
</view>
</template>
<script>
export default {
data() {
return {
goodsData: null,
shopUserInfo: uni.cache.get('shopUserInfo'),
shopId: null,
};
},
onLoad(options) {
if ( options.shopId ) {
this.shopId = options.shopId;
this.goodsData = JSON.parse(options.goodsData);
}
},
onShow() {
},
methods: {
/**
* 立即兑换
*/
exchange () {
uni.navigateTo({
url: `/pagesPoints/confirm_order/index?shopId=${this.shopId}&goodsData=${JSON.stringify(this.goodsData)}`,
})
},
}
};
</script>
<style>
page {
background-color: #fff!important;
}
</style>
<style scoped lang="scss">
.top{
display: flex;
flex-direction: column;
background-color: #fff;
padding-bottom: 32rpx;
.goodsImageUrl{
width: 100%;
height: 530rpx;
}
.title{
font-weight: bold;
font-size: 32rpx;
color: #1A1A1A;
padding: 32rpx 20rpx;
}
.pointsNum{
font-weight: bold;
font-size: 32rpx;
color: #333333;
display: flex;
align-items: flex-end;
padding: 0 20rpx;
.f{
font-weight: normal;
font-size: 24rpx;
}
}
}
.h{
width: 100%;
height: 14rpx;
background-color: #f9f9f9;
}
.bom{
padding: 32rpx 20rpx;
background-color: #fff;
.title{
font-weight: bold;
font-size: 32rpx;
color: #1A1A1A;
}
.goodsDescription{
font-weight: 400;
font-size: 28rpx;
color: #1A1A1A;
margin-top: 32rpx;
}
}
.btn{
width: 556rpx;
height: 84rpx;
line-height: 84rpx;
text-align: center;
background: #E8AD7B;
border-radius: 49rpx 49rpx 49rpx 49rpx;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
position: fixed;
bottom: 68rpx;
left: 0;
right: 0;
margin: auto;
}
</style>

349
pagesPoints/index/index.vue Normal file
View File

@@ -0,0 +1,349 @@
<template>
<view class="container">
<view class="head_bg"></view>
<view class="info">
<view class="info_content">
<image class="img" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/points/points_img1.png" mode="aspectFill"/>
<viwe class="tips">可用积分</viwe>
<viwe class="pnintsNum">{{pointsInfo.accountPoints}}</viwe>
<viwe class="bottom">
<view @click="tapClick(item)" v-for="(item,index) in tap" :key="index">
<image class="icon" :src="item.iconUrl" mode="aspectFill" />
<view>{{item.name}}</view>
</view>
</viwe>
</view>
</view>
<view class="list"
:class="{
column: shopSettingInfo.browseMode == 'list',
row: shopSettingInfo.browseMode == 'grid'
}"
>
<view class="listItem"
:class="{
row: shopSettingInfo.browseMode == 'list',
column: shopSettingInfo.browseMode == 'grid'
}"
v-for="(item,index) in list" :key="index"
@click="goDetail(item)"
>
<image class="img" :src="item.goodsImageUrl" mode="aspectFill"/>
<view class="itemInfo">
<view class="title">{{item.goodsName}}</view>
<view class="remainingNum" v-if="shopSettingInfo.browseMode == 'list'">剩余{{item.quantity}}</view>
<view class="bottom">
<view class="pointsNum">{{item.requiredPoints}}<view class="f">积分</view></view>
<view class="btn" @click.stop="exchange(item)" v-if="shopSettingInfo.browseMode == 'list'">立即兑换</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tap: [
{name: '积分明细', pageUrl: "/pagesPoints/IntegralDetail/index", iconUrl: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/points/icon_detail.png"},
{name: '兑换记录', pageUrl: "/pagesPoints/exchangeRecord/index", iconUrl: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/points/icon_record.png"}
],
query: {
page: 1,
size: 10,
},
list: [],
shopSettingInfo: null,
pointsInfo: null,
shopUserInfo: null,
shopId: null,
};
},
onLoad(options) {
if ( options.shopId ) {
this.shopId = options.shopId;
}
},
onShow() {
this.getShopSettingInfo()
this.getShopInfo()
this.getointsGoodsList()
},
methods: {
/**
* 获取会员信息
*/
async getShopInfo() {
let res = await this.api.shopUserInfo({
shopId: this.shopId,
userId: uni.cache.get('userInfo').id,
})
if (res.code == 0) {
this.shopUserInfo = res.data;
uni.cache.set('shopUserInfo',this.shopUserInfo)
this.getmemberPointsInfo(this.shopUserInfo.id)
}
},
/**
* 获取店铺设置
*/
async getShopSettingInfo() {
let res = await this.api.shopSettingInfo(this.shopId)
if (res.code == 0) {
this.shopSettingInfo = res.data;
}
},
/**
* 获取会员积分
*/
async getmemberPointsInfo (memberId) {
let res = await this.api.memberPointsInfo(memberId)
if (res.code == 0) {
this.pointsInfo = res.data;
}
},
/**
* 获取积分商品列表
*/
async getointsGoodsList() {
let res = await this.api.pointsGoodsList({
shopId: this.shopId,
...this.query
})
if ( res.code == 0) {
if (res.data.pages < this.query.page) {
this.status = 'nomore'
if (this.query.page == 1 && res.data.list.length == 0) {
this.list = []
// this.is_end = true
}
return false;
} else {
this.status = 'loading';
if (this.query.page == 1) {
this.list = res.data.list
} else {
this.list = [...this.list, ...res.data.list];
}
this.query.page = ++this.query.page;
if (this.query.page > res.data.pages) {
this.status = 'nomore';
} else {
this.status = 'loading';
}
}
}
},
/**
* 跳转详情
* @param {Object} item
*/
goDetail (item) {
uni.navigateTo({
url: `/pagesPoints/goodsDetail/index?shopId=${this.shopId}&goodsData=${JSON.stringify(item)}`,
})
},
/**
* 积分明细兑换记录跳转
*/
tapClick (item) {
uni.pro.navigateTo(item.pageUrl, {
shopId: this.shopId,
})
},
/**
* 立即兑换
*/
async exchange (item) {
uni.navigateTo({
url: `/pagesPoints/confirm_order/index?shopId=${this.shopId}&goodsData=${JSON.stringify(item)}`,
})
}
}
};
</script>
<style scoped lang="scss">
page {
// background: #f6f6f6;
}
.head_bg{
height: 256rpx;
background: linear-gradient(180deg, #E9B183 0%, #F5F5F500 100%);
position: absolute;
left: 0;
right: 0;
top: 0;
margin: auto;
}
.info{
padding: 32rpx 20rpx;
position: relative;
z-index: 2;
.info_content{
background: #FFFFFF;
box-shadow: 0rpx 6rpx 8rpx 2rpx rgba(0,0,0,0.09);
border-radius: 24rpx 24rpx 24rpx 24rpx;
padding: 32rpx;
display: flex;
flex-direction: column;
position: relative;
.img{
width: 152rpx;
height: 186rpx;
position: absolute;
top: 0;
right: 0;
}
.tips{
font-weight: 500;
font-size: 24rpx;
color: #666666;
margin-bottom: 32rpx;
}
.pnintsNum{
font-weight: bold;
font-size: 60rpx;
color: #333333;
}
.bottom{
font-weight: 400;
font-size: 26rpx;
color: #333333;
display: flex;
align-items: center;
justify-content: space-around;
border-top: 1rpx solid #E5E5E5;
padding-top: 24rpx;
margin-top: 24rpx;
position: relative;
z-index: 9;
>view{
width: 50%;
display: flex;
align-items: center;
justify-content: center;
.icon{
width: 30rpx;
height: 30rpx;
margin-right: 4rpx;
}
}
>view:nth-child(1){
border-right: 1rpx solid #E5E5E5
}
}
}
}
.list{
padding: 0 20rpx 0 20rpx;
position: relative;
z-index: 2;
display: flex;
flex-wrap: wrap;
.listItem{
display: flex;
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
padding: 32rpx 16rpx;
margin-bottom: 32rpx;
.img{
flex-shrink: 0;
border-radius: 10rpx;
}
.itemInfo{
width: 100%;
display: flex;
flex-direction: column;
.title{
font-weight: bold;
font-size: 28rpx;
color: #333333;
margin-top: 10rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.remainingNum{
font-weight: 400;
font-size: 24rpx;
color: #999999;
margin-top: 20rpx;
}
.bottom{
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
}
.pointsNum{
font-weight: bold;
font-size: 32rpx;
color: #333333;
display: flex;
align-items: flex-end;
.f{
font-weight: normal;
font-size: 24rpx;
}
}
.btn{
width: 180rpx;
height: 56rpx;
line-height: 56rpx;
text-align: center;
background: #E8AD7B;
border-radius: 34rpx 34rpx 34rpx 34rpx;
font-weight: bold;
font-size: 28rpx;
color: #FFFFFF;
}
}
}
.listItem.row{
width: 100%;
.img{
width: 160rpx;
height: 160rpx;
margin-right: 16rpx;
}
}
.listItem.column{
width: 45%;
.img{
width: 100%;
height: 224rpx;
}
.title{
margin-top: 16rpx;
margin-bottom: 10rpx;
}
}
}
.row{
flex-direction: row;
justify-content: space-between;
}
.column{
flex-direction: column;
}
</style>