diff --git a/common/http.api.js b/common/http.api.js
index a1bd4de..d2da6f8 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -1,4 +1,3 @@
-
//api集合
let apiApp = {
// 用户
@@ -8,7 +7,7 @@ let apiApp = {
getMobile: '/api/mobile/user/mobile',
// 用户订单
accompanyOrders: '/api/mobile/user/accompany-orders',
- accompanyOrdersDetail: '/api/mobile/user/accompany-orders-detail',
+ accompanyOrdersDetail: '/api/mobile/user/accompany-orders-detail',
// 医院 陪护下单
listHospital: '/api/mobile/hospital/hospital',
detailHospital: '/api/mobile/hospital/hospital-detail',
@@ -39,12 +38,14 @@ let apiApp = {
userAddressShow: '/api/mobile/user-address/show',
userAddressSave: '/api/mobile/user-address/save',
userAddressDestroy: '/api/mobile/user-address/destroy',
- // 用户商城订单
- userOrders: '/api/mobile/user/orders',
+ // 用户商城订单
+ userOrders: '/api/mobile/user/orders',
userOrdersDetail: '/api/mobile/user/orders-detail',
+ hospital: '/api/mobile/hospital/hospital',
+ banner: '/api/mobile/other/banner',
}
// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作
@@ -83,41 +84,47 @@ const install = (Vue, vm) => {
const productList = (params = {}) => vm.$u.get(apiApp.productList, params)
const productDetail = (params = {}) => vm.$u.get(apiApp.productDetail, params)
const productOrder = (params = {}) => vm.$u.get(apiApp.productOrder, params)
- const productPay = (params = {}) => vm.$u.get(apiApp.productPay, params)
- // 收货地址
- const userAddress = (params = {}) => vm.$u.get(apiApp.userAddress, params)
- const userAddressShow = (params = {}) => vm.$u.get(apiApp.userAddressShow, params)
- const userAddressSave = (params = {}) => vm.$u.post(apiApp.userAddressSave, params)
- const userAddressDestroy = (params = {}) => vm.$u.get(apiApp.userAddressDestroy, params)
- // 用户商城订单
- const userOrders = (params = {}) => vm.$u.get(apiApp.userOrders, params)
- const userOrdersDetail = (params = {}) => vm.$u.get(apiApp.userOrdersDetail, params)
+ const productPay = (params = {}) => vm.$u.get(apiApp.productPay, params)
+ // 收货地址
+ const userAddress = (params = {}) => vm.$u.get(apiApp.userAddress, params)
+ const userAddressShow = (params = {}) => vm.$u.get(apiApp.userAddressShow, params)
+ const userAddressSave = (params = {}) => vm.$u.post(apiApp.userAddressSave, params)
+ const userAddressDestroy = (params = {}) => vm.$u.get(apiApp.userAddressDestroy, params)
+ // 用户商城订单
+ const userOrders = (params = {}) => vm.$u.get(apiApp.userOrders, params)
+ const userOrdersDetail = (params = {}) => vm.$u.get(apiApp.userOrdersDetail, params)
+ const hospitalList = (params = {}) => vm.$u.get(apiApp.hospital, params)
+ const banner = (params = {}) => vm.$u.get(apiApp.banner, params)
// end
- vm.$u.api = {
+ vm.$u.api = {
+ hospitalList,
+ banner,
// 用户
- login,getUserInfo,updateUser,getMobile,
- //用户订单
+ login,
+ getUserInfo,
+ updateUser,
+ getMobile,
+ //用户订单
accompanyOrders,accompanyOrdersDetail,
// 医院 陪护下单
listHospital,detailHospital,accompanyProduct,accompanyProductDetail,accompanyProductOrder,accompanyPay,
- // 服务对象
- userArchive,userArchiveShow,userArchiveSave,userArchiveDestroy,
+ // 服务对象
+ userArchive,userArchiveShow,userArchiveSave,userArchiveDestroy,
// other
- otherBanner,otherSite,otherArticleType,otherArticle,otherArticleDetail,otherUpload,
- // 商城
- productCategory,productList,productDetail,productOrder,productPay,
- // 收货地址
- userAddress,userAddressShow,userAddressSave,userAddressDestroy,
- // 用户商城订单
- userOrders,userOrdersDetail,
-
+ otherBanner,otherSite,otherArticleType,otherArticle,otherArticleDetail,otherUpload,
+ // 商城
+ productCategory,productList,productDetail,productOrder,productPay,
+ // 收货地址
+ userAddress,userAddressShow,userAddressSave,userAddressDestroy,
+ // 用户商城订单
+ userOrders,userOrdersDetail,
+
};
}
export default {
install
-}
-
+}
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index f509438..f422583 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -20,7 +20,6 @@ const install = (Vue, vm) => {
// 请求拦截部分,如配置,每次请求前都会执行
Vue.prototype.$u.http.interceptor.request = (config) => {
- console.log('config-http', config)
// 引用token
let token = vm.vuex_token ? vm.vuex_token : uni.getStorageSync('lifeData')?.vuex_token;
if (token) {
@@ -31,7 +30,6 @@ const install = (Vue, vm) => {
// 响应拦截,如配置,每次请求结束都会执行本方法
Vue.prototype.$u.http.interceptor.response = (res) => {
- console.log('res-http',res)
if (res.statusCode === 200) {
if (res.data.hasOwnProperty("errcode")) {
if (res.data.errcode === 40001) {
diff --git a/package_sub/pages/AddOrder/AddOrder.vue b/package_sub/pages/AddOrder/AddOrder.vue
index e64d394..a92f587 100644
--- a/package_sub/pages/AddOrder/AddOrder.vue
+++ b/package_sub/pages/AddOrder/AddOrder.vue
@@ -1,1157 +1,1387 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ i.name }}
-
-
-
-
-
-
-
-
-
- {{info.name}}
-
-
-
-
- 更换服务
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
- 男
- 女
- 任意
-
-
-
-
-
-
-
- 上传资料
- (就诊卡、病例等)
-
-
-
-
-
-
-
-
- 其他服务需求
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 医康养 就医省心
- 期待下次为您服务
-
-
-
- 订单已完成
-
-
-
-
-
- 预约信息
-
-
-
-
- 就诊城市
-
-
- 苏州
-
-
-
-
- 就诊医院
-
-
- 苏打附属
-
-
-
-
- 就诊时间
-
-
- 2024-11-22
-
-
-
-
- 预约人
-
-
- xxx
-
-
-
-
- 预约人电话
-
-
- 18888888888
-
-
-
-
- 陪诊师性别
-
-
- 都可以
-
-
-
-
- 服务需求
-
-
- 无
-
-
-
-
-
-
- 就诊人信息
-
-
-
-
- 姓名
-
-
- aa
-
-
-
-
- 性别
-
-
- 女
-
-
-
-
- 年龄
-
-
- 55岁
-
-
-
-
- 手机号
-
-
- 15555555555
-
-
-
-
- 行动能力
-
-
- 无障碍
-
-
-
-
-
-
- 订单信息
-
-
-
-
- 服务内容
-
-
- 专享半天陪诊
-
-
-
-
- 服务标价
-
-
- ¥ 288
-
-
-
-
- 订单金额
-
-
- ¥ 288
-
-
-
-
- 订单编号
-
-
- PZ2024111855448048
-
-
-
-
- 下单日期
-
-
- 2024-11-18 17:48:47
-
-
-
-
-
-
-
-
- 实付:
- ¥ {{info.price}}
-
- 立即下单
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
- ¥{{item.price}}
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
- {{item.mobile}}
-
-
-
- {{item.address}}
-
-
-
-
-
- 新增就诊人
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+ {{ i.name }}
+
+
+
+
+
+
+
+
+
+ {{ accompanyProduct.name || "未选择" }}
+
+
+
+
+ 更换服务
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
+
+
+
+ 男
+ 女
+ 任意
+
+
+
+
+
+
+
+ 上传资料
+ (就诊卡、病例等)
+
+
+
+
+
+
+
+ 其他服务需求
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 医康养 就医省心
+ 期待下次为您服务
+
+
+
+ 订单已完成
+
+
+
+
+ 预约信息
+
+
+ 就诊城市
+
+ {{ hospital.site ? hospital.site.name : "" }}
+
+
+
+ 就诊医院
+ {{ hospital.name }}
+
+
+ 就诊时间
+ {{ form.time }}
+
+
+ 预约人
+
+ {{ form.appoint_name }}
+
+
+
+ 预约人电话
+
+ {{ form.appoint_mobile }}
+
+
+
+ 陪诊师性别
+
+ {{ sex(form.accompany_sex) }}
+
+
+
+ 服务需求
+ {{ form.content }}
+
+
+
+
+ 就诊人信息
+
+
+ 姓名
+ aa
+
+
+ 性别
+ 女
+
+
+ 年龄
+ 55岁
+
+
+ 手机号
+ 15555555555
+
+
+ 行动能力
+ 无障碍
+
+
+
+
+ 订单信息
+
+
+ 服务内容
+
+ {{ accompanyProduct.name }}
+
+
+
+
+
+
+
+ 订单金额
+
+ ¥ {{ accompanyProduct.price }}
+
+
+
+ 订单编号
+ {{ form.no }}
+
+
+ 下单日期
+
+ {{ form.created_at }}
+
+
+
+
+
+
+
+
+ 实付:
+ ¥ {{ accompanyProduct.price }}
+
+ 立即下单
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+ ¥{{ item.price }}
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+ {{ item.mobile }}
+
+
+
+ {{ item.address }}
+
+
+
+
+ 新增就诊人
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/package_sub/pages/ServiceDetail/ServiceDetail.vue b/package_sub/pages/ServiceDetail/ServiceDetail.vue
index ee8d4bf..650bb93 100644
--- a/package_sub/pages/ServiceDetail/ServiceDetail.vue
+++ b/package_sub/pages/ServiceDetail/ServiceDetail.vue
@@ -1,14 +1,14 @@
-
-
-
-
+
+
+
+
- {{info.introduce}}
+ {{info.introduce || ' '}}
{{info.price}}
@@ -127,16 +127,16 @@
async getDetail(id) {
await this.$u.api.accompanyProductDetail({
id: id
- }).then(res=>{
- console.log("res", res)
- this.info = res
+ }).then(res=>{
+ console.log("res", res)
+ this.info = res
})
-
- },
- toOrder(info) {
- this.$u.route({
- url: '/package_sub/pages/AddOrder/AddOrder?id='+info.id+'&site_id='+info.site_id+'&type='+info.type
- })
+
+ },
+ toOrder(info) {
+ this.$u.route({
+ url: '/package_sub/pages/AddOrder/AddOrder?id='+info.id+'&site_id='+info.site_id+'&type='+info.type
+ })
},
}
}
@@ -469,4 +469,4 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/package_sub/pages/ServiceList/ServiceList.vue b/package_sub/pages/ServiceList/ServiceList.vue
index 8d8d41f..7030f3c 100644
--- a/package_sub/pages/ServiceList/ServiceList.vue
+++ b/package_sub/pages/ServiceList/ServiceList.vue
@@ -67,7 +67,7 @@
'width': '130rpx',
'height': '60rpx',
'line-height': '60rpx'
- },
+ },
last_page:1,
select: {
page: 1,
@@ -105,32 +105,37 @@
async getList() {
const res = await this.$u.api.accompanyProduct({
...this.select
- })
- this.last_page = res.last_page
+ })
+ this.last_page = res.last_page
this.loadStatus = this.select.page >= this.last_page ?'nomore':'loadmore'
- this.list.push(...res.data)
+ this.list.push(...res.data)
console.log(this.select.page,this.last_page)
- },
- reachBottom() {
- if (this.select.page > this.last_page) {
- this.loadStatus = 'nomore'
- return
- }
- this.loadStatus = 'loading'
- this.select.page++
- this.getList()
+ },
+ reachBottom() {
+ if (this.select.page > this.last_page) {
+ this.loadStatus = 'nomore'
+ return
+ }
+ this.loadStatus = 'loading'
+ this.select.page++
+ this.getList()
},
confirmSite(e) {
this.select.site_name = e[0].label
this.select.site_id = e[0].value
- this.list = []
+ this.list = []
this.select.page = 1
this.getList()
},
toOrder(item) {
this.$u.route({
- url: '/package_sub/pages/AddOrder/AddOrder?id=' + item.id + '&title=' + item.name +
- '&site_id=' + item.site_id + '&type=' + item.type
+ url: '/package_sub/pages/AddOrder/AddOrder',
+ params: {
+ id: item.id,
+ title: item.name,
+ site_id: item.site_id,
+ type: item.type
+ }
})
},
toDetail(item) {
@@ -253,4 +258,4 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 5cb0361..c2773d8 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -8,9 +8,12 @@
alt=""
>
-
+
- {{ vuex_location.city.replace(/(市|区|县)/,'') }}
+ {{ vuex_location.city.replace(/(市|区|县)/, "") }}
@@ -34,28 +37,35 @@
-
-
+
+
- {{ vuex_location.city.replace(/(市|区|县)/,'') }}
+ {{ vuex_location.city.replace(/(市|区|县)/, "") }}
-
+
@@ -64,9 +74,13 @@
v-for="item in links"
:key="item.text"
bg-color="transparent"
- @click="$u.throttle($u.route({
- url: item.to
- }))"
+ @click="
+ $u.throttle(
+ $u.route({
+ url: item.to,
+ })
+ )
+ "
>
{{ item.text }}
@@ -75,17 +89,25 @@
-
+
热门医院
-
+
@@ -96,55 +118,89 @@
{{ item.good_at }}
综合医院
- {{item.good_at}}
+ {{ item.good_at }}
-
+
陪诊团队介绍
让就医体验更美好
预约陪诊
-
+
-
- 142812人次
-
+ 142812人次
医院陪护累计
-
+
-
- 12456人次
-
+ 12456人次
居家照护累计
-
+
关于我们
-
+
-
+
资质荣誉
-
+
-
+
@@ -161,7 +217,7 @@ import PrivacyPopup from "@/component/privacy-popup/privacy-popup.vue";
export default {
components: {
Tabbar,
- PrivacyPopup
+ PrivacyPopup,
},
data() {
return {
@@ -178,13 +234,11 @@ export default {
select: {
keyword: "",
},
- list: [],
- list_hospital:[],
links: [
{
text: "陪诊服务",
icon: "/static/index/peizhenfuwu.png",
- to: "/package_sub/pages/ServiceList/ServiceList?type=1"
+ to: "/package_sub/pages/ServiceList/ServiceList?type=1",
},
{
text: "就医服务",
@@ -193,7 +247,7 @@ export default {
{
text: "居家照护",
icon: "/static/index/jujiazhaohu.png",
- to: "/package_sub/pages/ServiceList/ServiceList?type=2"
+ to: "/package_sub/pages/ServiceList/ServiceList?type=2",
},
{
text: "医院陪护",
@@ -210,9 +264,9 @@ export default {
};
},
mounted() {
- this.getElScrollTop()
+ this.getElScrollTop();
if (this.$store.state.vuex_location.status !== 2) {
- this.$store.dispatch('getLocation')
+ this.$store.dispatch("getLocation");
}
},
created() {
@@ -222,74 +276,52 @@ export default {
10;
this.statusBarHeight = uni.getMenuButtonBoundingClientRect().top;
- this.getHospital()
- this.getBanner()
+ this.getHospital();
+ this.getBanner();
},
onPageScroll(e) {
- this.isShowSticky = e.scrollTop > this.scrollTop
- },
- onLoad() {
- this.getBanners()
- this.getHospital()
+ this.isShowSticky = e.scrollTop > this.scrollTop;
},
computed: {
navbarHeight() {
- return getApp().globalData.navbarHeight
- }
+ return getApp().globalData.navbarHeight;
+ },
},
methods: {
- getElScrollTop () {
- const query = uni.createSelectorQuery().in(this)
- query.select('.links').boundingClientRect(data => {
- if (data) {
- this.scrollTop = data.top
- }
- }).exec()
+ getElScrollTop() {
+ const query = uni.createSelectorQuery().in(this);
+ query
+ .select(".links")
+ .boundingClientRect((data) => {
+ if (data) {
+ this.scrollTop = data.top;
+ }
+ })
+ .exec();
},
- async getBanners(){
- const res = await this.$u.api.otherBanner({
- position:1
- })
- res.map(item=>{
- item.url = item.image.url
- })
-
- this.list = res
- },
- async getHospital(){
- const res = await this.$u.api.listHospital({
- page:1,
- page_size:3
- })
- this.list_hospital = res.data
- },
searchInput(e) {},
async getHospital() {
try {
const res = await this.$u.api.hospitalList({
page: 1,
- page_size: 10,
- 'show_relation[0]': 'site'
- })
- this.hospitals = res.data
- } catch (err) {
-
- }
+ page_size: 5,
+ "show_relation[0]": "site",
+ });
+ this.hospitals = res.data;
+ } catch (err) {}
},
async getBanner() {
try {
const res = await this.$u.api.banner({
- position: 1
- })
- this.banners = res.map(i => ({
+ position: 1,
+ });
+ this.banners = res.map((i) => ({
...i,
- url: i.image?.url
- }))
- } catch (err) {
-
- }
- }
+ url: i.image?.url,
+ }));
+ } catch (err) {}
+ },
},
};
@@ -377,7 +409,7 @@ export default {
top: 0;
width: 100vw;
padding-bottom: 20rpx;
- animation: fade .4s;
+ animation: fade 0.4s;
filter: drop-shadow(0 2rpx 6rpx #c20d1266);
@keyframes fade {
from {
@@ -542,7 +574,12 @@ export default {
}
}
.block1 {
- background: linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%);
+ background: linear-gradient(
+ -90deg,
+ #e26165 0%,
+ #c10d12 94%,
+ #c10d12 100%
+ );
position: relative;
.text1 {
diff --git a/pages/login/login.vue b/pages/login/login.vue
index d4b2a73..8a4eca8 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -16,7 +16,10 @@
:custom-style="mobileBtnStyle"
open-type="getPhoneNumber"
@getphonenumber="mobileLogin">手机登录
- 一件授权登录
+ 一件授权登录
@@ -67,7 +70,7 @@ export default {
}
},
methods: {
- authLogin() {
+ authLogin(e) {
if (!this.isAuth) {
this.$refs.uToast.show({
title: '请先阅读协议',
@@ -84,7 +87,7 @@ export default {
code: loginRes.code
})
this.$u.vuex('vuex_token', token)
- const {user} = await this.$u.api.getUserInfo()
+ const { user } = await this.$u.api.getUserInfo()
this.$u.vuex('vuex_user', user)
this.$u.route({
type: 'switchTab',
diff --git a/pages/me/me.vue b/pages/me/me.vue
index 3a43b27..f01d939 100644
--- a/pages/me/me.vue
+++ b/pages/me/me.vue
@@ -3,7 +3,7 @@
-
+
{{ vuex_user.nickname || '微信用户' }}
@@ -18,10 +18,22 @@
-
-
+
+
我要分享
+
+
+ 加入我们
+
+
+
+ 关注
+
+
+
+ 联系我们
+
@@ -35,8 +47,13 @@ export default {
Tabbar
},
data() {
- return {};
- }
+ return {
+ };
+ },
+ methods: {
+ },
+ onLoad() {
+ },
}
@@ -62,12 +79,13 @@ export default {
padding: 4vh 25rpx 0;
.avatar {
- width: 100rpx;
- height: 100rpx;
+ width: 80rpx;
+ height: 80rpx;
border-radius: 100%;
background: #fff;
- padding: 10rpx;
+ padding: 20rpx;
object-fit: cover;
+ filter: drop-shadow(4rpx 6rpx 10rpx #ba534c);
}
.info {
padding-left: 40rpx;
@@ -107,12 +125,12 @@ export default {
.row {
display: flex;
padding: 20rpx 10rpx;
- border-bottom: 2rpx #aaa solid;
+ border-bottom: 2rpx #dee2e6 solid;
&__icon {
- width: 40rpx;
- height: 40rpx;
margin-right: 20rpx;
+ color: $uni-color-primary;
+ font-size: 36rpx;
}
}
}
diff --git a/pages/order/order.vue b/pages/order/order.vue
index e3418d1..3e90d7d 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -2,31 +2,43 @@
-
+
-
-
+
+
+ scroll-y
+ style="height: 100%; width: 100%"
+ @scrolltolower="reachBottom"
+ >
-
+
- 专享半天陪诊
- 待支付
+
+
+ 专享半天陪诊
+
+ {{ statusFormat(i.pay_status) }}
@@ -35,76 +47,61 @@
- ¥600
- 订单号 PZ2024111855448048
+ ¥{{ i.accompany_product ? i.accompany_product.price : 0 }}
+ 订单号 {{ i.no }}
就诊城市
- 苏州
+ {{ i.city || ((i.hospital && i.hospital.site) ? i.hospital.site.name : "") || " " }}
就诊医院
- 苏大附属
+ {{ i.hospital ? i.hospital.name : '' }}
就诊人
- 萍萍
+ {{ i.user_archive ? i.user_archive.name : i.user_archive_id }}
就诊时间
- 2024-12-18 17:00
+ {{ i.time ? $moment(i.time).format('YYYY年MM月DD日 HH:mm') : '' }}
- 下单时间:
- 2024-11-18 17:48:47
+ 下单时间:
+ {{ i.created_at ? $moment(i.created_at).format('YYYY年MM月DD日 HH:mm') : '' }}
- 立即支付
+ {{ i.pay_status === 0 ? '立即支付' : '查看订单' }}
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -112,76 +109,89 @@
@@ -239,7 +270,7 @@ page {
.order {
margin: 0 25rpx;
border-radius: 10rpx;
- filter: drop-shadow(0 0 10rpx rgba(211,211,214,0.3));
+ filter: drop-shadow(0 0 10rpx rgba(211, 211, 214, 0.3));
background-color: #ffffff;
margin-top: 24rpx;
@@ -261,7 +292,7 @@ page {
margin-left: auto;
}
&::after {
- content: '';
+ content: "";
height: 2rpx;
background: #999999;
opacity: 0.302;
@@ -318,7 +349,6 @@ page {
& > text {
display: block;
-
}
& > text:nth-child(1) {
color: #999;
diff --git a/static/logo-mini.png b/static/logo-mini.png
new file mode 100644
index 0000000..66e12c6
Binary files /dev/null and b/static/logo-mini.png differ
diff --git a/store/index.js b/store/index.js
index 3163265..0cdefcb 100644
--- a/store/index.js
+++ b/store/index.js
@@ -34,6 +34,7 @@ const store = new Vuex.Store({
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
vuex_version: '1.0.0',
+ vuex_default_icon: '/static/logo-mini.png',
vuex_token: '',
vuex_user: {},