acdr-ui/dist/dev/mp-weixin/pages/space/index.js.map

1 line
12 KiB
Plaintext

{"version":3,"file":"index.js","sources":["../../../../../src/pages/space/index.vue","../../../../../uniPage:/cGFnZXMvc3BhY2UvaW5kZXgudnVl"],"sourcesContent":["<route lang=\"json5\">\r\n{\r\n style: {\r\n navigationBarTitleText: '互动空间',\r\n navigationStyle: 'custom',\r\n },\r\n}\r\n</route>\r\n\r\n<template>\r\n <view class=\"space-root\">\r\n <view class=\"index-bg\"></view>\r\n <image class=\"rootbg\" :src=\"imgUrl('@/static/space/bg.png')\" mode=\"widthFix\"></image>\r\n <view class=\"ai-space\" @click=\"toPath('/pages/ai/ai-interactive-space')\">\r\n <image :src=\"imgUrl('@/static/space/ai-space-button.png')\" class=\"ai-space-button\"></image>\r\n <view class=\"ai-space-text\">\r\n 您已经互动了\r\n <text class=\"orange\">10次,</text>\r\n 还有\r\n <text class=\"orange\">2次~</text>\r\n <wd-icon class=\"arrow\" name=\"arrow-right\"></wd-icon>\r\n </view>\r\n </view>\r\n <view class=\"actions\">\r\n <image\r\n @tap=\"actions\"\r\n :src=\"imgUrl('@/static/space/doctor.png')\"\r\n class=\"action_doctor\"\r\n mode=\"widthFix\"\r\n ></image>\r\n <image\r\n @tap=\"actions\"\r\n :src=\"imgUrl('@/static/space/talent.png')\"\r\n class=\"action_talent\"\r\n mode=\"widthFix\"\r\n ></image>\r\n </view>\r\n <view class=\"calendar\">\r\n <view class=\"calendar-number\">\r\n <text class=\"calendar-moth\">7月</text>\r\n <text class=\"calendar-day\">17</text>\r\n <text class=\"calendar-description\">今日任务</text>\r\n <image class=\"calendar-bg\" :src=\"imgUrl('@/static/space/calendar-number.png')\"></image>\r\n </view>\r\n <image class=\"c-bg\" :src=\"imgUrl('@/static/space/calendar.png')\"></image>\r\n </view>\r\n <view class=\"tabs-container\">\r\n <view class=\"tabs\">\r\n <view\r\n v-for=\"(tab, index) in tabs\"\r\n :key=\"index\"\r\n :class=\"['tab', { active: activeTab === index }]\"\r\n @tap=\"selectTab(index)\"\r\n >\r\n {{ tab }}\r\n <view v-if=\"activeTab === index\" class=\"underline\"></view>\r\n </view>\r\n </view>\r\n <view class=\"camera-icon\" @click=\"pushTo\">\r\n <wd-icon @click=\"camera\" class=\"camera\" name=\"camera\"></wd-icon>\r\n </view>\r\n </view>\r\n <view class=\"posts-container\">\r\n <scroll-view scroll-x=\"true\">\r\n <view class=\"scroll-container\" v-if=\"focusUser.length > 0\">\r\n <view class=\"user-item\" v-for=\"(user, index) in focusUser\" :key=\"index\">\r\n <wd-img :round=\"true\" :src=\"imgUrl(user.avatar)\" class=\"avatar\"></wd-img>\r\n <text class=\"name\">{{ user.name }}</text>\r\n </view>\r\n </view>\r\n <view v-else>\r\n <view class=\"flex items-center justify-center h-[40px] color-gray\">暂无内容...</view>\r\n </view>\r\n </scroll-view>\r\n <scroll-view scroll-y=\"true\" v-if=\"postsList\">\r\n <view v-for=\"post in postsList[activeTab == 0 ? 'posts' : 'followedPosts']\">\r\n <UserPost :post=\"post\" />\r\n </view>\r\n </scroll-view>\r\n </view>\r\n </view>\r\n\r\n <Tabbar />\r\n</template>\r\n\r\n<script lang=\"js\" setup>\r\nimport { ref } from 'vue'\r\nimport UserPost from './components/UserPost.vue'\r\nimport { httpGet } from '@/utils/http'\r\nimport { imgUrl, toast } from '@/utils/commUtils'\r\nimport Tabbar from '@/components/Tabbar.vue'\r\n\r\nconst tabs = ref(['推荐', '关注'])\r\nconst activeTab = ref(0)\r\nconst focusUser = ref([])\r\nconst postsList = ref(null)\r\n\r\n// 测试数据\r\n// focusUser = ref([\r\n// { name: '曲三岁', avatar: '/static/my/pet-auatar.jpg' },\r\n// { name: '王小样', avatar: '/static/my/pet-auatar-2.jpg' },\r\n// { name: '碎碎念', avatar: '/static/my/pet-auatar.jpg' },\r\n// { name: '小雨离线', avatar: '/static/my/pet-auatar-2.jpg' },\r\n// { name: '王小样', avatar: '/static/my/pet-auatar.jpg' },\r\n// { name: '碎碎念', avatar: '/static/my/pet-auatar-2.jpg' },\r\n// ])\r\n\r\nconst user = ref({\r\n name: '王小样',\r\n avatar: '/static/my/pet-auatar.jpg',\r\n location: '不拉多尔-泡芙',\r\n})\r\n\r\nconst post = ref({\r\n time: '1分钟前',\r\n images: [\r\n '/static/my/pet-auatar.jpg',\r\n '/static/my/pet-auatar-2.jpg',\r\n '/static/my/pet-auatar.jpg',\r\n '/static/my/pet-auatar-2.jpg',\r\n '/static/my/pet-auatar.jpg',\r\n ],\r\n content: '狗狗是人类的最好的朋友,它们忠诚可靠,守护着他们的主人不离不弃。甚至,比生命更为重要。',\r\n likes: 289,\r\n comments: 36,\r\n shares: 14,\r\n})\r\n\r\n// 获取关注博主的数据\r\nconst focus = async () => {\r\n try {\r\n const res = await httpGet('/posts/followed-users')\r\n if (res.code == 200) {\r\n focusUser.value = res.data\r\n } else {\r\n toast(res.message || '数据获取失败')\r\n }\r\n } catch (error) {\r\n toast(error.data.message || '获取关注博主数据失败')\r\n }\r\n}\r\n\r\n// 获取帖子数据\r\nconst getPosts = async () => {\r\n try {\r\n const res = await httpGet('/posts/list')\r\n if (res.code == 200) {\r\n postsList.value = res.data\r\n } else {\r\n toast(res.message || '数据获取失败')\r\n }\r\n } catch (error) {\r\n toast(error.data.message || '获取关注博主数据失败')\r\n }\r\n}\r\n\r\nconst selectTab = (index) => {\r\n activeTab.value = index\r\n console.log(index)\r\n}\r\n\r\nconst actions = () => {\r\n console.log('actions')\r\n}\r\n\r\nconst camera = () => {\r\n console.log('camera')\r\n}\r\n\r\nconst pushTo = () => {\r\n uni.navigateTo({\r\n url: '/pages/push/share',\r\n })\r\n}\r\n\r\nconst toPath = (path) => {\r\n uni.navigateTo({\r\n url: path,\r\n })\r\n}\r\n\r\nonLoad(async () => {\r\n await focus()\r\n await getPosts()\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.main-title-color {\r\n color: #d14328;\r\n}\r\n\r\n.space-root {\r\n width: 100%;\r\n height: 100vh;\r\n\r\n .index-bg {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: -1;\r\n width: 100%;\r\n height: 100%;\r\n background-color: #f5f5f5;\r\n }\r\n\r\n .rootbg {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: -1;\r\n width: 100%;\r\n }\r\n\r\n .ai-space {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding-top: 350rpx;\r\n\r\n .ai-space-button {\r\n width: 100%;\r\n height: 120rpx;\r\n background-repeat: no-repeat;\r\n background-size: contain;\r\n }\r\n\r\n .orange {\r\n color: #ff9775;\r\n }\r\n\r\n .ai-space-text {\r\n position: absolute;\r\n top: 85%;\r\n left: 60%;\r\n width: 100%;\r\n text-align: center;\r\n transform: translate(-50%, -50%);\r\n\r\n .arrow {\r\n position: absolute;\r\n top: 50%;\r\n right: 15%;\r\n color: #9d9d9d;\r\n transform: translateY(-50%);\r\n }\r\n }\r\n }\r\n\r\n .actions {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n width: 100%;\r\n height: 18%;\r\n\r\n .action_doctor {\r\n width: 100%;\r\n }\r\n\r\n .action_talent {\r\n width: 100%;\r\n }\r\n }\r\n\r\n .calendar {\r\n position: relative;\r\n width: 100%;\r\n height: 26%;\r\n\r\n .c-bg {\r\n position: absolute;\r\n top: -3%;\r\n z-index: -1;\r\n width: 100%;\r\n height: 100%;\r\n }\r\n\r\n .calendar-number {\r\n width: 131rpx;\r\n height: 159rpx;\r\n\r\n .calendar-bg {\r\n position: absolute;\r\n top: 50rpx;\r\n left: 50rpx;\r\n // z-index: 9;\r\n width: 90px;\r\n height: 110px;\r\n }\r\n }\r\n\r\n .calendar-moth {\r\n position: absolute;\r\n top: 31px;\r\n left: 58px;\r\n z-index: 1;\r\n font-weight: 600;\r\n }\r\n\r\n .calendar-day {\r\n position: absolute;\r\n top: 78px;\r\n left: 63px;\r\n z-index: 1;\r\n font-weight: 600;\r\n }\r\n\r\n .calendar-description {\r\n position: absolute;\r\n top: 109px;\r\n bottom: 0;\r\n left: -134px;\r\n z-index: 1;\r\n width: 100%;\r\n font-size: 15px;\r\n color: #808080;\r\n text-align: center;\r\n }\r\n }\r\n\r\n .tabs-container {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 10px 20px;\r\n background-color: #fff;\r\n border-bottom: 1px solid #eee;\r\n\r\n .tabs {\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .tab {\r\n position: relative;\r\n padding: 10px 20px;\r\n font-size: 16px;\r\n color: #666;\r\n cursor: pointer;\r\n\r\n &.active {\r\n font-weight: bold;\r\n color: #000;\r\n }\r\n }\r\n\r\n .underline {\r\n position: absolute;\r\n bottom: 0;\r\n left: 50%;\r\n width: 20px;\r\n height: 2px;\r\n background-color: #fcd038;\r\n border-radius: 1px;\r\n transform: translateX(-50%);\r\n }\r\n\r\n .camera-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n }\r\n\r\n .posts-container {\r\n padding-bottom: 100px;\r\n }\r\n\r\n .scroll-container {\r\n display: flex;\r\n padding: 10px;\r\n padding-left: 20px;\r\n white-space: nowrap;\r\n background-color: #fff;\r\n }\r\n\r\n .user-item {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n margin-right: 20px;\r\n }\r\n\r\n .avatar {\r\n width: 60px;\r\n height: 60px;\r\n border: 2px solid #ffd700;\r\n border-radius: 50%;\r\n }\r\n\r\n .name {\r\n margin-top: 8px;\r\n font-size: 14px;\r\n color: #333;\r\n text-align: center;\r\n }\r\n}\r\n</style>\r\n","import MiniProgramPage from 'D:/App/Work/addr/acdr-ui/src/pages/space/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","httpGet","toast","uni","onLoad"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOQ,MAAA,WAAA,MAAA;AAAA,MAAA,SAAA,MAAA;;;;AAAA,UAAA,OAAAA,cAAA,IAAA,CA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