feat:支付宝支付
This commit is contained in:
1 parent
8d07d19452
commit
5800a0c76c
16 files changed
+4319
-11
No files matched your search
@@ -58,6 +58,7 @@
|
||||
"base64-utf8": "^1.0.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dayjs": "^1.11.19",
|
||||
"lottie-web": "^5.13.0",
|
||||
"luch-request": "^3.1.1",
|
||||
"pinia": "^3.0.4",
|
||||
"radash": "^12.1.1",
|
||||
|
||||
Generated
+8
@@ -71,6 +71,9 @@ importers:
|
||||
dayjs:
|
||||
specifier: ^1.11.19
|
||||
version: 1.11.19
|
||||
lottie-web:
|
||||
specifier: ^5.13.0
|
||||
version: 5.13.0
|
||||
luch-request:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
@@ -3074,6 +3077,9 @@ packages:
|
||||
lodash@4.17.21:
|
||||
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
|
||||
|
||||
lottie-web@5.13.0:
|
||||
resolution: {integrity: sha512-+gfBXl6sxXMPe8tKQm7qzLnUy5DUPJPKIyRHwtpCpyUEYjHYRJC/5gjUvdkuO2c3JllrPtHXH5UJJK8LRYl5yQ==}
|
||||
|
||||
lru-cache@5.1.1:
|
||||
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
|
||||
|
||||
@@ -8373,6 +8379,8 @@ snapshots:
|
||||
|
||||
lodash@4.17.21: {}
|
||||
|
||||
lottie-web@5.13.0: {}
|
||||
|
||||
lru-cache@5.1.1:
|
||||
dependencies:
|
||||
yallist: 3.1.1
|
||||
|
||||
@@ -173,6 +173,13 @@
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "recharge-done",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="w-full absolute bottom-30rpx flex-col-center">
|
||||
<view class="w-full absolute bottom-30rpx flex-col-center gap-10rpx">
|
||||
<affirm-text />
|
||||
<copyright-text />
|
||||
</view>
|
||||
|
||||
<tm-modal :show="state.accountShow" :showCancel="false" title="警告" zIndex="999" @confirm="" @cancel=""
|
||||
@@ -51,7 +52,10 @@
|
||||
@click="doPhone(v)">
|
||||
<view class="flex items-center justify-between">
|
||||
<text class="iconfont icon-kefu1 font-size-50rpx! color-blue"></text>
|
||||
<text class="m-l-15rpx theme-text-28 color-blue! underline underline-1 underline-solid underline-blue">{{ v }}</text>
|
||||
<text
|
||||
class="m-l-15rpx theme-text-28 color-blue! underline underline-1 underline-solid underline-blue">{{
|
||||
v
|
||||
}}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-kefu color-blue font-size-40rpx!"></text>
|
||||
</view>
|
||||
@@ -71,6 +75,7 @@ import { getAppVersionCode } from "@@/utils/appTool"
|
||||
|
||||
import AffirmText from "@/sheep/components/common/affirm-text.vue"
|
||||
import AppHotUpdate from "@/sheep/components/app-version/app-hot-update.vue"
|
||||
import CopyrightText from "@/sheep/components/common/copyright-text.vue"
|
||||
|
||||
const dynamicMenuList = computed(() => {
|
||||
return state.menuList.filter(item => item.visible)
|
||||
|
||||
@@ -13,6 +13,7 @@ const state = reactive<any>({
|
||||
pa: {
|
||||
pagesize: 10,
|
||||
type: "1",
|
||||
name: '',
|
||||
},
|
||||
})
|
||||
|
||||
@@ -63,6 +64,12 @@ const reportPageAccess = async (pageCode: string) => {
|
||||
osVersion: systemInfo?.system || "",
|
||||
})
|
||||
}
|
||||
const search = () => {
|
||||
pageRef.value && pageRef.value.reload(false)
|
||||
}
|
||||
const inputClear = () => {
|
||||
pageRef.value && pageRef.value.reload(false)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -70,6 +77,16 @@ const reportPageAccess = async (pageCode: string) => {
|
||||
<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">
|
||||
<template #top>
|
||||
<tm-input class="mt-2" v-model="state.pa.name" type="text" height="72" minHeight="72" fontSize="28"
|
||||
:showClear="true" :focus="false" placeholder="请输入商户名"
|
||||
style="border: 4rpx solid #0779fd; border-radius: 14rpx" :focus-highlight="false" color="#ECF4F9"
|
||||
@clear="inputClear">
|
||||
<template v-slot:rightIcon>
|
||||
<tm-button class="mr-1 px-3 py-26rpx text-30rpx!" size="xs" @click="search">搜 索</tm-button>
|
||||
</template>
|
||||
</tm-input>
|
||||
</template>
|
||||
<view class="h-20rpx" />
|
||||
<view class="flex-row card p-20rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i" @tap="toDetail(v)">
|
||||
<image class="w-180rpx h-180rpx rounded-12rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<crud-layout title="我的" mainIsScroll bg="/static/page/blue-bg.png" navRightIcon="setting"
|
||||
<crud-layout title="我的" mainIsScroll bg="/static/page/blue-bg.png" navRightIcon="setting" :mainIsScroll="false"
|
||||
@navRightClick="onNavRightClick">
|
||||
<template #main-top>
|
||||
<view class="flex items-center justify-between py-3 mx-30rpx">
|
||||
@@ -326,7 +326,7 @@ const onTabMenu = async (item: any) => {
|
||||
case "核销":
|
||||
await appScanCode()
|
||||
break
|
||||
case "商品管理":
|
||||
case "商品":
|
||||
await gotoOnlineDishManage()
|
||||
break
|
||||
default:
|
||||
@@ -392,14 +392,14 @@ const hasRoleCode = (code: string) => {
|
||||
return Array.isArray(roleCodes) && roleCodes.includes(code)
|
||||
}
|
||||
|
||||
/** 按角色在「钱包 / 喜好」之后插入:商品管理、订单管理、骑手配送 */
|
||||
/** 按角色在「钱包 / 喜好」之后插入:商品、订单管理、骑手配送 */
|
||||
const syncRoleMenus = () => {
|
||||
const roleLabels = new Set(["商品管理", "订单管理", "配送"])
|
||||
const roleLabels = new Set(["商品", "商家", "配送"])
|
||||
const base = (state.menuList || []).filter((x: any) => !roleLabels.has(x?.text))
|
||||
const roleEntries: any[] = []
|
||||
if (hasRoleCode("ONLINE_CANTEEN_MCH")) {
|
||||
roleEntries.push({ text: "商品管理", icon: "/static/icon/service_2.png", path: "/pages/merchant/online-dish-manage" })
|
||||
roleEntries.push({ text: "订单管理", icon: "/static/icon/service_1.png", path: "/pages/canteen-delivery/mch-list" })
|
||||
roleEntries.push({ text: "商品", icon: "/static/icon/service_12.png", path: "/pages/merchant/online-dish-manage" })
|
||||
roleEntries.push({ text: "商家", icon: "/static/icon/service_1.png", path: "/pages/canteen-delivery/mch-list" })
|
||||
}
|
||||
if (hasRoleCode("CANTEEN_RIDER")) {
|
||||
roleEntries.push({ text: "配送", icon: "/static/icon/service_11.png", path: "/pages/canteen-delivery/list" })
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, reactive } from "vue"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
|
||||
import { hooks, constant, router } from "@@/index"
|
||||
import { payApi } from "@@/api"
|
||||
import AppLottiePlayer from "@@/components/common/app-lottie-player.vue"
|
||||
import InformationStreamAd from "@@/components/ad/information-stream-ad.vue"
|
||||
|
||||
import loadingAnimation from "@/static/lottie-json/loading.json"
|
||||
import successAnimation from "@/static/lottie-json/success.json"
|
||||
import errorAnimation from "@/static/lottie-json/fail.json"
|
||||
|
||||
type ResultPhase = "loading" | "success" | "error"
|
||||
|
||||
const { serviceEnum } = constant
|
||||
|
||||
const state = reactive<any>({
|
||||
phase: "loading" as ResultPhase,
|
||||
payNo: "",
|
||||
payOrder: {},
|
||||
failMessage: "",
|
||||
})
|
||||
|
||||
const titleText = computed(() => {
|
||||
if (state.phase === "loading") return "充值结果确认中"
|
||||
return state.phase === "success" ? "充值成功" : "充值失败"
|
||||
})
|
||||
|
||||
const descText = computed(() => {
|
||||
if (state.phase === "loading") return "正在查询订单状态,请稍候..."
|
||||
if (state.phase === "success") return "充值金额已到账,可前往钱包查看最新余额"
|
||||
return state.failMessage || "未查询到本次充值结果,请稍后在充值记录中确认"
|
||||
})
|
||||
|
||||
const currentAnimation = computed(() => {
|
||||
if (state.phase === "loading") return loadingAnimation
|
||||
return state.phase === "success" ? successAnimation : errorAnimation
|
||||
})
|
||||
|
||||
const currentLoop = computed(() => state.phase === "loading")
|
||||
|
||||
const currentAnimationSize = computed(() => {
|
||||
if (state.phase === "loading") {
|
||||
return { width: "140rpx", height: "140rpx" }
|
||||
}
|
||||
if (state.phase === "success") {
|
||||
return { width: "280rpx", height: "280rpx" }
|
||||
}
|
||||
return { width: "280rpx", height: "280rpx" }
|
||||
})
|
||||
|
||||
const payOrderAmount = computed(() => Number(state.payOrder?.price || 0))
|
||||
|
||||
const mchNameText = computed(() => state.payOrder?.mchName || "--")
|
||||
|
||||
const payTypeText = computed(() => {
|
||||
const text = serviceEnum.appPlusPlatformTypeEnum?.[state.payOrder?.payPlatformType]
|
||||
return text ? `${text}支付` : "--"
|
||||
})
|
||||
|
||||
const getPayOrder = async () => {
|
||||
try {
|
||||
const res: any = await payApi.getByPayNo({ payNo: state.payNo })
|
||||
state.payOrder = res?.data || {}
|
||||
if (!state.payOrder) {
|
||||
state.failMessage = "未查询到本次充值订单"
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (["20", "200"].includes(state.payOrder.status)) {
|
||||
state.phase = "success"
|
||||
} else {
|
||||
state.phase = "error"
|
||||
}
|
||||
}, 1000)
|
||||
} catch (error) {
|
||||
console.error("查询支付订单意外的错误:", error)
|
||||
}
|
||||
}
|
||||
|
||||
onLoad((options: any) => {
|
||||
state.payNo = options.payNo || ""
|
||||
if (state.payNo) {
|
||||
getPayOrder()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<crud-layout title="充值结果" bg="/static/page/blue-bg.png">
|
||||
<view class="h-30rpx" />
|
||||
<view class="bg-white rounded-24rpx shadow-main px-30rpx pt-10rpx pb-24rpx">
|
||||
<view class="flex-col-center pt-10rpx pb-20rpx h-500rpx">
|
||||
<view class="flex-row-center size-280rpx">
|
||||
<AppLottiePlayer :animationData="currentAnimation" :width="currentAnimationSize.width"
|
||||
:height="currentAnimationSize.height" :loop="currentLoop" />
|
||||
</view>
|
||||
|
||||
<view class="text-38rpx font-700 color-#222">{{ titleText }}</view>
|
||||
<view class="mt-10rpx text-24rpx color-#8a94a6 text-center">{{ descText }}</view>
|
||||
<view class="text-58rpx font-700 color-#222">¥{{ hooks.useMoney(payOrderAmount) }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pt-10rpx">
|
||||
<view class="flex items-center justify-between py-16rpx">
|
||||
<text class="text-26rpx color-#8a94a6">商户</text>
|
||||
<text class="text-28rpx color-#333 font-500 max-w-380rpx text-right">{{ mchNameText }}</text>
|
||||
</view>
|
||||
<view class="flex items-center justify-between py-16rpx">
|
||||
<text class="text-26rpx color-#8a94a6">充值方式</text>
|
||||
<text class="text-28rpx color-#333 font-500 max-w-380rpx text-right">
|
||||
{{ payTypeText }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="flex items-center justify-between py-16rpx">
|
||||
<text class="text-26rpx color-#8a94a6">订单状态</text>
|
||||
<text class="text-28rpx font-500 max-w-380rpx text-right"
|
||||
:class="state.phase === 'success' ? 'color-#1dbb84' : state.phase === 'error' ? 'color-#ff5a5f' : 'color-#0094ff'">
|
||||
{{ state.phase === "loading" ? "确认中" : state.phase === "success" ? "已到账" : "未完成" }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="state.phase !== 'loading'"
|
||||
class="fixed left-30rpx right-30rpx bottom-30rpx z-20 flex flex-col items-center gap-20rpx">
|
||||
<!-- 广告 -->
|
||||
<information-stream-ad class="w-full" />
|
||||
<view v-if="state.phase === 'success'"
|
||||
class="w-full h-88rpx rounded-full flex items-center justify-center text-30rpx font-700 color-white! bg-gradient-to-r from-#0094ff to-#36b4ff shadow-[0_16rpx_32rpx_rgba(0,148,255,0.18)]"
|
||||
@tap="router.jump('/pages/wallet/list', {}, 2)">
|
||||
查看钱包
|
||||
</view>
|
||||
<view v-else
|
||||
class="w-full h-88rpx rounded-full flex items-center justify-center text-30rpx font-700 color-white! bg-gradient-to-r from-#0094ff to-#36b4ff shadow-[0_16rpx_32rpx_rgba(0,148,255,0.18)]"
|
||||
@tap="getPayOrder">
|
||||
重新查询
|
||||
</view>
|
||||
</view>
|
||||
</crud-layout>
|
||||
</template>
|
||||
@@ -12,9 +12,11 @@ const isPay = computed(() => {
|
||||
|
||||
|
||||
const state = reactive<any>({
|
||||
payNo: '',
|
||||
|
||||
payType: [],
|
||||
walletId: null,
|
||||
currentPayType: "10",
|
||||
currentPayType: null,
|
||||
currentRecharge: 0,
|
||||
userInfo: {},
|
||||
detail: {},
|
||||
@@ -63,7 +65,10 @@ const getUserPayTypeList = async () => {
|
||||
},)
|
||||
}
|
||||
}
|
||||
state.currentPayType = state.payType[0].type
|
||||
const defaultPayType = state.payType[0].type
|
||||
if (defaultPayType && !state.currentPayType) {
|
||||
state.currentPayType = defaultPayType
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -114,6 +119,7 @@ const doPay = async () => {
|
||||
await disposeAlipay(targetRecharge.id)
|
||||
}
|
||||
uni.hideLoading()
|
||||
router.jump("/pages/wallet/recharge-done", { payNo: state.payNo }, 2)
|
||||
} catch (error: any) {
|
||||
console.error("充值意外的错误:", error)
|
||||
uni.hideLoading()
|
||||
@@ -147,6 +153,7 @@ const disposeAlipay = async (bizId: any) => {
|
||||
if (createCode != 0) {
|
||||
throw new Error(createData?.msg ?? "支付宝充值发起失败")
|
||||
}
|
||||
state.payNo = createData?.payNo ?? ""
|
||||
const paymentResult = await uni.requestPayment({
|
||||
provider: 'alipay',
|
||||
...createData?.appPlusPayParams ?? {},
|
||||
@@ -178,12 +185,22 @@ const disposeWxpay = async (bizId: any) => {
|
||||
openId: "",
|
||||
}
|
||||
const { data: createData, code: createCode }: any = await appPlusPlatformApi.miniPay(payParams)
|
||||
console.log("微信支付createData:", createData);
|
||||
if (createCode != 0) {
|
||||
throw new Error(createData?.msg ?? "微信充值发起失败")
|
||||
}
|
||||
state.payNo = createData?.payNo ?? ""
|
||||
const paymentResult = await uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
...createData?.appPlusPayParams ?? {},
|
||||
orderInfo: {
|
||||
"appid": createData?.appPlusPayParams?.appid,
|
||||
"noncestr": createData?.appPlusPayParams?.nonceStr,
|
||||
"package": createData?.appPlusPayParams?.packageVal,
|
||||
"partnerid": createData?.appPlusPayParams?.partnerId,
|
||||
"prepayid": createData?.appPlusPayParams?.prepayId,
|
||||
"timestamp": createData?.appPlusPayParams?.timestamp,
|
||||
"sign": createData?.appPlusPayParams?.sign,
|
||||
},
|
||||
});
|
||||
console.log("微信支付requestPayment返回:", paymentResult);
|
||||
if (paymentResult.errMsg && paymentResult.errMsg.includes("requestPayment:ok")) {
|
||||
|
||||
@@ -73,4 +73,13 @@ export default {
|
||||
data,
|
||||
})
|
||||
},
|
||||
// 查询支付订单
|
||||
getByPayNo: (params): Promise<any> => {
|
||||
return request({
|
||||
url: "/third/third-app-pay/app/get-by-pay-no",
|
||||
method: "GET",
|
||||
params,
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onBeforeUnmount, ref, watch } from "vue"
|
||||
import lottie from "lottie-web"
|
||||
|
||||
type LottieRenderer = "svg" | "canvas" | "html"
|
||||
declare const rdLottie: any
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
animationData: Record<string, any> | null
|
||||
autoplay?: boolean
|
||||
loop?: boolean | number
|
||||
renderer?: LottieRenderer
|
||||
width?: string
|
||||
height?: string
|
||||
}>(), {
|
||||
autoplay: true,
|
||||
loop: false,
|
||||
renderer: "svg",
|
||||
width: "260rpx",
|
||||
height: "260rpx",
|
||||
})
|
||||
|
||||
const containerRef = ref<any>(null)
|
||||
const containerId = `app-lottie-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`
|
||||
const lottiePlayer: any = (lottie as any)?.loadAnimation ? lottie : (lottie as any)?.default
|
||||
let animationInstance: any = null
|
||||
|
||||
// #ifdef APP-VUE
|
||||
const payload = computed(() => JSON.stringify({
|
||||
id: containerId,
|
||||
animationData: props.animationData,
|
||||
autoplay: props.autoplay,
|
||||
loop: props.loop,
|
||||
renderer: props.renderer,
|
||||
}))
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
const mountAnimation = async () => {
|
||||
if (!props.animationData || !lottiePlayer?.loadAnimation) return
|
||||
await nextTick()
|
||||
const el = containerRef.value?.$el ?? containerRef.value
|
||||
if (!el) return
|
||||
if (animationInstance) {
|
||||
animationInstance.destroy()
|
||||
animationInstance = null
|
||||
}
|
||||
animationInstance = lottiePlayer.loadAnimation({
|
||||
container: el,
|
||||
renderer: props.renderer,
|
||||
loop: props.loop,
|
||||
autoplay: props.autoplay,
|
||||
animationData: props.animationData,
|
||||
rendererSettings: {
|
||||
progressiveLoad: true,
|
||||
preserveAspectRatio: "xMidYMid meet",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
watch(
|
||||
() => [props.animationData, props.loop, props.autoplay, props.renderer],
|
||||
() => {
|
||||
mountAnimation()
|
||||
},
|
||||
{ immediate: true, deep: true },
|
||||
)
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (animationInstance) {
|
||||
animationInstance.destroy()
|
||||
animationInstance = null
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="app-lottie-player" :style="{ width: props.width, height: props.height }">
|
||||
<!-- #ifdef APP-VUE || H5 -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view ref="containerRef" class="app-lottie-player__inner" />
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-VUE -->
|
||||
<view :id="containerId" class="app-lottie-player__inner" :prop="payload" :change:prop="rdLottie.render" />
|
||||
<!-- #endif -->
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef APP-VUE || H5 -->
|
||||
<view class="app-lottie-player__fallback" />
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- #ifdef APP-VUE -->
|
||||
<script module="rdLottie" lang="renderjs">
|
||||
import lottie from "lottie-web"
|
||||
|
||||
const instances = {}
|
||||
const lottiePlayer = lottie && lottie.loadAnimation ? lottie : lottie.default
|
||||
|
||||
function destroyAnimation(id) {
|
||||
if (!id || !instances[id]) return
|
||||
instances[id].destroy()
|
||||
delete instances[id]
|
||||
}
|
||||
|
||||
function parsePayload(value) {
|
||||
try {
|
||||
return typeof value === "string" ? JSON.parse(value) : value
|
||||
} catch (error) {
|
||||
console.error("lottie payload parse error", error)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
function mountAnimation(options, retry = 0) {
|
||||
console.log("[AppLottie][renderjs] mountAnimation start", {
|
||||
id: options?.id,
|
||||
hasAnimationData: Boolean(options?.animationData),
|
||||
renderer: options?.renderer,
|
||||
loop: options?.loop,
|
||||
hasLoadAnimation: Boolean(lottiePlayer?.loadAnimation),
|
||||
retry,
|
||||
})
|
||||
if (!options || !options.id || !options.animationData || !lottiePlayer?.loadAnimation) return
|
||||
const el = document.getElementById(options.id)
|
||||
if (!el) {
|
||||
console.log("[AppLottie][renderjs] container not found", options.id)
|
||||
if (retry < 10) {
|
||||
setTimeout(() => mountAnimation(options, retry + 1), 50)
|
||||
}
|
||||
return
|
||||
}
|
||||
console.log("[AppLottie][renderjs] container found", {
|
||||
id: options.id,
|
||||
clientWidth: el.clientWidth,
|
||||
clientHeight: el.clientHeight,
|
||||
})
|
||||
destroyAnimation(options.id)
|
||||
el.innerHTML = ""
|
||||
instances[options.id] = lottiePlayer.loadAnimation({
|
||||
container: el,
|
||||
renderer: options.renderer || "svg",
|
||||
loop: options.loop ?? false,
|
||||
autoplay: options.autoplay ?? true,
|
||||
animationData: options.animationData,
|
||||
rendererSettings: {
|
||||
progressiveLoad: true,
|
||||
preserveAspectRatio: "xMidYMid meet",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentId: "",
|
||||
lastPayload: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
render(newValue) {
|
||||
const options = parsePayload(newValue)
|
||||
console.log("[AppLottie][renderjs] render called", {
|
||||
rawType: typeof newValue,
|
||||
hasOptions: Boolean(options),
|
||||
id: options?.id,
|
||||
})
|
||||
if (!options) return
|
||||
this.currentId = options.id
|
||||
this.lastPayload = options
|
||||
mountAnimation(options)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.lastPayload) {
|
||||
mountAnimation(this.lastPayload)
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
destroyAnimation(this.currentId)
|
||||
},
|
||||
destroyed() {
|
||||
destroyAnimation(this.currentId)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<!-- #endif -->
|
||||
|
||||
<style scoped lang="scss">
|
||||
.app-lottie-player {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.app-lottie-player__inner,
|
||||
.app-lottie-player__fallback {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.app-lottie-player__fallback {
|
||||
border-radius: 50%;
|
||||
background: #f4faff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<view class="second-text-20 flex-col-center gap-5rpx">
|
||||
<view>Copyright©2026-2036</view>
|
||||
<view>浙江资安信有限公司版权所有</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -62,6 +62,23 @@ const actCouponTypeEnum = {
|
||||
"4": "兑换券",
|
||||
}
|
||||
|
||||
const thirdPayOrderStatusEnum = {
|
||||
"10": "未支付",
|
||||
"20": "支付成功",
|
||||
"30": "支付失败",
|
||||
"100": "退款中",
|
||||
"200": "退款成功",
|
||||
"300": "退款失败",
|
||||
}
|
||||
|
||||
const thirdPayOrderBizTypeEnum = {
|
||||
"10": "小程序用户钱包充值",
|
||||
}
|
||||
|
||||
const appPlusPlatformTypeEnum = {
|
||||
"10": "微信",
|
||||
"20": "支付宝",
|
||||
}
|
||||
|
||||
export default {
|
||||
hardwareOrderStatusEnum,
|
||||
@@ -73,4 +90,7 @@ export default {
|
||||
carTypeEnum,
|
||||
actCancelStatusEnum,
|
||||
actCouponTypeEnum,
|
||||
thirdPayOrderStatusEnum,
|
||||
thirdPayOrderBizTypeEnum,
|
||||
appPlusPlatformTypeEnum,
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1 @@
|
||||
{"v":"4.6.3","fr":24,"ip":0,"op":21,"w":320,"h":320,"nm":"checklist","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 13","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":300},"p":{"a":0,"k":[160,159.5,0]},"a":{"a":0,"k":[0,-34,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p667_1_0p167_0p167","0p667_1_0p167_0p167"],"t":6,"s":[15.021,15.021],"e":[0,0]},{"t":17}]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":6,"s":[0.8274509,0.1843137,0.1843137,1],"e":[0.8274509,0.1843137,0.1843137,1]},{"t":17}]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p667_1_0p167_0p167","t":6,"s":[-8.142,-92.147],"e":[-7.675,-162.544],"to":[0.07779947668314,-11.7327470779419],"ti":[-0.07779947668314,11.7327470779419]},{"t":17}],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[83.981,100],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p667_1_0p167_0p167"],"t":6,"s":[20.367],"e":[6.367]},{"t":17}],"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 2","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group"},{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":6,"s":[15.021,15.021],"e":[0,0]},{"t":21}]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":6,"s":[0.8274509,0.1843137,0.1843137,1],"e":[0.8274509,0.1843137,0.1843137,1]},{"t":17}]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":6,"s":[16.585,-99.759],"e":[28.521,-187.495],"to":[1.9892578125,-14.6227216720581],"ti":[-1.9892578125,14.6227216720581]},{"t":21}],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[97.419,116],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":6,"s":[14.733],"e":[8.733]},{"t":21}],"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group"}],"ip":6,"op":22,"st":-21,"bm":0,"sr":1},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 12","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":250},"p":{"a":0,"k":[160,159.5,0]},"a":{"a":0,"k":[0,-34,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p667_1_0p167_0p167","0p667_1_0p167_0p167"],"t":6,"s":[15.021,15.021],"e":[0,0]},{"t":17}]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":6,"s":[0.8274509,0.1843137,0.1843137,1],"e":[0.8274509,0.1843137,0.1843137,1]},{"t":17}]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p667_1_0p167_0p167","t":6,"s":[-8.142,-92.147],"e":[-7.675,-162.544],"to":[0.07779947668314,-11.7327470779419],"ti":[-0.07779947668314,11.7327470779419]},{"t":17}],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[83.981,100],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p667_1_0p167_0p167"],"t":6,"s":[20.367],"e":[6.367]},{"t":17}],"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 2","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group"},{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":6,"s":[15.021,15.021],"e":[0,0]},{"t":21}]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":6,"s":[0.8274509,0.1843137,0.1843137,1],"e":[0.8274509,0.1843137,0.1843137,1]},{"t":17}]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":6,"s":[16.585,-99.759],"e":[28.521,-187.495],"to":[1.9892578125,-14.6227216720581],"ti":[-1.9892578125,Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"v":"5.5.7","meta":{"g":"LottieFiles AE 0.1.20","a":"","k":"","d":"","tc":""},"fr":60,"ip":0,"op":79,"w":50,"h":50,"nm":"spinner","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":10,"s":[70]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":20,"s":[60]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[50]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":40,"s":[40]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":50,"s":[30]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":60,"s":[20]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":70,"s":[10]},{"t":80,"s":[0]}],"ix":11},"r":{"a":0,"k":360,"ix":10},"p":{"a":0,"k":[24.688,24.938,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[4,12],"ix":2},"p":{"a":0,"k":[0,-4],"ix":3},"r":{"a":0,"k":15,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.28627450980392155,0.3137254901960784,0.3411764705882353,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0.248,-12.664],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":10,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":20,"s":[70]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[60]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":40,"s":[50]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":50,"s":[40]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":60,"s":[30]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":70,"s":[20]},{"t":80,"s":[10]}],"ix":11},"r":{"a":0,"k":405,"ix":10},"p":{"a":0,"k":[24.688,24.938,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[4,12],"ix":2},"p":{"a":0,"k":[0,-4],"ix":3},"r":{"a":0,"k":15,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.28627450980392155,0.3137254901960784,0.3411764705882353,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0.248,-12.664],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[20]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":10,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":20,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[70]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":40,"s":[60]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":50,"s":[50]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":60,"s":[40]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":70,"s":[30]},{"t":80,"s":[20]}],"ix":11},"r":{"a":0,"k":450,"ix":10},"p":{"a":0,"k":[24.688,24.938,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[4,12],"ix":2},"p":{"a":0,"k":[0,-4],"ix":3},"r":{"a":0,"k":15,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.28627450980392155,0.3137254901960784,0.3411764705882353,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0.248,-12.664],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120,"st":0,"bLine truncated
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user