소스 검색

no message

DaMowang 3 년 전
부모
커밋
c6e92a9ccb
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/pages/product/p_details.vue

+ 3 - 2
src/pages/product/p_details.vue

@@ -223,12 +223,13 @@ export default {
     };
   },
   onLoad: function (e) {
+    this.userinfo = uni.getStorageSync("userinfo");
+    let token = uni.getStorageSync("token");
     this.type = e.type;
     this.goodsDa = e;
-    this.userinfo = uni.getStorageSync("userinfo");
     this.loadData(e);
 
-    if(e.invite && !uni.getStorageSync("token")) this.login(e.invite);
+    if(e.invite && !token) this.login(e.invite);
   },
   onShow: function () {},
   methods: {