111
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
|
||||
|
||||
// components/nav/nav.js
|
||||
const app=getApp();
|
||||
Component({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
keyWord:'',
|
||||
img_host:app.hostConfig().imghost
|
||||
},
|
||||
pageLifetimes: {
|
||||
// 组件所在页面的生命周期函数
|
||||
show() {
|
||||
this.setData({
|
||||
img_host:app.hostConfig().imghost
|
||||
});
|
||||
},
|
||||
hide: function () { },
|
||||
resize: function () { },
|
||||
},
|
||||
|
||||
methods: {
|
||||
search(){
|
||||
this.triggerEvent('goSearch',this.data.keyWord)
|
||||
},
|
||||
clearKeyWord(){
|
||||
this.setData({
|
||||
keyWord:''
|
||||
})
|
||||
},
|
||||
changeIpt(event){
|
||||
let {value} = event.detail;
|
||||
console.log(value);
|
||||
this.setData({
|
||||
keyWord:value
|
||||
})
|
||||
|
||||
},
|
||||
goInquirtForm(){
|
||||
wx.navigateTo({
|
||||
url: '/case/pages/paintCanvas/paintCanvas',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<!--components/nav/nav.wxml-->
|
||||
<view class="barcontain">
|
||||
<image src="{{img_host+'/navbg.png'}}" mode="widthFix" class="bg" />
|
||||
<view class="barcon">
|
||||
<text class="text" bindtap="goInquirtForm">人工肝病例登记系统</text>
|
||||
<view class="scon">
|
||||
<input type="text" placeholder="请输入患者编号或者姓名拼音首字母" value="{{keyWord}}" bindinput="changeIpt" placeholder-style="color: rgba(0,0,0,0.25);font-size:28rpx;" confirm-type="search" class="ipt" />
|
||||
<view class="btn" bind:tap="search">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,61 @@
|
||||
/* components/nav/nav.wxss */
|
||||
.barcontain {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
height: 290rpx;
|
||||
}
|
||||
|
||||
.barcontain .barcon {
|
||||
margin: 106rpx 32rpx 0;
|
||||
}
|
||||
.barcon .scon {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background: #FBFBFB;
|
||||
display: flex;
|
||||
|
||||
box-shadow: 0rpx 12rpx 28rpx 0rpx rgba(0,0,0,0.03);
|
||||
border-radius: 8rpx;
|
||||
align-items: center;
|
||||
margin-top: 55rpx;
|
||||
}
|
||||
|
||||
.barcontain .text {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.barcon .ss {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 25rpx;
|
||||
}
|
||||
|
||||
.barcontain .ipt {
|
||||
margin-left: 30rpx;
|
||||
flex: 1;
|
||||
font-size: 32rpx;
|
||||
height: 80rpx;
|
||||
|
||||
}
|
||||
.bg{
|
||||
position: absolute;
|
||||
z-index:-1;
|
||||
width:750rpx;
|
||||
}
|
||||
.btn{
|
||||
width: 128rpx;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
margin-right: 8rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: linear-gradient(90deg, #377FF7 0%, #51AAFF 100%);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user