Browse Source

地图

master
kuaileWu 2 years ago
parent
commit
dd5b92a5e9
  1. 30
      components/preBookList.vue
  2. 2
      components/tabbar.vue
  3. 31
      manifest.json
  4. 14
      pages.json
  5. 105
      pages/index/index.vue
  6. 60
      pages/map/map.vue

30
components/preBookList.vue

@ -1,15 +1,15 @@
<template>
<view class="prebook-list-com">
<view class="list btPadding">
<view :class="'item '+item" v-for="(item, key) in data">
<view :class="'item '+item" v-for="(item, key) in dataList">
<view class="left">
<view class="title PfScMedium">上官梓涵</view>
<view class="date">2024.01.09 周二 09:30-12:00</view>
<view class="loction">广安门医院西单门诊部</view>
<view class="title PfScMedium"><text v-if="item.real_name">{{item.real_name}}</text><text v-else></text></view>
<view class="date">{{item.date}} {{getDayOfWeek(item.date)}} {{item.start_time}}-{{item.end_time}}</view>
<view class="loction">{{item.visit_hospital.hospital_name}}</view>
</view>
<view class="right">
<view :class="item+' status'"><view class="over">候诊</view></view>
<view class="queue-num" v-if="item=='status_wait'"><view>前方<text class="PfScSemibold">40</text></view> </view>
<view :class="statusList[item.status]+' status'"><view class="over">候诊</view></view>
<view class="queue-num" v-if="statusList[item.status]=='status_wait' && item.queue_num"><view>前方<text class="PfScSemibold">{{item.queue_num}}</text></view> </view>
</view>
</view>
</view>
@ -21,14 +21,26 @@
export default {
name: "preBookList",
props: {
dataList:{
type: Array,
default: function(){
return []
}
}
},
data() {
return {
cssUrl:this.cssUrl,
data:['status_wait', 'status_out_num', 'status_down', 'status_expire', 'status_ing', 'status_down', 'status_expire', 'status_ing']
statusList:['status_wait', 'status_ing', 'status_out_num', 'status_expire', 'status_down']
}
},
methods: {
methods: {
getDayOfWeek(dateString) {
var str = new Date(dateString);
var week = str.getDay();
var weekList = ['周日','周一','周二','周三','周四','周五','周六']
return weekList[week]
}
}
};
</script>
@ -40,7 +52,7 @@ export default {
overflow: hidden;
.list{
width: 100%;
min-height: calc(100vh - 168rpx);
height: auto;
background: #FFFFFF;
border-radius: 8rpx;
margin: 0 auto 0;

2
components/tabbar.vue

@ -1,6 +1,6 @@
<template>
<view>
<view style="height: 100rpx;"></view>
<view style="height: 118rpx;"></view>
<view class="tabbar_item_wrap" style="">
<view class="tabbar_item tabbar_item01" @click="jumpto('/pages/index/index')" style="">
<view :class="[current==1?'tabbarYes':'tabbarNone']">

31
manifest.json

@ -69,23 +69,22 @@
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2",
"vueVersion" : "2",
"h5" : {
"router" : {
"mode" : "history",
"base" : "/"
"mode" : "history",
"base" : "/"
},
"devServer" : {
"port" : 80,
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://apizj.checkcopy.com",
"changeOrigin" : true,
"secure" : false
}
}
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://apizj.checkcopy.com",
"changeOrigin" : true,
"secure" : false
}
}
},
"optimization" : {
"treeShaking" : {
@ -93,7 +92,13 @@
}
},
"sdkConfigs" : {
"maps" : {}
"maps" : {
"amap" : {
"key" : "1249ab0e0ef6a1d276e279cf7b51a3a2",
"securityJsCode" : "4f881fcb7709c8acbfb55c3708f7176b",
"serviceHost" : ""
}
}
}
}
}

14
pages.json

@ -1,10 +1,10 @@
{
"pages": [
{
"path" : "pages/prebook_list/prebook_list",
"style" :
"path" : "pages/map/map",
"style" :
{
"navigationBarTitleText": "预约列表",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
@ -23,6 +23,14 @@
}
},
{
"path" : "pages/prebook_list/prebook_list",
"style" :
{
"navigationBarTitleText": "预约列表",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/user_modify/user_modify",
"style" :
{

105
pages/index/index.vue

@ -69,38 +69,16 @@
查看全部<img :src="cssUrl+'index_comback2.svg'" alt="">
</view>
</view>
<view class="con">
<view class="item flex" @click="toPrebookDetail">
<view class="left">
<view class="PfScMedium over2">上官梓涵</view>
<view class="done">待就诊</view>
</view>
<view class="right">
<view>2024.01.09 周二 09:30-12:00</view>
<view class="over2">广安门中医医院西单门广安门中医医院西单门 针灸科</view>
</view>
</view>
<view class="item flex">
<view class="left">
<view class="PfScMedium over2">上官梓涵</view>
<view class="wait">待就诊</view>
</view>
<view class="right">
<view>2024.01.09 周二 09:30-12:00</view>
<view class="over2">广安门中医医院西单门诊部 针灸科</view>
</view>
</view>
</view>
</view>
<pre-book-list class="preg-books" :dataList="recentAppoint"></pre-book-list>
<tabbar current="1"></tabbar>
</view>
</template>
<script>
import tabbar from '@/components/tabbar.vue';
import tabbar from '@/components/tabbar.vue'
import preBookList from '@/components/preBookList.vue'
export default {
data() {
@ -112,11 +90,12 @@
doctorInfo:false,
doctor_dept:false,
hospitals:false,
recentAppoint:false,
recentAppoint:[]
}
},
components:{
tabbar:tabbar
tabbar,
preBookList,
},
onLoad(option) {
if(option.code) this.code = option.code
@ -154,7 +133,7 @@
});
},
getDoctorInfo() {
this.$http.req('client/user/doctorpage/2', {}, 'GET').then(data=>{
this.$http.req('client/user/doctorpage/'+this.doctor_id, {}, 'GET').then(data=>{
if(data == -1) return
this.pageShow = true
this.keywords = data
@ -162,11 +141,11 @@
if(this.doctorInfo.visit_hospital && this.doctorInfo.visit_hospital.length>0){
this.doctor_dept = this.doctorInfo.visit_hospital[0].hospital_dept_name
}
if(this.doctorInfo.visit_hospital && this.doctorInfo.visit_hospital.length>0){
this.hospitals = this.doctorInfo.visit_hospital
}
if(this.doctorInfo.appoint_record && this.doctorInfo.appoint_record.length>0){
this.recentAppoint = this.doctorInfo.appoint_record
}
@ -339,11 +318,14 @@
}
}
.visit-wrapper{
margin-bottom: 0;
.header{
justify-content: space-between;
.opt{
align-items: top;
align-items: center;
overflow: hidden;
font-size: 26rpx;
color: #949699;
img{
width: 20rpx;
height: 32rpx;
@ -352,63 +334,10 @@
}
}
}
.con{
width: 100%;
justify-content: center;
.item{
width: 669rpx;
min-height: 92rpx;
margin-bottom: 60rpx;
margin-top: 60rpx;
.left{
width: 180rpx;
flex-shrink: 1;
& view:first-of-type{
width: 140rpx;
font-size: 30rpx;
color: #000000;
min-height: 42rpx;
line-height: 42rpx;
}
& view:last-of-type{
border-radius: 6rpx;
font-size: 22rpx;
text-align:center;
width: 90rpx;
height: 32rpx;
line-height: 32rpx;
margin-top: 18rpx;
}
& view.wait:last-of-type{
border: 1rpx solid #AEB0B8;
background: #FCFCFC;
color: #AEB0B8;
}
& view.done:last-of-type{
color: #58CA7F;
background: #F8FFF7;
border: 1rpx solid #5BD07A;
}
}
.right{
flex-grow:1;
text-align:right;
& view:first-of-type{
font-size: 28rpx;
color: #000000;
height: 42rpx;
line-height: 42rpx;
}
& view:last-of-type{
min-height: 32rpx;
line-height: 32rpx;
color: #A1A1A1;
font-size: 28rpx;
margin-top: 18rpx;
}
}
}
}
}
.preg-books{
width: 714rpx;
margin: 0 auto;
}
}
</style>

60
pages/map/map.vue

@ -0,0 +1,60 @@
<template>
<view>
<view>
<a href="http://uri.amap.com/navigation?from=114.02597366,22.54605355&to=114.029243,22.609562&mode=car&src=nyx_super;">高德地图</a>
</view>
<view>
<a href="https://uri.amap.com/marker?position=114.02597366,22.54605355&name=深圳南山">高德地图OK</a>
</view>
<view>
<a href="http://api.map.baidu.com/marker?location=114.02597366,22.54605355&title=深圳南山&content=介绍深圳南山bbb&output=html">百度地图不太ok</a>
</view>
<view>
<a href='http://apis.map.qq.com/uri/v1/marker?marker=coord:31.2353,121.48108;addr:上海市人民广场'>腾讯地图</a>
</view>
<view>
<a href='http://apis.map.qq.com/uri/v1/marker?marker=coord:22.54605355,114.02597366;addr:深圳南山'>腾讯地图2</a>
</view>
<view>
<a href='https://apis.map.qq.com/uri/v1/marker?marker=coord:39.892326,116.342763;title:超好吃冰激凌;addr:手帕口桥北铁路道口&referer=myapp'>腾讯地图3</a>
</view>
<view class="btna" @click="mapbtn">确定</view>
<!-- <view class="page-body">
<view class="page-section page-section-gap">
<map style="width: 100%; height: 100vh;" :latitude="latitude" :longitude="longitude" :markers="covers" :show-compass="true"></map>
</view>
</view> -->
</view>
</template>
<script>
export default {
data() {
return {
id:0, // 使 marker id
title: 'map',
latitude: 39.909,
longitude: 116.39742,
covers: [{
latitude: 39.909,
longitude: 116.39742,
iconPath: '/static/images/frontend/add.svg'
}, {
latitude: 39.90,
longitude: 116.39,
iconPath: '/static/images/frontend/add.svg'
}]
}
},
methods: {
mapbtn() {
location.href="https://m.amap.com/picker/?keywords=写字楼,小区,学校&zoom=15&center=116.470098,39.992838&radius=1000&total=20&key=(您的Key)"
}
}
}
</script>
<style>
</style>
Loading…
Cancel
Save