diff --git a/api/order/order.js b/api/order/order.js new file mode 100644 index 0000000..61842c5 --- /dev/null +++ b/api/order/order.js @@ -0,0 +1,14 @@ +import upload from '@/utils/upload' +import request from '@/utils/request' + +// 查询伴宠师列表 +export function getTeacherList(params) { + return request({ + url: '/applet/mall/teacher/getTeacherList', + headers: { + "isToken": true + }, + method: 'get', + params + }) +} diff --git a/api/system/companion.js b/api/system/companion.js index 584355b..855ce6a 100644 --- a/api/system/companion.js +++ b/api/system/companion.js @@ -3,18 +3,20 @@ import request from '@/utils/request' // 查询伴宠师列表 export function getCompanionList(data) { - return request({ - url: '/h5/staff/list', - headers:{ "isToken":true}, - method: 'post', - data:data - }) + return request({ + url: '/h5/staff/list', + headers: { + "isToken": true + }, + method: 'post', + data: data + }) } -// 查询伴宠师列表 +// 查询伴宠师详情 export function getCompanionInfo(id) { - return request({ - url: `/h5/staff/${id}`, - method: 'get' - }) -} + return request({ + url: `/h5/staff/${id}`, + method: 'get' + }) +} \ No newline at end of file diff --git a/pages/companionPetList/companionPetList.vue b/pages/companionPetList/companionPetList.vue index 785142d..b9f4904 100644 --- a/pages/companionPetList/companionPetList.vue +++ b/pages/companionPetList/companionPetList.vue @@ -98,37 +98,45 @@ - + --> + + + - {{item.name}} + {{ item.userName || '匿名' }} - sex - 客户点赞数{{likeNum}} + 客户点赞数{{ likeNum }} - - 距离{{item.id}}km + + 距离{{ item.id }}km + + + 暂无距离估测 - 简介:{{item.shortDescription}} + 简介:{{ item.shortDescription || '暂无' }} @@ -136,7 +144,7 @@ - 养宠4年 | 评价11条 | 服务小结13份 + 养宠{{ item.experience || 0 }}年 | 评价{{ item.commentNum || 0 }}条 | 服务小结{{ item.serviceSummaryNum || 0 }}份 @@ -155,10 +163,13 @@ import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue'; import uniFab from '@/uni_modules/uni-fab/components/uni-fab/uni-fab.vue' import FilterPopup from '@/components/FilterPopup/FilterPopup.vue' + // import { + // getCompanionList, + // getCompanionInfo + // } from "@/api/system/companion" import { - getCompanionList, - getCompanionInfo - } from "@/api/system/companion" + getTeacherList, + } from "@/api/order/order" export default { data() { return { @@ -278,7 +289,14 @@ staffName: "君" } console.log('data', data); - getCompanionList(data).then(response => { + // getCompanionList(data).then(response => { + // if (response.code == 200) { + // this.companionList = response.rows + // console.log(response); + // } + // console.log(response); + // }) + getTeacherList(data).then(response => { if (response.code == 200) { this.companionList = response.rows console.log(response); diff --git a/pages_order/order/orderList.vue b/pages_order/order/orderList.vue index 89bd3af..4d93073 100644 --- a/pages_order/order/orderList.vue +++ b/pages_order/order/orderList.vue @@ -131,10 +131,10 @@ return { tabs: [ { name: '全部', value: '' }, - { name: '待付款', value: '1' }, - { name: '已接单', value: '2' }, - { name: '服务中', value: '3' }, - { name: '已完成', value: '4' } + { name: '待付款', value: '0' }, + { name: '已接单', value: '1' }, + { name: '服务中', value: '2' }, + { name: '已完成', value: '3' } ], currentTab: '', orderList: [],