个人中心

This commit is contained in:
liuye
2023-02-17 17:06:04 +08:00
parent ae600dc2c3
commit a36f3741bf
2 changed files with 31 additions and 10 deletions

View File

@@ -40,16 +40,21 @@
</div>
</template>
<script>
import {mapActions, mapState} from "vuex";
import {mapState, mapActions} from "vuex";
export default {
name: "AppPcMine",
appName: "我的",
customNavigation: true,
data() {
return {
user: {}
}
},
computed: {
...mapState(['user', 'token']),
...mapState(['token']),
isApprove() {
return this.user?.status == 2;
return this.user?.areaId ? true : false
},
listGroup() {
return [
@@ -86,6 +91,13 @@ export default {
},
methods: {
...mapActions(['getUserInfo']),
getUserInfo() {
this.$instance.post(`/app/appwechatuserqujing/check`).then(res=> {
if(res?.data) {
this.user = res.data
}
})
},
approve() {
if (!this.token) {
this.$refs.login.show();
@@ -133,7 +145,8 @@ export default {
}
},
onShow() {
this.getAuth();
this.getAuth()
this.getUserInfo()
},
onShareAppMessage() {
return {