Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
d21f26c0f3
11 changed files with 44 additions and 44 deletions
  1. 2
      colorui/main.wxss
  2. 3
      components/popup/index.wxss
  3. 2
      pages/goods/ablility/index.wxml
  4. 2
      pages/goods/fragment/index.wxml
  5. 2
      pages/goods/index/index.js
  6. 4
      pages/home/city-select/index.js
  7. 28
      pages/home/index/index.js
  8. 34
      pages/index/index.js
  9. 6
      pages/index/index.wxml
  10. 2
      pages/mall/fragment/index.wxml
  11. 3
      utils/util.js

2
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 {

3
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;

2
pages/goods/ablility/index.wxml

@ -25,7 +25,7 @@
<text wx:if="{{loading}}">正在加载</text>
<view wx:else>
<view wx:if="{{form.bidType == 2}}">
<view>价商品发布中,</view>
<view>价商品发布中,</view>
<view>先去一口价专区逛逛吧。</view>
</view>
<view wx:else>暂无数据</view>

2
pages/goods/fragment/index.wxml

@ -12,7 +12,7 @@
<text wx:if="{{loading}}">正在加载</text>
<view wx:else>
<view wx:if="{{form.bidType == 2}}">
<view>价商品发布中,</view>
<view>价商品发布中,</view>
<view>先去一口价专区逛逛吧。</view>
</view>
<view wx:else>暂无数据</view>

2
pages/goods/index/index.js

@ -16,7 +16,7 @@ Page({
loading: true,
requesting: false,
finished: false,
tabList: ['一口价商品', '价商品'],
tabList: ['一口价商品', '价商品'],
tabIndex: 0,
tabScroll: false,
cateList: [],

4
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()
}
})

28
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 () {

34
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)
},

6
pages/index/index.wxml

@ -50,13 +50,13 @@
<view class="text-black text-sg text-bold">选择城市</view>
<view class="text-gray text-df" hover-class="button--hover" style="width: 120rpx;line-height: 90rpx;" bindtap="onClose">取消</view>
</view>
<view class="flex flex-justify" style="padding: 24rpx 32rpx 0rpx 32rpx;" wx:if="{{hotList.length}}">
<view class="flex flex-justify" style="padding: 24rpx 32rpx 0rpx 32rpx;" wx:if="{{historyList.length}}">
<view class="text-black text-df text-bold">历史选择</view>
<text class="cuIcon-delete" style="font-size: 17px" bindtap="clearHistory"></text>
</view>
<view class="bg-white" style="padding: 24rpx;" wx:if="{{hotList.length}}">
<view class="bg-white" style="padding: 24rpx;" wx:if="{{historyList.length}}">
<wux-grids col="4" bordered="{{ false }}">
<wux-grid wx:for="{{hotList}}" wx:key="index" hover-class="none">
<wux-grid wx:for="{{historyList}}" wx:key="index" hover-class="none">
<view style="width: 160rpx;margin-bottom: 16rpx;">
<wux-button outline="{{cityId != item.cityId}}" block type="{{cityId == item.cityId ? 'positive' : 'stable'}}" size="city" data-id="{{item.cityId}}" bind:click="clickCity">{{item.cityName}}</wux-button>
</view>

2
pages/mall/fragment/index.wxml

@ -9,7 +9,7 @@
</view>
<view class="bg-white flex flex-center" style="margin-left:24rpx;flex: 1;border-radius: 16rpx;height: 60rpx;" catchtap="searchList">
<image src="/assets/image/icon-search.png" style="height: 30rpx;width: 30rpx;margin-left: 16rpx"></image>
<text class="text-gray text-sm" style="flex: 1;margin-left: 8rpx">搜索</text>
<text class="text-gray text-sm" style="flex: 1;margin-left: 8rpx">输入关键字搜索</text>
</view>
</view>
<view class="flex flex-center" style="margin-left: 24rpx;" id="message" bindtap="gridTap">

3
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){

Loading…
Cancel
Save