Browse Source

---

featrue/v4.5
DESKTOP-A1SENDA\HUzy 4 years ago
parent
commit
c9e1fcb9fe
3 changed files with 33 additions and 6 deletions
  1. 2
      components/city-change/index.js
  2. 18
      components/city-change/index.wxml
  3. 19
      components/city-change/index.wxss

2
components/city-change/index.js

@ -35,7 +35,7 @@ Component({
wx.getStorage({
key: 'city',
success: function(res){
if(res.data.cityName && res.data.cityId){
if(res.data.cityName){
that.setData({
chooseCity:res.data.cityName
})

18
components/city-change/index.wxml

@ -4,15 +4,23 @@
<view class='city_locate'>
<view data-types='locate' catchtap='cityTap'>
<text class='city_locate_title'>自动定位</text>
<text class='city_locate_text'
style='color:#33b9ff;'>{{locateCity||'点击定位'}}</text>
<text class='city_locate_text' style='color:#33b9ff;'>{{locateCity||'点击定位'}}</text>
</view>
<view >
<text class='city_locate_title' >选择城市</text>
<view>
<text class='city_locate_title'>选择城市</text>
<text class='city_locate_text' style='{{!locateCity&&"color:#33b9ff;"}}'>{{chooseCity}}</text>
</view>
</view>
<!-- <view class="top">
<view class="topsearch">
<view class="frame">
<input value="{{shoopingtext}}" bindinput="shoppinginput"></input>
</view>
<text bindtap="search">搜索</text>
</view>
</view> -->
<view class='new_city'>
<view class='new_city_title'>热门城市</view>
<view class='new_city_box'>

19
components/city-change/index.wxss

@ -104,3 +104,22 @@
text-align: center;
box-shadow:0px 2px 5px 5px gray;
}
.top {
width: 100%;
background-color: #f7f7f7;
}
.topsearch {
width: 97%;
display: flex;
padding: 3% 0;
align-items: center;
}
.frame {
background-color: white;
width: 90%;
border-radius: 20rpx;
padding: 0 3%;
}
Loading…
Cancel
Save