Browse Source

路由

dev_xrcc
jiazhipeng 4 months ago
parent
commit
0b4dc57050
  1. 10
      components/CustomTabBar.vue
  2. 41
      components/header.vue
  3. 54
      pages.json
  4. 25
      pages/index/iSoul.vue
  5. 118
      pages/index/index.vue
  6. 25
      pages/index/intelligentAgent.vue
  7. 25
      pages/index/readingBody.vue
  8. 25
      pages/index/sensoryStore.vue

10
components/CustomTabBar.vue

@ -18,27 +18,27 @@ export default {
return {
tabBarList: [
{
"pagePath": "pages/map/map",
"pagePath": "pages/index/index",
"selectColor": "#00FF00",
"text": "首页"
},
{
"pagePath": "pages/coupon/coupon",
"pagePath": "pages/index/readingBody",
"selectColor": "#00FF00",
"text": "阅读体"
},
{
"pagePath": "pages/index/index",
"pagePath": "pages/index/sensoryStore",
"selectColor": "#00FF00",
"text": "有感商店"
},
{
"pagePath": "pages/cart/cart",
"pagePath": "pages/index/intelligentAgent",
"selectColor": "#00FF00",
"text": "智能体"
},
{
"pagePath": "pages/user/user",
"pagePath": "pages/index/iSoul",
"selectColor": "#00FF00",
"text": "iSoul"
}

41
components/header.vue

@ -0,0 +1,41 @@
<template>
<view class="header" :style="{'height': height+'px','padding-top':statusBarHeight+'px'}">
<image src="https://static.ticket.sz-trip.com/uploads/20250625/9bb05097e07570a934235983e1681a9f.png" mode="heightFix"></image>
</view>
</template>
<script>
export default {
name:"header",
data() {
return {
//
height: 0,
statusBarHeight: 0,
};
},
mounted() {
this.initRectInfo()
},
methods:{
initRectInfo () {
const sysInfo = uni.getSystemInfoSync()
this.statusBarHeight = sysInfo.statusBarHeight
//
this.height = sysInfo.statusBarHeight + 40
console.log("sysInfo" ,sysInfo)
},
}
}
</script>
<style scoped lang="scss">
.header{
display: flex;
align-items: center;
justify-content: center;
image{
height: 46.16rpx;
}
}
</style>

54
pages.json

@ -12,6 +12,34 @@
"navigationStyle": "custom"
// "navigationBarTitleText": "CGC-ICH"
}
},
{
"path": "pages/index/readingBody",
"style": {
"navigationStyle": "custom"
// "navigationBarTitleText": "阅读体"
}
},
{
"path": "pages/index/sensoryStore",
"style": {
"navigationStyle": "custom"
// "navigationBarTitleText": "有感商店"
}
},
{
"path": "pages/index/intelligentAgent",
"style": {
"navigationStyle": "custom"
// "navigationBarTitleText": "智能体"
}
},
{
"path": "pages/index/iSoul",
"style": {
"navigationStyle": "custom"
// "navigationBarTitleText": "iSoul"
}
}
],
"subPackages": [{
@ -81,12 +109,34 @@
"visible": false
},
{
"pagePath": "pages/stratIndex",
"pagePath": "pages/index/readingBody",
"iconPath": "/static/images/home.png",
"selectedIconPath": "/static/images/selectHome.png",
"text": "首页",
"text": "阅读体",
"visible": false
},
{
"pagePath": "pages/index/sensoryStore",
"iconPath": "/static/images/home.png",
"selectedIconPath": "/static/images/selectHome.png",
"text": "有感商店",
"visible": false
},
{
"pagePath": "pages/index/intelligentAgent",
"iconPath": "/static/images/home.png",
"selectedIconPath": "/static/images/selectHome.png",
"text": "智能体",
"visible": false
},
{
"pagePath": "pages/index/iSoul",
"iconPath": "/static/images/home.png",
"selectedIconPath": "/static/images/selectHome.png",
"text": "iSoul",
"visible": false
}
]
},
"globalStyle": {

25
pages/index/iSoul.vue

@ -0,0 +1,25 @@
<template>
<view></view>
</template>
<script>
import CustomTabBar from '@/components/CustomTabBar.vue';
export default {
components: {CustomTabBar},
data() {
return {}
},
onLoad() {
},
onReady() {
},
methods:{
},
}
</script>
<style lang="scss" scoped>
</style>

118
pages/index/index.vue

@ -1,124 +1,16 @@
<template>
<view class="content" style="overflow-x: auto;">
<view class="search-header" :style="{'height': height+'px','padding-top':statusBarHeight+'px'}">
<view class="title">CGC-ICH</view>
<view class="subtitle">大运河非物质文化遗产</view>
</view>
<div :style="{'height':height+'px','flex-shrink':0}"></div>
<!-- 头部banner -->
<view class="top-box">
<!-- 搜索 -->
<!-- <view class="search-box">
<image src="https://static.ticket.sz-trip.com/cgc/images/index/search.png" mode=""></image>
<span>|</span>
搜一搜您想要的
</view> -->
<swiper class="top-banner" :circular="true" :interval="6000"
:duration="800" :indicator-dots="false" :autoplay="true" v-if="topBanner && topBanner.length > 0">
<swiper-item v-for="(item, index) in topBanner" :key="index" @click.stop="gotoUrlNew(item)">
<image class="top-banner" :src="showImg(item.head_img)" mode="aspectFill" lazy-load="true"></image>
</swiper-item>
</swiper>
</view>
<!-- 金刚区 -->
<view class="menu-box flex-between">
<view class="menu-left flex-around">
<view class="" v-for="(item,index) in menuList" :key="index" @click="gotoPath(item.path)">
<image :src="showImg(`https://static.ticket.sz-trip.com/cgc/images/indexs/${index + 1}.png`)" class="topImg" mode="heightFix"></image>
<image :src="showImg(`https://static.ticket.sz-trip.com/cgc/images/indexs/${index + 1}s.png`)" class="titleImg" mode="heightFix"></image>
</view>
</view>
<!-- <view class="menu-right flex-around">
<swiper class="menu-right" :circular="true" :interval="6000"
:duration="800" :indicator-dots="false" :autoplay="true" v-if="smallBanner">
<swiper-item v-for="(item, index) in smallBanner" :key="index" @click.stop="gotoUrlNew(item)">
<image class="menu-right" :src="showImg(item.head_img)" mode="aspectFill" lazy-load="true"></image>
</swiper-item>
</swiper>
</view> -->
</view>
<!-- 非遗手札 -->
<view v-if="handwrittenList && handwrittenList.length > 0">
<view class="title-box flex-between">
<image src="https://cgc.js-dyyj.com/uploads/20250619/d0cfd5cd7253d8ce6a747842a40be020.png" mode="heightFix"></image>
<image src="https://static.ticket.sz-trip.com/cgc/images/index/more.png" mode="" @click="gotoPath('/subPackages/letter/index')"></image>
</view>
<view class="handwritten-box flex-between">
<image :src="showImg(item.image)" mode="aspectFill" v-for="(item,index) in handwrittenList" :key="index"
@click="viewDetail(item)"></image>
</view>
</view>
<!-- 非遗时光 -->
<view v-if="shiguang && shiguang.image">
<view class="title-box flex-between">
<image src="https://cgc.js-dyyj.com/uploads/20250619/b10ed22a2e5b2187d88352869575fb16.png" mode="heightFix"></image>
<image src="https://static.ticket.sz-trip.com/cgc/images/index/more.png" mode="" @click="gotoPath('/subPackages/shiguang/index')"></image>
</view>
<view class="time-box" :style="{backgroundImage: 'url('+showImg(shiguang.image)+')'}" @click="gotoVideo(shiguang)">
<image src="https://static.ticket.sz-trip.com/cgc/images/index/play.png" class="play"></image>
</view>
</view>
<!-- 底部推荐 -->
<view class="hot-type flex-around">
<view v-for="(item,index) in hotType" :key="index" :class="{'hot-active': index == hotIndex}" @click="changeType(index)">
{{item.title}}
</view>
</view>
<view class="hot-box" v-if="hotIndex==0">
<view class="hot-column" v-for="(column, index) in 2" :key="index">
<view v-if="indexs%2==1&&column==0" v-for="(item,indexs) in hotList" :key="indexs" class="hot-item" @click="gotoHotDetail(item)">
<view class="image-container">
<image :src="showImg(item.goods.image)" mode="widthFix" class="hot-img" lazy-load="true"></image>
</view>
<view class="hot-content">
<view class="title text-overflowRows">{{item.title || item.goods.title}}</view>
</view>
</view>
<view v-if="indexs%2==0&&column==1" v-for="(item,indexs) in hotList" :key="indexs" class="hot-item" @click="gotoHotDetail(item)">
<view class="image-container">
<image :src="showImg(item.goods.image)" mode="widthFix" class="hot-img" lazy-load="true"></image>
</view>
<view class="hot-content">
<view class="title text-overflowRows">{{item.title || item.goods.title}}</view>
</view>
</view>
</view>
</view>
<view class="hot-box" v-else>
<view class="hot-column" v-for="(column, index) in 2" :key="index">
<view v-if="indexs%2==1&&column==0" v-for="(item,indexs) in hotList1" :key="indexs" class="hot-item" @click="gotoHotDetail(item)">
<view class="image-container">
<image :src="showImg(item.goods.image)" mode="widthFix" class="hot-img" lazy-load="true"></image>
</view>
<view class="hot-content">
<view class="title text-overflowRows">{{item.title || item.goods.title}}</view>
</view>
</view>
<view v-if="indexs%2==0&&column==1" v-for="(item,indexs) in hotList1" :key="indexs" class="hot-item" @click="gotoHotDetail(item)">
<view class="image-container">
<image :src="showImg(item.goods.image)" mode="widthFix" class="hot-img" lazy-load="true"></image>
</view>
<view class="hot-content">
<view class="title text-overflowRows">{{item.title || item.goods.title}}</view>
</view>
</view>
</view>
</view>
<view class="bg">
<headerVue></headerVue>
<CustomTabBar :currentTab="1" />
<CustomTabBar :currentTab="0" />
</view>
</template>
<script>
import headerVue from "@/components/header.vue"
import CustomTabBar from '@/components/CustomTabBar.vue';
export default {
components: {CustomTabBar},
components: {CustomTabBar,headerVue},
data() {
return {
//

25
pages/index/intelligentAgent.vue

@ -0,0 +1,25 @@
<template>
<view></view>
</template>
<script>
import CustomTabBar from '@/components/CustomTabBar.vue';
export default {
components: {CustomTabBar},
data() {
return {}
},
onLoad() {
},
onReady() {
},
methods:{
},
}
</script>
<style lang="scss" scoped>
</style>

25
pages/index/readingBody.vue

@ -0,0 +1,25 @@
<template>
<view></view>
</template>
<script>
import CustomTabBar from '@/components/CustomTabBar.vue';
export default {
components: {CustomTabBar},
data() {
return {}
},
onLoad() {
},
onReady() {
},
methods:{
},
}
</script>
<style lang="scss" scoped>
</style>

25
pages/index/sensoryStore.vue

@ -0,0 +1,25 @@
<template>
<view></view>
</template>
<script>
import CustomTabBar from '@/components/CustomTabBar.vue';
export default {
components: {CustomTabBar},
data() {
return {}
},
onLoad() {
},
onReady() {
},
methods:{
},
}
</script>
<style lang="scss" scoped>
</style>
Loading…
Cancel
Save