<template>
|
<view style="height: 100%">
|
<scroll-view class="container" style="height: 100%">
|
<view class="search-header">
|
<view class="input-box">
|
<uni-icons type="search" />
|
<input name="input" class="keywrod" :focus="true" v-model="pacName" placeholder="请输入套餐名字"
|
confirm-type="search" @confirm="onKeywordConfirm" :placeholder="defaultKeyword.pacName" />
|
<!-- <uni-icons type="shop-filled" class="del" v-if="keyword" @tap.native="clearKeyword" /> -->
|
</view>
|
<view class="right" @tap="closeSearch">取消</view>
|
</view>
|
|
<!-- 体检套餐选项卡 -->
|
<view class="padding-l" v-for="(item,index) in goodsList" :key="index">
|
<div class="Package" @click="package(item.pacId)">
|
<div class="Package_left">
|
<image class="Package_left_img" :src="item.pacPhone" alt="">
|
</div>
|
<div class="Package_right">
|
<span class="Package_txt">{{item.pacName}}</span>
|
<div class="Package_t">
|
<!-- <span class="Package_txt1">{{item.pacId}}</span> -->
|
<span class="Package_txt1">{{item.keyNames}}</span>
|
<!-- <span class="Package_txt1">手机查报告</span> -->
|
</div>
|
<div class="Package_right_txt">
|
<div class="Package_txt2">¥{{item.price}}</div>
|
<div class="Package_right_txt3">
|
<div class="Package_txt3">xx体检中心</div>
|
<div class="Package_txt3">(高新分院)</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</view>
|
|
|
|
|
<view class="search-result-empty" v-if="!goodsList.length">
|
<text class="text">您寻找的套餐还未上架</text>
|
</view>
|
</scroll-view>
|
</view>
|
</template>
|
|
<script>
|
import {
|
getPackageList
|
} from "@/api/system/cart";
|
export default {
|
data() {
|
return {
|
pacName: '',
|
searchStatus: false,
|
goodsList: [],
|
defaultKeyword:{
|
pacName:""
|
}
|
};
|
},
|
onLoad: function() {
|
|
},
|
methods: {
|
closeSearch: function() {
|
var that = this
|
that.pacName = ''
|
this.goodsList = []
|
that.defaultKeyword.pacName = ''
|
},
|
|
|
// inputChange: function(e) {
|
|
// console.log(11111)
|
// },
|
|
|
// inputFocus: function() {
|
// @input="inputChange" @focus="inputFocus"
|
// console.log(222222)
|
|
// },
|
|
|
onKeywordConfirm(event) {
|
// this.getSearchResult(event.detail.value);
|
let data = {
|
pacName: event.detail.value
|
}
|
getPackageList(data).then(res => {
|
this.goodsList = res.data
|
console.log(this.goodsList);
|
})
|
},
|
//跳转
|
package(pacId) {
|
uni.navigateTo({
|
url: '/pagesA/PackageDetails/PackageDetails?pacId=' + pacId
|
})
|
}
|
}
|
};
|
</script>
|
<style>
|
@import './search.css';
|
.padding-l{
|
margin: 0 15rpx;
|
}
|
.Package {
|
width: 100%;
|
height: 104px;
|
display: flex;
|
align-items: center;
|
}
|
|
.Package_left_img {
|
width: 180rpx;
|
height: 180rpx;
|
}
|
|
.Package_right {
|
width: 290px;
|
height: 104px;
|
padding-top: 10rpx;
|
padding-left: 10rpx;
|
}
|
|
.Package_txt1 {
|
font-size: 12px;
|
margin-right: 10px;
|
border-radius: 2px 2px 2px 2px;
|
color: #ff4f00;
|
background-color: #f4cfb8;
|
}
|
|
.Package_txt3 {
|
font-size: 12px;
|
color: #ccc;
|
}
|
</style>
|