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
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export const homeData = (data) => {
|
||||||
|
return request({
|
||||||
|
url: prveUrl + '/user/home/data',
|
||||||
|
method: 'get',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -56,3 +56,11 @@ export const recordPage = (data) => {
|
|||||||
data: data
|
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="container">
|
||||||
<view class="icon icon1" v-if="props.item.couponType == 1">
|
<view class="icon icon1" v-if="props.item.couponType == 1">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<text class="i">¥</text>
|
<text class="i" >¥</text>
|
||||||
<text class="num">{{ props.item.discountAmount }}</text>
|
<text class="num" >{{ props.item.discountAmount }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="intro">
|
<view class="intro">
|
||||||
<text class="t">满{{ props.item.fullAmount }}可用</text>
|
<text class="t">满{{ props.item.fullAmount }}可用</text>
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="icon icon2" v-if="props.item.couponType == 2">
|
<view class="icon icon2" v-if="props.item.couponType == 2">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<text class="i">{{ props.item.discountNum }}件</text>
|
<text class="i" >{{ props.item.discountNum }}件</text>
|
||||||
<text class="num">商品兑换</text>
|
<text class="num" >商品兑换</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="intro">
|
<view class="intro">
|
||||||
<text class="t">满{{ props.item.fullAmount }}可用</text>
|
<text class="t">满{{ props.item.fullAmount }}可用</text>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="icon icon3" v-if="props.item.couponType == 3">
|
<view class="icon icon3" v-if="props.item.couponType == 3">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<text class="num">{{ props.item.discountRate/10 }}折</text>
|
<text class="num" >{{ props.item.discountRate/10 }}折</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="intro">
|
<view class="intro">
|
||||||
<text class="t">满{{ props.item.fullAmount }}可用</text>
|
<text class="t">满{{ props.item.fullAmount }}可用</text>
|
||||||
@@ -29,34 +29,37 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="icon icon2" v-if="props.item.couponType == 4">
|
<view class="icon icon2" v-if="props.item.couponType == 4">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<text class="i">第二件</text>
|
<text class="i" >第二件</text>
|
||||||
<text class="num">半价券</text>
|
<text class="num" >半价券</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="icon icon2" v-if="props.item.couponType == 6">
|
<view class="icon icon2" v-if="props.item.couponType == 6">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<text class="i">买一送</text>
|
<text class="i" >买一送</text>
|
||||||
<text class="num">一券</text>
|
<text class="num" >一券</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: {}
|
||||||
}
|
},
|
||||||
});
|
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
$color: #ff1c1c;
|
$color: #ff1c1c;
|
||||||
.container {
|
|
||||||
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -64,6 +67,7 @@ $color: #ff1c1c;
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
&.icon1 {
|
&.icon1 {
|
||||||
.top {
|
.top {
|
||||||
.i {
|
.i {
|
||||||
@@ -71,6 +75,7 @@ $color: #ff1c1c;
|
|||||||
font-size: 24upx;
|
font-size: 24upx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
color: $color;
|
color: $color;
|
||||||
font-size: 72upx;
|
font-size: 72upx;
|
||||||
@@ -78,17 +83,20 @@ $color: #ff1c1c;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.icon2 {
|
&.icon2 {
|
||||||
.top {
|
.top {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.i {
|
.i {
|
||||||
color: $color;
|
color: $color;
|
||||||
font-size: 34upx;
|
font-size: 34upx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
color: $color;
|
color: $color;
|
||||||
font-size: 34upx;
|
font-size: 34upx;
|
||||||
@@ -96,17 +104,20 @@ $color: #ff1c1c;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.icon3 {
|
&.icon3 {
|
||||||
.top {
|
.top {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.i {
|
.i {
|
||||||
color: $color;
|
color: $color;
|
||||||
font-size: 34upx;
|
font-size: 34upx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
color: $color;
|
color: $color;
|
||||||
font-size: 52upx;
|
font-size: 52upx;
|
||||||
@@ -118,11 +129,12 @@ $color: #ff1c1c;
|
|||||||
.intro {
|
.intro {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.t {
|
.t {
|
||||||
font-size: 22upx;
|
font-size: 22upx;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -334,7 +334,7 @@ onShow(async () => {
|
|||||||
proxy.$isResolve();
|
proxy.$isResolve();
|
||||||
const shopId = uni.cache.get('shopId');
|
const shopId = uni.cache.get('shopId');
|
||||||
if (shopId) {
|
if (shopId) {
|
||||||
indexsRef.value.getVipConfig();
|
indexsRef.value.updateData();
|
||||||
}
|
}
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
await proxy.$onLaunched;
|
await proxy.$onLaunched;
|
||||||
|
|||||||
@@ -2,76 +2,99 @@
|
|||||||
<view class="content min-page bg-f7">
|
<view class="content min-page bg-f7">
|
||||||
<view class="contentbox">
|
<view class="contentbox">
|
||||||
<template v-if="shopExtend.length">
|
<template v-if="shopExtend.length">
|
||||||
<image
|
<image class="bg" :src="shopExtend[0].value" mode="aspectFill"
|
||||||
class="bg"
|
v-if="!isJsonArrayString(shopExtend[0].value)"></image>
|
||||||
:src="shopExtend[0].value"
|
|
||||||
mode="aspectFill"
|
|
||||||
v-if="!isJsonArrayString(shopExtend[0].value)"
|
|
||||||
></image>
|
|
||||||
<swiper class="swiper" autoplay circular v-else>
|
<swiper class="swiper" autoplay circular v-else>
|
||||||
<swiper-item
|
<swiper-item class="swiper-item" v-for="item in JSON.parse(shopExtend[0].value)">
|
||||||
class="swiper-item"
|
|
||||||
v-for="item in JSON.parse(shopExtend[0].value)"
|
|
||||||
>
|
|
||||||
<image class="swiper-bg" :src="item"></image>
|
<image class="swiper-bg" :src="item"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</template>
|
</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>
|
||||||
<view class="contentboxitemright">
|
|
||||||
<!-- <view class="contentboxitemright_item flex-between"
|
<view class="userInfo u-flex">
|
||||||
@click="memberindex('user/member/memberdetails')"> -->
|
<up-avatar size="61px" :default-url="imgs.defaultAvatar"></up-avatar>
|
||||||
<view class="contentboxitemright_item flex-between" @click="tomember">
|
<view class="u-flex-1 u-flex u-row-between u-p-l-16 u-p-r-16">
|
||||||
<image
|
<view>
|
||||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/Xvip.png"
|
<view class="u-flex">
|
||||||
mode="aspectFill"
|
<view class="u-font-32 color-333 font-bold u-line-1" style="max-width: 320rpx;">HI,欢迎回来</view>
|
||||||
></image>
|
<view class="vip" v-if="shopUserInfo.isVip">会员身份</view>
|
||||||
<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 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>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<image :src="imgs.code" class="code"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="u-flex menus u-font-32 color-333">
|
<view class="new-menus-box">
|
||||||
<view class="menu-item" @click="toIntegralMall">
|
<view class="new-menus layout2" v-if="allConfig.takeout">
|
||||||
<view>积分商城</view>
|
<view class="diner" @click="scanCodehandle(0)">
|
||||||
<view class="u-font-24 color-999">攒积分,兑换更多优惠</view>
|
<image :src="imgs.orderFood" class="icon"></image>
|
||||||
|
<view class="title">立即点单</view>
|
||||||
|
<view class="desc">下单免排队</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-item" @click="toFenxiao">
|
<view class="line"></view>
|
||||||
<view>分销</view>
|
<view class="takeout">
|
||||||
<view class="u-font-24 color-999">邀请好友,获得佣金</view>
|
<image :src="imgs.takeout" class="icon"></image>
|
||||||
|
<view class="title">外卖点单</view>
|
||||||
|
<view class="desc">外卖送到家</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup
|
<view class="new-menus layout1" v-else @click="scanCodehandle(0)">
|
||||||
:show="popupShow"
|
<view>
|
||||||
:safe-area-inset-bottom="false"
|
<view class="title">立即点单</view>
|
||||||
mode="center"
|
<view class="desc">-自助下单 快人一步-</view>
|
||||||
@close="popupShow = false"
|
</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="popup-content">
|
||||||
<view class="header-wrap">
|
<view class="header-wrap">
|
||||||
<text class="t">请选择</text>
|
<text class="t">请选择</text>
|
||||||
@@ -81,18 +104,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="btn-content">
|
<view class="btn-content">
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<u-button
|
<u-button color="#E8AD7B" plain="" shape="circle" @click="beforehandOrderHandle">预点单</u-button>
|
||||||
color="#E8AD7B"
|
|
||||||
plain=""
|
|
||||||
shape="circle"
|
|
||||||
@click="beforehandOrderHandle"
|
|
||||||
>预点单</u-button
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<u-button color="#E8AD7B" shape="circle" @click="scanOrderHandle"
|
<u-button color="#E8AD7B" shape="circle" @click="scanOrderHandle">扫码点单</u-button>
|
||||||
>扫码点单</u-button
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -101,68 +116,96 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
|
homeData
|
||||||
|
} from '@/common/api/market/index.js'
|
||||||
|
import {
|
||||||
getMemberConfig,
|
getMemberConfig,
|
||||||
getRechargeConfig,
|
getRechargeConfig,
|
||||||
} from "@/common/api/index/index.js";
|
} from "@/common/api/index/index.js";
|
||||||
import { ref, reactive, defineProps, defineEmits, onMounted } from "vue";
|
import {
|
||||||
import { isJsonArrayString } from "@/utils/util.js";
|
ref,
|
||||||
|
reactive,
|
||||||
// 定义接收的属性
|
defineProps,
|
||||||
const props = 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: {
|
shopExtend: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: [],
|
||||||
},
|
},
|
||||||
});
|
|
||||||
function toFenxiao() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/distribution/shop-detail/index?shopId="+uni.cache.get("shopId"),
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
function toIntegralMall() {
|
function toFenxiao() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/scoreShop/index/index?shopId="+uni.cache.get("shopId"),
|
url: "/distribution/shop-detail/index?shopId=" + uni.cache.get("shopId"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
import { productStore } from "@/stores/user.js";
|
function toIntegralMall() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/scoreShop/index/index?shopId=" + uni.cache.get("shopId"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 显示弹窗
|
import {
|
||||||
const popupShow = ref(false);
|
productStore
|
||||||
const scanCodehandle = (i) => {
|
} from "@/stores/user.js";
|
||||||
|
import {
|
||||||
|
onShow
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
|
||||||
|
// 显示弹窗
|
||||||
|
const popupShow = ref(false);
|
||||||
|
const scanCodehandle = (i) => {
|
||||||
popupShow.value = true;
|
popupShow.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 预点单
|
// 预点单
|
||||||
function beforehandOrderHandle() {
|
function beforehandOrderHandle() {
|
||||||
popupShow.value = false;
|
popupShow.value = false;
|
||||||
let shopUserInfo = uni.cache.get("shopUserInfo");
|
|
||||||
uni.cache.set("dinersNum", 1);
|
uni.cache.set("dinersNum", 1);
|
||||||
uni.cache.set("tableCode", shopUserInfo.id);
|
uni.cache.set("tableCode", shopUserInfo.id);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/product/index?type=beforehand",
|
url: "/pages/product/index?type=beforehand",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 扫码点餐
|
// 扫码点餐
|
||||||
async function scanOrderHandle() {
|
async function scanOrderHandle() {
|
||||||
popupShow.value = false;
|
popupShow.value = false;
|
||||||
const store = productStore();
|
const store = productStore();
|
||||||
await store.scanCodeactions();
|
await store.scanCodeactions();
|
||||||
}
|
}
|
||||||
|
|
||||||
const memberindex = (url) => {
|
const memberindex = (url) => {
|
||||||
uni.pro.navigateTo(url, {
|
uni.pro.navigateTo(url, {
|
||||||
shopId: uni.cache.get("shopId"),
|
shopId: uni.cache.get("shopId"),
|
||||||
type: "index",
|
type: "index",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const shopUserInfo = reactive({})
|
||||||
|
Object.assign(shopUserInfo, uni.cache.get("shopUserInfo") || {})
|
||||||
|
|
||||||
function tomember() {
|
function tomember() {
|
||||||
if (isMember.value) {
|
if (isMember.value) {
|
||||||
const shopUserInfo = uni.cache.get("shopUserInfo") || {};
|
|
||||||
const shopId = uni.cache.get("shopId");
|
const shopId = uni.cache.get("shopId");
|
||||||
if (!shopUserInfo.isVip) {
|
if (!shopUserInfo.isVip) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -179,9 +222,9 @@ function tomember() {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toCharge() {
|
function toCharge() {
|
||||||
if (isCharge.value) {
|
if (isCharge.value) {
|
||||||
const shopId = uni.cache.get("shopId");
|
const shopId = uni.cache.get("shopId");
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -193,8 +236,8 @@ function toCharge() {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getQueryString = (url, name) => {
|
const getQueryString = (url, name) => {
|
||||||
//解码
|
//解码
|
||||||
var reg = new RegExp("(^|&|/?)" + name + "=([^&|/?]*)(&|/?|$)", "i");
|
var reg = new RegExp("(^|&|/?)" + name + "=([^&|/?]*)(&|/?|$)", "i");
|
||||||
var r = url.substr(1).match(reg);
|
var r = url.substr(1).match(reg);
|
||||||
@@ -202,53 +245,82 @@ const getQueryString = (url, name) => {
|
|||||||
return r[2];
|
return r[2];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取会员配置
|
// 获取会员配置
|
||||||
const isMember = ref(0);
|
const isMember = ref(0);
|
||||||
const isCharge = ref(0);
|
const isCharge = ref(0);
|
||||||
async function getVipConfig() {
|
async function getVipConfig() {
|
||||||
try {
|
try {
|
||||||
const res1 = await getMemberConfig({ shopId: uni.cache.get("shopId") });
|
const res1 = await getMemberConfig({
|
||||||
const res2 = await getRechargeConfig({ shopId: uni.cache.get("shopId") });
|
shopId: uni.cache.get("shopId")
|
||||||
|
});
|
||||||
|
const res2 = await getRechargeConfig({
|
||||||
|
shopId: uni.cache.get("shopId")
|
||||||
|
});
|
||||||
|
|
||||||
isMember.value = +res1.memberConfig.isOpen;
|
isMember.value = +res1.memberConfig.isOpen;
|
||||||
isCharge.value = +res2.isEnable;
|
isCharge.value = +res2.isEnable;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
|
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();
|
getVipConfig();
|
||||||
});
|
getHomeData()
|
||||||
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getVipConfig,
|
updateData
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
page {
|
page {
|
||||||
background: #f6f8fa;
|
background: #f6f8fa;
|
||||||
}
|
}
|
||||||
.swiper {
|
|
||||||
|
.swiper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.swiper-bg {
|
.swiper-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content {
|
|
||||||
|
.content {
|
||||||
.contentbox {
|
.contentbox {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1046rpx;
|
height: 430rpx;
|
||||||
|
|
||||||
.bg {
|
.bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -331,11 +403,13 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.popup-content {
|
|
||||||
|
.popup-content {
|
||||||
width: 90vw;
|
width: 90vw;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
||||||
.header-wrap {
|
.header-wrap {
|
||||||
height: 64px;
|
height: 64px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -343,10 +417,12 @@ page {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border-bottom: 1px solid #ececec;
|
border-bottom: 1px solid #ececec;
|
||||||
padding: 0 28upx;
|
padding: 0 28upx;
|
||||||
|
|
||||||
.t {
|
.t {
|
||||||
font-size: 32upx;
|
font-size: 32upx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close {
|
.close {
|
||||||
$size: 60upx;
|
$size: 60upx;
|
||||||
width: $size;
|
width: $size;
|
||||||
@@ -356,23 +432,26 @@ page {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-content {
|
.btn-content {
|
||||||
height: 86px;
|
height: 86px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 60upx;
|
gap: 60upx;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
width: 248upx;
|
width: 248upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.menus {
|
.menus {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 32rpx 40rpx;
|
padding: 32rpx 40rpx;
|
||||||
margin-top: 150rpx;
|
margin-top: 150rpx;
|
||||||
gap: 20rpx;
|
gap: 20rpx;
|
||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
@@ -381,5 +460,164 @@ page {
|
|||||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||||
flex: 1;
|
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>
|
</style>
|
||||||
@@ -2260,7 +2260,7 @@ async function getDiscountActivity() {
|
|||||||
const res = await discountActivityApi.config({
|
const res = await discountActivityApi.config({
|
||||||
shopId: uni.cache.get('shopId')
|
shopId: uni.cache.get('shopId')
|
||||||
});
|
});
|
||||||
if (res) {
|
if (res&&typeof res=='object') {
|
||||||
fullAmountActivity.value = res;
|
fullAmountActivity.value = res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<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>
|
</template>
|
||||||
<view class="sku">
|
<view class="sku">
|
||||||
<view>
|
<view>
|
||||||
@@ -46,14 +47,17 @@
|
|||||||
<view class="title">商品详情</view>
|
<view class="title">商品详情</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-32">
|
<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>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="height: 100px"></view>
|
<view style="height: 100px"></view>
|
||||||
<view class="fixed-bottom u-flex u-row-center">
|
<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>
|
</view>
|
||||||
|
|
||||||
<!-- 兑换确认弹窗start -->
|
<!-- 兑换确认弹窗start -->
|
||||||
@@ -72,31 +76,36 @@
|
|||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<view class="popup-content-top">
|
<view class="popup-content-top">
|
||||||
<text class="color-666">领取方式</text>
|
<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>
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
<view class="u-flex">
|
<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 class="u-flex u-flex-1 u-row-between u-p-l-16 u-col-center">
|
||||||
<view>
|
<view>
|
||||||
<view class="u-font-32 font-bold">这里是商品名称</view>
|
<view class="u-font-32 font-bold">{{item.goodsName}}</view>
|
||||||
<view class="u-m-t-54 color-666">8000积分+9.99元</view>
|
<view class="u-m-t-54 color-666">{{item.requiredPoints}}积分+{{item.extraPrice}}元</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="color-666">X1</text>
|
<text class="color-666">X1</text>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
<up-icon name="info-circle" size="16" color="#FF9900"></up-icon>
|
||||||
<view class="u-m-l-16">优惠券为虚拟发放,一旦兑换不支持退款,请悉知</view>
|
<view class="u-m-l-16">优惠券为虚拟发放,一旦兑换不支持退款,请悉知</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bottom font-bold text-right">
|
<view class="bottom font-bold text-right">
|
||||||
<text>合计 8000积分 + ¥9.99</text>
|
<text>合计 {{item.requiredPoints}}积分 + ¥{{item.extraPrice}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="u-m-t-42 u-flex u-row-center">
|
<view class="u-m-t-42 u-flex u-row-center">
|
||||||
<view class="btn">确认兑换</view>
|
<view class="btn" @click="payExchange">确认兑换</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
@@ -113,6 +122,10 @@
|
|||||||
} from '@/utils/uniapp.js'
|
} from '@/utils/uniapp.js'
|
||||||
import modal from "@/scoreShop/components/modal.vue";
|
import modal from "@/scoreShop/components/modal.vue";
|
||||||
import * as pointGoodsApi from "@/common/api/order/pointGoods.js";
|
import * as pointGoodsApi from "@/common/api/order/pointGoods.js";
|
||||||
|
import couponIcon from "@/components/coupon-icon/index";
|
||||||
|
import {
|
||||||
|
pay
|
||||||
|
} from '@/utils/pay.js'
|
||||||
const imgs = {
|
const imgs = {
|
||||||
bg: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/9fd6a3ad2b384f6cb4e88ed6b77bd334.png",
|
bg: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/9fd6a3ad2b384f6cb4e88ed6b77bd334.png",
|
||||||
};
|
};
|
||||||
@@ -120,11 +133,21 @@
|
|||||||
show: false,
|
show: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function prveImg(url){
|
||||||
|
uni.previewImage({
|
||||||
|
urls:[url]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const popupData = reactive({
|
const popupData = reactive({
|
||||||
show: false,
|
show: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
function exchangeClick() {
|
function exchangeClick() {
|
||||||
|
if (item.extraPrice > 0) {
|
||||||
|
popupData.show = true
|
||||||
|
return
|
||||||
|
}
|
||||||
modalData.show = true;
|
modalData.show = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +155,45 @@
|
|||||||
// modalData.show = false;
|
// modalData.show = false;
|
||||||
exchange()
|
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() {
|
async function exchange() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '兑换中……'
|
title: '兑换中……'
|
||||||
@@ -148,12 +209,12 @@
|
|||||||
openId
|
openId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
modalData.show = false;
|
modalData.show = false;
|
||||||
if(res){
|
if (res) {
|
||||||
uni.setStorageSync('exchange_goods_success',res)
|
uni.setStorageSync('exchange_goods_success', res)
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url:'/scoreShop/success/index'
|
url: '/scoreShop/success/index'
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '兑换失败',
|
title: '兑换失败',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -190,13 +251,13 @@
|
|||||||
}
|
}
|
||||||
const type = item.couponInfo.couponType
|
const type = item.couponInfo.couponType
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
return item.couponInfo.discountAmount + '元代金券' + ' ' + `(满${item.fullAmount}可用)`
|
return item.couponInfo.discountAmount + '元代金券' + ' ' + `(满${item.couponInfo.fullAmount}可用)`
|
||||||
}
|
}
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
return item.couponInfo.discountNum + '件商品兑换' + ' ' + `(满${item.fullAmount}可用)`
|
return item.couponInfo.discountNum + '件商品兑换' + ' ' + `(满${item.couponInfo.fullAmount}可用)`
|
||||||
}
|
}
|
||||||
if (type == 3) {
|
if (type == 3) {
|
||||||
return item.couponInfo.discountRate / 10 + '折' + ' ' + `(满${item.fullAmount}可用)`
|
return item.couponInfo.discountRate / 10 + '折' + ' ' + `(满${item.couponInfo.fullAmount}可用)`
|
||||||
}
|
}
|
||||||
if (type == 4) {
|
if (type == 4) {
|
||||||
return '第二件半价券'
|
return '第二件半价券'
|
||||||
@@ -219,11 +280,27 @@
|
|||||||
if (item.quantity <= 0) {
|
if (item.quantity <= 0) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if(item.limitQuota&&item.boughtCount>=item.limitQuota){
|
if (item.limitQuota && item.boughtCount >= item.limitQuota) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
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) => {
|
onLoad((opt) => {
|
||||||
const exchange_goods = uni.getStorageSync('exchange_goods')
|
const exchange_goods = uni.getStorageSync('exchange_goods')
|
||||||
if (exchange_goods.goodsDescription) {
|
if (exchange_goods.goodsDescription) {
|
||||||
@@ -383,9 +460,13 @@
|
|||||||
height: 184rpx;
|
height: 184rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
background: #d9d9d9;
|
background: #d9d9d9;
|
||||||
|
&.bg-fff{
|
||||||
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
padding: 20rpx 28rpx 20rpx 20rpx;
|
padding: 20rpx 28rpx 20rpx 20rpx;
|
||||||
border-bottom: 1px solid #ededed;
|
border-bottom: 1px solid #ededed;
|
||||||
@@ -403,4 +484,7 @@
|
|||||||
font-size: 700;
|
font-size: 700;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.w-full{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
<view v-for="(item, index) in list" :key="index" @click="toDetail(item)">
|
<view v-for="(item, index) in list" :key="index" @click="toDetail(item)">
|
||||||
<template v-if="layout === 'list'">
|
<template v-if="layout === 'list'">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="img coupon" v-if="item.goodsCategory=='优惠劵'&&item.couponInfo">
|
<view class="img coupon" v-if="item.goodsCategory=='优惠券'&&item.couponInfo">
|
||||||
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
||||||
</view>
|
</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="info">
|
||||||
<view>
|
<view>
|
||||||
<view class="name u-line-1">{{item.goodsName}}</view>
|
<view class="name u-line-1">{{item.goodsName}}</view>
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="layout === 'block'">
|
<template v-if="layout === 'block'">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="img coupon" v-if="item.goodsCategory=='优惠劵'&&item.couponInfo">
|
<view class="img coupon" v-if="item.goodsCategory=='优惠券'&&item.couponInfo">
|
||||||
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
<couponIcon :item="item.couponInfo" typeKey="couponType" />
|
||||||
</view>
|
</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="info">
|
||||||
<view class="name u-line-1">{{item.goodsName}}</view>
|
<view class="name u-line-1">{{item.goodsName}}</view>
|
||||||
<view class="price">
|
<view class="price">
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-col-center u-m-t-16 u-row-between">
|
<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="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 class="btn end" v-else>已兑完</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -64,10 +64,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function toDetail(item) {
|
const numListStyle={
|
||||||
if (!canExchange(item)) {
|
'font-size':'24rpx'
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
const numBlockStyle={
|
||||||
|
'font-size':'24rpx'
|
||||||
|
}
|
||||||
|
|
||||||
|
function toDetail(item) {
|
||||||
uni.setStorageSync('exchange_goods', item)
|
uni.setStorageSync('exchange_goods', item)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/scoreShop/detail/index?id=' + item.id,
|
url: '/scoreShop/detail/index?id=' + item.id,
|
||||||
@@ -129,7 +133,7 @@
|
|||||||
background: #d9d9d9;
|
background: #d9d9d9;
|
||||||
|
|
||||||
&.coupon {
|
&.coupon {
|
||||||
// background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,6 +164,7 @@
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
&.end {
|
&.end {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
background: rgba(153, 153, 153, 0.3);
|
background: rgba(153, 153, 153, 0.3);
|
||||||
@@ -195,7 +200,7 @@
|
|||||||
background: #d9d9d9;
|
background: #d9d9d9;
|
||||||
|
|
||||||
&.coupon {
|
&.coupon {
|
||||||
// background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="list">
|
<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">
|
<view class="u-flex u-row-between">
|
||||||
<text class="color-999">{{item.createTime}}</text>
|
<text class="color-999">{{item.createTime}}</text>
|
||||||
<text class="status " :class="[returnStatusClass(item)]">{{item.status}}</text>
|
<text class="status " :class="[returnStatusClass(item)]">{{item.status}}</text>
|
||||||
@@ -12,13 +12,17 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="u-p-l-36">
|
<view class="u-p-l-36">
|
||||||
<view>{{item.pointsGoodsName}}</view>
|
<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>
|
</view>
|
||||||
<view class="u-m-t-28 u-flex u-row-right btns">
|
<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 look" @click.stop="lookCode(item)" v-if="item.goodsCategory!='优惠券'&&item.status!='已退款'&&item.status!='已完成'">查看券码</view>
|
||||||
<view class="btn black" @click="tuikuan(item)" v-if="canRefund(item)">申请退款</view>
|
<view class="btn black" @click.stop="refund(item)" v-if="canRefund(item)">申请退款</view>
|
||||||
<view class="btn black" @click="cancelRefund(item)" v-if="item.status=='退款中'" >取消退款</view>
|
<view class="btn black" @click.stop="cancelRefund(item)" v-if="item.status=='退款中'" >取消退款</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -39,13 +43,20 @@
|
|||||||
emits("lookCode", item);
|
emits("lookCode", item);
|
||||||
};
|
};
|
||||||
|
|
||||||
function tuikuan(item) {
|
function refund(item) {
|
||||||
emits("refund", item);
|
emits("refund", item);
|
||||||
}
|
}
|
||||||
function cancelRefund(item) {
|
function cancelRefund(item) {
|
||||||
emits("cancelRefund", item);
|
emits("cancelRefund", item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toDetail(item){
|
||||||
|
uni.setStorageSync('points_order_detail',item)
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/scoreShop/order/detail'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function returnStatusClass(item) {
|
function returnStatusClass(item) {
|
||||||
if (item.status == '已完成' || item.status == '已退款') {
|
if (item.status == '已完成' || item.status == '已退款') {
|
||||||
return 'gray'
|
return 'gray'
|
||||||
@@ -59,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function canRefund(item) {
|
function canRefund(item) {
|
||||||
if(item.status=='已退款'|| item.status=='退款中'||item.goodsCategory!='其它商品' ){
|
if(item.status=='已退款'|| item.status=='退款中'||item.goodsCategory!='其它商品' ||item.status=='已完成'){
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -2,17 +2,21 @@
|
|||||||
<view class="min-page bg-f7 color-333 u-font-28">
|
<view class="min-page bg-f7 color-333 u-font-28">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="u-flex u-col-center">
|
<view class="u-flex u-col-center">
|
||||||
<up-image width="208rpx" height="208rpx"></up-image>
|
<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="u-p-l-28 u-flex-1">
|
||||||
<view class="font-bold">这里是商品名称</view>
|
<view class="font-bold">{{item.pointsGoodsName}}</view>
|
||||||
<view class="u-flex u-row-between u-m-t-8">
|
<view class="u-flex u-row-between u-m-t-8">
|
||||||
<text class="color1 font-bold">8000积分</text>
|
<text class="color1 font-bold">{{item.spendPoints}}积分</text>
|
||||||
<text class="status success">已完成</text>
|
<text class="status " :class="[returnStatusClass(item)]">{{item.status}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-8 font-bold color1"> X1 </view>
|
<view class="u-m-t-8 font-bold color1"> X{{item.number}} </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="true">
|
<template v-if="item.goodsCategory=='其它商品'&&item.status!='已退款'">
|
||||||
<view class="u-m-t-16">
|
<view class="u-m-t-16">
|
||||||
<view class="u-flex u-row-center">
|
<view class="u-flex u-row-center">
|
||||||
<up-qrcode cid="ex1" :size="104" :val="qrcode"></up-qrcode>
|
<up-qrcode cid="ex1" :size="104" :val="qrcode"></up-qrcode>
|
||||||
@@ -20,10 +24,7 @@
|
|||||||
<view class="u-m-t-22 u-flex u-row-center">
|
<view class="u-m-t-22 u-flex u-row-center">
|
||||||
<text>{{ qrcode }}</text>
|
<text>{{ qrcode }}</text>
|
||||||
<view @click="copyCode">
|
<view @click="copyCode">
|
||||||
<image
|
<image src="/scoreShop/static/image/copy.png" class="u-m-l-24 copy"></image>
|
||||||
src="/scoreShop/static/image/copy.png"
|
|
||||||
class="u-m-l-24 copy"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -31,126 +32,252 @@
|
|||||||
|
|
||||||
<view class="u-m-t-16">
|
<view class="u-m-t-16">
|
||||||
<text class="color-666">领取方式</text>
|
<text class="color-666">领取方式</text>
|
||||||
<text class="u-m-l-20">需前往店铺自行兑换领取</text>
|
<text class="u-m-l-20" v-if="item.goodsCategory=='其它商品'">需前往店铺自行兑换领取</text>
|
||||||
|
<text class="u-m-l-20" v-else>系统发放</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="u-flex u-row-between item">
|
<view class="u-flex u-row-between item">
|
||||||
<text>兑换商品:</text>
|
<text>兑换商品:</text>
|
||||||
<text class="color-666">这里是商品名称</text>
|
<text class="color-666">{{item.pointsGoodsName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between item">
|
<view class="u-flex u-row-between item">
|
||||||
<text>兑换数量:</text>
|
<text>兑换数量:</text>
|
||||||
<text class="color-666">1份</text>
|
<text class="color-666">{{item.number}}份</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between item">
|
<view class="u-flex u-row-between item">
|
||||||
<text>消耗积分:</text>
|
<text>消耗积分:</text>
|
||||||
<text class="color-666">800</text>
|
<text class="color-666">{{item.spendPoints}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between item">
|
<view class="u-flex u-row-between item">
|
||||||
<text>支付金额:</text>
|
<text>支付金额:</text>
|
||||||
<text class="color-666">9.99元</text>
|
<text class="color-666">{{item.extraPaymentAmount}}元</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between item">
|
<view class="u-flex u-row-between item">
|
||||||
<text>下单时间:</text>
|
<text>下单时间:</text>
|
||||||
<text class="color-666">2025-12-3 17:19:32</text>
|
<text class="color-666">{{item.createTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between item">
|
<view class="u-flex u-row-between item">
|
||||||
<text>核销时间:</text>
|
<text>核销时间:</text>
|
||||||
<text class="color-666">2025-12-04 01:13:14</text>
|
<text class="color-666">{{item.checkoutTime||''}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between item">
|
<view class="u-flex u-row-between item">
|
||||||
<text>订单号:</text>
|
<text>订单号:</text>
|
||||||
<text class="color-666">DH202511300001</text>
|
<text class="color-666">{{item.orderNo}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
<view class="btn cancel">申请退款</view>
|
<view class="btn cancel" @click="refund(item)" v-if="canRefund(item)">申请退款</view>
|
||||||
<view class="btn success ">取消退款</view>
|
<view class="btn success " @click="cancelRefund(item)" v-if="item.status=='退款中'">取消退款</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
const qrcode = ref("251202150055");
|
import couponIcon from "@/components/coupon-icon/index";
|
||||||
function copyCode() {
|
import * as pointGoodsApi from "@/common/api/order/pointGoods.js";
|
||||||
|
const qrcode = ref();
|
||||||
|
|
||||||
|
function copyCode() {
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
data: qrcode.value,
|
data: qrcode.value,
|
||||||
success: function () {
|
success: function() {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "复制成功",
|
title: "复制成功",
|
||||||
icon: "none",
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.min-page {
|
.min-page {
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
}
|
}
|
||||||
.top {
|
|
||||||
|
.top {
|
||||||
padding: 32rpx 24rpx;
|
padding: 32rpx 24rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.color1 {
|
.color1 {
|
||||||
color: #9c571f;
|
color: #9c571f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
padding: 8rpx 18rpx;
|
padding: 8rpx 18rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
border: 2rpx solid transparent;
|
border: 2rpx solid transparent;
|
||||||
|
|
||||||
&.success {
|
&.success {
|
||||||
background: rgba(123, 209, 54, 0.12);
|
background: rgba(123, 209, 54, 0.12);
|
||||||
border-color: #7bd136;
|
border-color: #7bd136;
|
||||||
color: #7bd136;
|
color: #7bd136;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.gray {
|
&.gray {
|
||||||
background: #9999991f;
|
background: #9999991f;
|
||||||
border-color: #999;
|
border-color: #999;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.error {
|
&.error {
|
||||||
background: #ff1c1c2e;
|
background: #ff1c1c2e;
|
||||||
border-color: #ff1c1c;
|
border-color: #ff1c1c;
|
||||||
color: #ff1c1c;
|
color: #ff1c1c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.copy {
|
|
||||||
|
.copy {
|
||||||
width: 28rpx;
|
width: 28rpx;
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
}
|
}
|
||||||
.bottom {
|
|
||||||
|
.bottom {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
padding: 16rpx 28rpx;
|
padding: 16rpx 28rpx;
|
||||||
margin-top: 48rpx;
|
margin-top: 48rpx;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
padding: 16rpx 0;
|
padding: 16rpx 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btns {
|
|
||||||
|
.btns {
|
||||||
margin-top: 66rpx;
|
margin-top: 66rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 48rpx;
|
gap: 48rpx;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
border: 2rpx solid transparent;
|
border: 2rpx solid transparent;
|
||||||
border-radius: 100rpx;
|
border-radius: 100rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 14rpx 76rpx;
|
padding: 14rpx 76rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|
||||||
&.success {
|
&.success {
|
||||||
background-color: #e8ad7b;
|
background-color: #e8ad7b;
|
||||||
border-color: #e8ad7b;
|
border-color: #e8ad7b;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.cancel {
|
&.cancel {
|
||||||
border-color: #e8ad7b;
|
border-color: #e8ad7b;
|
||||||
color: #e8ad7b;
|
color: #e8ad7b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
value: "unevaluated",
|
value: "unevaluated",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "已核销",
|
name: "已完成",
|
||||||
value: "evaluated",
|
value: "evaluated",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
function getList() {
|
function getList() {
|
||||||
const status = tabs.list.find(v => v.value == tabs.sel)
|
const status = tabs.list.find(v => v.value == tabs.sel)
|
||||||
pointGoodsApi.recordPage({
|
pointGoodsApi.recordPage({
|
||||||
...query,
|
...query,status:tabs.sel?status.name:''
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const newList = res.records
|
const newList = res.records
|
||||||
if (query.page == 1) {
|
if (query.page == 1) {
|
||||||
|
|||||||
@@ -27,9 +27,13 @@
|
|||||||
<text class="color-666">消耗积分:</text>
|
<text class="color-666">消耗积分:</text>
|
||||||
<text>{{item.spendPoints}}</text>
|
<text>{{item.spendPoints}}</text>
|
||||||
</view>
|
</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">
|
<view class="u-p-22">
|
||||||
<text class="color-666">下单时间:</text>
|
<text class="color-666">下单时间:</text>
|
||||||
<text>{{item.checkoutTime}}</text>
|
<text>{{item.createTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-p-22">
|
<view class="u-p-22">
|
||||||
<text class="color-666">订单号:</text>
|
<text class="color-666">订单号:</text>
|
||||||
|
|||||||
Reference in New Issue
Block a user