Commit fd8e0d32 by 张立顺

功能开发完成

1 parent 2fe6e4f1
...@@ -67,10 +67,7 @@ ...@@ -67,10 +67,7 @@
.selectBgc { .selectBgc {
border: 2px solid #3666FE; border: 2px solid #3666FE;
// background-size: 150% 150%;
// background-size: cover;
/*按比例缩放*/ /*按比例缩放*/
// background-repeat: no-repeat;
} }
} }
......
...@@ -9,9 +9,53 @@ Page({ ...@@ -9,9 +9,53 @@ Page({
loginType: 0, loginType: 0,
agree: true, agree: true,
tabIndx: 1, tabIndx: 1,
tabList: ['我的客户', '我的门店', '我的员工'] tabList: ['我的客户', '我的门店', '我的员工'],
popupShow: true,
merchantList: [
{
merchantId: 0,
merchantName: 'string',
show: true
},
{
merchantId: 1,
merchantName: 'test',
show: true
}
]
},
confirm() {
let { merchantList } = this.data
},
select(e) {
console.log(e)
let { index } = e.currentTarget.dataset
console.log(index)
let { merchantList } = this.data
merchantList.forEach((item, ind) => {
if (index == ind) {
item.act = true
} else {
item.act = false
}
this.setData({
merchantList
})
})
},
input(e) {
console.log(e)
let { merchantList } = this.data
let { value } = e.detail
merchantList.forEach(item => {
item.act = false
item.show = item.merchantName.includes(value)
// = show
})
this.setData({
merchantList
})
}, },
navbarReady(e) { navbarReady(e) {
let { height, statusBarHeight } = e.detail let { height, statusBarHeight } = e.detail
this.setData({ this.setData({
...@@ -24,6 +68,34 @@ Page({ ...@@ -24,6 +68,34 @@ Page({
tabIndx: e.detail tabIndx: e.detail
}) })
}, },
// 切换园区
tapPicker() {
this.setData({
moveArrow: !this.data.moveArrow
})
},
changePicker(e) {
console.log('changePicker')
let { value } = e.detail
// 修改对应下标显示
app.globalData.yqdInfo.subIndex = value
let { merchantId } = this.data.merchantRange[value]
let obj = {}
if (merchantId) obj.merchantId = merchantId
wx.$util.showLoading('加载中...')
api.swtichSubLoginInfo(obj).then(res => {
// console.log(res)
let { code, data, message } = res
if (code == 0) {
// debugger
wx.$util.setUserInfo(data)
this.refresh(data)
} else {
this.showToast(message)
}
})
this.tapPicker()
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
"tab": "../../../components/Tab/Tab", "tab": "../../../components/Tab/Tab",
"client": "./components/client/client", "client": "./components/client/client",
"merchant": "./components/merchant/mrechant", "merchant": "./components/merchant/mrechant",
"staff": "./components/staff/staff" "staff": "./components/staff/staff",
"popup": "../../../components/Popup/Popup",
"search-input": "../../../components/SearchInput/SearchInput"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -57,3 +57,89 @@ ...@@ -57,3 +57,89 @@
.navigation-title .move { .navigation-title .move {
transform: rotate(-180deg) translateY(0); transform: rotate(-180deg) translateY(0);
} }
.search-box {
width: 100%;
height: 104rpx;
padding-left: 32rpx;
// margin-top: 20rpx;
display: flex;
align-items: center;
background-color: #fff;
position: sticky;
top: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
}
.search-box .search-input {
background: #F7F8FA;
border-radius: 38rpx;
width: 606rpx;
height: 72rpx;
display: flex;
align-items: center;
}
.search-box .search-input .search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 10rpx 0 26rpx;
}
.search-box .search-input .search-clear {
width: 36rpx;
height: 36rpx;
margin: 0 26rpx 0 10rpx;
}
.search-box .search-input .input {
font-size: 28rpx;
width: calc(100% - 136rpx);
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
.search-box .search {
width: 144rpx;
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 24rpx;
}
.search-box .search .text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
font-size: 32rpx;
color: #858A94;
}
.search-box .search .text-center .search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
.itemCon {
box-sizing: border-box;
width: 100%;
// background-color: #fff;
height: 80rpx;
color: #323436;
line-height: 80rpx;
padding: 0 32rpx;
}
.active {
// color: aqua;
background: #F0F7FF;
font-size: 28rpx;
color: #3666FE;
}
\ No newline at end of file \ No newline at end of file
...@@ -41,4 +41,52 @@ ...@@ -41,4 +41,52 @@
<staff id="staff" /> <staff id="staff" />
</view> </view>
</view> </view>
<!-- title="选择车型" -->
<popup show="{{popupShow}}" bindconfirm="confirm" height="60%">
<!-- <search-input placeholder="请搜索服务商账号名" ></search-input> -->
<view class="search-box">
<view class="search-input">
<image src="{{IMG_URL}}/output/searchIcon.png" class="search-icon" />
<input
type="text"
placeholder="请搜索服务商账号名"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">
搜索
<!-- <image class="search-filter" src="/images/filter.png" /> -->
</view>
</view>
</view>
<!-- style="height:0%;" -->
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
data-type="message"
refresher-triggered="{{triggered}}">
<block wx:for="{{merchantList}}" wx:key="index">
<view
class="itemCon {{item.act?'active':''}}"
hidden="{{!item.show}}"
data-index="{{index}}"
bindtap="select">
{{item.merchantName}}
</view>
</block>
</scroll-view>
</popup>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!