Merge branch 'test' of https://newgitea.sxczgkj.cn/czg_team/cashier_wx into test
This commit is contained in:
@@ -9,3 +9,10 @@ export const consumeDiscount = (data) => {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export const homeData = (data) => {
|
||||
return request({
|
||||
url: prveUrl + '/user/home/data',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -55,4 +55,12 @@ export const recordPage = (data) => {
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const recordOne = (data) => {
|
||||
return request({
|
||||
url: url + '/user/pointGoods/record/one',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -3,8 +3,8 @@
|
||||
<view class="container">
|
||||
<view class="icon icon1" v-if="props.item.couponType == 1">
|
||||
<view class="top">
|
||||
<text class="i">¥</text>
|
||||
<text class="num">{{ props.item.discountAmount }}</text>
|
||||
<text class="i" >¥</text>
|
||||
<text class="num" >{{ props.item.discountAmount }}</text>
|
||||
</view>
|
||||
<view class="intro">
|
||||
<text class="t">满{{ props.item.fullAmount }}可用</text>
|
||||
@@ -12,8 +12,8 @@
|
||||
</view>
|
||||
<view class="icon icon2" v-if="props.item.couponType == 2">
|
||||
<view class="top">
|
||||
<text class="i">{{ props.item.discountNum }}件</text>
|
||||
<text class="num">商品兑换</text>
|
||||
<text class="i" >{{ props.item.discountNum }}件</text>
|
||||
<text class="num" >商品兑换</text>
|
||||
</view>
|
||||
<view class="intro">
|
||||
<text class="t">满{{ props.item.fullAmount }}可用</text>
|
||||
@@ -21,7 +21,7 @@
|
||||
</view>
|
||||
<view class="icon icon3" v-if="props.item.couponType == 3">
|
||||
<view class="top">
|
||||
<text class="num">{{ props.item.discountRate/10 }}折</text>
|
||||
<text class="num" >{{ props.item.discountRate/10 }}折</text>
|
||||
</view>
|
||||
<view class="intro">
|
||||
<text class="t">满{{ props.item.fullAmount }}可用</text>
|
||||
@@ -29,100 +29,112 @@
|
||||
</view>
|
||||
<view class="icon icon2" v-if="props.item.couponType == 4">
|
||||
<view class="top">
|
||||
<text class="i">第二件</text>
|
||||
<text class="num">半价券</text>
|
||||
<text class="i" >第二件</text>
|
||||
<text class="num" >半价券</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="icon icon2" v-if="props.item.couponType == 6">
|
||||
<view class="top">
|
||||
<text class="i">买一送</text>
|
||||
<text class="num">一券</text>
|
||||
<text class="i" >买一送</text>
|
||||
<text class="num" >一券</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
$color: #ff1c1c;
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
.icon {
|
||||
$color: #ff1c1c;
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
&.icon1 {
|
||||
.top {
|
||||
.i {
|
||||
color: $color;
|
||||
font-size: 24upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.num {
|
||||
color: $color;
|
||||
font-size: 72upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.icon2 {
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.i {
|
||||
color: $color;
|
||||
font-size: 34upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.num {
|
||||
color: $color;
|
||||
font-size: 34upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.icon3 {
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.i {
|
||||
color: $color;
|
||||
font-size: 34upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.num {
|
||||
color: $color;
|
||||
font-size: 52upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
padding: 0;
|
||||
|
||||
.intro {
|
||||
.icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
.t {
|
||||
font-size: 22upx;
|
||||
color: #999;
|
||||
align-items: center;
|
||||
|
||||
&.icon1 {
|
||||
.top {
|
||||
.i {
|
||||
color: $color;
|
||||
font-size: 24upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.num {
|
||||
color: $color;
|
||||
font-size: 72upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.icon2 {
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.i {
|
||||
color: $color;
|
||||
font-size: 34upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.num {
|
||||
color: $color;
|
||||
font-size: 34upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.icon3 {
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.i {
|
||||
color: $color;
|
||||
font-size: 34upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.num {
|
||||
color: $color;
|
||||
font-size: 52upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.intro {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.t {
|
||||
font-size: 22upx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -334,7 +334,7 @@ onShow(async () => {
|
||||
proxy.$isResolve();
|
||||
const shopId = uni.cache.get('shopId');
|
||||
if (shopId) {
|
||||
indexsRef.value.getVipConfig();
|
||||
indexsRef.value.updateData();
|
||||
}
|
||||
} catch (error) {}
|
||||
await proxy.$onLaunched;
|
||||
|
||||
@@ -1,385 +1,623 @@
|
||||
<template>
|
||||
<view class="content min-page bg-f7">
|
||||
<view class="contentbox">
|
||||
<template v-if="shopExtend.length">
|
||||
<image
|
||||
class="bg"
|
||||
:src="shopExtend[0].value"
|
||||
mode="aspectFill"
|
||||
v-if="!isJsonArrayString(shopExtend[0].value)"
|
||||
></image>
|
||||
<swiper class="swiper" autoplay circular v-else>
|
||||
<swiper-item
|
||||
class="swiper-item"
|
||||
v-for="item in JSON.parse(shopExtend[0].value)"
|
||||
>
|
||||
<image class="swiper-bg" :src="item"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</template>
|
||||
<view class="contentboxitem flex-between">
|
||||
<view class="contentboxitemleft flex-colum" @click="scanCodehandle(0)">
|
||||
<image
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/Xdiancan.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<text class="contentboxitemlefttextone">点餐</text>
|
||||
<text class="contentboxitemlefttexttow">在线点不排队</text>
|
||||
</view>
|
||||
<view class="contentboxitemright">
|
||||
<!-- <view class="contentboxitemright_item flex-between"
|
||||
@click="memberindex('user/member/memberdetails')"> -->
|
||||
<view class="contentboxitemright_item flex-between" @click="tomember">
|
||||
<image
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/Xvip.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="contentboxitemright_itembox flex-colum">
|
||||
<text>会员</text>
|
||||
<text>入会享权益</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="contentboxitemright_item flex-between"
|
||||
@click="memberindex('user/member/index')"
|
||||
> -->
|
||||
<view class="contentboxitemright_item flex-between" @click="toCharge">
|
||||
<image
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/Xchong.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="contentboxitemright_itembox flex-colum">
|
||||
<text>充值</text>
|
||||
<text>充值享更多优惠</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content min-page bg-f7">
|
||||
<view class="contentbox">
|
||||
<template v-if="shopExtend.length">
|
||||
<image class="bg" :src="shopExtend[0].value" mode="aspectFill"
|
||||
v-if="!isJsonArrayString(shopExtend[0].value)"></image>
|
||||
<swiper class="swiper" autoplay circular v-else>
|
||||
<swiper-item class="swiper-item" v-for="item in JSON.parse(shopExtend[0].value)">
|
||||
<image class="swiper-bg" :src="item"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</template>
|
||||
|
||||
<view class="u-flex menus u-font-32 color-333">
|
||||
<view class="menu-item" @click="toIntegralMall">
|
||||
<view>积分商城</view>
|
||||
<view class="u-font-24 color-999">攒积分,兑换更多优惠</view>
|
||||
</view>
|
||||
<view class="menu-item" @click="toFenxiao">
|
||||
<view>分销</view>
|
||||
<view class="u-font-24 color-999">邀请好友,获得佣金</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-popup
|
||||
:show="popupShow"
|
||||
:safe-area-inset-bottom="false"
|
||||
mode="center"
|
||||
@close="popupShow = false"
|
||||
>
|
||||
<view class="popup-content">
|
||||
<view class="header-wrap">
|
||||
<text class="t">请选择</text>
|
||||
<view class="close" @click="popupShow = false">
|
||||
<u-icon name="close" size="16" color="#666"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-content">
|
||||
<view class="btn">
|
||||
<u-button
|
||||
color="#E8AD7B"
|
||||
plain=""
|
||||
shape="circle"
|
||||
@click="beforehandOrderHandle"
|
||||
>预点单</u-button
|
||||
>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<u-button color="#E8AD7B" shape="circle" @click="scanOrderHandle"
|
||||
>扫码点单</u-button
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="userInfo u-flex">
|
||||
<up-avatar size="61px" :default-url="imgs.defaultAvatar"></up-avatar>
|
||||
<view class="u-flex-1 u-flex u-row-between u-p-l-16 u-p-r-16">
|
||||
<view>
|
||||
<view class="u-flex">
|
||||
<view class="u-font-32 color-333 font-bold u-line-1" style="max-width: 320rpx;">HI,欢迎回来</view>
|
||||
<view class="vip" v-if="shopUserInfo.isVip">会员身份</view>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-10 u-font-24 color-666">
|
||||
<text>优惠券:{{allConfig.couponNum}}</text>
|
||||
<text class="u-m-l-22">积分:{{allConfig.pointNum}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<image :src="imgs.code" class="code"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="new-menus-box">
|
||||
<view class="new-menus layout2" v-if="allConfig.takeout">
|
||||
<view class="diner" @click="scanCodehandle(0)">
|
||||
<image :src="imgs.orderFood" class="icon"></image>
|
||||
<view class="title">立即点单</view>
|
||||
<view class="desc">下单免排队</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="takeout">
|
||||
<image :src="imgs.takeout" class="icon"></image>
|
||||
<view class="title">外卖点单</view>
|
||||
<view class="desc">外卖送到家</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="new-menus layout1" v-else @click="scanCodehandle(0)">
|
||||
<view>
|
||||
<view class="title">立即点单</view>
|
||||
<view class="desc">-自助下单 快人一步-</view>
|
||||
</view>
|
||||
<image :src="imgs.big_orderFood" class="big_img"></image>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<view class="groupBuying" v-if="allConfig.group">
|
||||
<view class="u-flex u-col-center">
|
||||
<image class="img" :src="imgs.groupBuying"></image>
|
||||
<view class="u-font-32 color-333 font-700 u-m-l-12">快乐拼单</view>
|
||||
</view>
|
||||
|
||||
<view class="u-font-28 color-999">一键分享,快速拼单</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="points" @click="toIntegralMall" v-if="allConfig.pointsMall">
|
||||
<view>
|
||||
<view class="title">积分乐园</view>
|
||||
<view class="desc">好物兑换 畅花积分</view>
|
||||
</view>
|
||||
<image class="img" :src="imgs.points"></image>
|
||||
</view>
|
||||
|
||||
<view class="bottom_menus">
|
||||
<view class="item" @click="tomember">
|
||||
<image :src="imgs.vip" class="img"></image>
|
||||
<view class="title">会员</view>
|
||||
<view class="desc">入会项权益</view>
|
||||
</view>
|
||||
<view class="item" @click="toCharge">
|
||||
<image :src="imgs.recharge" class="img"></image>
|
||||
<view class="title">充值</view>
|
||||
<view class="desc">充值享更多优惠</view>
|
||||
</view>
|
||||
<view class="item" @click="toFenxiao" v-if="allConfig.distribution">
|
||||
<image :src="imgs.share" class="img"></image>
|
||||
<view class="title">股东共享</view>
|
||||
<view class="desc">邀请好友,获得佣金</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view style="height: 90px;"></view>
|
||||
<u-popup :show="popupShow" :safe-area-inset-bottom="false" mode="center" @close="popupShow = false">
|
||||
<view class="popup-content">
|
||||
<view class="header-wrap">
|
||||
<text class="t">请选择</text>
|
||||
<view class="close" @click="popupShow = false">
|
||||
<u-icon name="close" size="16" color="#666"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-content">
|
||||
<view class="btn">
|
||||
<u-button color="#E8AD7B" plain="" shape="circle" @click="beforehandOrderHandle">预点单</u-button>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<u-button color="#E8AD7B" shape="circle" @click="scanOrderHandle">扫码点单</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getMemberConfig,
|
||||
getRechargeConfig,
|
||||
} from "@/common/api/index/index.js";
|
||||
import { ref, reactive, defineProps, defineEmits, onMounted } from "vue";
|
||||
import { isJsonArrayString } from "@/utils/util.js";
|
||||
import {
|
||||
homeData
|
||||
} from '@/common/api/market/index.js'
|
||||
import {
|
||||
getMemberConfig,
|
||||
getRechargeConfig,
|
||||
} from "@/common/api/index/index.js";
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
defineProps,
|
||||
defineEmits,
|
||||
onMounted
|
||||
} from "vue";
|
||||
import {
|
||||
isJsonArrayString
|
||||
} from "@/utils/util.js";
|
||||
const imgs = {
|
||||
recharge: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/2f22c0ced494497e8d6f981832b191c9.png',
|
||||
share: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/bcb8d461e96d445ba40256079da775b3.png',
|
||||
vip: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/cfc3bf5ba12747c6ada4d5a388aceca3.png',
|
||||
orderFood: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/7c54a22d56f44813bf3f76c1a82a34f3.png',
|
||||
big_orderFood: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/b3c7f6139eff4a7d81482cf533ec79fa.png',
|
||||
takeout: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/3623cbf425d845a993acb4309404a7b9.png',
|
||||
groupBuying: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/117745e0f3db48b489f9d4e5c5967043.png',
|
||||
points: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/df0758f7b86449f89f882e50226e17c7.png',
|
||||
code: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/044dcaf913054f03a9db7983f048b1e6.png',
|
||||
defaultAvatar: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/b98d2c7110e847f996e8d7ba4342f0a5.png'
|
||||
}
|
||||
// 定义接收的属性
|
||||
const props = defineProps({
|
||||
shopExtend: {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
});
|
||||
|
||||
// 定义接收的属性
|
||||
const props = defineProps({
|
||||
shopExtend: {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
});
|
||||
function toFenxiao() {
|
||||
uni.navigateTo({
|
||||
url: "/distribution/shop-detail/index?shopId="+uni.cache.get("shopId"),
|
||||
});
|
||||
}
|
||||
function toFenxiao() {
|
||||
uni.navigateTo({
|
||||
url: "/distribution/shop-detail/index?shopId=" + uni.cache.get("shopId"),
|
||||
});
|
||||
}
|
||||
|
||||
function toIntegralMall() {
|
||||
uni.navigateTo({
|
||||
url: "/scoreShop/index/index?shopId="+uni.cache.get("shopId"),
|
||||
});
|
||||
}
|
||||
function toIntegralMall() {
|
||||
uni.navigateTo({
|
||||
url: "/scoreShop/index/index?shopId=" + uni.cache.get("shopId"),
|
||||
});
|
||||
}
|
||||
|
||||
import { productStore } from "@/stores/user.js";
|
||||
import {
|
||||
productStore
|
||||
} from "@/stores/user.js";
|
||||
import {
|
||||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
|
||||
// 显示弹窗
|
||||
const popupShow = ref(false);
|
||||
const scanCodehandle = (i) => {
|
||||
popupShow.value = true;
|
||||
};
|
||||
// 显示弹窗
|
||||
const popupShow = ref(false);
|
||||
const scanCodehandle = (i) => {
|
||||
popupShow.value = true;
|
||||
};
|
||||
|
||||
// 预点单
|
||||
function beforehandOrderHandle() {
|
||||
popupShow.value = false;
|
||||
let shopUserInfo = uni.cache.get("shopUserInfo");
|
||||
uni.cache.set("dinersNum", 1);
|
||||
uni.cache.set("tableCode", shopUserInfo.id);
|
||||
uni.navigateTo({
|
||||
url: "/pages/product/index?type=beforehand",
|
||||
});
|
||||
}
|
||||
// 预点单
|
||||
function beforehandOrderHandle() {
|
||||
popupShow.value = false;
|
||||
uni.cache.set("dinersNum", 1);
|
||||
uni.cache.set("tableCode", shopUserInfo.id);
|
||||
uni.navigateTo({
|
||||
url: "/pages/product/index?type=beforehand",
|
||||
});
|
||||
}
|
||||
|
||||
// 扫码点餐
|
||||
async function scanOrderHandle() {
|
||||
popupShow.value = false;
|
||||
const store = productStore();
|
||||
await store.scanCodeactions();
|
||||
}
|
||||
// 扫码点餐
|
||||
async function scanOrderHandle() {
|
||||
popupShow.value = false;
|
||||
const store = productStore();
|
||||
await store.scanCodeactions();
|
||||
}
|
||||
|
||||
const memberindex = (url) => {
|
||||
uni.pro.navigateTo(url, {
|
||||
shopId: uni.cache.get("shopId"),
|
||||
type: "index",
|
||||
});
|
||||
};
|
||||
const memberindex = (url) => {
|
||||
uni.pro.navigateTo(url, {
|
||||
shopId: uni.cache.get("shopId"),
|
||||
type: "index",
|
||||
});
|
||||
};
|
||||
const shopUserInfo = reactive({})
|
||||
Object.assign(shopUserInfo, uni.cache.get("shopUserInfo") || {})
|
||||
|
||||
function tomember() {
|
||||
if (isMember.value) {
|
||||
const shopUserInfo = uni.cache.get("shopUserInfo") || {};
|
||||
const shopId = uni.cache.get("shopId");
|
||||
if (!shopUserInfo.isVip) {
|
||||
uni.navigateTo({
|
||||
url: "/user/vip/buy-vip?shopId=" + shopId,
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: "/user/vip/vip?shopId=" + shopId,
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "暂未开放",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
}
|
||||
function tomember() {
|
||||
if (isMember.value) {
|
||||
const shopId = uni.cache.get("shopId");
|
||||
if (!shopUserInfo.isVip) {
|
||||
uni.navigateTo({
|
||||
url: "/user/vip/buy-vip?shopId=" + shopId,
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: "/user/vip/vip?shopId=" + shopId,
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "暂未开放",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function toCharge() {
|
||||
if (isCharge.value) {
|
||||
const shopId = uni.cache.get("shopId");
|
||||
uni.navigateTo({
|
||||
url: "/pages/user/member/czzx?shopId=" + shopId,
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "暂未开放",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
}
|
||||
const getQueryString = (url, name) => {
|
||||
//解码
|
||||
var reg = new RegExp("(^|&|/?)" + name + "=([^&|/?]*)(&|/?|$)", "i");
|
||||
var r = url.substr(1).match(reg);
|
||||
if (r != null) {
|
||||
return r[2];
|
||||
}
|
||||
return null;
|
||||
};
|
||||
function toCharge() {
|
||||
if (isCharge.value) {
|
||||
const shopId = uni.cache.get("shopId");
|
||||
uni.navigateTo({
|
||||
url: "/pages/user/member/czzx?shopId=" + shopId,
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "暂未开放",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
}
|
||||
const getQueryString = (url, name) => {
|
||||
//解码
|
||||
var reg = new RegExp("(^|&|/?)" + name + "=([^&|/?]*)(&|/?|$)", "i");
|
||||
var r = url.substr(1).match(reg);
|
||||
if (r != null) {
|
||||
return r[2];
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
// 获取会员配置
|
||||
const isMember = ref(0);
|
||||
const isCharge = ref(0);
|
||||
async function getVipConfig() {
|
||||
try {
|
||||
const res1 = await getMemberConfig({ shopId: uni.cache.get("shopId") });
|
||||
const res2 = await getRechargeConfig({ shopId: uni.cache.get("shopId") });
|
||||
// 获取会员配置
|
||||
const isMember = ref(0);
|
||||
const isCharge = ref(0);
|
||||
async function getVipConfig() {
|
||||
try {
|
||||
const res1 = await getMemberConfig({
|
||||
shopId: uni.cache.get("shopId")
|
||||
});
|
||||
const res2 = await getRechargeConfig({
|
||||
shopId: uni.cache.get("shopId")
|
||||
});
|
||||
|
||||
isMember.value = +res1.memberConfig.isOpen;
|
||||
isCharge.value = +res2.isEnable;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
isMember.value = +res1.memberConfig.isOpen;
|
||||
isCharge.value = +res2.isEnable;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getVipConfig();
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
getVipConfig,
|
||||
});
|
||||
const allConfig = reactive({
|
||||
takeout: 0,
|
||||
group: 0,
|
||||
pointsMall: 0,
|
||||
distribution: 0,
|
||||
couponNum: 0,
|
||||
pointNum: 0
|
||||
})
|
||||
|
||||
function getHomeData() {
|
||||
homeData().then(res => {
|
||||
Object.assign(allConfig, res)
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
updateData()
|
||||
});
|
||||
|
||||
function updateData() {
|
||||
Object.assign(shopUserInfo, uni.cache.get("shopUserInfo") || {})
|
||||
getVipConfig();
|
||||
getHomeData()
|
||||
}
|
||||
defineExpose({
|
||||
updateData
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
page {
|
||||
background: #f6f8fa;
|
||||
}
|
||||
.swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.swiper-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.swiper-bg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
.contentbox {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 1046rpx;
|
||||
.bg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
page {
|
||||
background: #f6f8fa;
|
||||
}
|
||||
|
||||
.contentboxitem {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 90%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 50%);
|
||||
padding: 38rpx 0 26rpx 0;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
.swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.contentboxitemleft {
|
||||
width: 50%;
|
||||
border-right: 2rpx solid #623618;
|
||||
.swiper-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
image {
|
||||
width: 134rpx;
|
||||
height: 134rpx;
|
||||
}
|
||||
.swiper-bg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentboxitemlefttextone {
|
||||
margin-top: 10rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.content {
|
||||
.contentbox {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 430rpx;
|
||||
|
||||
.contentboxitemlefttexttow {
|
||||
margin-top: 2rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.bg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.contentboxitemright {
|
||||
width: 50%;
|
||||
padding: 0 34rpx;
|
||||
.contentboxitem {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 90%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 50%);
|
||||
padding: 38rpx 0 26rpx 0;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
|
||||
.contentboxitemright_item:nth-child(2) {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.contentboxitemleft {
|
||||
width: 50%;
|
||||
border-right: 2rpx solid #623618;
|
||||
|
||||
.contentboxitemright_item {
|
||||
image {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
}
|
||||
image {
|
||||
width: 134rpx;
|
||||
height: 134rpx;
|
||||
}
|
||||
|
||||
.contentboxitemright_itembox {
|
||||
width: 170rpx;
|
||||
.contentboxitemlefttextone {
|
||||
margin-top: 10rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.contentboxitemlefttexttow {
|
||||
margin-top: 2rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-top: 2rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.popup-content {
|
||||
width: 90vw;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
.header-wrap {
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ececec;
|
||||
padding: 0 28upx;
|
||||
.t {
|
||||
font-size: 32upx;
|
||||
color: #333;
|
||||
}
|
||||
.close {
|
||||
$size: 60upx;
|
||||
width: $size;
|
||||
height: $size;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.btn-content {
|
||||
height: 86px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 60upx;
|
||||
.btn {
|
||||
width: 248upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.contentboxitemright {
|
||||
width: 50%;
|
||||
padding: 0 34rpx;
|
||||
|
||||
.menus {
|
||||
display: flex;
|
||||
padding: 32rpx 40rpx;
|
||||
margin-top: 150rpx;
|
||||
gap: 20rpx;
|
||||
.menu-item {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
padding: 32rpx 28rpx;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.contentboxitemright_item:nth-child(2) {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.contentboxitemright_item {
|
||||
image {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
}
|
||||
|
||||
.contentboxitemright_itembox {
|
||||
width: 170rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-top: 2rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
width: 90vw;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
|
||||
.header-wrap {
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ececec;
|
||||
padding: 0 28upx;
|
||||
|
||||
.t {
|
||||
font-size: 32upx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.close {
|
||||
$size: 60upx;
|
||||
width: $size;
|
||||
height: $size;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-content {
|
||||
height: 86px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 60upx;
|
||||
|
||||
.btn {
|
||||
width: 248upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menus {
|
||||
display: flex;
|
||||
padding: 32rpx 40rpx;
|
||||
margin-top: 150rpx;
|
||||
gap: 20rpx;
|
||||
|
||||
.menu-item {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
padding: 32rpx 28rpx;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.userInfo {
|
||||
display: flex;
|
||||
padding: 22rpx 24rpx;
|
||||
margin: 0 4rpx;
|
||||
align-items: center;
|
||||
align-self: stretch;
|
||||
border-radius: 24rpx;
|
||||
background: #FFF;
|
||||
transform: translateY(-36rpx);
|
||||
|
||||
.vip {
|
||||
background: #FA720A;
|
||||
font-size: 24rpx;
|
||||
color: #ffffff;
|
||||
padding: 6rpx 10rpx;
|
||||
margin-left: 10rpx;
|
||||
border-radius: 20rpx 20rpx 20rpx 0;
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 33px;
|
||||
height: 33px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.new-menus-box {
|
||||
margin: 0 16rpx 34rpx 16rpx;
|
||||
|
||||
.new-menus {
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 79px;
|
||||
height: 79px;
|
||||
}
|
||||
|
||||
&.layout2 {
|
||||
padding: 29px 0;
|
||||
|
||||
.diner,
|
||||
.takeout {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 2rpx;
|
||||
height: 156rpx;
|
||||
background: #EDEDED;
|
||||
}
|
||||
|
||||
.takeout {}
|
||||
}
|
||||
|
||||
&.layout1 {
|
||||
padding: 36rpx 40rpx;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.big_img {
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 48rpx;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-top: 20rpx;
|
||||
font-size: 32rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.groupBuying {
|
||||
padding: 16rpx 38rpx;
|
||||
border-top: 2rpx solid #EDEDED;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #333333;
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-top: 16rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.points {
|
||||
margin-top: 34rpx;
|
||||
background-color: #fff;
|
||||
padding: 16rpx 68rpx;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.img {
|
||||
width: 98px;
|
||||
height: 98px;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom_menus {
|
||||
display: flex;
|
||||
gap: 14rpx;
|
||||
margin-top: 34rpx;
|
||||
|
||||
.item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
border-radius: 18rpx;
|
||||
background: #FFF;
|
||||
|
||||
.img {
|
||||
width: 39px;
|
||||
height: 39px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-top: 8rpx;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2260,7 +2260,7 @@ async function getDiscountActivity() {
|
||||
const res = await discountActivityApi.config({
|
||||
shopId: uni.cache.get('shopId')
|
||||
});
|
||||
if (res) {
|
||||
if (res&&typeof res=='object') {
|
||||
fullAmountActivity.value = res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<image class="top-img" :src="item.goodsImageUrl" mode="aspectFit"></image>
|
||||
|
||||
<view @click="prveImg(item.goodsImageUrl)">
|
||||
<image class="top-img" :src="item.goodsImageUrl" mode="aspectFill" ></image>
|
||||
</view>
|
||||
</template>
|
||||
<view class="sku">
|
||||
<view>
|
||||
@@ -46,14 +47,17 @@
|
||||
<view class="title">商品详情</view>
|
||||
</view>
|
||||
<view class="u-m-t-32">
|
||||
<image class="w-full" v-for="(item,index) in item.goodsDescription" :key="index" mode="widthFix" :src="item">
|
||||
<image class="w-full" v-for="(item,index) in item.goodsDescription" :key="index" mode="widthFix"
|
||||
:src="item">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="height: 100px"></view>
|
||||
<view class="fixed-bottom u-flex u-row-center">
|
||||
<view class="btn" @click="exchangeClick" :class="isCanExchange">立即兑换</view>
|
||||
<view class="btn" @click="exchangeClick" :class="[isCanExchange?'':'gray']">
|
||||
{{returnBtmText}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 兑换确认弹窗start -->
|
||||
@@ -72,31 +76,36 @@
|
||||
<view class="popup-content">
|
||||
<view class="popup-content-top">
|
||||
<text class="color-666">领取方式</text>
|
||||
<text class="u-m-l-16">需前往店铺自行兑换领取</text>
|
||||
<text class="u-m-l-16" v-if="item.goodsCategory=='优惠券'">系统发放</text>
|
||||
<text class="u-m-l-16" v-else>店内自取</text>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="u-flex">
|
||||
<image class="cover"></image>
|
||||
|
||||
<image class="cover" v-if="item.goodsCategory!='优惠券'" :src="item.goodsImageUrl"></image>
|
||||
<view v-else class="cover bg-fff">
|
||||
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
||||
</view>
|
||||
<view class="u-flex u-flex-1 u-row-between u-p-l-16 u-col-center">
|
||||
<view>
|
||||
<view class="u-font-32 font-bold">这里是商品名称</view>
|
||||
<view class="u-m-t-54 color-666">8000积分+9.99元</view>
|
||||
<view class="u-font-32 font-bold">{{item.goodsName}}</view>
|
||||
<view class="u-m-t-54 color-666">{{item.requiredPoints}}积分+{{item.extraPrice}}元</view>
|
||||
</view>
|
||||
<text class="color-666">X1</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-20 waring u-flex u-col-center">
|
||||
<view class="u-m-t-20 waring u-flex u-col-center" v-if="item.goodsCategory=='优惠券'">
|
||||
<up-icon name="info-circle" size="16" color="#FF9900"></up-icon>
|
||||
<view class="u-m-l-16">优惠券为虚拟发放,一旦兑换不支持退款,请悉知</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom font-bold text-right">
|
||||
<text>合计 8000积分 + ¥9.99</text>
|
||||
<text>合计 {{item.requiredPoints}}积分 + ¥{{item.extraPrice}}</text>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-42 u-flex u-row-center">
|
||||
<view class="btn">确认兑换</view>
|
||||
<view class="btn" @click="payExchange">确认兑换</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
@@ -113,18 +122,32 @@
|
||||
} from '@/utils/uniapp.js'
|
||||
import modal from "@/scoreShop/components/modal.vue";
|
||||
import * as pointGoodsApi from "@/common/api/order/pointGoods.js";
|
||||
import couponIcon from "@/components/coupon-icon/index";
|
||||
import {
|
||||
pay
|
||||
} from '@/utils/pay.js'
|
||||
const imgs = {
|
||||
bg: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/9fd6a3ad2b384f6cb4e88ed6b77bd334.png",
|
||||
};
|
||||
const modalData = reactive({
|
||||
show: false,
|
||||
});
|
||||
|
||||
function prveImg(url){
|
||||
uni.previewImage({
|
||||
urls:[url]
|
||||
})
|
||||
}
|
||||
|
||||
const popupData = reactive({
|
||||
show: false,
|
||||
});
|
||||
|
||||
function exchangeClick() {
|
||||
if (item.extraPrice > 0) {
|
||||
popupData.show = true
|
||||
return
|
||||
}
|
||||
modalData.show = true;
|
||||
}
|
||||
|
||||
@@ -132,7 +155,45 @@
|
||||
// modalData.show = false;
|
||||
exchange()
|
||||
}
|
||||
async function payExchange() {
|
||||
uni.showLoading({
|
||||
title: '兑换中……'
|
||||
})
|
||||
const openId = await getOpenId()
|
||||
uni.hideLoading()
|
||||
if (openId) {
|
||||
pointGoodsApi.exchange({
|
||||
pointsGoodsId: item.id,
|
||||
shopId: item.shopId,
|
||||
number: 1,
|
||||
price: item.extraPrice,
|
||||
openId
|
||||
}).then(orderRes => {
|
||||
popupData.show = false;
|
||||
pay(orderRes.payInfo).then(res => {
|
||||
console.log(res)
|
||||
if (res) {
|
||||
uni.setStorageSync('exchange_goods_success', orderRes.goodsRecord)
|
||||
uni.redirectTo({
|
||||
url: '/scoreShop/success/index'
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '兑换失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '鉴权失败,兑换失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
async function exchange() {
|
||||
uni.showLoading({
|
||||
title: '兑换中……'
|
||||
@@ -148,12 +209,12 @@
|
||||
openId
|
||||
}).then(res => {
|
||||
modalData.show = false;
|
||||
if(res){
|
||||
uni.setStorageSync('exchange_goods_success',res)
|
||||
if (res) {
|
||||
uni.setStorageSync('exchange_goods_success', res)
|
||||
uni.redirectTo({
|
||||
url:'/scoreShop/success/index'
|
||||
url: '/scoreShop/success/index'
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '兑换失败',
|
||||
icon: 'none'
|
||||
@@ -190,13 +251,13 @@
|
||||
}
|
||||
const type = item.couponInfo.couponType
|
||||
if (type == 1) {
|
||||
return item.couponInfo.discountAmount + '元代金券' + ' ' + `(满${item.fullAmount}可用)`
|
||||
return item.couponInfo.discountAmount + '元代金券' + ' ' + `(满${item.couponInfo.fullAmount}可用)`
|
||||
}
|
||||
if (type == 2) {
|
||||
return item.couponInfo.discountNum + '件商品兑换' + ' ' + `(满${item.fullAmount}可用)`
|
||||
return item.couponInfo.discountNum + '件商品兑换' + ' ' + `(满${item.couponInfo.fullAmount}可用)`
|
||||
}
|
||||
if (type == 3) {
|
||||
return item.couponInfo.discountRate / 10 + '折' + ' ' + `(满${item.fullAmount}可用)`
|
||||
return item.couponInfo.discountRate / 10 + '折' + ' ' + `(满${item.couponInfo.fullAmount}可用)`
|
||||
}
|
||||
if (type == 4) {
|
||||
return '第二件半价券'
|
||||
@@ -219,11 +280,27 @@
|
||||
if (item.quantity <= 0) {
|
||||
return false
|
||||
}
|
||||
if(item.limitQuota&&item.boughtCount>=item.limitQuota){
|
||||
if (item.limitQuota && item.boughtCount >= item.limitQuota) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
const returnBtmText = computed(() => {
|
||||
if (isCanExchange.value) {
|
||||
return '立即兑换'
|
||||
}
|
||||
if (pointsUser.pointBalance < item.requiredPoints) {
|
||||
const num = item.requiredPoints - pointsUser.pointBalance
|
||||
return `积分不足,还差${num}积分`
|
||||
}
|
||||
if (item.quantity <= 0) {
|
||||
return `库存不足`
|
||||
}
|
||||
if (item.limitQuota && item.boughtCount >= item.limitQuota) {
|
||||
return `单人兑换已达上限`
|
||||
}
|
||||
})
|
||||
onLoad((opt) => {
|
||||
const exchange_goods = uni.getStorageSync('exchange_goods')
|
||||
if (exchange_goods.goodsDescription) {
|
||||
@@ -342,7 +419,7 @@
|
||||
background-color: #fff;
|
||||
bottom: 0;
|
||||
z-index: 10;
|
||||
|
||||
|
||||
|
||||
.btn {
|
||||
padding: 16rpx 62rpx;
|
||||
@@ -383,7 +460,11 @@
|
||||
height: 184rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #d9d9d9;
|
||||
&.bg-fff{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.bottom {
|
||||
@@ -403,4 +484,7 @@
|
||||
font-size: 700;
|
||||
}
|
||||
}
|
||||
.w-full{
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -3,10 +3,10 @@
|
||||
<view v-for="(item, index) in list" :key="index" @click="toDetail(item)">
|
||||
<template v-if="layout === 'list'">
|
||||
<view class="item">
|
||||
<view class="img coupon" v-if="item.goodsCategory=='优惠劵'&&item.couponInfo">
|
||||
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
||||
<view class="img coupon" v-if="item.goodsCategory=='优惠券'&&item.couponInfo">
|
||||
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
||||
</view>
|
||||
<image class="img" v-else lazy-load :src="item.goodsImageUrl"></image>
|
||||
<image class="img" v-else lazy-load :src="item.goodsImageUrl" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view>
|
||||
<view class="name u-line-1">{{item.goodsName}}</view>
|
||||
@@ -25,10 +25,10 @@
|
||||
</template>
|
||||
<template v-if="layout === 'block'">
|
||||
<view class="item">
|
||||
<view class="img coupon" v-if="item.goodsCategory=='优惠劵'&&item.couponInfo">
|
||||
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
||||
<view class="img coupon" v-if="item.goodsCategory=='优惠券'&&item.couponInfo">
|
||||
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
||||
</view>
|
||||
<image class="img" v-else lazy-load :src="item.goodsImageUrl"></image>
|
||||
<image class="img" v-else lazy-load :src="item.goodsImageUrl" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name u-line-1">{{item.goodsName}}</view>
|
||||
<view class="price">
|
||||
@@ -37,7 +37,7 @@
|
||||
</view>
|
||||
<view class="u-flex u-col-center u-m-t-16 u-row-between">
|
||||
<view class="limit" v-if="item.limitQuota">限购{{item.limitQuota}}份</view>
|
||||
<view class="btn" v-if="canExchange(item)">兑换</view>
|
||||
<view class="btn" v-if="item.quantity>0">兑换</view>
|
||||
<view class="btn end" v-else>已兑完</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -63,11 +63,15 @@
|
||||
default: () => {},
|
||||
}
|
||||
});
|
||||
|
||||
const numListStyle={
|
||||
'font-size':'24rpx'
|
||||
}
|
||||
const numBlockStyle={
|
||||
'font-size':'24rpx'
|
||||
}
|
||||
|
||||
function toDetail(item) {
|
||||
if (!canExchange(item)) {
|
||||
return
|
||||
}
|
||||
uni.setStorageSync('exchange_goods', item)
|
||||
uni.navigateTo({
|
||||
url: '/scoreShop/detail/index?id=' + item.id,
|
||||
@@ -129,7 +133,7 @@
|
||||
background: #d9d9d9;
|
||||
|
||||
&.coupon {
|
||||
// background-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +164,7 @@
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
|
||||
&.end {
|
||||
color: #999999;
|
||||
background: rgba(153, 153, 153, 0.3);
|
||||
@@ -195,7 +200,7 @@
|
||||
background: #d9d9d9;
|
||||
|
||||
&.coupon {
|
||||
// background-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="list">
|
||||
<view v-for="(item, index) in list" :key="index" class="item">
|
||||
<view v-for="(item, index) in list" :key="index" class="item" @click="toDetail(item)">
|
||||
<view class="u-flex u-row-between">
|
||||
<text class="color-999">{{item.createTime}}</text>
|
||||
<text class="status " :class="[returnStatusClass(item)]">{{item.status}}</text>
|
||||
@@ -12,13 +12,17 @@
|
||||
</view>
|
||||
<view class="u-p-l-36">
|
||||
<view>{{item.pointsGoodsName}}</view>
|
||||
<view class="u-m-t-28 color-666">{{item.spendPoints}}积分</view>
|
||||
<view class="u-m-t-28 color-666">
|
||||
|
||||
<text>{{item.spendPoints}}积分 </text>
|
||||
<text v-if="item.extraPaymentAmount"> + {{item.extraPaymentAmount}}元 </text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-28 u-flex u-row-right btns">
|
||||
<view class="btn look" @click="lookCode(item)" v-if="item.goodsCategory!='优惠券'">查看券码</view>
|
||||
<view class="btn black" @click="tuikuan(item)" v-if="canRefund(item)">申请退款</view>
|
||||
<view class="btn black" @click="cancelRefund(item)" v-if="item.status=='退款中'" >取消退款</view>
|
||||
<view class="btn look" @click.stop="lookCode(item)" v-if="item.goodsCategory!='优惠券'&&item.status!='已退款'&&item.status!='已完成'">查看券码</view>
|
||||
<view class="btn black" @click.stop="refund(item)" v-if="canRefund(item)">申请退款</view>
|
||||
<view class="btn black" @click.stop="cancelRefund(item)" v-if="item.status=='退款中'" >取消退款</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -39,12 +43,19 @@
|
||||
emits("lookCode", item);
|
||||
};
|
||||
|
||||
function tuikuan(item) {
|
||||
function refund(item) {
|
||||
emits("refund", item);
|
||||
}
|
||||
function cancelRefund(item) {
|
||||
emits("cancelRefund", item);
|
||||
}
|
||||
|
||||
function toDetail(item){
|
||||
uni.setStorageSync('points_order_detail',item)
|
||||
uni.navigateTo({
|
||||
url:'/scoreShop/order/detail'
|
||||
})
|
||||
}
|
||||
|
||||
function returnStatusClass(item) {
|
||||
if (item.status == '已完成' || item.status == '已退款') {
|
||||
@@ -59,7 +70,7 @@
|
||||
}
|
||||
|
||||
function canRefund(item) {
|
||||
if(item.status=='已退款'|| item.status=='退款中'||item.goodsCategory!='其它商品' ){
|
||||
if(item.status=='已退款'|| item.status=='退款中'||item.goodsCategory!='其它商品' ||item.status=='已完成'){
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
@@ -1,156 +1,283 @@
|
||||
<template>
|
||||
<view class="min-page bg-f7 color-333 u-font-28">
|
||||
<view class="top">
|
||||
<view class="u-flex u-col-center">
|
||||
<up-image width="208rpx" height="208rpx"></up-image>
|
||||
<view class="u-p-l-28 u-flex-1">
|
||||
<view class="font-bold">这里是商品名称</view>
|
||||
<view class="u-flex u-row-between u-m-t-8">
|
||||
<text class="color1 font-bold">8000积分</text>
|
||||
<text class="status success">已完成</text>
|
||||
</view>
|
||||
<view class="u-m-t-8 font-bold color1"> X1 </view>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="true">
|
||||
<view class="u-m-t-16">
|
||||
<view class="u-flex u-row-center">
|
||||
<up-qrcode cid="ex1" :size="104" :val="qrcode"></up-qrcode>
|
||||
</view>
|
||||
<view class="u-m-t-22 u-flex u-row-center">
|
||||
<text>{{ qrcode }}</text>
|
||||
<view @click="copyCode">
|
||||
<image
|
||||
src="/scoreShop/static/image/copy.png"
|
||||
class="u-m-l-24 copy"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="min-page bg-f7 color-333 u-font-28">
|
||||
<view class="top">
|
||||
<view class="u-flex u-col-center">
|
||||
<up-image width="208rpx" height="208rpx" :src="item.goodsImageUrl"
|
||||
v-if="item.goodsCategory!='优惠券'"></up-image>
|
||||
<view class="" style="width: 208rpx;height: 208rpx;" v-else>
|
||||
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
||||
</view>
|
||||
<view class="u-p-l-28 u-flex-1">
|
||||
<view class="font-bold">{{item.pointsGoodsName}}</view>
|
||||
<view class="u-flex u-row-between u-m-t-8">
|
||||
<text class="color1 font-bold">{{item.spendPoints}}积分</text>
|
||||
<text class="status " :class="[returnStatusClass(item)]">{{item.status}}</text>
|
||||
</view>
|
||||
<view class="u-m-t-8 font-bold color1"> X{{item.number}} </view>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="item.goodsCategory=='其它商品'&&item.status!='已退款'">
|
||||
<view class="u-m-t-16">
|
||||
<view class="u-flex u-row-center">
|
||||
<up-qrcode cid="ex1" :size="104" :val="qrcode"></up-qrcode>
|
||||
</view>
|
||||
<view class="u-m-t-22 u-flex u-row-center">
|
||||
<text>{{ qrcode }}</text>
|
||||
<view @click="copyCode">
|
||||
<image src="/scoreShop/static/image/copy.png" class="u-m-l-24 copy"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="u-m-t-16">
|
||||
<text class="color-666">领取方式</text>
|
||||
<text class="u-m-l-20">需前往店铺自行兑换领取</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-16">
|
||||
<text class="color-666">领取方式</text>
|
||||
<text class="u-m-l-20" v-if="item.goodsCategory=='其它商品'">需前往店铺自行兑换领取</text>
|
||||
<text class="u-m-l-20" v-else>系统发放</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom">
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>兑换商品:</text>
|
||||
<text class="color-666">这里是商品名称</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>兑换数量:</text>
|
||||
<text class="color-666">1份</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>消耗积分:</text>
|
||||
<text class="color-666">800</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>支付金额:</text>
|
||||
<text class="color-666">9.99元</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>下单时间:</text>
|
||||
<text class="color-666">2025-12-3 17:19:32</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>核销时间:</text>
|
||||
<text class="color-666">2025-12-04 01:13:14</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>订单号:</text>
|
||||
<text class="color-666">DH202511300001</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>兑换商品:</text>
|
||||
<text class="color-666">{{item.pointsGoodsName}}</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>兑换数量:</text>
|
||||
<text class="color-666">{{item.number}}份</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>消耗积分:</text>
|
||||
<text class="color-666">{{item.spendPoints}}</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>支付金额:</text>
|
||||
<text class="color-666">{{item.extraPaymentAmount}}元</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>下单时间:</text>
|
||||
<text class="color-666">{{item.createTime}}</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>核销时间:</text>
|
||||
<text class="color-666">{{item.checkoutTime||''}}</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-between item">
|
||||
<text>订单号:</text>
|
||||
<text class="color-666">{{item.orderNo}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btns">
|
||||
<view class="btn cancel">申请退款</view>
|
||||
<view class="btn success ">取消退款</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<view class="btn cancel" @click="refund(item)" v-if="canRefund(item)">申请退款</view>
|
||||
<view class="btn success " @click="cancelRefund(item)" v-if="item.status=='退款中'">取消退款</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
const qrcode = ref("251202150055");
|
||||
function copyCode() {
|
||||
uni.setClipboardData({
|
||||
data: qrcode.value,
|
||||
success: function () {
|
||||
uni.showToast({
|
||||
title: "复制成功",
|
||||
icon: "none",
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
import couponIcon from "@/components/coupon-icon/index";
|
||||
import * as pointGoodsApi from "@/common/api/order/pointGoods.js";
|
||||
const qrcode = ref();
|
||||
|
||||
function copyCode() {
|
||||
uni.setClipboardData({
|
||||
data: qrcode.value,
|
||||
success: function() {
|
||||
uni.showToast({
|
||||
title: "复制成功",
|
||||
icon: "none",
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
const item = reactive({
|
||||
|
||||
})
|
||||
|
||||
function returnStatusClass(item) {
|
||||
if (item.status == '已完成' || item.status == '已退款') {
|
||||
return 'gray'
|
||||
}
|
||||
if (item.status == '待核销') {
|
||||
return 'success'
|
||||
}
|
||||
if (item.status == '退款中') {
|
||||
return 'error'
|
||||
}
|
||||
}
|
||||
|
||||
function canRefund(item) {
|
||||
if (item.status == '已退款' || item.status == '退款中' || item.goodsCategory != '其它商品' || item.status == '已完成') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
function init() {
|
||||
const data = uni.getStorageSync('points_order_detail')
|
||||
qrcode.value = data.couponCode
|
||||
Object.assign(item, data)
|
||||
|
||||
refresh()
|
||||
}
|
||||
onLoad(init)
|
||||
|
||||
|
||||
function refund(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否申请退款',
|
||||
showCancel: true,
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
pointGoodsApi.applyRefund({
|
||||
orderNo: item.orderNo,
|
||||
recordId: item.id
|
||||
}).then(res => {
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '申请退款成功',
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '申请退款失败',
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
}
|
||||
setTimeout(() => {
|
||||
refresh()
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
pointGoodsApi.recordOne({
|
||||
id: item.id,
|
||||
shopId: item.shopId
|
||||
}).then(res => {
|
||||
Object.assign(item, res)
|
||||
})
|
||||
}
|
||||
|
||||
function cancelRefund(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否取消退款',
|
||||
showCancel: true,
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
pointGoodsApi.cancelRefund({
|
||||
orderNo: item.orderNo,
|
||||
recordId: item.id
|
||||
}).then(res => {
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '取消退款成功',
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '取消退款失败',
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
}
|
||||
setTimeout(() => {
|
||||
refresh()
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.min-page {
|
||||
padding: 28rpx;
|
||||
}
|
||||
.top {
|
||||
padding: 32rpx 24rpx;
|
||||
background: #fff;
|
||||
.color1 {
|
||||
color: #9c571f;
|
||||
}
|
||||
.status {
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid transparent;
|
||||
&.success {
|
||||
background: rgba(123, 209, 54, 0.12);
|
||||
border-color: #7bd136;
|
||||
color: #7bd136;
|
||||
}
|
||||
&.gray {
|
||||
background: #9999991f;
|
||||
border-color: #999;
|
||||
color: #999;
|
||||
}
|
||||
&.error {
|
||||
background: #ff1c1c2e;
|
||||
border-color: #ff1c1c;
|
||||
color: #ff1c1c;
|
||||
}
|
||||
}
|
||||
}
|
||||
.copy {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
.bottom {
|
||||
background: #fff;
|
||||
border-radius: 32rpx;
|
||||
padding: 16rpx 28rpx;
|
||||
margin-top: 48rpx;
|
||||
.item {
|
||||
padding: 16rpx 0;
|
||||
}
|
||||
}
|
||||
.btns {
|
||||
margin-top: 66rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 48rpx;
|
||||
.btn {
|
||||
border: 2rpx solid transparent;
|
||||
border-radius: 100rpx;
|
||||
background: #fff;
|
||||
padding: 14rpx 76rpx;
|
||||
font-size: 32rpx;
|
||||
&.success {
|
||||
background-color: #e8ad7b;
|
||||
border-color: #e8ad7b;
|
||||
color: #fff;
|
||||
}
|
||||
&.cancel {
|
||||
border-color: #e8ad7b;
|
||||
color: #e8ad7b;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.min-page {
|
||||
padding: 28rpx;
|
||||
}
|
||||
|
||||
.top {
|
||||
padding: 32rpx 24rpx;
|
||||
background: #fff;
|
||||
|
||||
.color1 {
|
||||
color: #9c571f;
|
||||
}
|
||||
|
||||
.status {
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid transparent;
|
||||
|
||||
&.success {
|
||||
background: rgba(123, 209, 54, 0.12);
|
||||
border-color: #7bd136;
|
||||
color: #7bd136;
|
||||
}
|
||||
|
||||
&.gray {
|
||||
background: #9999991f;
|
||||
border-color: #999;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
&.error {
|
||||
background: #ff1c1c2e;
|
||||
border-color: #ff1c1c;
|
||||
color: #ff1c1c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.copy {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
background: #fff;
|
||||
border-radius: 32rpx;
|
||||
padding: 16rpx 28rpx;
|
||||
margin-top: 48rpx;
|
||||
|
||||
.item {
|
||||
padding: 16rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
margin-top: 66rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 48rpx;
|
||||
|
||||
.btn {
|
||||
border: 2rpx solid transparent;
|
||||
border-radius: 100rpx;
|
||||
background: #fff;
|
||||
padding: 14rpx 76rpx;
|
||||
font-size: 32rpx;
|
||||
|
||||
&.success {
|
||||
background-color: #e8ad7b;
|
||||
border-color: #e8ad7b;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&.cancel {
|
||||
border-color: #e8ad7b;
|
||||
color: #e8ad7b;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -147,7 +147,7 @@
|
||||
value: "unevaluated",
|
||||
},
|
||||
{
|
||||
name: "已核销",
|
||||
name: "已完成",
|
||||
value: "evaluated",
|
||||
},
|
||||
{
|
||||
@@ -171,7 +171,7 @@
|
||||
function getList() {
|
||||
const status = tabs.list.find(v => v.value == tabs.sel)
|
||||
pointGoodsApi.recordPage({
|
||||
...query,
|
||||
...query,status:tabs.sel?status.name:''
|
||||
}).then(res => {
|
||||
const newList = res.records
|
||||
if (query.page == 1) {
|
||||
|
||||
@@ -27,9 +27,13 @@
|
||||
<text class="color-666">消耗积分:</text>
|
||||
<text>{{item.spendPoints}}</text>
|
||||
</view>
|
||||
<view class="u-p-22" v-if="item.extraPaymentAmount">
|
||||
<text class="color-666">支付金额:</text>
|
||||
<text>{{item.extraPaymentAmount}}</text>
|
||||
</view>
|
||||
<view class="u-p-22">
|
||||
<text class="color-666">下单时间:</text>
|
||||
<text>{{item.checkoutTime}}</text>
|
||||
<text>{{item.createTime}}</text>
|
||||
</view>
|
||||
<view class="u-p-22">
|
||||
<text class="color-666">订单号:</text>
|
||||
|
||||
Reference in New Issue
Block a user