Browse Source

首页样式调整

master
zq 5 months ago
parent
commit
016e2b326b
  1. 85
      pages/index/index.vue

85
pages/index/index.vue

@ -62,7 +62,7 @@
<view class="flex right-wrapper" style="justify-content:center;" v-if="item.hospital_pos"> <view class="flex right-wrapper" style="justify-content:center;" v-if="item.hospital_pos">
<view class="" @click="toLocation(item)"> <view class="" @click="toLocation(item)">
<img :src="cssUrl+'index_nav.svg'" alt=""> <img :src="cssUrl+'index_nav.svg'" alt="">
<view>导航</view> <view class="map-wrap">导航</view>
</view> </view>
<!-- <view v-if="item.address" class="flex copy_btn" @click="copyAddress(item.address)" style="justify-content:center;flex-wrap: wrap;"> <!-- <view v-if="item.address" class="flex copy_btn" @click="copyAddress(item.address)" style="justify-content:center;flex-wrap: wrap;">
@ -130,11 +130,6 @@
loginToken:false, loginToken:false,
state:'', state:'',
workdate:[], workdate:[],
workPlan:{
1:'上午',
2:'下午',
3:'全天',
}
} }
}, },
components:{ components:{
@ -172,14 +167,6 @@
} }
await this.getDoctorInfo() await this.getDoctorInfo()
}, },
// onReady() {
// // console.log(this.doctorInfo,'this.doctorInfo');
// uni.setNavigationBarTitle({
// title: + ''
// })
// },
// "navigationBarTitleText": ""
methods: { methods: {
toLocation(hospital){ toLocation(hospital){
var that = this var that = this
@ -196,8 +183,7 @@
'http://api.map.baidu.com/marker?location='+baiduLngLat.lat+','+baiduLngLat.lng+'&title='+hospital.hospital_name+'&content=即将前往目的地&output=html&src=webapp.baidu.openAPIdemo', 'http://api.map.baidu.com/marker?location='+baiduLngLat.lat+','+baiduLngLat.lng+'&title='+hospital.hospital_name+'&content=即将前往目的地&output=html&src=webapp.baidu.openAPIdemo',
'https://m.amap.com/share/index/lnglat='+hospital.hospital_pos+'&name='+hospital.hospital_name+'&src=uriapi&innersrc=uriapi', 'https://m.amap.com/share/index/lnglat='+hospital.hospital_pos+'&name='+hospital.hospital_name+'&src=uriapi&innersrc=uriapi',
] ]
// return; this.$nav.navToPath(mapList[res.tapIndex])
location.href = mapList[res.tapIndex]
}, },
fail: function (res) { fail: function (res) {
} }
@ -228,19 +214,10 @@
var stat_info = this.state.split('-'); var stat_info = this.state.split('-');
if(stat_info.length > 2) { if(stat_info.length > 2) {
uni.removeStorageSync('checkin_depart_id'); uni.removeStorageSync('checkin_depart_id');
location.href = '/pages/visitors/visitors?type=3&depart_id='+stat_info[2]; this.$nav.navToPath('/pages/visitors/visitors?type=3&depart_id='+stat_info[2])
// uni.navigateTo({
// url:"/pages/visitors/visitors?type=3&depart_id="+stat_info[2]
// })
return; return;
} }
this.getDoctorInfo() this.getDoctorInfo()
// var rebackPagePath = uni.getStorageSync('rebackPagePath')
// if(rebackPagePath){
// uni.navigateTo({
// url:rebackPagePath
// })
// }
}); });
}, },
@ -248,11 +225,11 @@
await this.$http.req('user/index_info', {}, 'GET').then(data=>{ await this.$http.req('user/index_info', {}, 'GET').then(data=>{
if(data == -1) return if(data == -1) return
// var data = JSON.parse(uni.getStorageSync('doctor_info'));
var checkin_depart_id = uni.getStorageSync('checkin_depart_id'); var checkin_depart_id = uni.getStorageSync('checkin_depart_id');
if(checkin_depart_id){ if(checkin_depart_id){
uni.removeStorageSync('checkin_depart_id'); uni.removeStorageSync('checkin_depart_id');
location.href = '/pages/visitors/visitors?type=3&depart_id='+checkin_depart_id; this.$nav.navToPath('/pages/visitors/visitors?type=3&depart_id='+checkin_depart_id)
return; return;
} }
@ -282,28 +259,9 @@
}else{ }else{
visitFlag = false; visitFlag = false;
} }
// if(visitFlag){//
// let workDatKeyArr = Object.keys(this.workdate);
// let workDateValArr = Object.values(this.workdate);
// let timeList = [];
this.hospital_departs = this.doctorInfo.hospital_departs.map((item,index)=>{ this.hospital_departs = this.doctorInfo.hospital_departs.map((item,index)=>{
item.workdate_desc = this.doctorInfo.workdate_desc[item.depart_id] item.workdate_desc = this.doctorInfo.workdate_desc[item.depart_id]
// let indexofNum = workDatKeyArr.indexOf(item.depart_id);
// if(indexofNum > -1){
// let departCurItem = workDateValArr[indexofNum];
// let flag = Array.isArray(departCurItem)
// if(flag){
// item.visit_time = data.workdate_desc[item.depart_id]
// item.plan =0
// }else{
// for(let key in departCurItem){
// let dateItem = departCurItem[key];
// if(Number(dateItem.plan) === 0)continue
// timeList.push(dateItem.week_desc+this.workPlan[dateItem.plan])
// item.visit_time = timeList.join('')
// }
// }
// }
return item return item
}) })
}); });
@ -320,19 +278,14 @@
uni.setStorageSync('depart_id', hospital.depart_id) uni.setStorageSync('depart_id', hospital.depart_id)
uni.setStorageSync('depart', JSON.stringify(hospital)) uni.setStorageSync('depart', JSON.stringify(hospital))
uni.setStorageSync('doctor_info', JSON.stringify(this.doctorInfo)) uni.setStorageSync('doctor_info', JSON.stringify(this.doctorInfo))
uni.navigateTo({ this.$nav.navToPath("/pages/visitors/visitors?type=1&is_preview=1")
url:"/pages/visitors/visitors?type=1&is_preview=1"
})
}, },
toPrebookList(){ toPrebookList(){
uni.navigateTo({ this.$nav.navToPath("/pages/prebook_list/prebook_list")
url:"/pages/prebook_list/prebook_list"
})
}, },
toPrebookDetail(){ toPrebookDetail(){
uni.navigateTo({ this.$nav.navToPath("/pages/visit_detail/visit_detail")
url:"/pages/visit_detail/visit_detail"
})
}, },
qqMapTransBMap(lng, lat) { qqMapTransBMap(lng, lat) {
let x_pi = 3.14159265358979324 * 3000.0 / 180.0; let x_pi = 3.14159265358979324 * 3000.0 / 180.0;
@ -355,7 +308,7 @@
.index-page{ .index-page{
.header-wrapper{ .header-wrapper{
min-height: 208rpx; min-height: 208rpx;
padding: 24rpx 40rpx 24rpx; padding: 27rpx 40rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
.left{ .left{
width: 510rpx; width: 510rpx;
@ -415,7 +368,6 @@
font-size: 30rpx; font-size: 30rpx;
line-height: 50rpx; line-height: 50rpx;
.con{ .con{
// height: auto;
overflow-y: auto; overflow-y: auto;
max-height: 200rpx; max-height: 200rpx;
color: #666666; color: #666666;
@ -456,7 +408,6 @@
border-bottom:none !important; border-bottom:none !important;
} }
.top{ .top{
// min-height: 102rpx;
.left{ .left{
flex-grow: 1; flex-grow: 1;
.title{ .title{
@ -486,7 +437,6 @@
font-size: 26rpx; font-size: 26rpx;
letter-spacing: 0.69rpx; letter-spacing: 0.69rpx;
color: #0983D0; color: #0983D0;
// margin-left: 20rpx;
} }
} }
@ -498,19 +448,23 @@
} }
} }
.right{ .right{
// width: 200rpx;
width: 172rpx; width: 172rpx;
flex-shrink: 0; flex-shrink: 0;
height: 100%; height: 100%;
color: #666666; color: #666666;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
.map-wrap{
font-size: 26rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0.74rpx;
color: #666666;
margin-top: 4rpx;
}
img{ img{
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
// background: #F4F4F4;
// border-radius: 6rpx;
// margin-right: 7rpx;
} }
.copy_btn{ .copy_btn{
display: block; display: block;
@ -620,7 +574,6 @@
img{ img{
width: 20rpx; width: 20rpx;
height: 32rpx; height: 32rpx;
// margin-top: 8rpx;
margin-left: 8rpx; margin-left: 8rpx;
} }
} }

Loading…
Cancel
Save