调试接口
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
<view>
|
||||
<wd-navbar safeAreaInsetTop :bordered="false" custom-style="background-color: transparent;" :height="navbarHeight">
|
||||
<template #left>
|
||||
<view class="h-48rpx flex items-center" @click="StoreRecharge.back">
|
||||
<view class="h-48rpx flex items-center" @click="router.navigateBack()">
|
||||
<wd-img width="48rpx" height="48rpx" :src="`${OSS}icon/icon_arrow_left.png`" class="mt-6rpx"></wd-img>
|
||||
<view class="text-[#303133] text-36rpx ml-24rpx leading-48rpx">充值</view>
|
||||
</view>
|
||||
@ -34,12 +34,12 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="text-28rpx font-400 text-[#303133] leading-40rpx mx-70rpx mt-38rpx">推广方式</view>
|
||||
<!-- <view class="text-28rpx font-400 text-[#303133] leading-40rpx mx-70rpx mt-38rpx">推广方式</view>
|
||||
|
||||
<view class="bg-white mt-28rpx rounded-16rpx px-38rpx mx-32rpx h-150rpx flex items-center">
|
||||
<view class="text-[#303133] text-30rpx font-bold leading-42rpx">门店推广</view>
|
||||
<view class="flex-1 bg-[#F8F9FA] text-[#9CA3AF] rounded-8rpx ml-28rpx h-80rpx leading-80rpx rounded-8rpx pl-28rpx">{{ storeName }}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view @click="StoreRecharge.handleRecharge" class="fixed left-0 right-0 bottom-0 z-50 mx-60rpx flex items-center justify-center bg-[#4C9F44] rounded-8rpx text-[#fff] text-30rpx font-bold" :style="{ height: '90rpx', bottom: 'calc(env(safe-area-inset-bottom) + 26rpx)', city: canRecharge ? 1 : 0.5 }">
|
||||
确定转入
|
||||
@ -51,7 +51,8 @@
|
||||
import { getNavBarHeight } from '@/utils/index'
|
||||
import { toast } from '@/utils/toast'
|
||||
import { router } from '@/utils/tools'
|
||||
import { wxpay } from '@/hooks/usePay'
|
||||
// import { wxpay } from '@/hooks/usePay'
|
||||
import { teaRoomRecharge } from '@/api/tea-room'
|
||||
|
||||
let navbarHeight = ref<number>(0)
|
||||
let OSS = inject('OSS')
|
||||
@ -69,14 +70,24 @@
|
||||
})
|
||||
|
||||
const StoreRecharge = {
|
||||
handleRecharge: () => {
|
||||
handleRecharge: async () => {
|
||||
if (rechargeMoney.value) {
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请输入充值金额',
|
||||
icon: 'none'
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
try {
|
||||
const res = await teaRoomRecharge(Number(rechargeMoney.value))
|
||||
rechargeMoney.value = ''
|
||||
uni.hideLoading()
|
||||
toast.success('操作成功')
|
||||
} catch(e) {
|
||||
uni.hideLoading()
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
toast.info('请输入转入金额')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user