请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

问题以解决 不用回答了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
var postData=require('../../data/posts-data.js')
 
Page({
 
/**
   * 页面的初始数据
   */
data: {
},
 
/**
   * 生命周期函数--监听页面加载
   */
onLoad: function (options) {
this.setData({
post_key: postData.postlist
});
},
})
 
var post_container = [
{
date: "Nov 25 2016",
title: "正是虾肥蟹壮时",
image: "/imges/avatar/1.png",
crab: "/imges/post/crab.png",
content: "透过阳台玻璃,整个唐岛湾滨海公园尽收眼底。摆在你面前的是各种海鲜美味:清蒸扇贝、拌海蜇、鲜鱼饼子、烤海捕大虾、梭子蟹……“",
coll: "92",
view: "68",
 
},
{
date: "Nov 25 2016",
title: "正是虾肥蟹壮时",
image: "/imges/avatar/2.png",
crab: "/imges/post/bl.png",
content: "透过阳台玻璃,整个唐岛湾滨海公园尽收眼底。摆在你面前的是各种海鲜美味:清蒸扇贝、拌海蜇、鲜鱼饼子、烤海捕大虾、梭子蟹……“",
coll: "92",
view: "68",
},
{
date: "Nov 25 2016",
title: "正是虾肥蟹壮时",
image: "/imges/avatar/3.png",
crab: "/imges/post/cat.png",
content: "透过阳台玻璃,整个唐岛湾滨海公园尽收眼底。摆在你面前的是各种海鲜美味:清蒸扇贝、拌海蜇、鲜鱼饼子、烤海捕大虾、梭子蟹……“",
coll: "92",
view: "68",
},
{
date: "Nov 25 2016",
title: "正是虾肥蟹壮时",
image: "/imges/avatar/3.png",
crab: "/imges/post/sls.JPG",
content: "透过阳台玻璃,整个唐岛湾滨海公园尽收眼底。摆在你面前的是各种海鲜美味:清蒸扇贝、拌海蜇、鲜鱼饼子、烤海捕大虾、梭子蟹……“",
coll: "92",
view: "68",
}
]
module.exposts={
postlist: post_container
}
 
 
 
<view>
<swiper indicator-dots="true" >
<swiper-item>
<image src="/imges/wx.png" ></image>
</swiper-item>
<swiper-item>
<image src="/imges/vr.png" ></image>
</swiper-item>
<swiper-item>
<image src="/imges/iqiyi.png" ></image>
</swiper-item>
</swiper>
<block wx:for="{{post_key}}" wx:for-item="item">
<view class="post-container">
<view class="post-author-date">
<image class="post-author" src="{{item.image}}"></image>
<text class="post-date">{{item.date}}</text>
</view>  
<text class="post-title">{{item.title}}</text>
<image class="post-image" src="{{item.crab}}"></image>  
<text class="post-content">{{item.content}}</text>
<view class="post-like">
<image class="post-like-image" src="../../imges/icon/chat.png"></image>
<text class="post-like-font">{{item.coll}}</text>
<image class="post-like-image" src="../../imges/icon/view.png"></image>
<text  class="post-like-font">{{item.view}}</text>
</view>  
</view>
</block>
</view>


正在回答 回答被采纳积分+3

插入代码

1回答

提问者 qq_寄给你一朵玫瑰_0 2018-03-14 10:22:39

是module.exports单词写错了,数据能取到了,但是点击第一个页面无法跳转是怎么回事

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信