|
|
@@ -10,17 +10,31 @@
|
|
|
v-for="(item, index) in attractList"
|
|
|
:key="index"
|
|
|
style="justify-content: start"
|
|
|
- @click="goAttractDeatil(item.id)"
|
|
|
+ @click="goAttractDeatil(item.id, item.time_type)"
|
|
|
+ :class="{ unclick: item.time_type == 0 }"
|
|
|
>
|
|
|
<image
|
|
|
:src="item.pic_url"
|
|
|
mode="aspectFill"
|
|
|
- style="width: 112rpx; height: 112rpx; margin-right: 20rpx;border-radius: 10rpx;"
|
|
|
+ style="
|
|
|
+ width: 112rpx;
|
|
|
+ height: 112rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ "
|
|
|
></image>
|
|
|
<view class="notice-content" style="width: 75%">
|
|
|
<view class="notice-content-font">{{ item.title }}</view>
|
|
|
<view class="attract-content">{{ item.desc }}</view>
|
|
|
- <view class="notice-content-time" style="margin-top: 20rpx">{{item.addtime | globalTime}}</view>
|
|
|
+ <view
|
|
|
+ class="notice-content-time"
|
|
|
+ style="margin-top: 20rpx"
|
|
|
+ v-if="item.time_type == 1"
|
|
|
+ >时间:{{ item.time | globalTime }}</view
|
|
|
+ >
|
|
|
+ <view class="notice-content-time" style="margin-top: 20rpx" v-else
|
|
|
+ >时间:待定</view
|
|
|
+ >
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -52,7 +66,8 @@ export default {
|
|
|
this.getAttract();
|
|
|
},
|
|
|
methods: {
|
|
|
- goAttractDeatil(id) {
|
|
|
+ goAttractDeatil(id, type) {
|
|
|
+ if (type == 0) return;
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/attract/attract_deatil?id=" + id,
|
|
|
});
|
|
|
@@ -85,12 +100,13 @@ export default {
|
|
|
},
|
|
|
data: postData,
|
|
|
success: (res) => {
|
|
|
- if (res.data.code === 200) {
|
|
|
- res.data.data.list.forEach((item) => {
|
|
|
- item.pic_url = getApp().globalData.shareUrl + item.pic_url;
|
|
|
- });
|
|
|
- this.attractList = res.data.data.list;
|
|
|
- }
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ console.log(res.data.data.list);
|
|
|
+ res.data.data.list.forEach((item) => {
|
|
|
+ item.pic_url = getApp().globalData.shareUrl + item.pic_url;
|
|
|
+ });
|
|
|
+ this.attractList = res.data.data.list;
|
|
|
+ }
|
|
|
},
|
|
|
fail: () => {
|
|
|
console.log("连接失败");
|
|
|
@@ -102,6 +118,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.unclick {
|
|
|
+ background-color: #bfbfbf !important;
|
|
|
+}
|
|
|
.content {
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
@@ -127,7 +146,7 @@ export default {
|
|
|
padding-left: 20rpx;
|
|
|
width: 100%;
|
|
|
justify-items: start;
|
|
|
- margin-bottom: 10rpx;
|
|
|
+ margin-bottom: 10rpx;
|
|
|
}
|
|
|
.notice-content-box {
|
|
|
width: 100%;
|