Files
im/pages/workbench/index/index.vue
T
cansnow cf1ad1c24b 14
2025-12-17 08:47:58 +08:00

96 lines
3.6 KiB
Vue

<template>
<view class="workbench_page">
<uni-nav-bar
title="发现"
statusBar
fixed
background-color="transparent"></uni-nav-bar>
<uni-list>
<uni-list-item title="朋友圈"
thumb="/static/images/workbench/01.png"
:thumbSize="thumbSize"
showArrow
to="/pages/workbench/friend-circle/friend-circle">
<view slot="footer" v-if="last_unread_item&&last_unread_item.avatar.length>0">
<u-avatar :src="last_unread_item.avatar" mode="square" :size="70"></u-avatar>
<u-badge :is-dot="true" type="error" :offset="[20,60]"></u-badge>
</view>
</uni-list-item>
</uni-list>
<u-gap :height="10"></u-gap>
<uni-list>
<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/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/08.png" :thumbSize="thumbSize" to="/pages/workbench/near/near" showArrow></uni-list-item>
<uni-list-item title="购物" thumb="/static/images/workbench/09.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
</uni-list>
<u-cell-group :customStyle="{backgroundColor:'#FFF'}">
<u-cell
title="扫一扫"
icon="/static/images/workbench/03.png" :size="cellSize"
isLink
@click="scan"
></u-cell>
<u-cell title="摇一摇" icon="/static/images/workbench/05.png" :size="cellSize" url="/pages/workbench/friend-circle/friend-circle" isLink></u-cell>
<u-cell title="看一看" icon="/static/images/workbench/06.png" :size="cellSize" url="/pages/workbench/friend-circle/friend-circle" isLink></u-cell>
<u-cell title="听一听" icon="/static/images/workbench/06.png" :size="cellSize" url="/pages/workbench/friend-circle/friend-circle" isLink></u-cell>
<u-cell title="附近" icon="/static/images/workbench/08.png" :size="cellSize" url="/pages/workbench/near/near" isLink></u-cell>
<u-cell title="购物" icon="/static/images/workbench/09.png" :size="cellSize" url="/pages/workbench/friend-circle/friend-circle" isLink></u-cell>
</u-cell-group>
</view>
</template>
<script>
export default {
data() {
return {
thumbSize:"base",
cellSize:"large"
};
},
computed:{
circleUnreadCount() {
return this.$store.getters.storeCircleUnreadCount;
},
last_unread_item() {
return this.$store.getters.storeCircleLastUnreadItem;
},
},
onShow: function() {
let unreadCount= 1;
this.$store.dispatch('circle/getFriendCircleInfo');
},
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>
<style lang="scss" scoped>
.workbench_page {
background-color: #ececec !important;
}
</style>