Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
1392c16a12
6 changed files with 50 additions and 60 deletions
  1. 12
      pages/mall/fragment/index.js
  2. 12
      pages/mall/fragment/index.wxml
  3. 9
      pages/mall/fragment/index.wxss
  4. 8
      pages/moment/moment-item/index.js
  5. 64
      pages/moment/moment-item/index.wxml
  6. 5
      pages/moment/moment-item/index.wxss

12
pages/mall/fragment/index.js

@ -77,7 +77,7 @@ Component({
}
},
onEvent: function (message) {
console.log('mall>>index>>onEvent', message)
console.log('mall>>fragment>>onEvent', message)
if (message.what == 10 && app.globalData.isVIP == 1) {
// this.setData({ token: app.globalData.token })
// this.onRefreshList()
@ -91,15 +91,9 @@ Component({
this.fetchAgentList()
}
},
chooseCity: function(){
wx.navigateTo({url: `/pages/home/city-select/index?type=1` })
},
searchList: function(){
wx.navigateTo({url: `/pages/mall/search-list/index` })
},
postList: function(){
util.navigateTo('/pages/article/index/index')
},
postInfo: function(e){
var item = this.data.momentList[e.currentTarget.dataset.index]
wx.navigateTo({ url: '/pages/article/detail/index?id=' + item.id })
@ -113,6 +107,10 @@ Component({
util.navigateTo(`/pages/agent/ability/index`)
} else if(e.currentTarget.id == 'moment'){
this.triggerEvent("click", { what: 1 })
} else if(e.currentTarget.id == 'info'){
util.navigateTo('/pages/article/index/index')
} else if(e.currentTarget.id == 'city'){
wx.navigateTo({url: `/pages/home/city-select/index?type=1` })
}
},
tapBanner: function(e){

12
pages/mall/fragment/index.wxml

@ -3,7 +3,7 @@
<view class="cu-custom top-bg" style="height:{{customHeight}}rpx;z-index: 1;">
<view class="cu-bar fixed " style="height:{{customHeight}}rpx;padding-top:{{StatusBar}}rpx;border-bottom:none">
<view class="flex flex-center" style="margin-left: 32rpx;width: 100%;">
<view class="flex flex-center" catchtap="chooseCity">
<view id="city" class="flex flex-center" catchtap="gridTap">
<text class="text-white text-lg">{{cityName}}</text>
<text class="cuIcon-unfold text-white" style="font-size:16px;padding-top: 8rpx;margin-left: 8rpx;"></text>
</view>
@ -38,7 +38,7 @@
</view>
<view class="bg-white" style="margin-top:16rpx;border-radius: 24rpx;">
<view class="flex flex-justify" style="padding: 20rpx 24rpx;" bindtap="postList">
<view id="info" class="flex flex-justify" style="padding: 20rpx 24rpx;" bindtap="gridTap">
<view class="text-lg text-bold text-black">最新资讯</view>
<view class="flex flex-center">
<text class="text-gray">更多</text>
@ -46,8 +46,8 @@
</view>
</view>
<wux-skeleton active wx:if="{{!momentList.length}}">
<view class="flex item-content">
<wux-skeleton-paragraph rounded rows="8" wux-class="case3-class" />
<view class="flex" style="padding:16rpx 24rpx">
<wux-skeleton-paragraph rounded rows="3" wux-class="case3-class" />
</view>
</wux-skeleton>
<view wx:for="{{momentList}}" wx:key="index" data-index="{{index}}" class="flex flex-justify moment-pad" bindtap="postInfo">
@ -75,8 +75,8 @@
</view>
</view>
<wux-skeleton active wx:if="{{!orderList.length}}">
<view class="flex item-content" wx:for="{{4}}" wx:key="index">
<wux-skeleton-paragraph rounded rows="42" wux-class="case3-class" />
<view class="flex" style="padding:16rpx 24rpx">
<wux-skeleton-paragraph rounded rows="20" wux-class="case3-class" />
</view>
</wux-skeleton>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">

9
pages/mall/fragment/index.wxss

@ -9,6 +9,10 @@
padding: 0 24rpx;
}
.case3-class {
width: 600rpx;
}
.banner{
border-radius: 16rpx;
}
@ -18,11 +22,6 @@
border-radius: 16rpx;
}
.item-content {
background: rgba(255, 255, 255, 1);
padding:32rpx
}
.tui-swiper {
margin-left: 8rpx;
font-size: 26rpx;

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

@ -12,17 +12,23 @@ Component({
},
data: {
unflod: false,
loading: true
itemList: [2]
},
methods: {
onFlodTap: function(){
this.setData({ unflod: !this.data.unflod })
if(!this.data.itemList.length){
}
},
onAttentionChange: function(){
},
lookItem: function(e){
util.navigateTo('/pages/article/detail/index?id=' + this.data.item.id)
},
agentOrder: function(e){
}
}
})

64
pages/moment/moment-item/index.wxml

@ -19,49 +19,31 @@
<text class="cuIcon-triangle{{unflod ? 'upfill': 'downfill'}}" style="font-size:48rpx;padding-top: 4rpx;color: #ccc;" bindtap="onFlodTap"></text>
</view>
<view style="display: {{ unflod ? 'block' : 'none'}};padding:16rpx 24rpx;">
<view class="flex" style="padding-bottom: 16rpx;">
<view style="width: 30%;padding-left: 32rpx;">品类</view>
<view style="width: 20%;text-align: center">
<text class="text-df" style="color: #555555;">价格</text>
<text style="color: #555555;font-size: 20rpx;">(元/吨)</text>
</view>
<view style="width: 20%;padding-left: 40rpx;">涨跌</view>
<view style="width: 30%;">
<text class="text-df" style="color: #555555;">平均扣点</text>
<text style="color: #555555;font-size: 20rpx;">(最近7天)</text>
</view>
<view class="list-empty" style="height:240rpx" wx:if="{{!itemList.length}}">
<view class="load-spinner text-gray" />
</view>
<view class="flex flex-center bg-white" style="padding:16rpx 24rpx;">
<view class="text-df text-black" style="width: 25%;">东莞金洲</view>
<view class="flex flex-center" style="width: 25%;">
<text class="text-lg text-red">2560</text>
<text class="cuIcon-refresharrow text-red" style="font-size:12px;margin-left: 4rpx;"></text>
<view wx:else>
<view class="flex" style="padding-bottom: 16rpx;">
<view style="width: 30%;padding-left: 32rpx;">品类</view>
<view style="width: 20%;text-align: center">
<text class="text-df" style="color: #555555;">价格</text>
<text style="color: #555555;font-size: 20rpx;">(元/吨)</text>
</view>
<view style="width: 20%;padding-left: 40rpx;">涨跌</view>
<view style="width: 30%;">
<text class="text-df" style="color: #555555;">平均扣点</text>
<text style="color: #555555;font-size: 20rpx;">(最近7天)</text>
</view>
</view>
<view class="text-df text-green" style="width: 20%;padding-left: 24rpx;">+20</view>
<view class="text-df text-green" style="width: 10%;">--</view>
<wux-button outline round type="positive" size="cate" bind:click="clipboard">代卖</wux-button>
</view>
<wux-divider show-text="{{ false }}"></wux-divider>
<view class="flex flex-center bg-white" style="padding:16rpx 24rpx;">
<view class="text-df text-black" style="width: 25%;">东莞金洲</view>
<view class="flex flex-center" style="width: 25%;">
<text class="text-lg text-red">2560</text>
<text class="cuIcon-refresharrow text-red" style="font-size:12px;margin-left: 4rpx;"></text>
</view>
<view class="text-df text-green" style="width: 20%;padding-left: 24rpx;">+20</view>
<view class="text-df text-green" style="width: 10%;">--</view>
<wux-button outline round type="positive" size="cate" bind:click="clipboard">代卖</wux-button>
</view>
<wux-divider show-text="{{ false }}"></wux-divider>
<view class="flex flex-center bg-white" style="padding:16rpx 24rpx;">
<view class="text-df text-black" style="width: 25%;">东莞金洲</view>
<view class="flex flex-center" style="width: 25%;">
<text class="text-lg text-red">2560</text>
<text class="cuIcon-refresharrow text-red" style="font-size:12px;margin-left: 4rpx;"></text>
<view class="flex flex-center bg-white item-content" wx:for="{{itemList}}" wx:key="index">
<view class="text-df text-black" style="width: 25%;">一级纸品</view>
<view class="flex flex-center" style="width: 25%;">
<text class="text-lg text-red">2560</text>
<text class="cuIcon-refresharrow text-red" style="font-size:12px;margin-left: 4rpx;"></text>
</view>
<view class="text-df text-green" style="width: 20%;padding-left: 24rpx;">+20</view>
<view class="text-df text-green" style="width: 10%;">--</view>
<wux-button outline round type="positive" size="cate" data-index="{{index}}" bind:click="agentOrder">代卖</wux-button>
</view>
<view class="text-df text-green" style="width: 20%;padding-left: 24rpx;">+20</view>
<view class="text-df text-green" style="width: 10%;">--</view>
<wux-button outline round type="positive" size="cate" bind:click="clipboard">代卖</wux-button>
</view>
</view>

5
pages/moment/moment-item/index.wxss

@ -9,4 +9,9 @@
text-align: center;
padding-top: 2rpx;
margin-top: 4rpx;
}
.item-content{
padding:16rpx 24rpx;
border-bottom: 1rpx solid #f3f3f3;
}
Loading…
Cancel
Save