|
|
@ -1,5 +1,5 @@ |
|
|
import util from "../../../utils/util" |
|
|
import util from "../../../utils/util" |
|
|
import { getFactoryPrice, getFactoryCity, hasActivity } from "../../../api/ztb" |
|
|
|
|
|
|
|
|
import { getFactoryPrice, getFactoryCity } from "../../../api/ztb" |
|
|
const event = require('../../../utils/event') |
|
|
const event = require('../../../utils/event') |
|
|
const app = getApp() |
|
|
const app = getApp() |
|
|
|
|
|
|
|
|
@ -35,8 +35,7 @@ Component({ |
|
|
listType: 0 |
|
|
listType: 0 |
|
|
}, |
|
|
}, |
|
|
triggered: false, |
|
|
triggered: false, |
|
|
firstShow: false, |
|
|
|
|
|
hasActivity: false |
|
|
|
|
|
|
|
|
firstShow: false |
|
|
}, |
|
|
}, |
|
|
lifetimes: { |
|
|
lifetimes: { |
|
|
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
|
|
|
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
|
|
|
@ -53,11 +52,6 @@ Component({ |
|
|
onRestart: function(){ |
|
|
onRestart: function(){ |
|
|
this.fetchRegionList() |
|
|
this.fetchRegionList() |
|
|
if(!this.data.firstShow){ |
|
|
if(!this.data.firstShow){ |
|
|
if(app.globalData.userInfo){ |
|
|
|
|
|
hasActivity().then(result => { |
|
|
|
|
|
this.setData({ hasActivity: result.data }) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
this.setData({mHeight: app.globalData.safeFragmentHeight - 190 }) |
|
|
this.setData({mHeight: app.globalData.safeFragmentHeight - 190 }) |
|
|
this.fetchPapersList() |
|
|
this.fetchPapersList() |
|
|
} |
|
|
} |
|
|
@ -74,13 +68,6 @@ Component({ |
|
|
} else if(message.what == 888){ |
|
|
} else if(message.what == 888){ |
|
|
this.setData({ orderList: [], tabIndex: this.data.tabIndex, ['form.pageNum']: 1, loading: true, finished: false }) |
|
|
this.setData({ orderList: [], tabIndex: this.data.tabIndex, ['form.pageNum']: 1, loading: true, finished: false }) |
|
|
this.fetchPapersList() |
|
|
this.fetchPapersList() |
|
|
if(app.globalData.userInfo){ |
|
|
|
|
|
hasActivity().then(result => { |
|
|
|
|
|
this.setData({ hasActivity: result.data }) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.setData({ hasActivity: false }) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
searchList: function(){ |
|
|
searchList: function(){ |
|
|
@ -89,9 +76,6 @@ Component({ |
|
|
chooseCity: function(){ |
|
|
chooseCity: function(){ |
|
|
this.triggerEvent("picker", {type: 2, cityId: this.data.form.cityId}) |
|
|
this.triggerEvent("picker", {type: 2, cityId: this.data.form.cityId}) |
|
|
}, |
|
|
}, |
|
|
toAbility: function(){ |
|
|
|
|
|
util.navigateTo('/pages/agent/ability/index') |
|
|
|
|
|
}, |
|
|
|
|
|
fetchRegionList: function () { |
|
|
fetchRegionList: function () { |
|
|
if(this.data.tabList.length > 0){ |
|
|
if(this.data.tabList.length > 0){ |
|
|
return |
|
|
return |
|
|
|