Update index.vue
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
</uni-list>
|
</uni-list>
|
||||||
<u-gap :height="10"></u-gap>
|
<u-gap :height="10"></u-gap>
|
||||||
<uni-list>
|
<uni-list>
|
||||||
<uni-list-item title="扫一扫" thumb="/static/images/workbench/03.png" :thumbSize="thumbSize" to="/pages/common/scan" showArrow></uni-list-item>
|
<uni-list-item title="扫一扫" thumb="/static/images/workbench/03.png" :thumbSize="thumbSize" @click="scan" clickable showArrow></uni-list-item>
|
||||||
<uni-list-item title="摇一摇" thumb="/static/images/workbench/05.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
<uni-list-item title="摇一摇" thumb="/static/images/workbench/05.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||||
<uni-list-item title="看一看" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
<uni-list-item title="看一看" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||||
<uni-list-item title="听一听" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
<uni-list-item title="听一听" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
|
||||||
@@ -45,6 +45,27 @@
|
|||||||
this.$store.dispatch('circle/getFriendCircleInfo');
|
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"
|
||||||
|
// })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user