Commit c0f9020f by chenwq

排名

1 parent a1c2eb1a
...@@ -78,8 +78,9 @@ Component({ ...@@ -78,8 +78,9 @@ Component({
dealStaffList() { dealStaffList() {
var list = this.data.orderObj var list = this.data.orderObj
list && list.activityList.forEach(item => { list && list.activityList.forEach(item => {
item.showStaffList = item.staffList.length > 10 ? item.staffList.slice(0, 10) : item.staffList let sliceNum = item.actStatus == 1 ? 10 : 3
item.staffList = item.staffList.length > 10 ? item.staffList.slice(10) : [] item.showStaffList = item.staffList.length > sliceNum ? item.staffList.slice(0, sliceNum) : item.staffList
item.staffList = item.staffList.length > sliceNum ? item.staffList.slice(sliceNum) : []
}) })
this.setData({ this.setData({
orderObj: list orderObj: list
......
...@@ -228,7 +228,6 @@ Page({ ...@@ -228,7 +228,6 @@ Page({
actList.forEach((item, idx) => { actList.forEach((item, idx) => {
var curItem = res.find(k => k.goodsCategoryCode == item.productCode) var curItem = res.find(k => k.goodsCategoryCode == item.productCode)
if (curItem) { if (curItem) {
console.log(curItem)
curItem.totalNum = curItem.activityList.length curItem.totalNum = curItem.activityList.length
curItem.activityList.forEach(k => { curItem.activityList.forEach(k => {
// 删--- // 删---
...@@ -241,14 +240,14 @@ Page({ ...@@ -241,14 +240,14 @@ Page({
// 0-未开始;1-活动中;2-已结束 // 0-未开始;1-活动中;2-已结束
if (new Date(k.startTime) > new Date()) { if (new Date(k.startTime) > new Date()) {
k.actStatus = 0 k.actStatus = 0
k.interDays = parseInt((new Date().getTime(k.startTime) - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1 k.interDays = parseInt((new Date(k.startTime).getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1
} else if (new Date(k.startTime) < new Date() < new Date(k.endTime)) { } else if (new Date(k.startTime) < new Date() < new Date(k.endTime)) {
k.actStatus = 1 k.actStatus = 1
k.interDays = parseInt((new Date().getTime() - new Date(k.startTime).getTime()) / (1000 * 60 * 60 * 24)) + 1 k.interDays = parseInt((new Date().getTime() - new Date(k.startTime).getTime()) / (1000 * 60 * 60 * 24)) + 1
k.toEndDays = parseInt((new Date(k.endTime).getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1 k.toEndDays = parseInt((new Date(k.endTime).getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1
} else if (new Date(k.endTime) < new Date()) { } else if (new Date(k.endTime) < new Date()) {
k.actStatus = 2 k.actStatus = 2
k.interDays = parseInt((new Date().getTime(k.endTime) - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1 k.interDays = parseInt((new Date(k.endTime).getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1
} }
k.suggestTxtList = [] k.suggestTxtList = []
k.suggestList = [] k.suggestList = []
...@@ -299,7 +298,6 @@ Page({ ...@@ -299,7 +298,6 @@ Page({
this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1]) this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1])
wx.$router.getData(obj => { wx.$router.getData(obj => {
console.log(obj)
var scene = {} var scene = {}
Object.keys(this.data.sceneObj).forEach(item => { Object.keys(this.data.sceneObj).forEach(item => {
scene[item] = obj[item] scene[item] = obj[item]
...@@ -311,8 +309,6 @@ Page({ ...@@ -311,8 +309,6 @@ Page({
}) })
this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1]) this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1])
// this.getCustomerDetail()
// this.setCurActivity()
}) })
}, },
...@@ -323,47 +319,5 @@ Page({ ...@@ -323,47 +319,5 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: this.data.merchantInfo.merchantName, title: this.data.merchantInfo.merchantName,
}) })
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
} }
}) })
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!