This commit is contained in:
2025-06-04 08:55:14 +08:00
parent 4a945c763f
commit d6306fd462
14 changed files with 300 additions and 58 deletions

View File

@@ -2,6 +2,7 @@
import {reactive, ref} from "vue";
import {Message} from "@arco-design/web-vue";
import Api from "../../api/index.ts";
import {QrcodeCanvas} from "qrcode.vue";
const {money} = defineProps({
money: {
@@ -21,7 +22,7 @@ const open = () => {
}
const initQR = async () => {
const {data} = await Api.merchant.rechargeOrderQR({
const {data: {data}} = await Api.merchant.rechargeOrderQR({
money: money,
});
Object.assign(qrInfo, data);
@@ -46,10 +47,10 @@ const initQR = async () => {
</div>
<div class="text-center mt-[20px]">打开支付宝扫描下方二维码支付</div>
<div class="w-[200px] aspect-square mx-auto mt-[5px]">
<img class="w-full h-full object-cover" src="" alt=""/>
<qrcode-canvas size="200" :value="qrInfo.qr_code"></qrcode-canvas>
</div>
<div class="flex justify-center mt-[5px] flex-col items-center">
<a-link :hoverable="false" style="color: var(--color-neutral-6)">
<a-link :hoverable="false" style="color: var(--color-neutral-6)" @click="initQR">
<icon-sync class="mr-[5px]"/>
点击刷新
</a-link>

View File

@@ -0,0 +1,41 @@
<script setup lang="ts">
import {nextTick, ref, useTemplateRef} from "vue";
const inputTagRef = useTemplateRef('inputTagRef');
const modelValue = defineModel();
const input = ref('');
const changeInput = (e) => {
if (e.match(/#(\S+?)(?=\s)/g)) {
modelValue.value.push(...e.match(/#(\S+?)(?=\s)/g).map(tag => tag.slice(1)));
input.value = null;
nextTick(() => {
inputTagRef.value.blur();
nextTick(() => {
inputTagRef.value.focus();
})
})
}
}
const pressEnter = () => {
modelValue.value = modelValue.value.filter(v => v.match(/#(\S+?)(?=\s)/g));
}
</script>
<template>
<a-input-tag
ref="inputTagRef"
:retain-input-value="false"
@press-enter="pressEnter"
@input-value-change="changeInput"
v-model:model-value="modelValue"
v-model:input-value="input"
placeholder="请输入话题"
unique-value>
</a-input-tag>
</template>
<style scoped lang="scss">
</style>

View File

@@ -27,7 +27,7 @@ const verifyPhone = async () => {
if (timer === null) {
const {msg, code} = await api(mobile, type);
if (code === 1) Message.success(msg);
time.value = 10;
time.value = 60;
timer = setInterval(() => {
if (time.value <= 0) {
time.value = null;