|
|
@@ -166,6 +166,8 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
</uni-PopupMessage>
|
|
|
+ <!-- 自定义加载动画 -->
|
|
|
+ <global-loading :show="loadingShow" :text="loadingText"></global-loading>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -177,6 +179,8 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ loadingShow: false,
|
|
|
+ loadingText: '数据加载中',
|
|
|
deleteShow: false, //
|
|
|
defaultCard: false, // 控制默认银行卡的单选状态
|
|
|
currentTab: 1, // 当前激活的选项卡索引
|
|
|
@@ -276,11 +280,23 @@
|
|
|
...mapState(['userInfo']),
|
|
|
},
|
|
|
async onShow() {
|
|
|
- let res = await this.$http.get('/userAccount/userWallet'); //获取钱包信息
|
|
|
- if (res.code == '200') {
|
|
|
- this.walletInfo = res.data;
|
|
|
+ this.loadingShow = true;
|
|
|
+ try {
|
|
|
+ let res = await this.$http.get('/userAccount/userWallet'); //获取钱包信息
|
|
|
+ if (res.code == '200') {
|
|
|
+ this.walletInfo = res.data;
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.msg,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ await this.getcardPack();
|
|
|
+ this.loadingShow = false;
|
|
|
+ } catch {
|
|
|
+ this.loadingShow = false;
|
|
|
}
|
|
|
- await this.getcardPack();
|
|
|
+
|
|
|
},
|
|
|
async onLoad(options) {
|
|
|
if (options) {
|