增加查看券码弹窗
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<up-popup :show="show" mode="center" :safeAreaInsetBottom="mode==='bottom'?true:false">
|
<up-popup
|
||||||
|
:show="show"
|
||||||
|
mode="center"
|
||||||
|
:safeAreaInsetBottom="mode === 'bottom' ? true : false"
|
||||||
|
>
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<view class="top u-flex u-row-between">
|
<view class="top u-flex u-row-between">
|
||||||
<text class="font-bold u-font-32 color-333">{{ title }}</text>
|
<text class="font-bold u-font-32 color-333">{{ title }}</text>
|
||||||
@@ -10,12 +14,14 @@
|
|||||||
<scroll-view style="max-height: 50vh" :scroll-y="true">
|
<scroll-view style="max-height: 50vh" :scroll-y="true">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<up-line></up-line>
|
<template v-if="showBottom">
|
||||||
|
<up-line></up-line>
|
||||||
|
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="btn cancel" @click="close">{{ cancelText }}</view>
|
<view class="btn cancel" @click="close">{{ cancelText }}</view>
|
||||||
<view class="btn success" @click="confirm">{{ confirmText }}</view>
|
<view class="btn success" @click="confirm">{{ confirmText }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
</view>
|
</view>
|
||||||
@@ -39,6 +45,10 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: "取消",
|
default: "取消",
|
||||||
},
|
},
|
||||||
|
showBottom: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const show = defineModel({
|
const show = defineModel({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|||||||
@@ -13,13 +13,20 @@
|
|||||||
</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">查看券码</view>
|
<view class="btn look" @click="lookCode">查看券码</view>
|
||||||
<view class="btn black">申请退款</view>
|
<view class="btn black">申请退款</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
const emits = defineEmits(["lookCode"]);
|
||||||
|
const lookCode = () => {
|
||||||
|
emits("lookCode");
|
||||||
|
};
|
||||||
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.list {
|
.list {
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
|
|||||||
@@ -14,26 +14,62 @@
|
|||||||
</view>
|
</view>
|
||||||
<template v-if="true">
|
<template v-if="true">
|
||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
<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"
|
src="/scoreShop/static/image/copy.png"
|
||||||
class="u-m-l-24 copy"
|
class="u-m-l-24 copy"
|
||||||
></image>
|
></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<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">需前往店铺自行兑换领取</text>
|
||||||
</view>
|
</view>
|
||||||
</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="btns">
|
||||||
|
<view class="btn cancel">申请退款</view>
|
||||||
|
<view class="btn success ">取消退款</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -86,4 +122,35 @@ function copyCode() {
|
|||||||
width: 28rpx;
|
width: 28rpx;
|
||||||
height: 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>
|
</style>
|
||||||
|
|||||||
@@ -13,12 +13,51 @@
|
|||||||
</view>
|
</view>
|
||||||
</up-sticky>
|
</up-sticky>
|
||||||
|
|
||||||
<orderList :list="list" />
|
<orderList :list="list" @lookCode="lookCode" />
|
||||||
|
|
||||||
|
<modal v-model="modalData.show" title="立即兑换确认" :showBottom="false">
|
||||||
|
<view class="u-p-28">
|
||||||
|
<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>
|
||||||
|
</modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import modal from "@/scoreShop/components/modal.vue";
|
||||||
import orderList from "./components/order-list.vue";
|
import orderList from "./components/order-list.vue";
|
||||||
|
const modalData = reactive({
|
||||||
|
show: false,
|
||||||
|
});
|
||||||
|
const qrcode = ref("daddadaddad");
|
||||||
|
|
||||||
|
function copyCode() {
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: qrcode.value,
|
||||||
|
success: function () {
|
||||||
|
uni.showToast({
|
||||||
|
title: "复制成功",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function lookCode() {
|
||||||
|
modalData.show = true;
|
||||||
|
}
|
||||||
const tabs = reactive({
|
const tabs = reactive({
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
@@ -59,4 +98,8 @@ const list = ref([]);
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.copy {
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user