diff --git a/common/config.js b/common/config.js index 4e7f758..89b2d43 100644 --- a/common/config.js +++ b/common/config.js @@ -1,14 +1,14 @@ const mode = 'devOnline'; //devLocal:本地测试、devOnline:线上测试、production:生产环境 -let ROOTPATH = ''; //域名 +let ROOTPATH = 'http://yikangyang.ali251.langye.net'; //域名 switch (mode) { case 'devLocal': - ROOTPATH = "http://yikangyang.ali251.langye.net" + ROOTPATH = ROOTPATH break; case 'devOnline': - ROOTPATH = "http://yikangyang.ali251.langye.net" + ROOTPATH = ROOTPATH break; case 'production': - ROOTPATH = "https://xxxxx.cn" + ROOTPATH = ROOTPATH break; default: throw new Error('未配置环境'); diff --git a/common/http.api.js b/common/http.api.js index 80da9c8..7e0d229 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -1,26 +1,121 @@ -//api集合 -let apiApp = { - login: '/api/mobile/user/applet-login', - userInfo: '/api/mobile/user/get-user-info', - - -} - -// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作 -const install = (Vue, vm) => { - - //api方法 - // - const login = (params = {}) => vm.$u.get(apiApp.login, params) - const getUserInfo = () => vm.$u.get(apiApp.userInfo) - // end - +//api集合 +let apiApp = { + // 用户 + login: '/api/mobile/user/applet-login', + userInfo: '/api/mobile/user/get-user-info', + updateUser: '/api/mobile/user/update-user', + getMobile: '/api/mobile/user/mobile', + // 用户订单 + accompanyOrders: '/api/mobile/user/accompany-orders', + accompanyOrdersDetail: '/api​/mobile​/user​/accompany-orders-detail', + // 医院 陪护下单 + listHospital: '/api/mobile/hospital/hospital', + detailHospital: '/api/mobile/hospital/hospital-detail', + accompanyProduct: '/api/mobile/hospital/accompany-product', + accompanyProductDetail: '/api/mobile/hospital/accompany-product-detail', + accompanyProductOrder: '/api/mobile/hospital/accompany-order', + accompanyPay: '/api/mobile/hospital/accompany-pay', + // 服务对象 + userArchive: '/api/mobile/user-archive/index', + userArchiveShow: '/api/mobile/user-archive/show', + userArchiveSave: '/api/mobile/user-archive/save', + userArchiveDestroy: '/api/mobile/user-archive/destroy', + // 其他 + otherBanner: '/api/mobile/other/banner', + otherSite: '/api/mobile/other/site', + otherArticleType: '/api/mobile/other/article-type', + otherArticle: '/api/mobile/other/article', + otherArticleDetail: '/api/mobile/other/article-detail', + otherUpload: '/api/mobile/upload-file', + //商城 + productCategory: '/api/mobile/product/product-category', + productList: '/api/mobile/product/product', + productDetail: '/api/mobile/product/product-detail', + productOrder: '/api/mobile/product/order', + productPay: '/api/mobile/product/pay', + // 收货地址 + userAddress: '/api/mobile/user-address/index', + userAddressShow: '/api/mobile/user-address/show', + userAddressSave: '/api/mobile/user-address/save', + userAddressDestroy: '/api/mobile/user-address/destroy', + // 用户商城订单 + userOrders: '/api/mobile/user/orders', + userOrdersDetail: '/api/mobile/user/orders-detail', + + + +} + +// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作 +const install = (Vue, vm) => { + + //api方法 + // + const login = (params = {}) => vm.$u.get(apiApp.login, params) + const getUserInfo = () => vm.$u.get(apiApp.userInfo) + const updateUser = (params = {}) => vm.$u.post(apiApp.updateUser, params) + const getMobile = (params = {}) => vm.$u.get(apiApp.getMobile, params) + // 用户订单 + const accompanyOrders = (params = {}) => vm.$u.get(apiApp.accompanyOrders, params) + const accompanyOrdersDetail = (params = {}) => vm.$u.get(apiApp.accompanyOrdersDetail, params) + // 医院 陪护下单 + const listHospital = (params = {}) => vm.$u.get(apiApp.listHospital, params) + const detailHospital = (params = {}) => vm.$u.get(apiApp.detailHospital, params) + const accompanyProduct = (params = {}) => vm.$u.get(apiApp.accompanyProduct, params) + const accompanyProductDetail = (params = {}) => vm.$u.get(apiApp.accompanyProductDetail, params) + const accompanyProductOrder = (params = {}) => vm.$u.post(apiApp.accompanyProductOrder, params) + const accompanyPay = (params = {}) => vm.$u.post(apiApp.accompanyPay, params) + // 服务对象 + const userArchive = (params = {}) => vm.$u.get(apiApp.userArchive, params) + const userArchiveShow = (params = {}) => vm.$u.get(apiApp.userArchiveShow, params) + const userArchiveSave = (params = {}) => vm.$u.post(apiApp.userArchiveSave, params) + const userArchiveDestroy = (params = {}) => vm.$u.get(apiApp.userArchiveDestroy, params) + // 其他 + const otherBanner = (params = {}) => vm.$u.get(apiApp.otherBanner, params) + const otherSite = (params = {}) => vm.$u.get(apiApp.otherSite, params) + const otherArticleType = (params = {}) => vm.$u.get(apiApp.otherArticleType, params) + const otherArticle = (params = {}) => vm.$u.get(apiApp.otherArticle, params) + const otherArticleDetail = (params = {}) => vm.$u.get(apiApp.otherArticleDetail, params) + const otherUpload = (params = {}) => vm.$u.post(apiApp.accompanyPay, params) + // 商城 + const productCategory = (params = {}) => vm.$u.get(apiApp.productCategory, params) + 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) + + // end + vm.$u.api = { - login, - getUserInfo - }; -} - -export default { - install -} + // 用户 + login,getUserInfo,updateUser,getMobile, + //用户订单 + accompanyOrders,accompanyOrdersDetail, + // 医院 陪护下单 + listHospital,detailHospital,accompanyProduct,accompanyProductDetail,accompanyProductOrder,accompanyPay, + // 服务对象 + userArchive,userArchiveShow,userArchiveSave,userArchiveDestroy, + // other + otherBanner,otherSite,otherArticleType,otherArticle,otherArticleDetail,otherUpload, + // 商城 + productCategory,productList,productDetail,productOrder,productPay, + // 收货地址 + userAddress,userAddressShow,userAddressSave,userAddressDestroy, + // 用户商城订单 + userOrders,userOrdersDetail, + + + }; +} + +export default { + install +} \ No newline at end of file diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 2f1fcce..f509438 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -50,7 +50,7 @@ const install = (Vue, vm) => { } else { uni.showToast({ icon: "none", - title: "系统错误" + title: res.errmsg||"系统错误" }) return false } diff --git a/component/serviceArchive/service-archive.vue b/component/serviceArchive/service-archive.vue new file mode 100644 index 0000000..96c7a15 --- /dev/null +++ b/component/serviceArchive/service-archive.vue @@ -0,0 +1,195 @@ + + + + + + + \ No newline at end of file diff --git a/package_sub/pages/AddOrder/AddOrder.vue b/package_sub/pages/AddOrder/AddOrder.vue index d335673..e64d394 100644 --- a/package_sub/pages/AddOrder/AddOrder.vue +++ b/package_sub/pages/AddOrder/AddOrder.vue @@ -1,924 +1,1157 @@ - - - - - - + + + + + + \ No newline at end of file diff --git a/package_sub/pages/ServiceDetail/ServiceDetail.vue b/package_sub/pages/ServiceDetail/ServiceDetail.vue index f627d10..ee8d4bf 100644 --- a/package_sub/pages/ServiceDetail/ServiceDetail.vue +++ b/package_sub/pages/ServiceDetail/ServiceDetail.vue @@ -1,412 +1,472 @@ - - - - - - + + + + + + \ No newline at end of file diff --git a/package_sub/pages/ServiceList/ServiceList.vue b/package_sub/pages/ServiceList/ServiceList.vue index b51cc20..8d8d41f 100644 --- a/package_sub/pages/ServiceList/ServiceList.vue +++ b/package_sub/pages/ServiceList/ServiceList.vue @@ -1,175 +1,256 @@ - - - - - + + + + + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index ad3609a..3350d20 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -55,7 +55,7 @@ - + @@ -82,28 +82,28 @@ 热门医院 - + - 苏州大学附属第一医院 + {{item.name}} 三甲 综合医院 - 内科、外科、五官科、其他 + {{item.good_at}} - + 陪诊团队介绍 让就医体验更美好 预约陪诊 @@ -178,25 +178,13 @@ export default { select: { keyword: "", }, - list: [ - { - image: "https://cdn.uviewui.com/uview/swiper/1.jpg", - title: "昨夜星辰昨夜风,画楼西畔桂堂东", - }, - { - image: "https://cdn.uviewui.com/uview/swiper/2.jpg", - title: "身无彩凤双飞翼,心有灵犀一点通", - }, - { - image: "https://cdn.uviewui.com/uview/swiper/3.jpg", - title: "谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳", - }, - ], + list: [], + list_hospital:[], links: [ { text: "陪诊服务", icon: "/static/index/peizhenfuwu.png", - to: "/package_sub/pages/ServiceList/ServiceList" + to: "/package_sub/pages/ServiceList/ServiceList?type=1" }, { text: "就医服务", @@ -205,6 +193,7 @@ export default { { text: "居家照护", icon: "/static/index/jujiazhaohu.png", + to: "/package_sub/pages/ServiceList/ServiceList?type=2" }, { text: "医院陪护", @@ -235,6 +224,8 @@ export default { this.isShowSticky = e.scrollTop > this.scrollTop }, onLoad() { + this.getBanners() + this.getHospital() }, computed: { navbarHeight() { @@ -250,6 +241,23 @@ export default { } }).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) {}, toPage (url, type='page') { diff --git a/pages/order/order.vue b/pages/order/order.vue index 5436737..e3418d1 100644 --- a/pages/order/order.vue +++ b/pages/order/order.vue @@ -130,24 +130,30 @@ export default { }, tabs: [ { - name: '全部' + name: '全部', + id:'' }, { - name: '待支付' + name: '待支付', + id:0 }, { - name: '待评价' + // name: '待评价', + name: '已支付', + id:1 }, { name: '服务中', + id:2, count: 12 }, { - name: '已完成' + name: '已完成', + id:3 }, - { - name: '已取消' - } + // { + // name: '已取消' + // } ], current: 0, swiperCurrent: 0, @@ -188,7 +194,12 @@ export default { this.$refs.tabs.setFinishCurrent(current); this.swiperCurrent = current; this.current = current; - } + }, + async getOrder(){ + const res = await this.$u.api.accompanyOrders({ + pay_status:1 + }) + }, } };