wenxin0805 1 vuosi sitten
vanhempi
sitoutus
e3783a1ab5

+ 27 - 27
src/views/Fuzeren/FuzerenView.vue

@@ -293,7 +293,7 @@ export default {
       PhoneNumber: [], //联系方式手机号
       address: [], //详细地址
       action: '',//动态
-      tel: '',//拨打电话的phone
+      tel: '15225791048',//拨打电话的phone
       myId: '',
       //获取当前外部联系人userid  参数
       contactsUserId: '',
@@ -312,30 +312,30 @@ export default {
     Tab, Tabs, Step, Steps
   },
   async created () {
-    // let auth_code = "";
-    // if (this.$route.query.auth_code) {
-    //     auth_code = this.$route.query.auth_code
-    // }
-    // if (!auth_code) {
-    //     let userid = sessionStorage.getLocalstorage("user_id");
-    //     if (userid && userid !== undefined && userid !== "") {
-    //         this.myId = userid
-    //         this.getConfigParams({'url': location.href.split('#')[0]});
-    //     } else {
-    //         this.$router.push({ name: 'GetMyId' })
-    //     }
-    // } else {
-    //     let result = await getUser_Id(auth_code);
-    //     if (result.code !== 2000) {
-    //         alert(result.msg)
-    //         return false
-    //     }
-    //     let { user_id } = result.data;
-    //     this.myId = user_id;
-    //     sessionStorage.setLocalstorage('user_id', user_id);
-    //     this.getConfigParams({'url': location.href.split('#')[0]});
-    // }
-    this.myId = "WeiQiJia"
+    let auth_code = "";
+    if (this.$route.query.auth_code) {
+        auth_code = this.$route.query.auth_code
+    }
+    if (!auth_code) {
+        let userid = sessionStorage.getLocalstorage("user_id");
+        if (userid && userid !== undefined && userid !== "") {
+            this.myId = userid
+            this.getConfigParams({'url': location.href.split('#')[0]});
+        } else {
+            this.$router.push({ name: 'GetMyId' })
+        }
+    } else {
+        let result = await getUser_Id(auth_code);
+        if (result.code !== 2000) {
+            alert(result.msg)
+            return false
+        }
+        let { user_id } = result.data;
+        this.myId = user_id;
+        sessionStorage.setLocalstorage('user_id', user_id);
+        this.getConfigParams({'url': location.href.split('#')[0]});
+    }
+    // this.myId = "WeiQiJia"
   },
   methods: {
     onClick (name, title) {
@@ -358,11 +358,11 @@ export default {
     },
     //带icon的拨打电话
     callPhone () {
-      window.location.href = this.tel
+      window.location.href ='tel:' +this.tel
     },
     //数组拨打电话
     telPhoneNumber (item) {
-      window.location.href = item
+      window.location.href = 'tel:' +item
     },
 
       //获取参数信息

+ 2 - 2
src/views/userindex/indexpage/ArticleIndex.vue

@@ -152,7 +152,7 @@ export default {
     },
     //打电话
     callPhone () {
-      window.location.href = this.phone
+      window.location.href = 'tel'+ this.phone
     },
     //获取分享参数 在wx.ready执行分享的事件分享到朋友/朋友圈等
     async getShareParmasinfo (id,myId) {
@@ -242,7 +242,7 @@ export default {
             }
             wx.config({
                 beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-                debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
                 appId: appId, // 必填,企业微信的corpID
                 timestamp: timestamp, // 必填,生成签名的时间戳
                 nonceStr: nonceStr, // 必填,生成签名的随机串

+ 22 - 22
src/views/userindex/indexpage/UserIndex.vue

@@ -69,28 +69,28 @@ export default {
     Swipe, SwipeItem, Tab, Tabs, List,
   },
   async created () {
-      // let auth_code = "";
-      // if (this.$route.query.auth_code) {
-      //     auth_code = this.$route.query.auth_code
-      // }
-      // if (!auth_code) {
-      //     let userid = sessionStorage.getLocalstorage("user_id");
-      //     if (userid && userid !== undefined && userid !== "") {
-      //         this.myId = userid
-      //     } else {
-      //         this.$router.push({ name: 'GetUserIndex' })
-      //     }
-      // } else {
-      //     let result = await getUser_Id(auth_code);
-      //     if (result.code !== 2000) {
-      //         Toast(result.msg)
-      //         return false
-      //     }
-      //     let { user_id } = result.data;
-      //     this.myId = user_id;
-      //     sessionStorage.setLocalstorage('user_id', user_id);
-      //  }
-      this.myId ='WeiQiJia';
+      let auth_code = "";
+      if (this.$route.query.auth_code) {
+          auth_code = this.$route.query.auth_code
+      }
+      if (!auth_code) {
+          let userid = sessionStorage.getLocalstorage("user_id");
+          if (userid && userid !== undefined && userid !== "") {
+              this.myId = userid
+          } else {
+              this.$router.push({ name: 'GetUserIndex' })
+          }
+      } else {
+          let result = await getUser_Id(auth_code);
+          if (result.code !== 2000) {
+              Toast(result.msg)
+              return false
+          }
+          let { user_id } = result.data;
+          this.myId = user_id;
+          sessionStorage.setLocalstorage('user_id', user_id);
+       }
+      // this.myId ='WeiQiJia';
    
   },
   mounted () {

+ 7 - 7
src/views/userindex/my/MyForward.vue

@@ -62,13 +62,13 @@ export default {
   },
   created () {
     this.getCategory();
-    // if (!this.myId) {
-    //   this.myId = storage.getLocalstorage('user_id')
-    // }
-    // if (this.myId != null && this.myId !== '' && this.myId !== 'undefined') {
-    //   this.forwardapi(this.myId, '', this.limit, this.page)
-    // }
-    this.myId='WeiQiJia'
+    if (!this.myId) {
+      this.myId = storage.getLocalstorage('user_id')
+    }
+    if (this.myId != null && this.myId !== '' && this.myId !== 'undefined') {
+      this.forwardapi(this.myId, '', this.limit, this.page)
+    }
+    // this.myId='WeiQiJia'
   },
   mounted () { },
   methods: {

+ 8 - 8
src/views/userindex/my/MyIndex.vue

@@ -51,13 +51,13 @@ export default {
     }
   },
   created () {
-    // if(!this.myId){
-    //   this.myId = storage.getLocalstorage('user_id')
-    // }
-    // if (this.myId != null && this.myId !== '' && this.myId !== 'undefined') {
-    //   this.getMemberapi(this.myId)
-    // }
-    this.myId='WeiQiJia'
+    if(!this.myId){
+      this.myId = storage.getLocalstorage('user_id')
+    }
+    if (this.myId != null && this.myId !== '' && this.myId !== 'undefined') {
+      this.getMemberapi(this.myId)
+    }
+    // this.myId='WeiQiJia'
   },
   mounted () {
 
@@ -82,7 +82,7 @@ export default {
     },
     //打电话
     callPhone(){
-      window.location.href=this.phone
+      window.location.href='tel'+ this.phone
     }
 
   },