1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- import httpRequestApi from '../../../utils/APIClient';
- Page({
- data: {
- class1: 'commentItem commentItemFirst',
- classNormal: 'commentItem',
- comment:[
- {
- name: '阿尔萨斯',
- text: '总有一天我将死去而你我儿子啊将加冕为王加冕为王加冕为王加冕为王加冕为王加冕为王加冕为王',
- time: '10-18 09:56',
- likes: '165',
- avatar: '../../../static/image/timg.jpg'
- },
- {
- name: '古尔丹',
- text: '你读的是个求',
- time: '10-18 09:56',
- likes: '165',
- avatar: '../../../static/image/timg.jpg'
- },
- {
- name: '阿尔萨斯',
- text: '圣光将照耀我',
- time: '10-18 09:56',
- likes: '165',
- avatar: '../../../static/image/timg.jpg'
- },
- ]
-
- },
- onLoad: function (option) {
- console.log(option)
- wx.setNavigationBarTitle({
- title: option.num + '条回复'//页面标题为路由参数
- })
- },
- goToReading: function () {
- let id = this.data.id;
- let title = this.data.title;
- wx.navigateTo({
- url: `../../main/reading/reading?id=${id}&title=${title}`
- })
- },
- onShareAppMessage: function (res) {
- if (res.from === 'button') {
- // 来自页面内转发按钮
- console.log(res.target)
- }
- return {
- title: '测试',
- path: '/pages/social/works/works'
- }
- },
- follow: function () {
- let uid = 1;
- let followUid = 2;
- httpRequestApi.followUser(uid, followUid).success((res) => {
- console.log(res)
- });
- },
- // 去其他用户的作品页
- goToOthers: function (e) {
- wx.navigateTo({
- url: `../../main/reading/reading?id=${id}&title=${title}`
- })
- },
- // 查询回复
- getReply: function () {
- let uid = 1;
- let columnId = 1001;
- let pageNo = 1;
- let pageSize = 10;
- httpRequestApi.getReply(uid, columnId, pageNo, pageSize).success((res) => {
- console.log(res);
- });
- },
- // 打开回复详情页
- goToDetail: function (e) {
- let id = e.currentTarget.dataset.id;
- let num = e.currentTarget.dataset.num;
- console.log(e);
- wx.navigateTo({
- url: `../../social/replyDetail/replyDetail?id=${id}&num=${num}`
- })
- }
- })
|