ui修改
This commit is contained in:
@@ -31,9 +31,9 @@ Page( {
|
||||
if (userId && userInfodata) {
|
||||
const userInfo = JSON.parse(userInfodata);
|
||||
if (userInfo.bdshEnable == 1) {
|
||||
sel = 3; // 在特殊权限菜单中,"门店"选项不存在,"我的"选项索引为3
|
||||
sel = 3; // 在特殊权限菜单中,"健康驿站"选项不存在,"我的"选项索引为3
|
||||
} else {
|
||||
sel = 3; // 在普通菜单中,"门店"选项索引为3
|
||||
sel = 3; // 在普通菜单中,"健康驿站"选项索引为3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,22 +166,38 @@ Page( {
|
||||
}
|
||||
}
|
||||
})
|
||||
},onsearch:function() {
|
||||
var keyword=that.data.keyword.replace(/\s+/g, "");
|
||||
if(keyword!=""){
|
||||
},
|
||||
// 获取输入的关键字
|
||||
getkeyword: function(e) {
|
||||
that.setData({
|
||||
keyword: e.detail.value
|
||||
});
|
||||
},
|
||||
// 清空搜索
|
||||
clearSearch: function() {
|
||||
that.setData({
|
||||
keyword: ""
|
||||
});
|
||||
that.clearCache();
|
||||
that.getlist(0);
|
||||
},
|
||||
onsearch: function() {
|
||||
var keyword = that.data.keyword.replace(/\s+/g, "");
|
||||
if (keyword != "") {
|
||||
that.setData({
|
||||
keyword:keyword
|
||||
})
|
||||
that.clearCache();//清本页缓存
|
||||
that.getlist(0);//第一次加载数据
|
||||
}else{
|
||||
keyword: keyword
|
||||
});
|
||||
that.clearCache();
|
||||
that.getlist(0);
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: "关键字不能为空",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
duration: 3000
|
||||
});
|
||||
}
|
||||
},swiperchange0:function(e) {
|
||||
},
|
||||
swiperchange0: function(e) {
|
||||
|
||||
},closeserver:function(e) {
|
||||
that.setData({
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "门店"
|
||||
"navigationBarTitleText": "健康驿站"
|
||||
}
|
||||
@@ -4,11 +4,14 @@
|
||||
<!--<view class="searchbox2">
|
||||
<view class="logobox"><image src="../../images/logo2.png" /></view>
|
||||
</view>-->
|
||||
<view class="searchbox">
|
||||
<view class="searchbox">
|
||||
<view class="icobox" bindtap="onsearch"><image src="../../images/searchto1.png" /></view>
|
||||
<view class="inpubox">
|
||||
<input type="text" placeholder="{{qkeyword}}" confirm-type="search" focus="{{getfocus}}" bindinput="getkeyword" bindconfirm="onsearch" placeholder-style="color:#bbb;" />
|
||||
</view>
|
||||
<input type="text" value="{{keyword}}" placeholder="{{qkeyword}}" confirm-type="search" focus="{{getfocus}}" bindinput="getkeyword" bindconfirm="onsearch" placeholder-style="color:#bbb;" />
|
||||
</view>
|
||||
<view class="clearicobox" wx:if="{{keyword}}" bindtap="clearSearch">
|
||||
<image src="../../images/close.png" />
|
||||
</view>
|
||||
<view class="searchicobox" bindtap="onsearch">搜索</view>
|
||||
|
||||
|
||||
@@ -28,7 +31,7 @@
|
||||
<view class="business_item" wx:for="{{business}}" bindtap="onview" data-id="{{item._id}}">
|
||||
<view class="business_item_top">
|
||||
<view class="ub item_image">
|
||||
<image wx:if="{{item.showpic==0}}" src="{{item.image}}" />
|
||||
<image wx:if="{{item.showpic==0 || item.showpic=='0'}}" src="{{item.image}}" />
|
||||
</view>
|
||||
<view class="ub-f1 item_info">
|
||||
<view class="item_title">{{item.name}}</view>
|
||||
|
||||
@@ -32,6 +32,8 @@ page{
|
||||
.searchbox .icobox image{width: 1.5em; height:1.5em; margin-top: 0.4em; margin-left: 0.6em;}
|
||||
.searchbox .icobox0{margin:0; margin-left:0.5em; margin-top:0.2em; width:1.8em;height:1.8em; box-sizing:border-box;z-index: 101;border-radius:50%;}
|
||||
.searchbox .icobox0 image{width: 1.5em; height:1.5em; margin-top: 0.1em; margin-left: 0.1em;}
|
||||
.searchbox .clearicobox{margin:0; margin-right:-2.3em; width:2.2em;height:2.2em;box-sizing:border-box;z-index: 101;display: flex;align-items: center;justify-content: center;}
|
||||
.searchbox .clearicobox image{width: 1.2em; height:1.2em;}
|
||||
.searchbox .searchicobox{margin:0; margin-left:0em; width:3em;height:2.2em; line-height: 2.2em; box-sizing:border-box;z-index: 102;background:linear-gradient(to right, #6BA3F0, #8BBDF5); border:1px solid #6BA3F0; border-left:0; color:#fff; text-align: center; border-radius:0 0.5em 0.5em 0;}
|
||||
|
||||
.swiper{
|
||||
|
||||
Reference in New Issue
Block a user