Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
6d2b54dda6
6 changed files with 38 additions and 8 deletions
  1. 4
      api/moment.js
  2. 1
      pages/agent/fragment/index.wxml
  3. 2
      pages/mall/fragment/index.wxml
  4. 31
      pages/moment/moment-item/index.js
  5. 4
      pages/moment/theall/index.js
  6. 4
      pages/moment/theall/index.wxml

4
api/moment.js

@ -40,6 +40,7 @@ const getCategoryList = (params) => mGet(`/information-center/paper-index-catego
const getCategoryType = (params) => mGet(`/ztb-market-information-service/get/scrap-paper-main-category`, params, mconfig) const getCategoryType = (params) => mGet(`/ztb-market-information-service/get/scrap-paper-main-category`, params, mconfig)
const getMomentList = (params) => mGet(`/ztb-market-information-service/get/price-compare-info/by-scrap-paper-main-category`, params, mconfig) const getMomentList = (params) => mGet(`/ztb-market-information-service/get/price-compare-info/by-scrap-paper-main-category`, params, mconfig)
const getInformationList = (params) => mGet(`/ztb-market-information-service/get/market-info/by-query-type`, params, mconfig) const getInformationList = (params) => mGet(`/ztb-market-information-service/get/market-info/by-query-type`, params, mconfig)
const getMillPaperList = (params) => mGet(`/ztb-market-information-service/get/paper-category-info/by-paper-mill-id`, params, mconfig)
export { export {
mconfig, mconfig,
@ -59,5 +60,6 @@ export {
getCategoryList, getCategoryList,
getCategoryType, getCategoryType,
getMomentList, getMomentList,
getInformationList
getInformationList,
getMillPaperList
} }

1
pages/agent/fragment/index.wxml

@ -17,6 +17,7 @@
<text class="cuIcon-right text-blue" style="padding-top: 4rpx;"></text> <text class="cuIcon-right text-blue" style="padding-top: 4rpx;"></text>
</view> </view>
</view> </view>
<view class="bg-white" style="height: 90rpx;" wx:else></view>
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchPapersList"> <refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchPapersList">
<view class="bg-white list-empty" style="height:{{height}}rpx" wx:if="{{!orderList.length}}"> <view class="bg-white list-empty" style="height:{{height}}rpx" wx:if="{{!orderList.length}}">

2
pages/mall/fragment/index.wxml

@ -75,7 +75,7 @@
</view> </view>
</view> </view>
<view class="bg-white" style="height:90rpx;border-bottom:2rpx solid #f3f3f3;border-top:2rpx solid #f3f3f3" wx:if="{{tabList.length}}"> <view class="bg-white" style="height:90rpx;border-bottom:2rpx solid #f3f3f3;border-top:2rpx solid #f3f3f3" wx:if="{{tabList.length}}">
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" padding="{{12}}" line-height="{{3}}" bind:change="onTabChange"></wux-tabi>
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" disable="{{requesting}}" padding="{{12}}" line-height="{{3}}" bind:change="onTabChange"></wux-tabi>
</view> </view>
</view> </view>
<wux-skeleton active wx:if="{{!orderList.length}}"> <wux-skeleton active wx:if="{{!orderList.length}}">

31
pages/moment/moment-item/index.js

@ -1,5 +1,8 @@
// pages/stock/index.js // pages/stock/index.js
const util = require('../../../utils/util') const util = require('../../../utils/util')
import { userPushFollowMill } from "../../../api/ztb"
import { getMillPaperList } from "../../../api/moment"
var requesting = false
Component({ Component({
options: { options: {
@ -12,21 +15,45 @@ Component({
}, },
data: { data: {
unflod: false, unflod: false,
loading: false,
itemList: [2] itemList: [2]
}, },
methods: { methods: {
onFlodTap: function(){ onFlodTap: function(){
this.setData({ unflod: !this.data.unflod }) this.setData({ unflod: !this.data.unflod })
if(!this.data.itemList.length){ if(!this.data.itemList.length){
this.fetchItemList()
} }
}, },
onAttentionChange: function(){ onAttentionChange: function(){
if (this.data.loading) {
return
}
this.setData({ loading: true })
userPushFollowMill({ paperMillId: 1, follow: true }).then(result => {
this.setData({ loading: false })
}).catch(err => {
this.setData({ loading: false })
})
}, },
lookItem: function(e){ lookItem: function(e){
util.navigateTo('/pages/article/detail/index?id=' + this.data.item.id) util.navigateTo('/pages/article/detail/index?id=' + this.data.item.id)
}, },
fetchItemList: function(){
if (requesting) {
return
}
requesting = true
getMillPaperList({ paperMillId: 1, date: '' }).then(result => {
if (result.data.records.length) {
this.setData({ orderList: result.data.records })
} else {
requesting = false
}
}).catch(err => {
requesting = false
})
},
agentOrder: function(e){ agentOrder: function(e){
} }

4
pages/moment/theall/index.js

@ -64,14 +64,14 @@ Component({
if (this.data.requesting) { if (this.data.requesting) {
return return
} }
this.setData({ orderList: [], ['form.pageNum']: 1, finished: false })
this.setData({ orderList: [], ['form.pageNum']: 1, finished: false, requesting: true })
this.fetchOrderList() this.fetchOrderList()
}, },
fetchList: function(){ fetchList: function(){
if (this.data.requesting) { if (this.data.requesting) {
return return
} }
this.data.requesting = true
this.setData({ requesting: true })
getInformationList(this.data.form).then(result => { getInformationList(this.data.form).then(result => {
if (result.data.records.length) { if (result.data.records.length) {
var respList = result.data.records var respList = result.data.records

4
pages/moment/theall/index.wxml

@ -1,9 +1,9 @@
<!--pages/message/index.wxml--> <!--pages/message/index.wxml-->
<view class="bg-white" style="height:90rpx;border-bottom:2rpx solid #f3f3f3" wx:if="{{firstShow}}"> <view class="bg-white" style="height:90rpx;border-bottom:2rpx solid #f3f3f3" wx:if="{{firstShow}}">
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" line-height="{{3}}" scroll="{{false}}" bind:change="onTabChange"></wux-tabi>
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" line-height="{{3}}" disable="{{requesting}}" scroll="{{false}}" bind:change="onTabChange"></wux-tabi>
</view> </view>
<view class="bg-white" style="height:100rpx;border-bottom:2rpx solid #f3f3f3;padding: 6rpx 0rpx;" wx:if="{{firstShow}}"> <view class="bg-white" style="height:100rpx;border-bottom:2rpx solid #f3f3f3;padding: 6rpx 0rpx;" wx:if="{{firstShow}}">
<wux-tabi tab-data="{{proviceList}}" tab-index="{{pIndex}}" line-type="{{1}}" scroll="{{true}}" bind:change="onProviceChange"></wux-tabi>
<wux-tabi tab-data="{{proviceList}}" tab-index="{{pIndex}}" line-type="{{1}}" disable="{{requesting}}" scroll="{{true}}" bind:change="onProviceChange"></wux-tabi>
</view> </view>
<scroll-view scroll-y style="height: {{height - 190}}rpx;" bind:scrolltolower="fetchList"> <scroll-view scroll-y style="height: {{height - 190}}rpx;" bind:scrolltolower="fetchList">

Loading…
Cancel
Save