提交 5ebe2eb4 编写于 作者: K kongbai121

页面下拉

上级 07221063
......@@ -32,11 +32,11 @@ App({
token: null,
//图片网络路径
// httpUrl:"http://10.170.15.123:8088/images",
// httpUrl:"http://localhost:8088/images",
httpUrl:"https://kongbai121.xyz/images",
//后台地址
// myUrl:"http://10.170.15.123:8080",
// myUrl:"http://localhost:8080",
myUrl:"https://kongbai121.xyz/miniapp",
//(为了减轻服务器负担,只在演示时开)
......
......@@ -200,7 +200,12 @@ Page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
onPullDownRefresh: function () {
this.listTree();
this.setData({
grade_name: '分类'
})
},
/**
* 页面上拉触底事件的处理函数
......
{
"usingComponents": {},
"navigationStyle":"custom"
"navigationStyle":"custom",
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -284,7 +284,13 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.setData({
treeId: options.id,
hasLogin:app.globalData.hasLogin,
// treeId: 33
});
this.tree();
this.opinion();
},
/**
......
{
"usingComponents": {},
"navigationBarTitleText": "树洞详情"
"navigationBarTitleText": "树洞详情",
"enablePullDownRefresh": true
}
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "发布"
"navigationBarTitleText": "发布",
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -332,7 +332,13 @@ toggleDialogtwo(e) {
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.setData({
articleId: options.id,
hasLogin:app.globalData.hasLogin,
// articleId: 33
});
this.article();
this.comment();
},
/**
......
{
"usingComponents": {},
"navigationBarTitleText": "文章详细"
"navigationBarTitleText": "文章详细",
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -172,6 +172,10 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.setData({
inputData:''
});
this.listArticle();
},
/**
......
{
"usingComponents": {},
"navigationStyle":"custom"
"navigationStyle":"custom",
"enablePullDownRefresh": true
}
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "关于我们"
"navigationBarTitleText": "关于我们",
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ Page({
* 页面的初始数据
*/
data: {
userid:null,
chatList:[]
},
......@@ -41,6 +42,25 @@ Page({
})
return;
}
wx.request({
url: app.globalData.myUrl+'/user/getUserId',
data: {
token: app.globalData.token
},
success: (res) => {
// console.log(res);
if (res.data.success) {
that.setData({
userid:res.data.msg
})
}else{
that.errShowToast(res.data.msg)
}
// console.log(that.data.chatList);
},
fail: (res) => {},
complete: (res) => {},
})
wx.request({
url: app.globalData.myUrl+'/chat/list',
data: {
......@@ -55,6 +75,7 @@ Page({
}else{
that.errShowToast(res.data.msg)
}
// console.log(that.data.userid);
// console.log(that.data.chatList);
},
fail: (res) => {},
......
<!-- 私信 -->
<view class="all" wx:for="{{chatList}}" wx:key="index">
<!-- 单个聊天框 -->
<view class="single" bindtap="beng" data-idd="{{item.toUser.id}}">
<!-- 未读信息数量 -->
<view class="marks" wx:if="{{item.unreadNum != 0}}">
<text>{{item.unreadNum}}</text>
</view>
<view class="left">
<!-- 左边头像 -->
<image src="{{item.toUser.avatarUrl}}"></image>
</view>
<!-- 右边个人信息 -->
<view class="right">
<view class="flex">
<!-- 用户id -->
<text class="title">{{item.toUser.nickName}}</text>
<!-- 最近一条聊天记录 -->
<text class="nextTitle">{{item.content}}</text>
<view wx:if="{{userid==item.toUserId}}">
<!-- 单个聊天框 -->
<view class="single" bindtap="beng" data-idd="{{item.user.id}}">
<!-- 未读信息数量 -->
<view class="marks" wx:if="{{item.unreadNum != 0}}">
<text>{{item.unreadNum}}</text>
</view>
<view class="left">
<!-- 左边头像 -->
<image src="{{item.user.avatarUrl}}"></image>
</view>
<!-- 右边个人信息 -->
<view class="right">
<view class="flex">
<!-- 用户id -->
<text class="title">{{item.user.nickName}}</text>
<!-- 最近一条聊天记录 -->
<text class="nextTitle">{{item.content}}</text>
</view>
</view>
<!-- 最右边的时间 -->
<view class="rightEnd">
<text class="time">{{item.ofTime}}</text>
</view>
</view>
<!-- 最右边的时间 -->
<view class="rightEnd">
<text class="time">{{item.ofTime}}</text>
</view>
<view wx:if="{{userid!=item.toUserId}}">
<!-- 单个聊天框 -->
<view class="single" bindtap="beng" data-idd="{{item.toUser.id}}">
<!-- 未读信息数量 -->
<view class="marks" wx:if="{{item.unreadNum != 0}}">
<text>{{item.unreadNum}}</text>
</view>
<view class="left">
<!-- 左边头像 -->
<image src="{{item.toUser.avatarUrl}}"></image>
</view>
<!-- 右边个人信息 -->
<view class="right">
<view class="flex">
<!-- 用户id -->
<text class="title">{{item.toUser.nickName}}</text>
<!-- 最近一条聊天记录 -->
<text class="nextTitle">{{item.content}}</text>
</view>
</view>
<!-- 最右边的时间 -->
<view class="rightEnd">
<text class="time">{{item.ofTime}}</text>
</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -98,7 +98,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.commentLiseByUser();
},
/**
......
{
"usingComponents": {},
"navigationBarTitleText": "文章评论"
"navigationBarTitleText": "文章评论",
"enablePullDownRefresh": true
}
\ No newline at end of file
{
"usingComponents": {}
"usingComponents": {},
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -97,7 +97,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.opinionLiseByUser()
},
/**
......
{
"usingComponents": {},
"navigationBarTitleText": "树洞评论"
"navigationBarTitleText": "树洞评论",
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -375,7 +375,12 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
if (app.globalData.hasLogin && !app.globalData.openTime) {
this.getArticleNum();
this.getTreeHoleNum();
this.getNewCommentNum();
this.getNewOpinionNum();
}
},
/**
......
{
"usingComponents": {},
"navigationBarTitleText": "个人中心"
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": true
}
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "您发过的帖子"
"navigationBarTitleText": "您发过的帖子",
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -113,7 +113,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.listArticle();
this.listTree();
// console.log(123);
},
......
{
"usingComponents": {},
"navigationBarTitleText": "您发过的树洞"
"navigationBarTitleText": "您发过的树洞",
"enablePullDownRefresh": true
}
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "发帖"
"navigationBarTitleText": "发帖",
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -150,7 +150,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.resourcesList();
},
/**
......
{
"usingComponents": {},
"navigationBarTitleText": "资源共享"
"navigationBarTitleText": "资源共享",
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -92,7 +92,11 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.setData({
resourcesId: options.id
});
// console.log(this.data.resourcesId);
this.getResources();
},
/**
......
{
"usingComponents": {},
"navigationBarTitleText": "资源详细"
"navigationBarTitleText": "资源详细",
"enablePullDownRefresh": true
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册