Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
c014486947
2 changed files with 2 additions and 25 deletions
  1. 20
      pages/agent/fragment/index.js
  2. 7
      pages/agent/fragment/index.wxml

20
pages/agent/fragment/index.js

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

7
pages/agent/fragment/index.wxml

@ -31,13 +31,6 @@
<view class="text-empty">暂无数据,点击重新加载</view>
</view>
<view wx:else>
<view class="bg-white" wx:if="{{hasActivity}}" bindtap="toAbility">
<wux-image width="{{750}}" height="{{160}}" nuit="{{'rpx'}}" src="https://img.imgdb.cn/item/603f4f7e360785be54c19c1d.png" mode="aspectFill">
<view class="flex flex-center" slot="loading" style="height:146rpx;width:686rpx">
<text class="icon--refresher"></text>
</view>
</wux-image>
</view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index">
<view style="height:16rpx" wx:if="{{pageIndex != 0 || index != 0 }}"></view>

Loading…
Cancel
Save