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

1 line
6.2 KiB
Plaintext
Raw Normal View History

2024-09-19 07:20:14 +08:00
{"version":3,"file":"index.js","sources":["../../../../../src/pages/index/index.vue","../../../../../uniPage:/cGFnZXMvaW5kZXgvaW5kZXgudnVl"],"sourcesContent":["<route lang=\"json5\">\n{\n style: {\n navigationBarTitleText: '首页',\n navigationStyle: 'custom',\n },\n}\n</route>\n\n<template>\n <view class=\"container\">\n <Banner />\n <AddressCell />\n <!-- 这里放搜索框 -->\n <view :class=\"['w-[70vw] pos-absolute right-0', isH5 ? 'top-[1vw]' : 'top-[3vw]']\">\n <Search />\n </view>\n <loading-animation v-model=\"isLoading\" />\n\n <view class=\"index\">\n <view\n v-if=\"petInfo?.id\"\n class=\"profileRoot\"\n @click=\"toPath('/pages/pet/pet-detail-page?id=' + petInfo.id)\"\n >\n <ProfileInfo\n :profileIcon=\"\n petInfo?.profileUrl ? imgUrl(petInfo?.profileUrl) : '@/static/icons/cat.png'\n \"\n :profileName=\"petInfo?.name\"\n :gender=\"petInfo?.sex\"\n :profileTags=\"[\n petInfo?.breed,\n petInfo?.sex == 0 ? '妹妹' : '弟弟',\n petInfo?.isSterilization == 1 ? '已绝育' : '未绝育',\n ]\"\n />\n </view>\n <view class=\"h-1xl\"></view>\n <hurry name=\"萌萌哒\" :distance=\"25\" :time=\"45\" />\n <view class=\"services\">\n <view class=\"service-card large-card\" @click=\"toPath('/pages/service/search')\">\n <image :src=\"imgUrl('@/static/home/cwpb.png')\" class=\"service-image\" mode=\"widthFix\" />\n </view>\n <view class=\"right-column\">\n <view class=\"service-card small-card\" @click=\"toPath('/pages/service/slippery')\">\n <image :src=\"imgUrl('@/static/home/cwpl.png')\" class=\"service-image\" mode=\"widthFix\" />\n </view>\n <view class=\"service-card small-card\" @click=\"toPath('/pages/service/search')\">\n <image :src=\"imgUrl('@/static/home/smfw.png')\" class=\"service-image\" mode=\"widthFix\" />\n </view>\n </view>\n </view>\n\n <view class=\"quick\">\n <view class=\"head\">\n <view class=\"quick-title\">\n <text class=\"title\">快捷服务</text>\n </view>\n <view @click=\"toExtended\" class=\"quick-more\">\n <text>查看全部</text>\n <wd-icon name=\"arrow-right\"></wd-icon>\n </view>\n </view>\n\n <QuickServiceCarousel />\n </view>\n\n <RecommendedServices />\n </view>\n </view>\n\n <!-- 引入tabBar -->\n <Tabbar />\n</template>\n\n<script setup>\nimport ProfileInfo from './components/profileInfo.vue'\nimport hurry from './components/hurry.vue'\nimport QuickServiceCarousel from './components/quickServiceCarousel.vue'\nimport RecommendedServices from './components/recommendedServices.vue'\nimport Banner from './components/banner.vue'\nimport LoadingAnimation from '@/components/LoadingAnimation.vue'\nimport { imgUrl, toast } from '@/utils/commUtils'\nimport { httpGet } from '@/utils/http'\nimport Tabbar from '@/components/Tabbar.vue'\nimport AddressCell from '@/components/AddressCell.vue'\nimport Search from '@/components/Search.vue'\nimport { isH5 } from '@/utils/platform'\n\nconst isLoading = ref(false)\nconst petInfo = ref({})\n\n// 获取当前页面的宠物信息\nconst getPetInfo = async () => {\n try {\n const res = await httpGet('/petInfo/index')\n if (res.code === 200) {\n petInfo.value = res.data\n } else {\n toast(res.message)\n }\n } catch (error) {\n console.log(error)\n }\n}\n\nconst toExtended = () => {\n // 跳转到extended 页面\n uni.navigateTo({\n url: '/pages/extended/index',\n })\n}\n\nconst toPath = (path) => {\n uni.navigateTo({\n url: path,\n })\n}\n\nonLoad(async () => {\n isLoading.value = true\n await getPetInfo()\n isLoading.value = false\n})\n</script>\n\n<style lang=\"scss\" scoped>\npage {\n background-color: #f9f9f9;\n}\n\n.profileRoot {\n z-index: 999;\n margin-top: -30px;\n}\n\n.container {\n z-index: -99