Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
8694ad7696
4 changed files with 15 additions and 5 deletions
  1. 7
      pages/home/city-select/index.js
  2. 7
      pages/home/city-select/index.wxml
  3. 4
      pages/mall/fragment/index.wxml
  4. 2
      pages/moment/fragment/index.wxml

7
pages/home/city-select/index.js

@ -95,6 +95,10 @@ Page({
touchEnd: function() {
this.setData({ touchmove: false, touchmoveIndex: -1 })
},
lookNow: function(){
var item = {code: app.nowLocation.cityCode, name:app.nowLocation.cityName}
this.selectCity(item)
},
lookItem: function(e){
var item = null
if(util.isEmpty(this.data.value)){
@ -106,6 +110,9 @@ Page({
} else {
item = this.data.searchResult[e.currentTarget.dataset.index]
}
this.selectCity(item)
},
selectCity: function(item){
if(app.nowCity) {
if(app.nowCity.cityCode == item.code){
wx.navigateBack()

7
pages/home/city-select/index.wxml

@ -13,14 +13,17 @@
</view>
</view>
<view wx:else>
<view class="bg-white flex flex-justify" style="padding: 8rpx 72rpx 16rpx 32rpx;">
<view class="bg-white flex" style="padding: 8rpx 72rpx 16rpx 32rpx;">
<view class="text-df">
<text class="text-gray">当前城市:</text>
<text class="text-blue">{{nowCity || '暂无'}}</text>
</view>
</view>
<view class="bg-white flex" style="padding: 8rpx 72rpx 16rpx 32rpx;">
<view class="text-df">
<text class="text-gray">定位城市:</text>
<text class="text-black">{{localCity || '暂无定位城市'}}</text>
<view class="city-name-item" bindtap="lookNow" wx:if="{{localCity}}">{{localCity}}</view>
<text class="text-black" wx:else>暂无定位城市</text>
</view>
</view>
<!-- 热门城市 -->

4
pages/mall/fragment/index.wxml

@ -3,8 +3,8 @@
<view class="cu-custom top-bg" style="height:{{customHeight}}rpx;z-index: 1;">
<view class="cu-bar fixed " style="height:{{customHeight}}rpx;padding-top:{{StatusBar}}rpx;border-bottom:none;padding-right: 0px;width: {{customWidth}}px">
<view class="flex flex-center" style="margin-left: 32rpx;width: 100%;flex: 1;">
<view id="city" class="flex flex-center" style="margin-right:24rpx;" catchtap="gridTap" wx:if="{{cityName}}">
<text class="text-white text-lg">{{cityName}}</text>
<view id="city" class="flex flex-center" style="margin-right:24rpx;" catchtap="gridTap">
<text class="text-white text-lg">{{cityName || '未知'}}</text>
<text class="cuIcon-unfold text-white" style="font-size:16px;padding-top: 8rpx;margin-left: 8rpx;"></text>
</view>
<view class="bg-white flex flex-center" style="flex: 1;border-radius: 16rpx;height: 64rpx;" catchtap="searchList">

2
pages/moment/fragment/index.wxml

@ -4,7 +4,7 @@
<view class="cu-bar fixed " style="height:{{customHeight}}rpx;padding-top:{{StatusBar}}rpx;border-bottom:none;padding-right: 0px;width: {{customWidth}}px">
<view class="flex flex-center" style="margin-left: 32rpx;width: 100%;">
<view class="flex flex-center" catchtap="chooseCity">
<text class="text-white text-lg">{{cityName}}</text>
<text class="text-white text-lg">{{cityName || '未知'}}</text>
<text class="cuIcon-unfold text-white" style="font-size:16px;padding-top: 8rpx;margin-left: 8rpx;"></text>
</view>
<view class="bg-white flex flex-center" style="margin-left:24rpx;flex: 1;border-radius: 16rpx;height: 64rpx;" catchtap="searchList">

Loading…
Cancel
Save