This commit is contained in:
nyoung 2024-08-22 21:28:23 +08:00
parent c2648e42f3
commit 84aef54964
2 changed files with 32 additions and 15 deletions

View File

@ -8,6 +8,7 @@
<view class="s-input"> <view class="s-input">
<uni-icons type="search" color=" #999999" size="16"></uni-icons> <uni-icons type="search" color=" #999999" size="16"></uni-icons>
<input type="text" v-model="licenseNum" placeholder="车牌号搜索"> <input type="text" v-model="licenseNum" placeholder="车牌号搜索">
<uni-icons @click="licenseNum = ''" type="clear" color="#8E8E93"></uni-icons>
</view> </view>
<view class="search-button" @click="getlist()">搜索</view> <view class="search-button" @click="getlist()">搜索</view>
</view> </view>
@ -311,7 +312,7 @@
height: calc(100vh); height: calc(100vh);
background-color: #f6f7fc; background-color: #f6f7fc;
box-sizing: border-box; box-sizing: border-box;
padding-top: 45px; //padding-top: 45px;
} }
.top-icon { .top-icon {
@ -330,6 +331,8 @@
background-color: #f6f7fc; background-color: #f6f7fc;
box-sizing: border-box; box-sizing: border-box;
padding: 15px 12px; padding: 15px 12px;
height: calc(100% - 155px);
overflow-y: auto;
} }
.h-text { .h-text {
@ -357,21 +360,24 @@
} }
.s-input { .s-input {
width: 75%; margin-left: 10px;
height: 30px; width: 78%;
background: #ffffff; height: 56rpx;
border-radius: 50px; background: #fff;
box-sizing: border-box; border-radius: 50px;
display: flex; box-sizing: border-box;
align-items: center; display: flex;
padding: 0px 10px; align-items: center;
padding: 0px 10px;
input { input {
margin-left: 5px; margin-left: 5px;
width: 80%; flex: 1;
font-size: 14px; width: 0;
color: #999999; font-size: 14px;
} color: #999999;
}
} }
.top-tap { .top-tap {

View File

@ -26,6 +26,8 @@ const request = config => {
if(getTenantId() && !isTanantId){ if(getTenantId() && !isTanantId){
config.header['Tenant-Id'] = getTenantId() config.header['Tenant-Id'] = getTenantId()
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.request({ uni.request({
method: config.method || 'get', method: config.method || 'get',
@ -51,6 +53,15 @@ const request = config => {
toast(msg) toast(msg)
reject(code) reject(code)
} }
res.data.code = (res.data.code === 0 ? 200 : res.data.code)
if(res.data.data && res.data.data.records){
res.data.rows = res.data.data.records
}
if(res.data.data && res.data.data.total){
res.data.total = res.data.data.total
}
resolve(res.data) resolve(res.data)
}) })
.catch(error => { .catch(error => {