|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="mine">
|
|
|
+ <van-pull-refresh class="mine" v-model="isLoading" @refresh="onRefresh">
|
|
|
<div class="userInfo" v-if="isLogin">
|
|
|
<van-image
|
|
|
width="100%"
|
|
|
@@ -184,7 +184,7 @@
|
|
|
|
|
|
<div class="tabbar-placeholder"></div>
|
|
|
<post ref="post" :info="shareProduct" noButton></post>
|
|
|
- </div>
|
|
|
+ </van-pull-refresh>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -208,60 +208,63 @@ export default {
|
|
|
...mapState(['userInfo'])
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.$store.dispatch('getUserInfo');
|
|
|
- if (this.isLogin) {
|
|
|
- this.$http
|
|
|
- .post(
|
|
|
- '/identityAuth/all',
|
|
|
- {
|
|
|
- query: {
|
|
|
- userId: this.$store.state.userInfo.id
|
|
|
+ this.getInit();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getInit() {
|
|
|
+ this.$store.dispatch('getUserInfo');
|
|
|
+ if (this.isLogin) {
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ '/identityAuth/all',
|
|
|
+ {
|
|
|
+ query: {
|
|
|
+ userId: this.$store.state.userInfo.id
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { body: 'json' }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ if (!res.empty) {
|
|
|
+ this.form = res.content[0];
|
|
|
+ this.org = this.form.org;
|
|
|
}
|
|
|
- },
|
|
|
- { body: 'json' }
|
|
|
- )
|
|
|
- .then(res => {
|
|
|
- if (!res.empty) {
|
|
|
- this.form = res.content[0];
|
|
|
- this.org = this.form.org;
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
|
|
|
- this.$http
|
|
|
- .post(
|
|
|
- '/asset/all',
|
|
|
- {
|
|
|
- query: {
|
|
|
- page: 0,
|
|
|
- size: 1,
|
|
|
- userId: this.$store.state.userInfo.id,
|
|
|
- status: 'NORMAL,TRADING,GIFTING,MINTING'
|
|
|
- }
|
|
|
- },
|
|
|
- { body: 'json' }
|
|
|
- )
|
|
|
- .then(res => {
|
|
|
- this.assetNum = Number(res.totalElements);
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ '/asset/all',
|
|
|
+ {
|
|
|
+ query: {
|
|
|
+ page: 0,
|
|
|
+ size: 1,
|
|
|
+ userId: this.$store.state.userInfo.id,
|
|
|
+ status: 'NORMAL,TRADING,GIFTING,MINTING'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { body: 'json' }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.assetNum = Number(res.totalElements);
|
|
|
+ });
|
|
|
+
|
|
|
+ this.getProduct();
|
|
|
+ this.$http.get('/sysConfig/get/share_lvzhoushi_num').then(res => {
|
|
|
+ if (res.value) {
|
|
|
+ this.shareMoney = Number(res.value);
|
|
|
+ }
|
|
|
});
|
|
|
+ }
|
|
|
|
|
|
- this.getProduct();
|
|
|
- this.$http.get('/sysConfig/get/share_lvzhoushi_num').then(res => {
|
|
|
- if (res.value) {
|
|
|
- this.shareMoney = Number(res.value);
|
|
|
- }
|
|
|
+ if (window.cordova && StatusBar && StatusBar.isVisible) {
|
|
|
+ StatusBar.backgroundColorByHexString('#222426');
|
|
|
+ StatusBar.styleLightContent();
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$el.parentNode.childNodes[1].className =
|
|
|
+ this.$el.parentNode.childNodes[1].className.replace(/ bgBack/, '') + ' bgBack';
|
|
|
});
|
|
|
- }
|
|
|
-
|
|
|
- if (window.cordova && StatusBar && StatusBar.isVisible) {
|
|
|
- StatusBar.backgroundColorByHexString('#222426');
|
|
|
- StatusBar.styleLightContent();
|
|
|
- }
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$el.parentNode.childNodes[1].className =
|
|
|
- this.$el.parentNode.childNodes[1].className.replace(/ bgBack/, '') + ' bgBack';
|
|
|
- });
|
|
|
- },
|
|
|
- methods: {
|
|
|
+ },
|
|
|
copy() {
|
|
|
this.$copyText(this.userInfo.id).then(
|
|
|
e => {
|
|
|
@@ -324,6 +327,12 @@ export default {
|
|
|
this.$toast(e);
|
|
|
}
|
|
|
});
|
|
|
+ },
|
|
|
+ onRefresh() {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.getInit();
|
|
|
+ }, 1000);
|
|
|
}
|
|
|
},
|
|
|
beforeRouteLeave(to, from, next) {
|