完成了小程序项目列表页,项目明细抽佣表,下级用户项目明细抽佣表的下拉刷新
This commit is contained in:
3
app.js
3
app.js
@ -2,5 +2,6 @@ const { checkLogin } = require('./utils/logcheck');
|
|||||||
App({
|
App({
|
||||||
onLaunch() {
|
onLaunch() {
|
||||||
// checkLogin();
|
// checkLogin();
|
||||||
}
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -6,7 +6,7 @@ Page({
|
|||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad() {
|
||||||
this.getProjectList()
|
this.getProjectList()
|
||||||
this.getFixedRate()
|
this.getFixedRate()
|
||||||
},
|
},
|
||||||
@ -126,53 +126,27 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
*/
|
*/
|
||||||
onReady() {
|
onPullDownRefresh: function () {
|
||||||
|
this.onRefresh();
|
||||||
|
},
|
||||||
|
onRefresh:function(){
|
||||||
|
//导航条加载动画
|
||||||
|
wx.showNavigationBarLoading()
|
||||||
|
//loading 提示框
|
||||||
|
wx.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
})
|
||||||
|
console.log("下拉刷新啦");
|
||||||
|
this.onLoad()
|
||||||
|
setTimeout(function () {
|
||||||
|
wx.hideLoading();
|
||||||
|
wx.hideNavigationBarLoading();
|
||||||
|
//停止下拉刷新
|
||||||
|
wx.stopPullDownRefresh();
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面显示
|
|
||||||
*/
|
|
||||||
onShow() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面隐藏
|
|
||||||
*/
|
|
||||||
onHide() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面卸载
|
|
||||||
*/
|
|
||||||
onUnload() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
|
||||||
*/
|
|
||||||
onPullDownRefresh() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
})
|
@ -2,5 +2,6 @@
|
|||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"commissionPop": "/pages/personCenter/component/commissionPop/commissionPop",
|
"commissionPop": "/pages/personCenter/component/commissionPop/commissionPop",
|
||||||
"commissionRatePop": "/pages/personCenter/component/commissionRatePop/commissionRatePop"
|
"commissionRatePop": "/pages/personCenter/component/commissionRatePop/commissionRatePop"
|
||||||
}
|
},
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
@ -32,7 +32,7 @@ import { baseUrl } from "../../../../request";Component({
|
|||||||
// 提交设置
|
// 提交设置
|
||||||
submit() {
|
submit() {
|
||||||
const rate = parseFloat(this.data.commissionRate);
|
const rate = parseFloat(this.data.commissionRate);
|
||||||
if (isNaN(rate) || rate <= 0 || rate > 5) {
|
if (isNaN(rate) || rate < 0 || rate > 10) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: `请输入有效的比例,最大为 5%`,
|
title: `请输入有效的比例,最大为 5%`,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
@ -99,52 +99,25 @@ Page({
|
|||||||
this.getSubCommissionList()
|
this.getSubCommissionList()
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
*/
|
*/
|
||||||
onReady() {
|
onPullDownRefresh: function () {
|
||||||
|
this.onRefresh();
|
||||||
},
|
},
|
||||||
|
onRefresh:function(){
|
||||||
/**
|
//导航条加载动画
|
||||||
* 生命周期函数--监听页面显示
|
wx.showNavigationBarLoading()
|
||||||
*/
|
//loading 提示框
|
||||||
onShow() {
|
wx.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
},
|
})
|
||||||
|
this.getSubCommissionList()
|
||||||
/**
|
setTimeout(function () {
|
||||||
* 生命周期函数--监听页面隐藏
|
wx.hideLoading();
|
||||||
*/
|
wx.hideNavigationBarLoading();
|
||||||
onHide() {
|
//停止下拉刷新
|
||||||
|
wx.stopPullDownRefresh();
|
||||||
},
|
}, 1000)
|
||||||
|
},
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面卸载
|
|
||||||
*/
|
|
||||||
onUnload() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
|
||||||
*/
|
|
||||||
onPullDownRefresh() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
})
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"commissionRatePop": "/pages/personCenter/component/commissionRatePop/commissionRatePop"
|
"commissionRatePop": "/pages/personCenter/component/commissionRatePop/commissionRatePop"
|
||||||
}
|
},
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
@ -64,4 +64,31 @@ Page({
|
|||||||
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}&isPromo=0`
|
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}&isPromo=0`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
this.onRefresh();
|
||||||
|
},
|
||||||
|
onRefresh:function(){
|
||||||
|
//导航条加载动画
|
||||||
|
wx.showNavigationBarLoading()
|
||||||
|
//loading 提示框
|
||||||
|
wx.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
})
|
||||||
|
console.log("下拉刷新啦");
|
||||||
|
this.onLoad()
|
||||||
|
setTimeout(function () {
|
||||||
|
wx.hideLoading();
|
||||||
|
wx.hideNavigationBarLoading();
|
||||||
|
//停止下拉刷新
|
||||||
|
wx.stopPullDownRefresh();
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText": "接单列表",
|
"navigationBarTitleText": "接单列表",
|
||||||
"usingComponents": {}
|
"usingComponents": {},
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
Reference in New Issue
Block a user