|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<view class="app-container">
|
|
|
+ <button @click="close">返回</button>
|
|
|
<view class="bg">
|
|
|
<view flex around class="tabs">
|
|
|
<img v-for="(item, index) in tabs" :key="index" :src="item" @click="getActive(index)" />
|
|
@@ -12,10 +13,12 @@
|
|
|
<text>{{ item.title }}</text>
|
|
|
</view>
|
|
|
<view flex wrap :center="index === 1 || index === 2 ? true : false">
|
|
|
- <view :style="{width: index === 1 || index === 2 ? '50%' : '33.33333%'}" v-for="(i, ind) in item.img"
|
|
|
- :key="i.name" @click="getDetail(i)">
|
|
|
+ <view :style="{width: index === 1 || index === 2 ? '50%' : '33.33333%'}"
|
|
|
+ v-for="(i, ind) in item.img" :key="i.name" @click="getDetail(i)">
|
|
|
<img :src="i.url" style="width: 100%" />
|
|
|
- <view :class="['name', item.img.length === 2 ? ind === 0 ? 'padding-left' : 'padding-right' : '']">{{ i.name }}</view>
|
|
|
+ <view
|
|
|
+ :class="['name', item.img.length === 2 ? ind === 0 ? 'padding-left' : 'padding-right' : '']">
|
|
|
+ {{ i.name }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -106,6 +109,10 @@ export default {
|
|
|
url: `/pages/museum/detail?id=${i.id}`
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ close() {
|
|
|
+ closePage.postMessage('关闭页面')
|
|
|
}
|
|
|
}
|
|
|
}
|