Commit 2249a9cb authored by 阮藤's avatar 阮藤

相关代码上传

parent 1cc83710
<template>
<!-- 搜索界面 -->
<view class="">
<u-navbar :is-back="true" :background="{ backgroundColor: '#F5F5F5' }" title="">
<u-navbar :is-back="true" :borderBottom="false" :background="{ backgroundColor: '#F5F5F5' }" title="">
<view class="slot-wrap">
<view class="search-wrap">
<u-search
......@@ -18,8 +18,9 @@
</u-navbar>
<!-- 列表 -->
<view class="home_con_order u-p-l-30 u-p-r-30">
<view class="u-m-t-30" @click="searchEng(item.materialName)" v-for="item in fiabricList">
<text>{{ item.materialName }}</text>
<view class="u-flex u-m-t-30 hs-height-120 u-border-bottom" @click="searchEng(item.materialName)" v-for="item in fiabricList">
<image class="hs-img-48 u-m-r-20" src="@/static/images/home/search@2x.png" mode=""></image>
<text class="u-font-28 u-flex-1 text-cut" v-html="brightenKeyword(item.materialName,value)"></text>
</view>
</view>
<u-toast ref="uToast" />
......@@ -43,6 +44,14 @@ export default {
this.state = option.state;
},
methods: {
brightenKeyword(val, keyword) {
val = val + '';
if (val.indexOf(keyword) !== -1 && keyword !== '') {
return val.replace(keyword, '<font color="#AF8D66">' + keyword + '</font>');
} else {
return val;
}
},
filterSwitch() {
const val = this.state;
switch (val) {
......@@ -115,4 +124,7 @@ export default {
margin: 0 20rpx;
flex: 1;
}
.ver_middle {
vertical-align: middle;
}
</style>
......@@ -7,10 +7,10 @@
<view class="u-flex u-row-center u-flex-1 hs-weight-600 u-font-36">
<text v-if="searchFlag" class="map-wrap-text">款式委托</text>
<u-search
v-if="!searchFlag"
v-show="!searchFlag"
class="u-m-r-24"
bg-color="#fff"
@click='searchCli'
@click="searchCli"
:disabled="true"
border-color="#d5aa7a"
placeholder="请输入面料名称"
......@@ -47,8 +47,8 @@
<view class="content" :style="{ bottom: footerHeight + 'px', top: headerHeight + 'px' }">
<!-- list -->
<view class="u-p-t-20 u-p-l-30 u-p-r-30 u-p-b-20">
<!-- entrustmentList -->
<view v-if="!isEmpty" class="u-m-b-20 bd_rad1 u-p-30" @click="detaileCli(item)" v-for="item in entrustmentList" :key="item.id" style="background: #fff;">
<!-- entrustmentList v-if="!isEmpty" -->
<view class="u-m-b-20 bd_rad1 u-p-30" @click="detaileCli(item)" v-for="item in entrustmentList" :key="item.id" style="background: #fff;">
<view class="u-m-b-30 u-flex justify-between">
<view class="entrus_list_title u-font-32">{{ item.materialName }}</view>
<view class="u-font-28">{{ item.status | filterStatus }}</view>
......@@ -176,20 +176,6 @@ export default {
onHide() {
this.enable = false;
},
onPullDownRefresh() {
this.pages.size = 5;
this.entrustmentPage();
this.toBeSelectedQuantity();
this.orderTicketExceptionNum();
this.noSampleOrder();
},
// 上拉加载更多
onReachBottom() {
if (this.total > this.entrustmentList.length) {
this.pages.size = this.pages.size + 5;
this.entrustmentPage();
}
},
onPageScroll(object) {
this.statusBtn = false;
if (this.timeOut) {
......@@ -198,13 +184,26 @@ export default {
this.timeOut = setTimeout(() => {
this.statusBtn = true;
}, 1000);
let a = JSON.stringify(object);
if (object.scrollTop >= this.headerHeight) {
this.background.backgroundColor = 'rgba(245,245,245,1)';
} else {
this.background.backgroundColor = 'rgba(245,245,245,0)';
}
},
onPullDownRefresh() {
this.pages.size = 5;
this.entrustmentPage();
this.toBeSelectedQuantity();
this.orderTicketExceptionNum();
this.noSampleOrder();
},
// 上拉加载更多
onReachBottom() {
if (this.total > this.entrustmentList.length) {
this.pages.size = this.pages.size + 5;
this.entrustmentPage();
}
},
computed: {
isEmpty() {
return this.entrustmentList.length === 0 ? true : false;
......@@ -243,7 +242,6 @@ export default {
setOffestTop() {
let systemInfo = uni.getSystemInfoSync();
let topPx = systemInfo.statusBarHeight + 44; // 顶部状态栏+沉浸式自定义顶部导航
console.log(systemInfo, topPx);
this.offsetTop = topPx / (uni.upx2px(topPx) / topPx); // px转rpx
},
// 选款总数
......@@ -391,7 +389,6 @@ export default {
left: 0;
right: 0;
bottom: 0;
overflow: auto;
}
.custom-style {
color: #fff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment