| | |
| | | <input type="text" placeholder="搜索医院" placeholder-class="placeholder" v-model="name"/> |
| | | <view class="search-btn" @click="search">搜索</view> |
| | | </view> |
| | | <!-- <view class="filter-bar"> |
| | | <view class="filter-item"> |
| | | 全部县区 |
| | | <uni-icons type="bottom" size="14" color="#666"></uni-icons> |
| | | </view> |
| | | <view class="filter-item"> |
| | | 级别优先 |
| | | <uni-icons type="bottom" size="14" color="#666"></uni-icons> |
| | | </view> |
| | | <view class="filter-item active"> |
| | | 其他 |
| | | <uni-icons type="bottom" size="14" color="#2979ff"></uni-icons> |
| | | </view> |
| | | </view> --> |
| | | <view class="filter-tabs"> |
| | | <view class="filter-item" v-for="(item, index) in filterOptions" :key="index" |
| | | :class="{ 'active': currentFilter === index }" @click="selectFilter(index)"> |
| | |
| | | </uni-popup> |
| | | </view> |
| | | |
| | | <!-- 分院选项卡 --> |
| | | <!-- <view class="padding-l" v-for="(item,index) in hosplist" :key="index" @click="gohosp"> |
| | | <div class="Package"> |
| | | <div class="Package_left"> |
| | | <img class="Package_left_img" src="https://ltpeis.xaltjdkj.cn:5502/static/images/hosp.png" alt=""> |
| | | </div> |
| | | <div class="Package_right"> |
| | | <span class="Package_txt">{{item.hospAreaName}}</span> |
| | | |
| | | <div class="Package_t"> |
| | | <span class="Package_txt1">营业时间:周一至周六8:00-12:00,周日休息</span> |
| | | </div> |
| | | |
| | | <div class="Package_right_txt"> |
| | | <div class="Package_txt2">地址:{{item.areaName}}</div> |
| | | <div class="Package_txt2">联系电话:{{item.phone}}</div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </view> --> |
| | | |
| | | <scroll-view class="hospital-list" scroll-y> |
| | | <view class="hospital-item" v-for="(hospital, index) in hosplist" :key="index" @click="gohosp"> |
| | | <view class="hospital-item" v-for="(hospital, index) in hosplist" :key="index" @click="gohosp(hospital)"> |
| | | <image src="https://ltpeis.xaltjdkj.cn:5502/static/images/hosp.png" mode="aspectFill" |
| | | class="hospital-image" /> |
| | | <view class="hospital-info"> |
| | |
| | | this.$refs.popup.close() |
| | | }, |
| | | |
| | | //跳转页面 |
| | | ComparisonReport() { |
| | | uni.navigateTo({ |
| | | url: '/pagesA/ComparisonReport/ComparisonReport' |
| | | }) |
| | | |
| | | |
| | | isBase64(str) { |
| | | if (!str || typeof str !== 'string') return false; |
| | | const base64Regex = /^[A-Za-z0-9+/=]+$/; |
| | | if (!base64Regex.test(str) || str.length % 4 !== 0) return false; |
| | | try { |
| | | return btoa(atob(str)) === str; |
| | | } catch (e) { |
| | | return false; |
| | | } |
| | | }, |
| | | ReportDetails() { |
| | | uni.navigateTo({ |
| | | url: '/pagesA/ReportDetails/ReportDetails' |
| | | }) |
| | | // 解码 Base64,处理 Unicode 字符 |
| | | decodeBase64(str) { |
| | | try { |
| | | str = str.replace(/-/g, '+').replace(/_/g, '/'); |
| | | const decoded = atob(str); |
| | | return decodeURIComponent(escape(decoded)); |
| | | } catch (e) { |
| | | console.error("Base64 解码失败:", e); |
| | | return null; |
| | | } |
| | | }, |
| | | gohosp() { |
| | | gohosp(item) { |
| | | // 将 hospId 存储到本地 |
| | | uni.setStorageSync('hospId', item.code); |
| | | |
| | | // 处理 introduction 的 Base64 解码 |
| | | let introduction = item.introduction; |
| | | if (this.isBase64(introduction)) { |
| | | const decoded = this.decodeBase64(introduction); |
| | | introduction = decoded || '<p>无法解码医院简介,请检查数据</p>'; |
| | | } |
| | | uni.setStorageSync('introduction', introduction); |
| | | |
| | | // 通过 URL 传递参数 |
| | | uni.navigateTo({ |
| | | url: '/pagesA/goHosp/goHosp' |
| | | }) |
| | | url: `/pagesA/hospIntroduce/hospIntroduce?hospId=${item.code}&introduction=${encodeURIComponent(introduction)}` |
| | | }); |
| | | } |
| | | |
| | | }, |