路泰科技体检小程序UI设计新版本
1
wwl
5 天以前 a6cdbcfe28fcc40ebb4919f57d60fb20122e8e57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<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>