feat:迁移

This commit is contained in:
dzc committed 2026-03-26 11:03:45 +08:00
1 parent d87d1b5f8d
commit 3f4e389b33
63 files changed
+502 -108

No files matched your search

+3 -1
View File
@@ -2,6 +2,8 @@
import { ref, reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import { SERVICE_IMAGE } from "@@/constant/index"
import { filePath } from "@@/utils/file"
import { hooks } from "@@/index"
import { walletApi } from "@@/api"
@@ -43,7 +45,7 @@ const doTab = (e: any) => {
</script>
<template>
<crud-layout title="饭卡" bg="/static/page/blue-bg.png">
<crud-layout title="饭卡" :bg="filePath(SERVICE_IMAGE.blueBg)">
<z-paging ref="pageRef" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="10"
safe-area-inset-bottom :loading-more-enabled="true" :show-scrollbar="false" @query="query"
:auto-clean-list-when-reload="false" :auto-scroll-to-top-when-reload="false" @scroll="pageHook.scroll">
+2 -1
View File
@@ -5,6 +5,7 @@ import uqrcode from "@@/utils/uqrcode"
import { hooks, router } from "@@/index"
import { walletApi } from "@@/api"
import { SERVICE_IMAGE } from "@@/constant/index"
import { filePath } from "@@/utils/file"
import { usePayStore } from "@/sheep/stores/pay"
@@ -139,7 +140,7 @@ const doTransferMoney = (v: any) => {
</script>
<template>
<crud-layout title="我的钱包" bg="/static/page/blue-bg.png">
<crud-layout title="我的钱包" :bg="filePath(SERVICE_IMAGE.blueBg)">
<z-paging ref="pageRef" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="5"
safe-area-inset-bottom :loading-more-enabled="true" :show-scrollbar="false" @query="query"
:auto-clean-list-when-reload="false" :auto-scroll-to-top-when-reload="false" @scroll="pageHook.scroll">
+23 -15
View File
@@ -4,19 +4,21 @@ import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import { hooks, constant } from "@@/index"
import { walletApi, payApi } from "@@/api"
import { walletApi, payApi, miniPlatformApi, type MiniPayDto } from "@@/api"
import { SERVICE_IMAGE, storageConstant } from "@@/constant/index"
import { filePath } from "@@/utils/file"
import { getMiniUniqueCode } from "@@/utils/mini-tool"
const data = {
payType: [
// { text: "模拟支付", disabled: false, type: "0", value: "mock" },
{ text: "微信支付", disabled: false, type: "1", value: "wx_pub" },
// { text: "支付宝支付", disabled: false, type: "2", value: "alipay_wap" },
{ text: "微信支付", disabled: false, type: "0", value: "WECHAT" },
// { text: "支付宝支付", disabled: false, type: "1", value: "ALI_PAY" },
],
}
const state = reactive<any>({
walletId: null,
currentPayType: "1",
currentPayType: "0",
currentRecharge: 0,
userInfo: {},
detail: {},
@@ -65,15 +67,21 @@ const doPay = async () => {
const targetRecharge = state.rechargeList[state.currentRecharge]
const targetPayType = data.payType[state.currentPayType]
if (isEmpty(targetRecharge)) throw new Error()
// const _pa = {
// payPrice: targetRecharge.payPrice,
// walletId: state.walletId,
// packageId: targetRecharge.id,
// }
// const { data: createData, code: createCode }: any = await walletApi.recharge(_pa)
// if (createCode != 0) throw new Error()
const uniqueCode = await getMiniUniqueCode(false)
console.log("uniqueCode:", uniqueCode);
const payParams: MiniPayDto = {
bizType: "MINI_APP_WALLET_RECHARGE",
bizId: targetRecharge.id,
miniPlatformType: targetPayType.value,
openId: uniqueCode,
}
const { data: createData, code: createCode }: any = await miniPlatformApi.miniPay(payParams)
if (createCode != 0) throw new Error()
const paymentResult = await uni.requestPayment({
provider: 'wxpay',
...createData?.miniAppPayParams ?? {},
});
console.log("paymentResult:", paymentResult);
getDetail()
uni.hideLoading()
uni.showToast({ title: "充值成功", icon: "none" })
@@ -86,7 +94,7 @@ const doPay = async () => {
</script>
<template>
<crud-layout title="充值" bg="/static/page/blue-bg.png">
<crud-layout title="充值" :bg="filePath(SERVICE_IMAGE.blueBg)">
<view class="h-30rpx" />
<view class="flex-row items-center justify-between h-120rpx p-x-30rpx bg-#222222 rounded-20rpx">
<view class="flex-row items-center">