You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
2.6 KiB
87 lines
2.6 KiB
const util = require('../../../utils/util')
|
|
const app = getApp()
|
|
import { getPaperMillOfInformationList } from "../../api/ztb"
|
|
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
height: app.globalData.fragmentHeight - 80,
|
|
safeBottom: app.globalData.safeBottom,
|
|
orderList: [],
|
|
tableSgin: null,
|
|
loading: false,
|
|
pximg:'/assets/info/px-mr.png',
|
|
querFrom:{
|
|
queryWay: 1,
|
|
priceSort:0
|
|
},
|
|
factoryList:[]
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
this.setData({
|
|
StatusBar: app.globalData.StatusBar || 40,
|
|
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 80),
|
|
height: app.globalData.fragmentHeight - 80
|
|
})
|
|
this.getPaperMillOfInformationListFct({ queryWay: 1 })
|
|
},
|
|
toPage: function (e) {
|
|
if (e.currentTarget.id == 'toqb') {
|
|
util.navigateTo('/pages/article/index/index')
|
|
}
|
|
if(e.currentTarget.id == 'toAttentionPaperFctory'){
|
|
util.navigateTo('/pages/article/attentionPaperFactory/index')
|
|
}
|
|
if(e.currentTarget.id == 'toFactoryDetails'){
|
|
util.navigateTo('/pages/agent/factory/index?id='+e.currentTarget.dataset.factoryid)
|
|
}
|
|
if(e.currentTarget.id == 'toDmai'){
|
|
util.navigateTo('/pages/agent/edit/index?id='+e.currentTarget.dataset.fcid+'&categoryId='+e.currentTarget.dataset.paperid)
|
|
}
|
|
},
|
|
changeTable: function (e) {
|
|
var a = e.currentTarget.id
|
|
if (e.currentTarget.id === this.data.tableSgin) {
|
|
this.setData({ tableSgin: null })
|
|
} else {
|
|
this.setData({ tableSgin: e.currentTarget.id })
|
|
}
|
|
},
|
|
getPaperMillOfInformationListFct(model) {
|
|
this.setData({ loading: true })
|
|
wx.showLoading({ title: '加载中' })
|
|
getPaperMillOfInformationList(model).then(res => {
|
|
this.setData({ orderList: res.data, loading: false })
|
|
wx.hideLoading()
|
|
}).catch((e) => {
|
|
wx.hideLoading()
|
|
})
|
|
},
|
|
changeSort:function(){
|
|
if(this.data.pximg=='/assets/info/px-mr.png'){
|
|
this.setData({ pximg:'/assets/info/px-sx.png' })
|
|
this.data.querFrom.priceSort=1
|
|
this.getPaperMillOfInformationListFct(this.data.querFrom)
|
|
return
|
|
}
|
|
if(this.data.pximg=='/assets/info/px-sx.png'){
|
|
this.setData({ pximg:'/assets/info/px-jx.png' })
|
|
this.data.querFrom.priceSort=0
|
|
this.getPaperMillOfInformationListFct(this.data.querFrom)
|
|
return
|
|
}
|
|
if(this.data.pximg=='/assets/info/px-jx.png'){
|
|
this.setData({ pximg:'/assets/info/px-mr.png' })
|
|
this.data.querFrom.priceSort=0
|
|
this.getPaperMillOfInformationListFct(this.data.querFrom)
|
|
return
|
|
}
|
|
},
|
|
})
|