更新:谷歌支付

This commit is contained in:
2025-11-27 14:17:50 +08:00
parent 37b9a4d02a
commit f9cad8d740
4 changed files with 341 additions and 215 deletions

View File

@@ -47,14 +47,14 @@
<view class="assets_row">天医币</view>
<view>{{userInfo.peanutCoin ?? 1}}</view>
</view>
<view>
<view @click="goPointsList">
<view class="assets_row">积分</view>
<view>{{userInfo.jf ?? 1}}</view>
</view>
<view>
<!-- <view>
<view class="assets_row">优惠卷</view>
<view>0</view>
</view>
</view> -->
</view>
<view class="chong_btn" @click="goRecharge"> </view>
<!-- <text class="wallet_title">{{$t('my.coin')}}<uni-icons type="help" size="19" color="#666"></uni-icons></text>
@@ -81,6 +81,7 @@
import type { IVipInfo } from '@/types/user'
import { useI18n } from 'vue-i18n'
import { getNotchHeight } from '@/utils/system'
import { onShow } from '@dcloudio/uni-app'
const { t } = useI18n()
const userStore = useUserStore()
@@ -147,12 +148,13 @@
* 获取数据
*/
const getData = async () => {
console.log(userInfo.value);
try {
// 获取用户信息
const userRes = await getUserInfo()
console.log(userRes);
if (userRes.user) {
userStore.setUserInfo(userRes.user)
console.log(userRes, '-----userRes');
if (userRes.result) {
userStore.setUserInfo(userRes.result)
}
// 获取VIP信息
@@ -228,11 +230,21 @@
})
}
/**
* 跳转积分列表
*/
const goPointsList = () => {
uni.navigateTo({
url: '/pages/user/points/index'
})
}
onShow(() => {
getData()
})
onMounted(() => {
getPlatform()
getData()
})
</script>
@@ -375,7 +387,7 @@
border-radius: 50rpx;
color: #fffbf6;
padding: 10rpx 32rpx;
background-image: linear-gradient(90deg, #3ab3ae 0%, #d5ecdd 200%);
background-color: #007bff;
}
.assets {