Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
4b32d4c7d2
4 changed files with 25 additions and 4 deletions
  1. 11
      pages/mall/search-list/index.js
  2. 3
      pages/mall/search-list/index.json
  3. 13
      pages/mall/search-list/index.wxml
  4. 2
      pages/moment/moment-item/index.js

11
pages/mall/search-list/index.js

@ -2,6 +2,7 @@ import { getFactoryPrice, getProxyOrderList } from "../../../api/ztb"
import { getPreferList, getInformationList } from "../../../api/moment" import { getPreferList, getInformationList } from "../../../api/moment"
const storage = require('../../../utils/storage') const storage = require('../../../utils/storage')
const util = require('../../../utils/util') const util = require('../../../utils/util')
const event = require('../../../utils/event')
const tdsdk = require('../../../libs/tdweapp.js') const tdsdk = require('../../../libs/tdweapp.js')
const app = getApp() const app = getApp()
const limit = 8 const limit = 8
@ -27,7 +28,8 @@ Page({
requesting: false, requesting: false,
finished: false, finished: false,
dataIndex: 0, dataIndex: 0,
taskList: []
taskList: [],
visible: false
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -49,6 +51,12 @@ Page({
this.setData({searchList: rearchStringList, keyIndex: 0 }) this.setData({searchList: rearchStringList, keyIndex: 0 })
} }
} }
event.on('EventMessage', this, this.onEvent)
},
onEvent: function (message) {
if(message.what == 223){
this.setData({ visible: true })
}
}, },
flodKeybord: function(){ flodKeybord: function(){
if(this.data.keyIndex > 0 && this.data.keyIndex == 2){ if(this.data.keyIndex > 0 && this.data.keyIndex == 2){
@ -232,6 +240,7 @@ Page({
}, },
onUnload: function() { onUnload: function() {
tdsdk.Page.onUnload() tdsdk.Page.onUnload()
event.remove('EventMessage', this)
if(rearchStringList.length){ if(rearchStringList.length){
storage.put('mall-search', rearchStringList.toString()) storage.put('mall-search', rearchStringList.toString())
} }

3
pages/mall/search-list/index.json

@ -6,6 +6,7 @@
"info-item": "/pages/moment/info-item/index", "info-item": "/pages/moment/info-item/index",
"order-item": "/pages/agent/order-item/index", "order-item": "/pages/agent/order-item/index",
"agent-item": "/pages/agent/agent-item/index", "agent-item": "/pages/agent/agent-item/index",
"moment-item": "/pages/moment/moment-item/index"
"moment-item": "/pages/moment/moment-item/index",
"wux-popup": "/components/popup/index"
} }
} }

13
pages/mall/search-list/index.wxml

@ -63,4 +63,15 @@
</wux-divider> </wux-divider>
</view> </view>
</scroll-view> </scroll-view>
</view>
</view>
<wux-popup wux-class="wux-landscape" wux-content-class="wux-landscape__popup" wux-body-class="wux-landscape__popup-body"
hasHeader="{{ false }}" hasFooter="{{ false }}" visible="{{ visible }}" mask="{{ true }}" bind:close="onClose">
<view class="wux-close" bindtap="onClose">
<text class="cuIcon-roundclose text-white" style="font-size:64rpx"></text>
</view>
<view class="wux-landscape__inner">
<wux-image width="{{604}}" height="{{806}}" nuit="{{'rpx'}}" src="/assets/popup/need-member.png" bind:click="onImageClick">
</wux-image>
</view>
</wux-popup>

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

@ -27,7 +27,7 @@ Component({
return return
} }
if(this.data.item.isCooperate === 1 && !app.globalData.userInfo.isVIP) { if(this.data.item.isCooperate === 1 && !app.globalData.userInfo.isVIP) {
event.emit('EventMessage', {what: 223, desc: 'Logout'})
event.emit('EventMessage', {what: 223, desc: 'needvip'})
return return
} }
this.setData({ unflod: !this.data.unflod }) this.setData({ unflod: !this.data.unflod })

Loading…
Cancel
Save