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 { .cu-custom .cu-bar .content {
width: calc(100% - 440rpx);
width: calc(100% - 380rpx);
} }
.cu-custom .cu-bar .content image { .cu-custom .cu-bar .content image {

3
components/popup/index.wxss

@ -72,7 +72,8 @@
background-clip: padding-box; background-clip: padding-box;
height: 100%; height: 100%;
text-align: center; text-align: center;
overflow: hidden
overflow: hidden;
border-radius: 12rpx;
} }
.wux-popup__title { .wux-popup__title {
font-weight: 400; font-weight: 400;

2
pages/goods/ablility/index.wxml

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

2
pages/goods/fragment/index.wxml

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

2
pages/goods/index/index.js

@ -16,7 +16,7 @@ Page({
loading: true, loading: true,
requesting: false, requesting: false,
finished: false, finished: false,
tabList: ['一口价商品', '价商品'],
tabList: ['一口价商品', '价商品'],
tabIndex: 0, tabIndex: 0,
tabScroll: false, tabScroll: false,
cateList: [], 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 index = Math.floor((pageY - this.data.titleHeight) / this.data.itemHeight)
let item = this.data.lists[index] let item = this.data.lists[index]
if (item) { if (item) {
this.setData({ scrollViewId: item.letter == '#' ? 'E_' : item.letter, touchmoveIndex: index })
this.setData({ scrollViewId: item.letter, touchmoveIndex: index })
} }
}, },
touchEnd: function() { touchEnd: function() {
@ -128,7 +128,7 @@ Page({
storage.put('ztb-hot-list', JSON.stringify(hotList)) storage.put('ztb-hot-list', JSON.stringify(hotList))
} }
storage.put('ztb-now-city', JSON.stringify(app.nowCity)) 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() wx.navigateBack()
} }
}) })

28
pages/home/index/index.js

@ -20,6 +20,7 @@ Component({
userInfo: null, userInfo: null,
avatarUrl: '/assets/myinfo/user-icon.png', avatarUrl: '/assets/myinfo/user-icon.png',
accountMoney: 0, accountMoney: 0,
frozenMoney: 0.00,
messageNumber: 0 messageNumber: 0
}, },
lifetimes: { lifetimes: {
@ -55,6 +56,7 @@ Component({
this.setData({ this.setData({
userInfo: app.globalData.userInfo, userInfo: app.globalData.userInfo,
accountMoney: 0, accountMoney: 0,
frozenMoney: 0,
messageNumber: 0, messageNumber: 0,
avatarUrl: '/assets/myinfo/user-icon.png' avatarUrl: '/assets/myinfo/user-icon.png'
}) })
@ -93,7 +95,7 @@ Component({
getBalanceInfo().then(result => { getBalanceInfo().then(result => {
this.setData({ this.setData({
accountMoney: math.minus(result.data.accountMoney, result.data.frozenMoney), accountMoney: math.minus(result.data.accountMoney, result.data.frozenMoney),
frozenMoney: result.data.frozenMoney
frozenMoney: result.data.frozenMoney || '0.00'
}) })
}) })
getMessageNumber().then(result => { getMessageNumber().then(result => {
@ -134,29 +136,15 @@ Component({
} else if (e.currentTarget.id == 'agent50') { } else if (e.currentTarget.id == 'agent50') {
util.navigateTo('/pages/agent/order/index?status=50&tabIndex=1') util.navigateTo('/pages/agent/order/index?status=50&tabIndex=1')
} else if (e.currentTarget.id == 'agent51') { } 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') { } 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') { } 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') { } 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') { } 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 () { toUserInfo: function () {

34
pages/index/index.js

@ -29,7 +29,7 @@ Page({
landInfo: null, landInfo: null,
visible: false, visible: false,
show: false, show: false,
hotList: [],
historyList: [],
cityId: null, cityId: null,
visible2: false visible2: false
}, },
@ -88,7 +88,7 @@ Page({
this.locationing() this.locationing()
this.onResume() this.onResume()
if (this.data.path) { if (this.data.path) {
wx.navigateTo({ url: this.data.path })
util.navigateTo(this.data.path)
} }
getPopupInfo().then(result => { getPopupInfo().then(result => {
if (result.data) { if (result.data) {
@ -107,8 +107,10 @@ Page({
success: function (res) { success: function (res) {
app.nowLocation.cityName = res.result.address_component.city.replace('市', '') app.nowLocation.cityName = res.result.address_component.city.replace('市', '')
app.nowLocation.cityCode = res.result.ad_info.city_code 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 that.located = true
}, },
fail: function (res) { fail: function (res) {
@ -266,13 +268,13 @@ Page({
util.navigateTarget(this.data.landInfo.ruleRedirectInfo) util.navigateTarget(this.data.landInfo.ruleRedirectInfo)
}, },
fetchRegionList: function () { fetchRegionList: function () {
var hotstring = storage.get('ztb-city-list')
var hotList = []
var hotstring = storage.get('ztb-history-list')
var historyList = []
if(!util.isEmpty(hotstring)){ if(!util.isEmpty(hotstring)){
hotList = JSON.parse(hotstring)
historyList = JSON.parse(hotstring)
} }
getFactoryCity().then(result => { getFactoryCity().then(result => {
this.setData({ cityList: result.data, hotList })
this.setData({ cityList: result.data, historyList })
}) })
}, },
clickCity: function(e){ clickCity: function(e){
@ -283,18 +285,26 @@ Page({
if(!util.isEmpty(e.currentTarget.dataset.index)){ if(!util.isEmpty(e.currentTarget.dataset.index)){
var item = this.data.cityList[e.currentTarget.dataset.index] var item = this.data.cityList[e.currentTarget.dataset.index]
var flag = false 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 flag = true
break break
} }
} }
if(!flag){ 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(){ onUnload: function(){
event.remove('EventMessage', this) 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-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 class="text-gray text-df" hover-class="button--hover" style="width: 120rpx;line-height: 90rpx;" bindtap="onClose">取消</view>
</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> <view class="text-black text-df text-bold">历史选择</view>
<text class="cuIcon-delete" style="font-size: 17px" bindtap="clearHistory"></text> <text class="cuIcon-delete" style="font-size: 17px" bindtap="clearHistory"></text>
</view> </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-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;"> <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> <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> </view>

2
pages/mall/fragment/index.wxml

@ -9,7 +9,7 @@
</view> </view>
<view class="bg-white flex flex-center" style="margin-left:24rpx;flex: 1;border-radius: 16rpx;height: 60rpx;" catchtap="searchList"> <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> <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> </view>
<view class="flex flex-center" style="margin-left: 24rpx;" id="message" bindtap="gridTap"> <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/home/attention-paper/index',
'/pages/article/feedback/index', '/pages/article/feedback/index',
'pages/agent/edit/index', 'pages/agent/edit/index',
'/pages/agent/ability/index'
'/pages/agent/ability/index',
'/pages/bank/bill/index'
] ]
function navigateTo(url){ function navigateTo(url){

Loading…
Cancel
Save