From d21f26c0f3a256f6a3f38e8a1a06d222c2c94fa4 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Thu, 23 Sep 2021 10:55:31 +0800 Subject: [PATCH] no message --- colorui/main.wxss | 2 +- components/popup/index.wxss | 3 ++- pages/goods/ablility/index.wxml | 2 +- pages/goods/fragment/index.wxml | 2 +- pages/goods/index/index.js | 2 +- pages/home/city-select/index.js | 4 ++-- pages/home/index/index.js | 28 ++++++++------------------- pages/index/index.js | 34 +++++++++++++++++++++------------ pages/index/index.wxml | 6 +++--- pages/mall/fragment/index.wxml | 2 +- utils/util.js | 3 ++- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/colorui/main.wxss b/colorui/main.wxss index 8bef11f..d5e4f37 100644 --- a/colorui/main.wxss +++ b/colorui/main.wxss @@ -977,7 +977,7 @@ button.icon.lg { } .cu-custom .cu-bar .content { - width: calc(100% - 440rpx); + width: calc(100% - 380rpx); } .cu-custom .cu-bar .content image { diff --git a/components/popup/index.wxss b/components/popup/index.wxss index 21a68d2..fd0d731 100644 --- a/components/popup/index.wxss +++ b/components/popup/index.wxss @@ -72,7 +72,8 @@ background-clip: padding-box; height: 100%; text-align: center; - overflow: hidden + overflow: hidden; + border-radius: 12rpx; } .wux-popup__title { font-weight: 400; diff --git a/pages/goods/ablility/index.wxml b/pages/goods/ablility/index.wxml index 0732709..a7090fc 100644 --- a/pages/goods/ablility/index.wxml +++ b/pages/goods/ablility/index.wxml @@ -25,7 +25,7 @@ 正在加载 - 竞价商品发布中, + 特价商品发布中, 先去一口价专区逛逛吧。 暂无数据 diff --git a/pages/goods/fragment/index.wxml b/pages/goods/fragment/index.wxml index 5634126..cfce1c6 100644 --- a/pages/goods/fragment/index.wxml +++ b/pages/goods/fragment/index.wxml @@ -12,7 +12,7 @@ 正在加载 - 竞价商品发布中, + 特价商品发布中, 先去一口价专区逛逛吧。 暂无数据 diff --git a/pages/goods/index/index.js b/pages/goods/index/index.js index e1270ba..b189a5c 100644 --- a/pages/goods/index/index.js +++ b/pages/goods/index/index.js @@ -16,7 +16,7 @@ Page({ loading: true, requesting: false, finished: false, - tabList: ['一口价商品', '竞价商品'], + tabList: ['一口价商品', '特价商品'], tabIndex: 0, tabScroll: false, cateList: [], diff --git a/pages/home/city-select/index.js b/pages/home/city-select/index.js index aee6a23..05bfe41 100644 --- a/pages/home/city-select/index.js +++ b/pages/home/city-select/index.js @@ -89,7 +89,7 @@ Page({ let index = Math.floor((pageY - this.data.titleHeight) / this.data.itemHeight) let item = this.data.lists[index] if (item) { - this.setData({ scrollViewId: item.letter == '#' ? 'E_' : item.letter, touchmoveIndex: index }) + this.setData({ scrollViewId: item.letter, touchmoveIndex: index }) } }, touchEnd: function() { @@ -128,7 +128,7 @@ Page({ storage.put('ztb-hot-list', JSON.stringify(hotList)) } storage.put('ztb-now-city', JSON.stringify(app.nowCity)) - event.emit('EventMessage', { what: 444, desc: 'nowLocation' }) + event.emit('EventMessage', { what: 444, desc: 'nowCity' }) wx.navigateBack() } }) \ No newline at end of file diff --git a/pages/home/index/index.js b/pages/home/index/index.js index 85e2777..191a584 100644 --- a/pages/home/index/index.js +++ b/pages/home/index/index.js @@ -20,6 +20,7 @@ Component({ userInfo: null, avatarUrl: '/assets/myinfo/user-icon.png', accountMoney: 0, + frozenMoney: 0.00, messageNumber: 0 }, lifetimes: { @@ -55,6 +56,7 @@ Component({ this.setData({ userInfo: app.globalData.userInfo, accountMoney: 0, + frozenMoney: 0, messageNumber: 0, avatarUrl: '/assets/myinfo/user-icon.png' }) @@ -93,7 +95,7 @@ Component({ getBalanceInfo().then(result => { this.setData({ accountMoney: math.minus(result.data.accountMoney, result.data.frozenMoney), - frozenMoney: result.data.frozenMoney + frozenMoney: result.data.frozenMoney || '0.00' }) }) getMessageNumber().then(result => { @@ -134,29 +136,15 @@ Component({ } else if (e.currentTarget.id == 'agent50') { util.navigateTo('/pages/agent/order/index?status=50&tabIndex=1') } else if (e.currentTarget.id == 'agent51') { - wx.navigateTo({ - url: '/pages/agent/order/index?status=51&tabIndex=2' - }) + util.navigateTo('/pages/agent/order/index?status=51&tabIndex=2') } else if (e.currentTarget.id == 'agent53') { - wx.navigateTo({ - url: '/pages/agent/order/index?status=53&tabIndex=3' - }) + util.navigateTo('/pages/agent/order/index?status=53&tabIndex=3') } else if (e.currentTarget.id == 'agent54') { - wx.navigateTo({ - url: '/pages/agent/order/index?status=54&tabIndex=4' - }) + util.navigateTo('/pages/agent/order/index?status=54&tabIndex=4') } else if (e.currentTarget.id == 'agent55') { - wx.navigateTo({ - url: '/pages/agent/order/index?status=55&tabIndex=5' - }) + util.navigateTo('/pages/agent/order/index?status=55&tabIndex=5') } else if (e.currentTarget.id == 'agentall') { - wx.navigateTo({ - url: '/pages/agent/order/index?status=&tabIndex=0' - }) - }else if (e.currentTarget.id == 'cscs') { - wx.navigateTo({ - url: '/pages/home/city-test/index' - }) + util.navigateTo('/pages/agent/order/index?status=&tabIndex=0') } }, toUserInfo: function () { diff --git a/pages/index/index.js b/pages/index/index.js index ffb3f50..831e3fc 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -29,7 +29,7 @@ Page({ landInfo: null, visible: false, show: false, - hotList: [], + historyList: [], cityId: null, visible2: false }, @@ -88,7 +88,7 @@ Page({ this.locationing() this.onResume() if (this.data.path) { - wx.navigateTo({ url: this.data.path }) + util.navigateTo(this.data.path) } getPopupInfo().then(result => { if (result.data) { @@ -107,8 +107,10 @@ Page({ success: function (res) { app.nowLocation.cityName = res.result.address_component.city.replace('市', '') app.nowLocation.cityCode = res.result.ad_info.city_code - app.nowCity = { cityName: app.nowLocation.cityName, cityCode: app.nowLocation.cityCode } - that.setData({ cityName: app.nowLocation.cityName }) + if(!app.nowCity){ + app.nowCity = { cityName: app.nowLocation.cityName, cityCode: app.nowLocation.cityCode } + that.setData({ cityName: app.nowLocation.cityName }) + } that.located = true }, fail: function (res) { @@ -266,13 +268,13 @@ Page({ util.navigateTarget(this.data.landInfo.ruleRedirectInfo) }, fetchRegionList: function () { - var hotstring = storage.get('ztb-city-list') - var hotList = [] + var hotstring = storage.get('ztb-history-list') + var historyList = [] if(!util.isEmpty(hotstring)){ - hotList = JSON.parse(hotstring) + historyList = JSON.parse(hotstring) } getFactoryCity().then(result => { - this.setData({ cityList: result.data, hotList }) + this.setData({ cityList: result.data, historyList }) }) }, clickCity: function(e){ @@ -283,18 +285,26 @@ Page({ if(!util.isEmpty(e.currentTarget.dataset.index)){ var item = this.data.cityList[e.currentTarget.dataset.index] var flag = false - for (let index = 0; index < this.data.cityList.length; index++) { - if(this.data.cityList[index].cityId == item.cityId){ + for (let index = 0; index < this.data.historyList.length; index++) { + if(this.data.historyList[index].cityId == item.cityId){ flag = true break } } if(!flag){ - hotList.push(item) - storage.put('ztb-hot-list', JSON.stringify(hotList)) + if(this.data.historyList.length >= 4){ + this.data.historyList.splice(3, 1) + } + this.data.historyList.unshift(item) + storage.put('ztb-history-list', JSON.stringify(this.data.historyList)) + this.setData({ historyList: this.data.historyList }) } } }, + clearHistory: function(){ + storage.remove('ztb-history-list') + this.setData({ historyList: [] }) + }, onUnload: function(){ event.remove('EventMessage', this) }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 237fd60..03e31c4 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -50,13 +50,13 @@ 选择城市 取消 - + 历史选择 - + - + {{item.cityName}} diff --git a/pages/mall/fragment/index.wxml b/pages/mall/fragment/index.wxml index 50946a4..1db9bba 100644 --- a/pages/mall/fragment/index.wxml +++ b/pages/mall/fragment/index.wxml @@ -9,7 +9,7 @@ - 搜索 + 输入关键字搜索 diff --git a/utils/util.js b/utils/util.js index 8660538..71f728a 100644 --- a/utils/util.js +++ b/utils/util.js @@ -184,7 +184,8 @@ const tokenList = [ '/pages/home/attention-paper/index', '/pages/article/feedback/index', 'pages/agent/edit/index', - '/pages/agent/ability/index' + '/pages/agent/ability/index', + '/pages/bank/bill/index' ] function navigateTo(url){