Browse Source

线路跳转

master
chenkainan 1 year ago
parent
commit
31fb599514
  1. 40
      pages/index/index.vue
  2. 1
      pages/map/map.vue

40
pages/index/index.vue

@ -76,19 +76,19 @@
<view v-if="lineList && lineList.length > 0"> <view v-if="lineList && lineList.length > 0">
<view class="title-box flex-between"> <view class="title-box flex-between">
<image :src="showImg(homeUi.xltj)" mode=""></image> <image :src="showImg(homeUi.xltj)" mode=""></image>
<view @click="gotoPath('/subPackages/line/lineList')">更多 ></view> <view @click="gotoLineList">更多 ></view>
</view> </view>
<view class="box"> <view class="box">
<view v-for="(item,index) in lineList" :key="index" class="line-item" @click="goCalendarDetail(item.goods,1)"> <view v-for="(item,index) in lineList" :key="index" class="line-item" @click="goLineDetail(item)">
<view class="hot flex-center" v-if="item.goods.image_tag">{{item.goods.image_tag}}</view> <view class="hot flex-center" v-if="item.goods.image_tag">{{item.goods.image_tag}}</view>
<image :src="showImg(item.goods.image)" mode="aspectFill" class="line-img"></image> <image :src="showImg(item.points[0].main_image)" mode="aspectFill" class="line-img"></image>
<view class="line-content flex-between"> <view class="line-content">
<view class="line-title text-overflow">{{item.goods.title}}</view> <view class="line-title text-overflow">{{item.name}}</view>
<view class="line-subtitle text-overflow">{{item.goods.subtitle}}</view> <view class="line-subtitle text-overflow">{{item.points.length}}个景点</view>
<view style="display: flex;" v-if="item.goods.goods_new_tag"> <!-- <view style="display: flex;" v-if="item.goods.goods_new_tag">
<view class="line-tag" v-for="(tagItem,tagIndex) in item.goods.goods_new_tag.split(',').slice(0,2)" :key="tagIndex">{{tagItem}}</view> <view class="line-tag" v-for="(tagItem,tagIndex) in item.goods.goods_new_tag.split(',').slice(0,2)" :key="tagIndex">{{tagItem}}</view>
</view> </view> -->
<!-- <view class="line-price">{{item.goods.low_money / 100}}</view> --> <!-- <view class="line-price">{{item.goods.low_money / 100}}</view> -->
</view> </view>
</view> </view>
@ -224,6 +224,18 @@
this.getEventCalendarNum() this.getEventCalendarNum()
}, },
methods: { methods: {
// 线
gotoLineList() {
uni.navigateTo({
url: '/subPackages/webPage/webPage?url=https://yandumap.sz-trip.com/lineList'
});
},
// 线
goLineDetail(item) {
uni.navigateTo({
url: '/subPackages/webPage/webPage?url=https://yandumap.sz-trip.com/lineList?id=' + item.id
});
},
// //
getEventCalendarNum() { getEventCalendarNum() {
this.Post({},'/api/activity/getActivityCalendarCount').then(res => { this.Post({},'/api/activity/getActivityCalendarCount').then(res => {
@ -349,11 +361,10 @@
// 线 // 线
getLineList() { getLineList() {
this.Post({ this.Post({
offset: 0, type: '',
limit: 3, code: ''
tag_id: 55 },'/api/emap/getLineByCode').then(res => {
},'/api/tag/getGoodsByTagId').then(res => { this.lineList = res.data
this.lineList = res.data;
}) })
}, },
// //
@ -627,8 +638,6 @@
height: 227rpx; height: 227rpx;
margin-left: 23rpx; margin-left: 23rpx;
padding: 16rpx 0 18rpx; padding: 16rpx 0 18rpx;
flex-direction: column;
align-items: flex-start;
.line-title { .line-title {
width: 368rpx; width: 368rpx;
@ -643,6 +652,7 @@
font-weight: 500; font-weight: 500;
font-size: 25rpx; font-size: 25rpx;
color: #999999; color: #999999;
margin-top: 15px;
} }
.line-tag { .line-tag {

1
pages/map/map.vue

@ -32,5 +32,6 @@
.content { .content {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
padding-bottom: env(safe-area-inset-bottom)
} }
</style> </style>
Loading…
Cancel
Save