Browse Source

no message

featrue/v.4.0
xpz2018 5 years ago
parent
commit
878ac9d3af
7 changed files with 23 additions and 26 deletions
  1. 1
      components/refresher/index.wxml
  2. 5
      pages/article/hot-index/index.wxml
  3. 7
      pages/article/index/index.js
  4. 11
      pages/article/index/index.wxml
  5. 1
      pages/article/index/index.wxss
  6. 9
      pages/home/index/index.js
  7. 15
      pages/home/setting/index.js

1
components/refresher/index.wxml

@ -6,5 +6,4 @@
<view>{{ _state }}</view>
</view>
<slot></slot>
<!-- <view class="jan-refresher--safety-block" /> -->
</scroll-view>

5
pages/article/hot-index/index.wxml

@ -1,4 +1,3 @@
<!--pages/main/index.wxml-->
<!-- <scroll-view scroll-y style="height: {{height}}rpx;" lower-threshold="200" bindscrolltolower="fetchMomentList"> -->
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchMomentList">
<!-- <wux-notice-bar id="wux-notice-bar" wux-class="notice-bar" loop speed="100" mode="link" icon="" action=""
@ -8,11 +7,11 @@
<text>{{content}}</text>
</wux-notice-bar> -->
<wux-skeleton active wx:if="{{!factoryList.length}}">
<view class="bg-white flex flex-justify" style="padding:30rpx 0rpx 30rpx 30rpx">
<view class="bg-white flex flex-justify" style="padding:24rpx 0rpx 12rpx 30rpx">
<wux-skeleton-paragraph rounded rows="1" wux-class="case-class" />
<wux-skeleton-paragraph rounded rows="1" wux-class="case2-class" />
</view>
<view class="bg-white flex" style="padding: 4rpx 30rpx">
<view class="bg-white flex" style="padding: 12rpx 30rpx 24rpx 30rpx">
<view wx:for="{{5}}" wx:key="index" class="item-host" style="padding-left:{{index == 0? 0 : 8}}rpx;">
<wux-skeleton-avatar shape="rounded" size="large" />
<wux-skeleton-paragraph rounded rows="1" wux-class="host-class" />

7
pages/article/index/index.js

@ -1,5 +1,6 @@
// pages/stock/index.js
const request = require('../../../utils/request') //导入模块
const util = require('../../../utils/util')
const app = getApp()
Component({
@ -12,6 +13,7 @@ Component({
*/
data: {
height: app.globalData.safeFragmentHeight - 190,
safeBottom: app.globalData.safeBottom,
firstShow: false,
tabList: [ '热门', '纸品价格', '车辆排队', '纸厂扣点' ],
tabIndex: 0
@ -23,7 +25,7 @@ Component({
fragment.onRestart()
}
if (!this.data.firstShow) {
this.setData({ height: app.globalData.safeFragmentHeight - 190, tabList: this.data.tabList})
this.setData({ height: app.globalData.safeFragmentHeight - 190, tabList: this.data.tabList, safeBottom: app.globalData.safeBottom})
// request.get('/information-center/article-category/get/article-category-list').then(result => {
// for (let index = 0; index < result.data.length; index++) {
// this.data.tabList[index + 1] = result.data[index].name
@ -44,6 +46,9 @@ Component({
},
stopTouchMove: function(e){
return false
},
postMoment: function(){
util.navigateTo('/pages/article/publish/index')
}
}
})

11
pages/article/index/index.wxml

@ -3,9 +3,6 @@
<view slot="content" style="color:black;font-size:36rpx">情报</view>
</cu-custom>
<!-- <view class="nav bg-white fixed" style="top:{{CustomBar}}px;height:90rpx;">
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" bind:change="onTabChange"></wux-tabi>
</view> -->
<view class="bg-white" style="height:90rpx;border-bottom:2rpx solid #eee">
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" bind:change="onTabChange"></wux-tabi>
</view>
@ -15,4 +12,10 @@
<swiper-item catchtouchmove="stopTouchMove"><price id=fragment1"/></swiper-item>
<swiper-item catchtouchmove="stopTouchMove"><queue id=fragment2"/></swiper-item>
<swiper-item catchtouchmove="stopTouchMove"><point id=fragment3"/></swiper-item>
</swiper>
</swiper>
<view class="booking-tool" style="bottom:{{200 + safeBottom}}rpx" bindtap="postMoment">
<view class="roder-add flex flex-center">
<text class="cuIcon-add text-white" style="font-size:32px"></text>
</view>
</view>

1
pages/article/index/index.wxss

@ -3,7 +3,6 @@
width: calc(100% - 20px);
background-color: #008AFF;
position: fixed;
bottom: 150px;
left: 25px;
}

9
pages/home/index/index.js

@ -16,8 +16,7 @@ Component({
data: {
height: app.globalData.safeFragmentHeight,
firstShow: false,
token: app.globalData.userToken,
userInfo: {},
userInfo: null,
avatarUrl: '/assets/image/ygImg.png',
accountMoney: 0,
messageNumber: 0
@ -25,7 +24,6 @@ Component({
lifetimes: {
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
attached: function () {
event.on('EventMessage', this, this.onEvent)
},
detached: function () {
@ -42,9 +40,8 @@ Component({
this.data.firstShow = true
},
onEvent: function (message) {
console.log('home>>index>>onEvent', message)
if (message.what == 82) {
// 认证成功
if (message.what == 888) {
this.setData({ userInfo: app.globalData.userInfo, accountMoney: 0, messageNumber: 0, avatarUrl: '/assets/image/ygImg.png' })
}
},
fetchUserInfo: function () {

15
pages/home/setting/index.js

@ -1,6 +1,6 @@
// pages/home/setting/index.js
import { $wuxDialog } from '../../../components/index'
const event = require('../../../utils/event.js')
const event = require('../../../utils/event')
const app = getApp()
Page({
@ -51,17 +51,12 @@ Page({
onTap(e) {
wx.removeStorageSync('accessToken')
wx.removeStorageSync('Authorization')
wx.reLaunch({
url: '/pages/login/index'
})
app.globalData.token = null
app.globalData.userInfo = null
event.emit('EventMessage', { what: 888, desc: 'Logout' })
wx.navigateBack()
}
}]
})
// wx.requestSubscribeMessage({
// tmplIds: app.tmplIds,
// complete(res) {
// }
// })
}
})
Loading…
Cancel
Save