|
|
@ -1,14 +1,14 @@ |
|
|
|
<template> |
|
|
|
<view class="page__view highlight"> |
|
|
|
|
|
|
|
<navbar :title="detail.title" leftClick @leftClick="$utils.navigateBack" /> |
|
|
|
<navbar :title="liveInfo.title" leftClick @leftClick="$utils.navigateBack" /> |
|
|
|
|
|
|
|
<view class="header"> |
|
|
|
<image class="cover-img" :src="detail.image" mode="widthFix"></image> |
|
|
|
<image class="cover-img" :src="liveInfo.url" mode="widthFix"></image> |
|
|
|
<view class="flex" style="padding: 40rpx 40rpx 0 40rpx;"> |
|
|
|
<view class="flex flex-column"> |
|
|
|
<view class="title">{{ detail.title }}</view> |
|
|
|
<view class="tag">{{ detail.createTime }}</view> |
|
|
|
<view class="title">{{ liveInfo.title }}</view> |
|
|
|
<view class="tag">{{ liveInfo.createTime }}</view> |
|
|
|
</view> |
|
|
|
<view v-if="isManager" class="flex operate"> |
|
|
|
<view class="btn btn-add" @click="onAdd">新增记录</view> |
|
|
@ -25,7 +25,7 @@ |
|
|
|
</view> |
|
|
|
<view class="info"> |
|
|
|
<view class="flex title"> |
|
|
|
<view>{{ item.name }}</view> |
|
|
|
<view>{{ item.createBy }}</view> |
|
|
|
<image class="icon" src="@/static/image/icon-location.png" mode="widthFix"></image> |
|
|
|
<view class="address text-ellipsis">{{ item.address }}</view> |
|
|
|
</view> |
|
|
@ -34,7 +34,7 @@ |
|
|
|
</view> |
|
|
|
<view class="section-content record"> |
|
|
|
<view class="record-item" v-for="(image, imgIdx) in item.images" :key="imgIdx"> |
|
|
|
<image class="img" :src="image" mode="scaleToFill"></image> |
|
|
|
<image class="img" :src="image" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -47,6 +47,8 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapState } from 'vuex' |
|
|
|
|
|
|
|
import mixinsList from '@/mixins/list.js' |
|
|
|
|
|
|
|
import SYStackedCarousel from '@/uni_modules/SY-StackedCarousel/components/SY-StackedCarousel/SY-StackedCarousel.vue' |
|
|
@ -60,93 +62,44 @@ |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
id: null, |
|
|
|
detail: {}, |
|
|
|
bannerList: [], |
|
|
|
current: 0, |
|
|
|
queryParams: { |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
id: '', |
|
|
|
imageId: '', |
|
|
|
}, |
|
|
|
// todo |
|
|
|
mixinsListApi: '', |
|
|
|
mixinsListApi: 'queryImageContentList', |
|
|
|
// todo: fetch |
|
|
|
isManager: false, |
|
|
|
isManager: true, |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
swiperCurrent() { |
|
|
|
return this.bannerList[this.current] |
|
|
|
}, |
|
|
|
...mapState(['liveInfo']), |
|
|
|
}, |
|
|
|
onLoad(arg) { |
|
|
|
const { id } = arg |
|
|
|
this.id = id |
|
|
|
|
|
|
|
this.fetchDetail() |
|
|
|
|
|
|
|
this.queryParams.id = id |
|
|
|
this.queryParams.imageId = id |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async fetchDetail() { |
|
|
|
// todo: fetch |
|
|
|
this.detail = { |
|
|
|
id: '001', |
|
|
|
image: '/static/image/temp-20.png', |
|
|
|
title: '趣玩新加坡', |
|
|
|
createTime: '2025-04-18', |
|
|
|
} |
|
|
|
}, |
|
|
|
// todo: delete |
|
|
|
getData() { |
|
|
|
this.list = [ |
|
|
|
{ |
|
|
|
id: '001', |
|
|
|
avatar: '/pages_order/static/temp-30.png', |
|
|
|
name: '战斗世界', |
|
|
|
address: '241 Orchard Road, Singapore 238863', |
|
|
|
createTime: '2023-04-18 12:00:00', |
|
|
|
images: [ |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: '001', |
|
|
|
avatar: '/pages_order/static/temp-30.png', |
|
|
|
name: '战斗世界', |
|
|
|
address: '10 Bayfront Avenue, Singapore 018956', |
|
|
|
createTime: '2023-04-18 12:00:00', |
|
|
|
images: [ |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
'/pages_order/static/temp-38.png', |
|
|
|
] |
|
|
|
}, |
|
|
|
] |
|
|
|
}, |
|
|
|
clickHandler(item, index) { |
|
|
|
console.log("item: ", item); |
|
|
|
console.log("index: ", index); |
|
|
|
this.current = index |
|
|
|
}, |
|
|
|
changeHandler(index) { |
|
|
|
console.log("当前触发change事件,返回索引: ", index); |
|
|
|
getCoverImage(image) { |
|
|
|
return image?.split?.(',')?.[0] |
|
|
|
}, |
|
|
|
getDataThen(records) { |
|
|
|
this.list = records.map(item => { |
|
|
|
const { id, avatar, createBy, address, image, createTime } = item |
|
|
|
|
|
|
|
return { |
|
|
|
id, |
|
|
|
// todo: check key |
|
|
|
avatar: avatar || '/pages_order/static/center/avatar-default.png', |
|
|
|
createBy, |
|
|
|
address, |
|
|
|
images: image?.split?.(',') || [], |
|
|
|
createTime, |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
onAdd() { |
|
|
|
this.$refs.formPopup.open() |
|
|
|