Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
128cf7c970
33 changed files with 252 additions and 54 deletions
  1. BIN
      assets/image/icon_post_blue.png
  2. BIN
      assets/image/icon_post_gray.png
  3. BIN
      assets/image/icon_self_blue.png
  4. BIN
      assets/image/icon_self_gray.png
  5. BIN
      assets/image/icon_trans_blue.png
  6. BIN
      assets/image/icon_trans_gray.png
  7. BIN
      assets/tabs/tab-host-blue.png
  8. BIN
      assets/tabs/tab-host-gray.png
  9. BIN
      assets/tabs/tab-infi-blue.png
  10. BIN
      assets/tabs/tab-infi-gray.png
  11. BIN
      assets/tabs/tab-self-blue.png
  12. BIN
      assets/tabs/tab-self-gray.png
  13. BIN
      assets/tabs/tab-trans-blue.png
  14. BIN
      assets/tabs/tab-trans-gray.png
  15. 2
      pages/agent/index/index.wxml
  16. 4
      pages/article/information-item/index.json
  17. 16
      pages/index/index.wxs
  18. 30
      pages/moment/attention/index.js
  19. 8
      pages/moment/attention/index.json
  20. 26
      pages/moment/attention/index.wxml
  21. 9
      pages/moment/attention/index.wxss
  22. 51
      pages/moment/fragment/index.js
  23. 4
      pages/moment/fragment/index.json
  24. 13
      pages/moment/fragment/index.wxml
  25. 18
      pages/moment/moment-item/index.js
  26. 5
      pages/moment/moment-item/index.json
  27. 18
      pages/moment/moment-item/index.wxml
  28. 23
      pages/moment/moment-item/index.wxss
  29. 30
      pages/moment/recommend/index.js
  30. 9
      pages/moment/recommend/index.json
  31. 26
      pages/moment/recommend/index.wxml
  32. 9
      pages/moment/recommend/index.wxss
  33. 5
      pakageInfo/pages/article/sucessFul/index.wxml

BIN
assets/image/icon_post_blue.png

Before After
Width: 50  |  Height: 50  |  Size: 704 B

BIN
assets/image/icon_post_gray.png

Before After
Width: 50  |  Height: 50  |  Size: 692 B

BIN
assets/image/icon_self_blue.png

Before After
Width: 50  |  Height: 50  |  Size: 736 B

BIN
assets/image/icon_self_gray.png

Before After
Width: 50  |  Height: 50  |  Size: 711 B

BIN
assets/image/icon_trans_blue.png

Before After
Width: 50  |  Height: 50  |  Size: 651 B

BIN
assets/image/icon_trans_gray.png

Before After
Width: 50  |  Height: 50  |  Size: 562 B

BIN
assets/tabs/tab-host-blue.png

Before After
Width: 66  |  Height: 66  |  Size: 1.6 KiB

BIN
assets/tabs/tab-host-gray.png

Before After
Width: 66  |  Height: 66  |  Size: 2.4 KiB

BIN
assets/tabs/tab-infi-blue.png

Before After
Width: 66  |  Height: 66  |  Size: 1.3 KiB

BIN
assets/tabs/tab-infi-gray.png

Before After
Width: 66  |  Height: 66  |  Size: 1.7 KiB

BIN
assets/tabs/tab-self-blue.png

Before After
Width: 66  |  Height: 66  |  Size: 1.4 KiB

BIN
assets/tabs/tab-self-gray.png

Before After
Width: 66  |  Height: 66  |  Size: 2.1 KiB

BIN
assets/tabs/tab-trans-blue.png

Before After
Width: 66  |  Height: 66  |  Size: 1.4 KiB

BIN
assets/tabs/tab-trans-gray.png

Before After
Width: 66  |  Height: 66  |  Size: 1.7 KiB

2
pages/agent/index/index.wxml

@ -18,7 +18,7 @@
</view>
</view>
<swiper current="{{pageIndex}}" duration="0" style="height:{{height}}rpx">
<swiper current="{{pageIndex}}" duration="300" style="height:{{height}}rpx">
<swiper-item catchtouchmove="stopTouchMove">
<focus id="{{TabList[0].value}}" />
</swiper-item>

4
pages/article/information-item/index.json

@ -1,9 +1,5 @@
{
"component": true,
"usingComponents": {
"wux-image": "/components/image/index",
"sudoku-image": "/components/sudoku-image/index",
"fold-text": "/components/fold-text/index",
"wux-tag": "/components/tag/index"
}
}

16
pages/index/index.wxs

@ -1,24 +1,24 @@
function tabImage(tabIndex, index) {
if (index == 0) {
if(tabIndex == index){
return '/assets/image/icon_post_blue.png'
return '/assets/tabs/tab-host-blue.png'
}
return '/assets/image/icon_post_gray.png'
return '/assets/tabs/tab-host-gray.png'
} else if (index == 1) {
if(tabIndex == index){
return '/assets/image/icon_trans_blue.png'
return '/assets/tabs/tab-infi-blue.png'
}
return '/assets/image/icon_trans_gray.png'
return '/assets/tabs/tab-infi-gray.png'
} else if (index == 2) {
if(tabIndex == index){
return '/assets/image/icon_self_blue.png'
return '/assets/tabs/tab-trans-blue.png'
}
return '/assets/image/icon_self_gray.png'
return '/assets/tabs/tab-trans-gray.png'
} else if (index == 3) {
if(tabIndex == index){
return '/assets/image/icon_self_blue.png'
return '/assets/tabs/tab-self-blue.png'
}
return '/assets/image/icon_self_gray.png'
return '/assets/tabs/tab-self-gray.png'
}
return ''
}

30
pages/moment/attention/index.js

@ -0,0 +1,30 @@
// pages/message/index.js
const util = require('../../../utils/util')
const app = getApp()
Component({
options: {
addGlobalClass: true,
multipleSlots: true
},
properties: {
height: { type: Number, value: 0 },
item: { type: Object, value: null }
},
data: {
orderList: []
},
methods: {
onRestart: function () {
console.log('attention....start')
if(!this.firstShow){
}
this.firstShow = true
},
fetchList: function(){
}
}
})

8
pages/moment/attention/index.json

@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"wux-skeleton": "/components/skeleton/index",
"wux-skeleton-paragraph": "/components/skeleton-paragraph/index",
"moment-item": "/pages/moment/moment-item/index"
}
}

26
pages/moment/attention/index.wxml

@ -0,0 +1,26 @@
<!--pages/message/index.wxml-->
<scroll-view scroll-y style="height: {{height}}rpx;" bind:scrolltolower="fetchList">
<wux-skeleton active wx:if="{{!orderList.length}}">
<view class="flex item-content">
<wux-skeleton-paragraph rounded rows="8" wux-class="case3-class" />
</view>
</wux-skeleton>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index">
<view class="bg-white" style="padding: 0rpx 32rpx" wx:if="{{pageIndex != 0 || index != 0 }}">
<wux-divider show-text="{{ false }}"></wux-divider>
</view>
<moment-item item="{{item}}"></moment-item>
</view>
</view>
<!--加载更多的UI-->
<view wx:if="{{form.pageNum > 1}}" style="padding:20rpx">
<wux-divider>
<view class="loadmore">
<text class="icon--refresher" wx:if="{{!finished}}"></text>
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text>
</view>
</wux-divider>
</view>
</scroll-view>

9
pages/moment/attention/index.wxss

@ -0,0 +1,9 @@
/* pages/mall/shops/index.wxss */
.item-content {
background: rgba(255, 255, 255, 1);
padding:32rpx
}
.case3-class {
width: 680rpx;
}

51
pages/moment/fragment/index.js

@ -1,5 +1,5 @@
// pages/message/index.js
import { getFactoryPrice, getSuccessNotices } from "../../../api/ztb"
import { getSuccessNotices } from "../../../api/ztb"
const event = require('../../../utils/event')
const util = require('../../../utils/util')
const app = getApp()
@ -45,26 +45,20 @@ Component({
tabIndex: 0,
firstShow: true
})
this.fetchAgentList()
}
this.data.firstShow = true
if(!this.data.noticeList.length){
this.fetchNoticeList()
}
this.onResume()
},
onEvent: function (message) {
console.log('mall>>index>>onEvent', message)
if (message.what == 10 && app.globalData.isVIP == 1) {
// this.setData({ token: app.globalData.token })
// this.onRefreshList()
} else if(message.what == 1001){
this.setData({ kg: app.globalData.kg })
} else if(message.what == 888){
this.setData({ orderList: [], ['form.pageNum']: 1, loading: true, finished: false })
this.fetchAgentList()
} else if(message.what == 444){
this.setData({ orderList: [], ['form.pageNum']: 1, loading: true, finished: false, cityName: app.nowCity.cityName })
this.fetchAgentList()
this.setData({ cityName: app.nowCity.cityName })
}
},
chooseCity: function(){
@ -72,15 +66,13 @@ Component({
},
searchList: function(){
},
postList: function(){
},
onTabChange: function({detail}){
if(this.data.tabIndex == Number(detail.index)){
return
}
this.fetchAgentList()
this.setData({ tabIndex: Number(detail.index) })
this.onResume()
},
fetchNoticeList: function(){
if (this.data.loopRequesting) {
@ -100,30 +92,19 @@ Component({
this.data.loopRequesting = false
})
},
//*************************************************fetchAgentList************************************************//
fetchAgentList: function () {
if (this.data.requesting || this.data.finished) {
return
toNotice: function(e){
},
onResume: function(){
var fragment = null
if(this.data.tabIndex == 0){
fragment = this.selectComponent('#recommend')
} else if(this.data.tabIndex == 1){
fragment = this.selectComponent('#attention')
}
if (this.data.loading) {
this.data.requesting = true
} else {
this.setData({ requesting: true })
if (fragment) {
fragment.onRestart()
}
getFactoryPrice(this.data.form).then(result => {
if (result.data.records.length) {
var respList = result.data.records
let nowList = `orderList[${this.data.orderList.length}]`
var num = result.data.current
var finished = result.data.current >= result.data.pages
this.setData({ [nowList]: respList, ['form.pageNum']: (num + 1), finished, requesting: false, loading: false })
} else {
this.setData({ requesting: false, finished: true, loading: false })
}
}).catch(err => {
//异常回调
this.setData({ requesting: false, finished: true, loading: false })
})
}
}

4
pages/moment/fragment/index.json

@ -1,6 +1,8 @@
{
"component": true,
"usingComponents": {
"wux-tabi": "/components/tabi/index"
"wux-tabi": "/components/tabi/index",
"recommend": "/pages/moment/recommend/index",
"attention": "/pages/moment/attention/index"
}
}

13
pages/moment/fragment/index.wxml

@ -19,7 +19,7 @@
<text class="cuIcon-notification text-yellow" style="font-size:36rpx;"></text>
<swiper vertical="{{true}}" autoplay="{{true}}" circular="{{true}}" interval="3000" class="tui-swiper">
<swiper-item wx:for="{{noticeList}}" wx:key="index" class="flex flex-center" catchtouchmove="stopTouchMove" style="justify-content: flex-start">
<view class="flex flex-justify" style="width: 100%;height: 100%;">
<view class="flex flex-justify" style="width: 100%;height: 100%;" data-index="{{index}}" bindtap="toNotice">
<view class="tui-news-item">{{item}}</view>
<text class="cuIcon-right text-black" style="font-size:16px;margin-left: 8rpx;"></text>
</view>
@ -28,4 +28,13 @@
</view>
<view class="bg-white" style="height:90rpx;border-bottom:2rpx solid #f3f3f3;border-top:2rpx solid #f3f3f3" wx:if="{{firstShow}}">
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" scroll="{{false}}" bind:change="onTabChange"></wux-tabi>
</view>
</view>
<swiper current="{{tabIndex}}" duration="300" style="height:{{height}}rpx">
<swiper-item catchtouchmove="stopTouchMove">
<recommend id="recommend" height="{{height}}"/>
</swiper-item>
<swiper-item catchtouchmove="stopTouchMove">
<attention id="attention" height="{{height}}"/>
</swiper-item>
</swiper>

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

@ -0,0 +1,18 @@
// pages/stock/index.js
const util = require('../../../utils/util')
Component({
options: {
addGlobalClass: true,
multipleSlots: true
},
properties: {
item: { type: Object, value: null },
mclick: { type: Boolean, value: true }
},
methods: {
lookItem: function(e){
util.navigateTo('/pakageInfo/pages/article/detail/index?id=' + this.data.item.id)
}
}
})

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

@ -0,0 +1,5 @@
{
"component": true,
"usingComponents": {
}
}

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

@ -0,0 +1,18 @@
<!--pages/main/index.wxml-->
<view class="bg-white flex flex-justify" style="padding:18rpx 24rpx">
<view style="flex: 2;">
<view class="text-df text-black">一级纸 东莞金洲</view>
<view class="text-gray text-xs" style="margin-top: 6rpx;">2021年9月14日 13:47:17</view>
</view>
<view style="flex: 1;">
<view class="flex flex-center">
<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-gray text-sm" style="margin-top: 4rpx;text-align: center">当前价</view>
</view>
<view style="flex: 1;">
<view class="text-df text-green" style="text-align: center">+20</view>
<view class="text-gray text-sm" style="margin-top: 4rpx;text-align: center">较上次</view>
</view>
</view>

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

@ -0,0 +1,23 @@
/* pages/main/index.wxss */
.image-load {
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
}
.bottomViewRightImg {
width: 290rpx;
height: 200rpx;
overflow: hidden;
}
.bottomViewRight {
width: 290rpx;
height: 200rpx !important;
overflow: hidden;
}
.imgZt{
display: flex;
justify-content: flex-start;
}

30
pages/moment/recommend/index.js

@ -0,0 +1,30 @@
// pages/message/index.js
const util = require('../../../utils/util')
const app = getApp()
Component({
options: {
addGlobalClass: true,
multipleSlots: true
},
properties: {
height: { type: Number, value: 0 },
item: { type: Object, value: null }
},
data: {
orderList: [3]
},
methods: {
onRestart: function () {
console.log('recomm....start')
if(!this.firstShow){
}
this.firstShow = true
},
fetchList: function(){
}
}
})

9
pages/moment/recommend/index.json

@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"wux-skeleton": "/components/skeleton/index",
"wux-skeleton-paragraph": "/components/skeleton-paragraph/index",
"wux-divider": "/components/divider/index",
"moment-item": "/pages/moment/moment-item/index"
}
}

26
pages/moment/recommend/index.wxml

@ -0,0 +1,26 @@
<!--pages/message/index.wxml-->
<scroll-view scroll-y style="height: {{height}}rpx;" bind:scrolltolower="fetchList">
<wux-skeleton active wx:if="{{!orderList.length}}">
<view class="flex item-content">
<wux-skeleton-paragraph rounded rows="12" wux-class="case3-class" />
</view>
</wux-skeleton>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index">
<view class="bg-white" style="padding: 0rpx 32rpx" wx:if="{{pageIndex != 0 || index != 0 }}">
<wux-divider show-text="{{ false }}"></wux-divider>
</view>
<moment-item item="{{item}}"></moment-item>
</view>
</view>
<!--加载更多的UI-->
<view wx:if="{{form.pageNum > 1}}" style="padding:20rpx">
<wux-divider>
<view class="loadmore">
<text class="icon--refresher" wx:if="{{!finished}}"></text>
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text>
</view>
</wux-divider>
</view>
</scroll-view>

9
pages/moment/recommend/index.wxss

@ -0,0 +1,9 @@
/* pages/mall/shops/index.wxss */
.item-content {
background: rgba(255, 255, 255, 1);
padding:32rpx
}
.case3-class {
width: 680rpx;
}

5
pakageInfo/pages/article/sucessFul/index.wxml

@ -1,11 +1,10 @@
<!--pakageInfo/pages/article/sucessFul/index.wxml-->
<view class="zt">
<view class="view1">
<image style="width:198.3rpx;height:198.3rpx" src="/assets/info/sucessful.png"></image>
<image style="width:198.3rpx;height:198.3rpx" src="/assets/info/sucessful.png"></image>
</view>
<view class="view2">您反馈的情报信息已查收,谢谢您对平台的参与和支持。</view>
<view class="view3">
<view class="btnView" bindtap="rt">关闭</view>
<view class="btnView" bindtap="rt">关闭</view>
</view>
</view>
Loading…
Cancel
Save