panhui 5 vuotta sitten
vanhempi
commit
8de61f6e2c

+ 1 - 0
src/components/productInfo.vue

@@ -31,6 +31,7 @@
 
 <script>
 export default {
+    name: 'ProductInfo',
     props: {
         info: {
             type: Object,

+ 5 - 1
src/pages/authorized.vue

@@ -38,7 +38,11 @@ export default {
                             encryptedData: res.encryptedData,
                             iv: res.iv
                         })
-                        .then(() => {});
+                        .then(() => {
+                            this.$store.dispatch('getUserInfo').then(() => {
+                                this.navigateBack();
+                            });
+                        });
                 }
             });
         }

+ 2 - 2
src/pages/chat.vue

@@ -37,8 +37,8 @@
 </template>
 
 <script>
-import ChatInfo from '@/components/chatInfo';
-import ProductInfo from '@/components/productInfo';
+import ChatInfo from '@/components/ChatInfo';
+import ProductInfo from '@/components/ProductInfo';
 export default {
     name: 'Chat',
     components: {

+ 9 - 4
src/pages/mine.vue

@@ -11,7 +11,14 @@
 <template>
     <div class="page-scroll">
         <div class="top">
-            <van-image src="/native/svgs/img_defaultphoto.svg" width="90" height="90" round class="avatar" fit="cover">
+            <van-image
+                :src="userInfo ? userInfo.avatar : '/native/svgs/img_defaultphoto.svg'"
+                width="90"
+                height="90"
+                round
+                class="avatar"
+                fit="cover"
+            >
             </van-image>
 
             <van-button type="primary" v-if="!userInfo" @click="login">点击授权登录</van-button>
@@ -93,9 +100,7 @@ export default {
                             iv: res.iv
                         })
                         .then(() => {
-                            this.$store.dispatch('getUserInfo').then(() => {
-                                this.navigateBack();
-                            });
+                            this.$store.dispatch('getUserInfo');
                         });
                 }
             });

+ 2 - 2
src/pages/mineFollow.vue

@@ -16,11 +16,11 @@ export default {
     name: 'MineFollow',
     data() {
         return {};
-    }
+    },
 };
 </script>
 
-<style lang="less">
+<style lang="less" scoped>
 .product {
     background-color: #fff;
     padding: 15px;

+ 1 - 1
src/pages/news.vue

@@ -17,7 +17,7 @@
 </template>
 
 <script>
-import NewsInfo from '../components/newsInfo.vue';
+import NewsInfo from '../components/NewsInfo.vue';
 export default {
     name: 'News',
     components: {

+ 2 - 2
src/pages/wallet.vue

@@ -48,9 +48,9 @@
 
 <script>
 import dayjs from 'dayjs';
-import billInfo from '../components/billInfo.vue';
+import BillInfo from '../components/BillInfo.vue';
 export default {
-    components: { billInfo },
+    components: { BillInfo },
     name: 'Wallet',
     data() {
         return {