修改
This commit is contained in:
parent
767f7bc140
commit
676b43db1e
@ -1,22 +1,22 @@
|
|||||||
import request from "../request.js"
|
import request from "../request.js"
|
||||||
|
|
||||||
|
|
||||||
export function introductionList(id) {
|
export function introductionList(id, longitude, latitude) {
|
||||||
return request({
|
return request({
|
||||||
url: `/nurseApplet/nearbyNursingStation/introductionList?nurseStationId=${id}`,
|
url: `/nurseApplet/nearbyNursingStation/introductionList?nurseStationId=${id}&homeLongitude=${longitude}&homeLatitude=${latitude}`,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function itemList(id,pageSize,pageNum,nurseClassifyInfoId) {
|
export function itemList(id, pageSize, pageNum, nurseClassifyInfoId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/nurseApplet/nearbyNursingStation/itemList?pageSize=${pageSize}&pageNum=${pageNum}&nurseStationId=${id}&nurseClassifyInfoId=${nurseClassifyInfoId}`,
|
url: `/nurseApplet/nearbyNursingStation/itemList?pageSize=${pageSize}&pageNum=${pageNum}&nurseStationId=${id}&nurseClassifyInfoId=${nurseClassifyInfoId}`,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function productInformation(id,pageNum, pageSize) {
|
export function productInformation(id, pageNum, pageSize) {
|
||||||
return request({
|
return request({
|
||||||
url: `/nurseApplet/nearbyNursingStation/productInformation?pageSize=${pageSize}&pageNum=${pageNum}&nurseStationId=${id}`,
|
url: `/nurseApplet/nearbyNursingStation/productInformation?pageSize=${pageSize}&pageNum=${pageNum}&nurseStationId=${id}`,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
|
|||||||
@ -37,22 +37,22 @@
|
|||||||
暂无
|
暂无
|
||||||
</view>
|
</view>
|
||||||
<view class="time">
|
<view class="time">
|
||||||
<view class="text">
|
<view class="text" v-if="list.businessStatus">
|
||||||
{{list.businessStatus}}
|
{{list.businessStatus}}
|
||||||
</view>
|
</view>
|
||||||
<view class="timeday" v-if="list.openingHoursDescribe">
|
<view class="timeday" v-if="list.openingHoursDescribe">
|
||||||
{{list.openingHoursDescribe}}
|
{{list.openingHoursDescribe}}
|
||||||
</view>
|
</view>
|
||||||
<view class="texttime">
|
<view class="texttime">
|
||||||
<view class="">
|
<view class="" v-if="list.morningOpenStartTime">
|
||||||
上午:{{list.morningOpenStartTime}}-{{list.morningOpenEndTime}}
|
上午:{{list.morningOpenStartTime}}-{{list.morningOpenEndTime}}
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="" v-if="list.afternoonOpenStartTime">
|
||||||
下午:{{list.afternoonOpenStartTime}}-{{list.afternoonOpenEndTime}}
|
下午:{{list.afternoonOpenStartTime}}-{{list.afternoonOpenEndTime}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="configuration">
|
<view class="configuration" v-if="nurseStationLabelList">
|
||||||
<view class="text" v-for="(item,index) in nurseStationLabelList" :key="index">
|
<view class="text" v-for="(item,index) in nurseStationLabelList" :key="index">
|
||||||
{{item.labelDescription}}
|
{{item.labelDescription}}
|
||||||
</view>
|
</view>
|
||||||
@ -62,8 +62,8 @@
|
|||||||
<view class="text">
|
<view class="text">
|
||||||
{{list.address}}
|
{{list.address}}
|
||||||
</view>
|
</view>
|
||||||
<view class="distance" v-if="distance!=null">
|
<view class="distance" v-if="list.distance">
|
||||||
{{distance}}KM
|
{{list.distance}}KM
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="address" v-else>
|
<view class="address" v-else>
|
||||||
@ -71,9 +71,6 @@
|
|||||||
<view class="text">
|
<view class="text">
|
||||||
暂无
|
暂无
|
||||||
</view>
|
</view>
|
||||||
<view class="distance" v-if="distance!=null">
|
|
||||||
{{distance}}KM
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="address" v-if="list.dutyPhone" style="margin: 20rpx 0 0 33rpx;" @tap='gophone'>
|
<view class="address" v-if="list.dutyPhone" style="margin: 20rpx 0 0 33rpx;" @tap='gophone'>
|
||||||
<image src="../../static/phone.png" mode=""></image>
|
<image src="../../static/phone.png" mode=""></image>
|
||||||
@ -154,6 +151,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
getPatientInfo,
|
||||||
|
} from '@/api/site/site.js';
|
||||||
import {
|
import {
|
||||||
AppIdentification
|
AppIdentification
|
||||||
} from '@/api/AppIdentification/index.js'
|
} from '@/api/AppIdentification/index.js'
|
||||||
@ -176,13 +176,13 @@
|
|||||||
baseurl: '',
|
baseurl: '',
|
||||||
usershow: false, //完善信息开关
|
usershow: false, //完善信息开关
|
||||||
choicetab: false, //切换
|
choicetab: false, //切换
|
||||||
list: [], //护理站list
|
list: undefined, //护理站list
|
||||||
servelist: [], //服务项目
|
servelist: [], //服务项目
|
||||||
productlist: [], //产品
|
productlist: [], //产品
|
||||||
servetotal: 0, //服务项目total
|
servetotal: 0, //服务项目total
|
||||||
producttotal: 0, //产品total
|
producttotal: 0, //产品total
|
||||||
stationid: '', //护理站id
|
stationid: '', //护理站id
|
||||||
nurseStationLabelList: [], //护理站配置
|
nurseStationLabelList: undefined, //护理站配置
|
||||||
nearbyNursingStationItemList: [],
|
nearbyNursingStationItemList: [],
|
||||||
nurseStationId: '',
|
nurseStationId: '',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -202,9 +202,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
classifycurrent: 0, //分类下标
|
classifycurrent: 0, //分类下标
|
||||||
distance: null, //距离
|
|
||||||
nurseClassifyInfoId: '', //分类id
|
nurseClassifyInfoId: '', //分类id
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
|
latitude: 39.90374,
|
||||||
|
longitude: 116.397827,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@ -212,7 +213,45 @@
|
|||||||
this.nurseClassifyInfoId = ''
|
this.nurseClassifyInfoId = ''
|
||||||
this.baseurl = baseurl
|
this.baseurl = baseurl
|
||||||
this.usershow = false
|
this.usershow = false
|
||||||
this.getInfo()
|
var that = this
|
||||||
|
const value = uni.getStorageSync('patientId');
|
||||||
|
if (value) {
|
||||||
|
getPatientInfo(value).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data.homeLatitude && res.data.homeLongitude) {
|
||||||
|
that.latitude = res.data.homeLatitude
|
||||||
|
that.longitude = res.data.homeLongitude
|
||||||
|
that.getInfo();
|
||||||
|
} else {
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'wgs84',
|
||||||
|
success: function(resp) {
|
||||||
|
that.latitude = resp.latitude
|
||||||
|
that.longitude = resp.longitude
|
||||||
|
that.getInfo();
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
that.getInfo();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (res.code == 9999) {} else {
|
||||||
|
that.getInfo();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'wgs84',
|
||||||
|
success: function(res) {
|
||||||
|
that.latitude = res.latitude
|
||||||
|
that.longitude = res.longitude
|
||||||
|
that.getInfo();
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
that.getInfo();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let that = this
|
let that = this
|
||||||
@ -340,9 +379,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getInfo() {
|
getInfo() {
|
||||||
introductionList(this.nurseStationId).then(res => {
|
introductionList(this.nurseStationId, this.longitude, this.latitude).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.distance = res.data.distance
|
|
||||||
this.Banners = []
|
this.Banners = []
|
||||||
this.tabList = [{
|
this.tabList = [{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
|
|||||||
@ -29,8 +29,7 @@
|
|||||||
<view class="addressContent" v-for="(item,index) in nursestationlist" :key="index">
|
<view class="addressContent" v-for="(item,index) in nursestationlist" :key="index">
|
||||||
<view class="lists" @tap='godetails(item)'>
|
<view class="lists" @tap='godetails(item)'>
|
||||||
<view class="nurse">{{item.nurseStationName}}</view>
|
<view class="nurse">{{item.nurseStationName}}</view>
|
||||||
<view class="distance"
|
<view class="distance" v-if="item.distance">
|
||||||
v-show="homeLatitudeLongitude.homeLatitude&&homeLatitudeLongitude.homeLongitude">
|
|
||||||
距离您{{item.distance}}KM</view>
|
距离您{{item.distance}}KM</view>
|
||||||
<image class="background" :src="item.stationPictureUrl" mode=""></image>
|
<image class="background" :src="item.stationPictureUrl" mode=""></image>
|
||||||
<view class="tags">
|
<view class="tags">
|
||||||
@ -86,7 +85,6 @@
|
|||||||
total: 0,
|
total: 0,
|
||||||
latitude: 39.90374,
|
latitude: 39.90374,
|
||||||
longitude: 116.397827,
|
longitude: 116.397827,
|
||||||
homeLatitudeLongitude: null,
|
|
||||||
nurseClassId: '', //护理站分类id
|
nurseClassId: '', //护理站分类id
|
||||||
itemClassId: '', //护理项目分类id
|
itemClassId: '', //护理项目分类id
|
||||||
searchName: '', //通用名称
|
searchName: '', //通用名称
|
||||||
@ -167,14 +165,14 @@
|
|||||||
uni.openSetting({
|
uni.openSetting({
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.authSetting['scope.userLocation']) {
|
if (res.authSetting['scope.userLocation']) {
|
||||||
// uni.getLocation({
|
uni.getLocation({
|
||||||
// type: 'wgs84',
|
type: 'wgs84',
|
||||||
// success: function(res) {
|
success: function(res) {
|
||||||
// that.latitude = res.latitude
|
that.latitude = res.latitude
|
||||||
// that.longitude = res.longitude
|
that.longitude = res.longitude
|
||||||
// that.mask = false
|
that.mask = false
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -261,42 +259,39 @@
|
|||||||
if (value) {
|
if (value) {
|
||||||
getPatientInfo(value).then(res => {
|
getPatientInfo(value).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.homeLatitudeLongitude = res.data
|
|
||||||
if (res.data.homeLatitude && res.data.homeLongitude) {
|
if (res.data.homeLatitude && res.data.homeLongitude) {
|
||||||
that.latitude = res.data.homeLatitude
|
that.latitude = res.data.homeLatitude
|
||||||
that.longitude = res.data.homeLongitude
|
that.longitude = res.data.homeLongitude
|
||||||
that.requestinfo();
|
that.requestinfo();
|
||||||
} else {
|
} else {
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'wgs84',
|
||||||
|
success: function(resp) {
|
||||||
|
that.latitude = resp.latitude
|
||||||
|
that.longitude = resp.longitude
|
||||||
that.requestinfo();
|
that.requestinfo();
|
||||||
// uni.getLocation({
|
},
|
||||||
// type: 'wgs84',
|
fail(err) {
|
||||||
// success: function(resp) {
|
that.mask = true;
|
||||||
// that.latitude = resp.latitude
|
}
|
||||||
// that.longitude = resp.longitude
|
});
|
||||||
// that.requestinfo();
|
|
||||||
// },
|
|
||||||
// fail(err) {
|
|
||||||
// that.mask = true;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
} else if (res.code == 9999) {} else {
|
} else if (res.code == 9999) {} else {
|
||||||
that.requestinfo();
|
that.requestinfo();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'wgs84',
|
||||||
|
success: function(res) {
|
||||||
|
that.latitude = res.latitude
|
||||||
|
that.longitude = res.longitude
|
||||||
that.requestinfo();
|
that.requestinfo();
|
||||||
// uni.getLocation({
|
},
|
||||||
// type: 'wgs84',
|
fail(err) {
|
||||||
// success: function(res) {
|
that.mask = true;
|
||||||
// that.latitude = res.latitude
|
}
|
||||||
// that.longitude = res.longitude
|
});
|
||||||
// that.requestinfo();
|
|
||||||
// },
|
|
||||||
// fail(err) {
|
|
||||||
// that.mask = true;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//1.分享给朋友
|
//1.分享给朋友
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user