完善地址

This commit is contained in:
wangxiaowei
2025-10-21 18:05:47 +08:00
parent 820b445e9c
commit b2f658f3c0
22 changed files with 613 additions and 190 deletions

View File

@ -12,7 +12,7 @@
<view class="ml-20rpx text-30rpx text-[#303133] leading-42rpx">{{ item.name }}</view>
</view>
</view>
<view class="absolute right-0 top-6rpx right-60rpx" v-if="item.type !== PayCategory.WeChatPay">可用202.22</view>
<view class="absolute right-0 top-6rpx right-60rpx" v-if="item.type !== PayCategory.WeChatPay">可用{{ userInfo.user_money }}</view>
</wd-radio>
</block>
</wd-radio-group>
@ -24,12 +24,37 @@
* Pay 支付组件
* @description 用于展示支付
*/
import { PayList as OriginPayList, PayCategory, PayValue } from '@/utils/pay'
import { IUserInfoResult } from '@/api/types/user'
import { getUserInfo } from '@/api/user'
const OSS = inject('OSS')
const pay = ref<number>() // 支付方式
// 当前用户信息
const userInfo = reactive<IUserInfoResult>({
account: '',
avatar: '',
create_time: '',
has_auth: false,
has_password: false,
id: 0,
mobile: '',
nickname: '',
real_name: '',
sex: '',
sn: 0,
user_money: '',
version: 0
})
onMounted(async () => {
// 获取个人用户信息
const userRes = await getUserInfo()
Object.assign(userInfo, userRes || {})
})
const props = defineProps({
// 是否隐藏平台余额支付
hidePlatformBalance: {
@ -52,6 +77,7 @@
// 定义emit事件
const emit = defineEmits(['pay'])
const Pay = {
// 支付方式改变
handleChangePay(e: {value: number}) {
@ -71,6 +97,7 @@
watch(PayList, (list) => {
if (list.length > 0) {
pay.value = list[0].value
emit('pay', pay.value )
} else {
pay.value = undefined
}