diff --git a/pages/workbench/index/index.vue b/pages/workbench/index/index.vue index 1b31f30..37dc709 100644 --- a/pages/workbench/index/index.vue +++ b/pages/workbench/index/index.vue @@ -15,7 +15,7 @@ - + @@ -44,7 +44,28 @@ let unreadCount= 1; this.$store.dispatch('circle/getFriendCircleInfo'); }, - methods: { + methods: { + scan(){ + uni.scanCode({ + success(res) { + if(res.scanType == "QR_CODE"){ + if(res.result.startsWith("http")){ + uni.navigateTo({ + url:"/pages/common/webview?url="+encodeURIComponent(res.result) + }); + //res.result; + return ; + } + if(res.result.startsWith("http")){ + return ; + } + } + } + }) + // uni.navigateTo({ + // url:"/pages/common/scan" + // }) + } } };