正在显示
4 个修改的文件
包含
112 行增加
和
0 行删除
pages/dynamic/dynamic.js
0 → 100644
1 | +// pages/dynamic/dynamic.js | ||
2 | +const app = getApp() | ||
3 | +Page({ | ||
4 | + | ||
5 | + /** | ||
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + videoUrl:'', | ||
10 | + title:'', | ||
11 | + time:'', | ||
12 | + content:'', | ||
13 | + }, | ||
14 | + | ||
15 | + /** | ||
16 | + * 生命周期函数--监听页面加载 | ||
17 | + */ | ||
18 | + onLoad: function (options) { | ||
19 | + app.post("school/SchoolDynamicDetails", {school_dynamic_id:options.id}).then(res => { | ||
20 | + if(res.code == 1){ | ||
21 | + console.log(res) | ||
22 | + this.setData({ | ||
23 | + videoUrl:res.data.video_file, | ||
24 | + title:res.data.title, | ||
25 | + time:res.data.createtime, | ||
26 | + content:res.data.content.replace(/\<img/gi, '<img style="width:100%;height:auto" '), | ||
27 | + }) | ||
28 | + } | ||
29 | + }).catch(err => { | ||
30 | + wx.showToast({ | ||
31 | + title: err.msg, | ||
32 | + icon: 'none' | ||
33 | + }) | ||
34 | + }) | ||
35 | + }, | ||
36 | + | ||
37 | + /** | ||
38 | + * 生命周期函数--监听页面初次渲染完成 | ||
39 | + */ | ||
40 | + onReady: function () { | ||
41 | + | ||
42 | + }, | ||
43 | + | ||
44 | + /** | ||
45 | + * 生命周期函数--监听页面显示 | ||
46 | + */ | ||
47 | + onShow: function () { | ||
48 | + | ||
49 | + }, | ||
50 | + | ||
51 | + /** | ||
52 | + * 生命周期函数--监听页面隐藏 | ||
53 | + */ | ||
54 | + onHide: function () { | ||
55 | + | ||
56 | + }, | ||
57 | + | ||
58 | + /** | ||
59 | + * 生命周期函数--监听页面卸载 | ||
60 | + */ | ||
61 | + onUnload: function () { | ||
62 | + | ||
63 | + }, | ||
64 | + | ||
65 | + /** | ||
66 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
67 | + */ | ||
68 | + onPullDownRefresh: function () { | ||
69 | + | ||
70 | + }, | ||
71 | + | ||
72 | + /** | ||
73 | + * 页面上拉触底事件的处理函数 | ||
74 | + */ | ||
75 | + onReachBottom: function () { | ||
76 | + | ||
77 | + }, | ||
78 | + | ||
79 | + /** | ||
80 | + * 用户点击右上角分享 | ||
81 | + */ | ||
82 | + onShareAppMessage: function () { | ||
83 | + | ||
84 | + } | ||
85 | +}) |
pages/dynamic/dynamic.json
0 → 100644
pages/dynamic/dynamic.wxml
0 → 100644
pages/dynamic/dynamic.wxss
0 → 100644
-
请 注册 或 登录 后发表评论