第一次提交

This commit is contained in:
2023-03-12 21:34:45 +08:00
parent 2cccaf2c62
commit 4c96aa0951
12 changed files with 403 additions and 236 deletions

View File

@@ -1,81 +1,140 @@
//获取应用实例
var app = getApp();
// pages/home/home.js
Page({
data: {
option1: [{
text: '全部医院',
value: 0
},
{
text: '西京医院',
value: 1
},
{
text: '陕西省人民医院',
value: 2
},
{
text: '陕西省人民医院1',
value: 5
},
],
value1: 0,
version_number: '1.0',
height: '',
url: app.globalData.url,
},
onChange(e) {
this.setData({
timeData: e.detail,
});
},
//生命周期回调——监听小程序启动或切前台。
onShow: function () {
this.getBannerAndCat();
},
//首页信息
getBannerAndCat: function () {
var that = this;
wx.request({
url: app.globalData.url + '/system/hospitalUserView/list',
header: app.getRequestHeader(),
method: 'GET',
data: {
},
success: (res) => {
var resp = res.data;
if (res.data.code == 200) {
that.setData({
special_offer: resp.data,
});
/**
* 页面的初始数据
*/
data: {
bannerdata:[
"home-banner",
"home-banner",
"home-banner"
],
itemView: [
{
icon: "诊前约号",
title: "诊前约号"
},
{
icon: "代办买药",
title: "代办买药"
},
{
icon: "取送结果",
title: "取送结果"
},
{
icon: "出入院办理",
title: "出入院办理"
}
}
});
},
// 跳转详情
details(e) {
if (e.currentTarget.dataset.item != 0) {
let item = JSON.stringify(e.currentTarget.dataset.item);
console.log("传递的item" + item);
wx.navigateTo({
// url: "/shopping/pages/goddess/goddess?item=" + item,
url: "/pages/peihu/peihu",
});
}
},
],
hospitalData: [
{
img: "https://bkimg.cdn.bcebos.com/pic/8326cffc1e178a828fa58d64f303738da877e85d?x-bce-process=image/resize,m_lfit,w_536,limit_1",
name: "西京医院",
grade: "三甲",
genre: "综合医院",
skiled: "消化内科、心血管内科",
address: "西安市高新区长乐西路127号",
id: "1"
},{
img: "https://bkimg.cdn.bcebos.com/pic/8326cffc1e178a828fa58d64f303738da877e85d?x-bce-process=image/resize,m_lfit,w_536,limit_1",
name: "西京医院",
grade: "三甲",
genre: "综合医院",
skiled: "消化内科、心血管内科",
address: "西安市高新区长乐西路127号",
id: "1"
},{
img: "https://bkimg.cdn.bcebos.com/pic/8326cffc1e178a828fa58d64f303738da877e85d?x-bce-process=image/resize,m_lfit,w_536,limit_1",
name: "西京医院",
grade: "三甲",
genre: "综合医院",
skiled: "消化内科、心血管内科",
address: "西安市高新区长乐西路127号",
id: "1"
},{
img: "https://bkimg.cdn.bcebos.com/pic/8326cffc1e178a828fa58d64f303738da877e85d?x-bce-process=image/resize,m_lfit,w_536,limit_1",
name: "西京医院",
grade: "三甲",
genre: "综合医院",
skiled: "消化内科、心血管内科",
address: "西安市高新区长乐西路127号",
id: "1"
}
]
},
onLoad() {
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
this.setData({
statusBarHeight: statusBarHeight,
height: 46 + statusBarHeight,
});
},
changeDateTime1(e) {
this.setData({
dateTime1: e.detail.value
});
},
})
/**
* 诊前约号、代办买药、取送结果、出入院办理、就医陪诊、园内护理
*/
itemClick (options) {
console.log(options.currentTarget.dataset.id)
},
/**
* 医院列表
*/
listItemTap(options){
console.log(options),
wx.navigateTo({
url: '/pages/peihu/peihu',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -1,12 +1,3 @@
{
"usingComponents": {
"van-count-down": "/miniprogram/miniprogram_npm/@vant/weapp/count-down/index",
"van-dropdown-menu": "/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index",
"van-dropdown-item": "/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index",
"van-calendar": "/miniprogram/miniprogram_npm/@vant/weapp/calendar/index",
"van-cell": "/miniprogram/miniprogram_npm/@vant/weapp/cell/index",
"van-nav-bar":"/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index"
},
"navigationBarTitleText": "服务列表"
}
"usingComponents": {}
}

View File

@@ -1,44 +1,69 @@
<view class="area1">
<image style="height: 336rpx;width: 100%;" src="../image/home_bj.png"></image>
</view>
<view style="display: flex; flex-direction:row;align-items : flex-end;margin-top: -200rpx; justify-content: center;">
<!-- <image style="width: 25rpx;height: 50rpx;" src="../image/right.png"></image> -->
<view class="" style="font-size: 34rpx;color: #ffffff;">{{"服务列表"}}</view>
</view>
<view class="substance" style="margin-top: 186rpx;">
<van-dropdown-menu active-color="#1989fa">
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" />
</van-dropdown-menu>
</view>
<!--index.wxml-->
<view class="contar">
<view class="tejiashangpin">
<view class="Discount" wx:if="{{special_offer.length}}">
<view wx:for="{{special_offer}}" wx:key="{{index}}" wx:for-item="item" class="flex-item bc_green" style='display:flex;background-color: white;margin-right: 10rpx;margin-bottom: 24rpx;'>
<view class="Group" bindtap="details" data-item="{{item}}">
<view class="Group-image">
<image src="{{url+item.avatar}}"></image>
</view>
<view class="content">
<view style="display: flex; flex-direction:row;align-items : flex-end;">
<view class="title1">{{item.nickName}}</view>
<view class="title2">{{"陪护员"}}</view>
<view wx:if="{{item.sex==1}}" class="title3">{{"男"}}</view>
<view wx:if="{{item.sex==0}}" class="title3">{{"女"}}</view>
<view class="title4">{{item.experience}}经验</view>
</view>
<view class="tejia">
<view class="Price2">{{item.introduce}}</view>
</view>
</view>
</view>
</view>
<view class="content">
<view class="head-view">
<image src="../image/home/home-head.png" mode="aspectFill"></image>
</view>
<view class="home-title"><text>瑞莱健康</text></view>
<view class="banner">
<swiper indicator-dots="true" autoplay="true" circular="true" interval="2000" duration="400" indicator-color="#fff" indicator-active-color="#FF9A16">
<view wx:for="{{bannerdata}}" wx:key="id">
<swiper-item>
<image src="../image/home/home-banner.png" mode="aspectFill"></image>
</swiper-item>
</view>
</swiper>
</view>
<view class="item-view">
<block wx:for="{{itemView}}" wx:key="id">
<view class="item-list" bindtap="itemClick" data-id="{{item.title}}">
<view class="item-image">
<image src="../image/home/{{item.icon}}.png" mode="aspectFit"></image>
</view>
<view class="item-title">
<text>{{item.title}}</text>
</view>
</view>
</block>
</view>
<view>
<view class="main">
<view class="main-item">
<view>
<image src="../image/home/就医陪诊-back.png" mode="aspectFit"></image>
</view>
<view class="title-view">
<text class="main-title">就医陪诊</text>
<text class="sub-title">专业陪诊</text>
<text class="sub-title">全程无忧</text>
</view>
</view>
<view class="main-item">
<view>
<image src="../image/home/院内陪护-back.png" mode="aspectFit"></image>
</view>
<view class="title-view">
<text class="main-title">院内护理</text>
<text class="sub-title">专业陪护</text>
<text class="sub-title">家人般温暖</text>
</view>
</view>
</view>
</view>
<view class="list-hospital">
<block wx:for="{{hospitalData}}" wx:key="id">
<view class="list-item" bindtap="listItemTap" data-id="{{item.id}}">
<view class="img-back">
<image src="{{item.img}}" mode="aspectFill"></image>
</view>
<view class="list-info">
<view class="name"><text>{{item.name}}</text></view>
<view class="list-lable">
<view class="grade"><text>{{item.grade}}</text></view>
<view class="genre"><text>{{item.genre}}</text></view>
</view>
<view class="skiled"><text>{{item.skiled}}</text></view>
<view class="address"><text>{{item.address}}</text></view>
</view>
</view>
</block>
</view>
</view>

View File

@@ -1,118 +1,210 @@
@import "../../component/picker/picker.wxss";
page{
background: #F8F8F8;
}
.flex-item{
display:flex;
height: 270rpx;
width: 670rpx;
border-radius: 20rpx;
margin-top: 20rpx;
}
.Discount {
margin-left: 40rpx;
margin-right: 40rpx;
.content{
display: flex;
flex-direction: column;
}
.Group {
display: flex;
}
.Group-image {
width: 128rpx;
height: 128rpx;
margin: 84rpx 40rpx 84rpx 40rpx;
}
.Group-image image {
width: 100%;
height: 100%;
}
.head-view{
width: 750rpx;
height: 420rpx;
position: absolute;
}
.content {
.home-title{
position: relative;
font-weight: bold;
font-size: 48rpx;
color: #333333;
margin: 108rpx 0 0 40rpx;
}
width: auto;
height: 201rpx;
margin-top: 48rpx;
}
.head-view image{
width: 750rpx;
height: 420rpx;
}
.content .title1 {
font-size: 36rpx;
font-weight: 700;
}
.content .title2 {
font-size: 30rpx;
font-weight: 700;
}
.content .title3 {
font-size: 32rpx;
margin-left: 24rpx;
}
.content .title4 {
font-size: 28rpx;
color: #228BFE;
width: 132rpx;
height: 40rpx;
text-align: center;
background-color: #A5BBE0;
border-radius: 20rpx;
margin-left: 24rpx;
}
/* .content .title2 {
font-size: 26rpx;
display: flex;
color: #B4B4B4;
margin: 11rpx 0 18rpx 0;
} */
.content .title2 .house {
width: 24rpx;
height: 24rpx;
margin-right: 7rpx;
}
.content .title2 .house image {
width: 100%;
height: 100%;
}
.content .tejia {
display: flex;
width: 446rpx;
margin-top: 24rpx;
}
.banner{
position: relative;
align-self: center;
width: 670rpx;
height: 286rpx;
margin-top: 54rpx;
border-radius: 20rpx;
overflow: hidden;
}
.banner image{
width: 670rpx;
height: 286rpx;
}
.content .tejia .Price2 {
font-size: 30rpx;
color: #666666;
line-height: 41rpx;
margin-right: 23rpx;
}
.area {
display: relative;
flex-direction: column;
align-items: center;
height: 300rpx;
}
.area1 {
height: 300rpx;
width: 100%;
}
.item-view{
display: flex;
flex-direction: row;
margin: 30rpx 40rpx 0;
}
.van-nav-bar {
background-color: #228BFE;
}
#block{
float: left;
}
.item-list{
display: flex;
flex-direction: column;
padding: 0 10rpx;
width: 160rpx;
height: 160rpx;
align-items: center;
justify-content: center;
}
.item-image{
width: 72rpx;
height: 72rpx;
align-items: center;
}
.item-image image{
width: 72rpx;
height: 72rpx;
}
.item-title{
padding-top: 10rpx;
}
.item-title text{
top: 20rpx;
font-size: 28rpx;
font-weight: normal;
color: #333333;
}
.main{
display: flex;
flex-direction: row;
}
.main-item{
display: flex;
flex-direction: column;
width: 375rpx;
height: 254rpx;
}
.main-item image{
position: absolute;
margin: 0;
width: 375rpx;
height: 254rpx;
}
.title-view{
display: flex;
position: relative;
flex-direction: column;
}
.main-title{
margin-left: 64rpx;
margin-top: 60rpx;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
color: #345170;
font-size: 36rpx;
}
.sub-title{
margin-left: 64rpx;
margin-top: 5rpx;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 24rpx;
color: #345170;
}
.list-hospital{
display: flex;
flex-direction: column;
}
.list-item{
display: flex;
flex-direction: row;
padding: 30rpx 40rpx;
}
.img-back{
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 0 10rpx #A6BBE1;
width: 220rpx;
height: 220rpx;
border-radius: 20rpx;
overflow: hidden;
}
.list-item image{
width: 180rpx;
height: 180rpx;
border-radius: 90rpx;
overflow: hidden;
}
.list-info{
display: flex;
flex-direction: column;
margin-left: 32rpx;
}
.name{
margin-left: 32rpx;
margin-top: 0;
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.list-lable{
display: flex;
flex-direction: row;
}
.grade{
display: flex;
justify-content: center;
align-items: center;
margin-left: 32rpx;
margin-top: 16rpx;
width: 90rpx;
height: 40rpx;
background: -webkit-linear-gradient(left,#1F92FF,#1FC6FF);
border-radius: 20rpx 20rpx 20rpx 0;
color: white;
font-size: 24rpx;
}
.genre{
display: flex;
align-items: center;
height: 40rpx;
margin-left: 16rpx;
margin-top: 16rpx;
padding: 0 20rpx;
background: -webkit-linear-gradient(left,#F4B616,#FF9A16);
color: white;
border-radius: 20rpx;
font-size: 24rpx;
}
.skiled{
margin-left: 32rpx;
margin-top: 24rpx;
font-size: 30rpx;
color: #666666;
}
.address{
margin-left: 32rpx;
margin-top: 24rpx;
font-size: 30rpx;
color: #666666;
}