Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
804250267d
2 changed files with 12 additions and 12 deletions
  1. 4
      pages/index/index.js
  2. 20
      pages/mall/search-list/index.js

4
pages/index/index.js

@ -99,8 +99,8 @@ Page({
this.setData({ landInfo: {otherType: 10, picUrl: '/assets/popup/send-member.png'} }) this.setData({ landInfo: {otherType: 10, picUrl: '/assets/popup/send-member.png'} })
} else { } else {
hasGetMemberInfo().then(result => { hasGetMemberInfo().then(result => {
if (!result.data && !this.data.landInfo) {
if(app.globalData.userInfo.isVIP){
if (!result.data && !result.data.hasGetMember &&!this.data.landInfo) {
if(result.data.type === 1){
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/eighty-member.png'} }) this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/eighty-member.png'} })
} else { } else {
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/serve-member.png'} }) this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/serve-member.png'} })

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

@ -21,7 +21,7 @@ Page({
pageSize: 10, pageSize: 10,
pageNum: 1 pageNum: 1
}, },
loading: true,
loading: false,
requesting: false, requesting: false,
finished: false, finished: false,
taskList: [] taskList: []
@ -30,10 +30,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
var searchString = storage.get('mall-search')
if(!util.isEmpty(searchString)){
this.setData({rearchStringList: searchString.split(',').slice(0, 24)})
}
if(options.tab) { if(options.tab) {
this.data.tabIndex = Number(options.tab) this.data.tabIndex = Number(options.tab)
} }
@ -41,6 +37,10 @@ Page({
min.setHours(0, 0, 0) min.setHours(0, 0, 0)
this.data.form.date = util.formatDate(min, 'Y-M-D') this.data.form.date = util.formatDate(min, 'Y-M-D')
this.setData({height: app.globalData.fragmentHeight - 100, tabIndex: this.data.tabIndex}) this.setData({height: app.globalData.fragmentHeight - 100, tabIndex: this.data.tabIndex})
var searchString = storage.get('mall-search')
if(!util.isEmpty(searchString)){
this.setData({rearchStringList: searchString.split(',').slice(0, 24)})
}
}, },
clearHistory: function(){ clearHistory: function(){
var that = this var that = this
@ -93,13 +93,13 @@ Page({
return return
} }
if (this.data.loading) { if (this.data.loading) {
this.data.requesting = true
this.setData({ loading: true })
} else { } else {
this.setData({ requesting: true }) this.setData({ requesting: true })
} }
if(this.data.tabIndex == 0){ if(this.data.tabIndex == 0){
getFactoryPrice(this.data.form).then(result => { getFactoryPrice(this.data.form).then(result => {
if (result.data.records.length) {
if (result.data && result.data.records.length) {
this.handRespList(result.data) this.handRespList(result.data)
} else { } else {
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex })
@ -110,7 +110,7 @@ Page({
}) })
} else if(this.data.tabIndex == 1){ } else if(this.data.tabIndex == 1){
getInformationList(this.data.form).then(result => { getInformationList(this.data.form).then(result => {
if (result.data.records.length) {
if (result.data && result.data.records.length) {
this.handRespList(result.data) this.handRespList(result.data)
} else { } else {
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex })
@ -121,7 +121,7 @@ Page({
}) })
} else if(this.data.tabIndex == 2){ } else if(this.data.tabIndex == 2){
getProxyOrderList(this.data.form).then(result => { getProxyOrderList(this.data.form).then(result => {
if (result.data.records.length) {
if (result.data && result.data.records.length) {
this.handRespList(result.data) this.handRespList(result.data)
} else { } else {
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex })
@ -132,7 +132,7 @@ Page({
}) })
} else if(this.data.tabIndex == 3){ } else if(this.data.tabIndex == 3){
getPreferList(this.data.form).then(result => { getPreferList(this.data.form).then(result => {
if (result.data.records.length) {
if (result.data && result.data.records.length) {
this.handRespList(result.data) this.handRespList(result.data)
} else { } else {
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex })

Loading…
Cancel
Save