diff --git a/env/.env b/env/.env index 1ac8de3..0a8a268 100644 --- a/env/.env +++ b/env/.env @@ -10,16 +10,17 @@ VITE_APP_PUBLIC_BASE=/ # 登录页面 VITE_LOGIN_URL = '/pages/login/login' # 第一个请求地址 -VITE_SERVER_BASEURL = 'https://76458.com' - +# VITE_SERVER_BASEURL = 'https://76458.com' +VITE_SERVER_BASEURL = 'https://cz.stnav.com' VITE_UPLOAD_BASEURL = 'https://76458.com/upload' + # h5是否需要配置代理 VITE_APP_PROXY=false VITE_APP_PROXY_PREFIX = '/api' # 第二个请求地址 (目前alova中可以使用) -VITE_SERVER_BASEURL = 'https://76458.com' +# VITE_SERVER_BASEURL = 'https://76458.com' # 默认上海经纬度 VITE_DEFAULT_LONGITUDE = 121.4737 diff --git a/src/App.vue b/src/App.vue index 19c907f..86c0f57 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,6 +27,11 @@ // uni.setStorageSync(LOCATION_CITY_KEY, LOCATION_DEFAULT_CITY) }) onShow((options) => { + uni.showModal({ + title: '提示', + content: `当前请求域名是:${import.meta.env.VITE_SERVER_BASEURL}`, + showCancel: false + }) if (options?.path === 'bundle/order/tea-room/order-detail') { uni.setStorageSync('transferOrderParams', { orderId: options?.query?.orderId || '', diff --git a/src/api/tea-room.ts b/src/api/tea-room.ts index ba86742..a4be1ec 100644 --- a/src/api/tea-room.ts +++ b/src/api/tea-room.ts @@ -47,10 +47,10 @@ export function getLocationToCity(data: ILocationToCityParams) { export interface IHomeTeaStoreListParams { page: number size: number - search: string + search?: string latitude: number longitude: number - city_area_id: number + city_area_id?: number } export function getHomeTeaStoreList(data: IHomeTeaStoreListParams) { diff --git a/src/api/tea-specialist.ts b/src/api/tea-specialist.ts index 7394e36..bb464b0 100644 --- a/src/api/tea-specialist.ts +++ b/src/api/tea-specialist.ts @@ -1,23 +1,47 @@ import { http } from '@/http/alova' -/** - * 获取茶艺师等级 - */ -export function getTeaSpecialistLevels() { - return http.Post('/api/Teamaster/teamasterLevel', null) -} - /** * 获取茶艺师列表 */ export interface ITeaSpecialistParams { - level_id: string page: number size: number latitude: number longitude: number + level: string + search: string } export function getTeaSpecialist(data: ITeaSpecialistParams) { return http.Post('/api/Teamaster/teamasterList', data) } + +/** + * 茶艺师详情 + * @param team_user_id 茶艺师用户ID + * @param longitude 经度 + * @param latitude 纬度 + */ +export interface ITeaSpecialistDetailParams { + team_user_id: number + longitude: number + latitude: number +} + +export function getTeaSpecialistDetail(data: ITeaSpecialistDetailParams) { + return http.Post('/api/Teamaster/TeamasterDetails', data) +} + +/** + * 茶叶商品列表 + */ +export function getTeaProducts() { + return http.Post('/api/Teamaster/LeafList') +} + +/** + * 获取茶艺师优惠券 + */ +export function getTeaSpecialistCoupons() { + return http.Post('/api/Teamaster/userCoupon') +} \ No newline at end of file diff --git a/src/api/tea.ts b/src/api/tea.ts index 03ec21e..6453953 100644 --- a/src/api/tea.ts +++ b/src/api/tea.ts @@ -48,22 +48,6 @@ export function getTeaSpecialistRewardAmounts() { return http.Post('/api/Teamaster/teamasterTipAmount') } -/** - * 获取门店地址 - */ -export interface ITeaHouseListParams { - page: number - size: number - latitude: number - longitude: number - search: string -} - -export function getTeaHouseList(data: ITeaHouseListParams) { - return http.Post('/api/Store/storeList', - data - ) -} /** * 获取未来7天时间 @@ -76,7 +60,7 @@ export function getNext7Days() { * 获取茶叶类型列表 */ export function getTeaTypeList() { - return http.Post('/api/Teamaster/teaType') + return http.Post('/api/Teamaster/LeafList') } /** @@ -106,23 +90,23 @@ export function teaSpecialistInvite(data: ITeaSpecialistInviteParams) { * 创建预约茶艺师订单 */ export interface ICreateTeaSpecialistOrderParams { - teamaster_id: number - address_id: number + team_user_id: number + server_type: number + longitude: number + latitude: number + store_id: number start_time: number end_time: number - nums: number - tea_id: string - service_type: number - store_id: number - latitude: number - longitude: number - remark: string - coupon_id: number hours: number + address: string + remrk: string + is_teacup: number + tea_id: string + user_coupon_id: number } export function createTeaSpecialistOrder(data: ICreateTeaSpecialistOrderParams) { - return http.Post('/api/order/submitOrder', data) + return http.Post('/api/Teamaster/addTeamOrder', data) } /*** diff --git a/src/api/types/tea.ts b/src/api/types/tea.ts index 62b3b56..e28da73 100644 --- a/src/api/types/tea.ts +++ b/src/api/types/tea.ts @@ -67,9 +67,7 @@ export interface ITeaSpecialistFuture7DaysResult { export interface ITeaTypeListResult { id: number name: string - status: number - tea_price: number - dtime: string + price: number } /** diff --git a/src/api/user.ts b/src/api/user.ts index 752a922..64623e1 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -32,12 +32,14 @@ export interface IAddUserAddressParams { id: number contact: string telephone: string - province: string - province_id?: number - city: string - city_id?: number - district: string - district_id?: number + // province: string + // province_id?: number + // city: string + // city_id?: number + // district: string + // district_id?: number + longitude: number, + latitude: number, address: string is_default: number } diff --git a/src/bundle_b/pages/tea-specialist/address/add.vue b/src/bundle_b/pages/tea-specialist/address/add.vue index 2ddb828..bd48f70 100644 --- a/src/bundle_b/pages/tea-specialist/address/add.vue +++ b/src/bundle_b/pages/tea-specialist/address/add.vue @@ -35,7 +35,7 @@ - + - + 地址 - + @@ -106,12 +106,14 @@ const form = reactive({ contact: '', telephone: '', - province: '', - province_id: 0, - city: '', - city_id: 0, - district: '', - district_id: 0, + // province: '', + // province_id: 0, + // city: '', + // city_id: 0, + // district: '', + // district_id: 0, + longitude: 0, + latitude: 0, address: '', is_default: 0, id: 0 @@ -153,14 +155,14 @@ const Add = { // 确认省市区 - handleConfirmAddress: (e) => { - form.province = e.selectedItems[0]?.label || '' - form.province_id = Number(e.selectedItems[0]?.value) || 0 - form.city = e.selectedItems[1]?.label || '' - form.city_id = Number(e.selectedItems[1]?.value) || 0 - form.district = e.selectedItems[2]?.label || '' - form.district_id = Number(e.selectedItems[2]?.value) || 0 - }, + // handleConfirmAddress: (e) => { + // form.province = e.selectedItems[0]?.label || '' + // form.province_id = Number(e.selectedItems[0]?.value) || 0 + // form.city = e.selectedItems[1]?.label || '' + // form.city_id = Number(e.selectedItems[1]?.value) || 0 + // form.district = e.selectedItems[2]?.label || '' + // form.district_id = Number(e.selectedItems[2]?.value) || 0 + // }, // 获取地址详情 handleGetAddressDetails: async () => { @@ -169,13 +171,12 @@ }) form.contact = res.address_details.contact form.telephone = res.address_details.telephone - form.province = res.address_details.province - form.province_id = res.address_details.province_id - console.log("🚀 ~ form.province_id :", form.province_id ) - form.city = res.address_details.city - form.city_id = res.address_details.city_id - form.district = res.address_details.district - form.district_id = res.address_details.district_id + // form.province = res.address_details.province + // form.province_id = res.address_details.province_id + // form.city = res.address_details.city + // form.city_id = res.address_details.city_id + // form.district = res.address_details.district + // form.district_id = res.address_details.district_id form.address = res.address_details.address form.is_default = res.address_details.is_default isDefaultAddress.value = res.address_details.is_default === 1 ? true : false @@ -214,7 +215,27 @@ console.log("🚀 ~ res2:", res) // 点击取消按钮回调事件 }) - + }, + + /** + * 选择地址 + */ + handleChooseLocation: async () => { + uni.chooseLocation({ + success: (res) => { + console.log("🚀 ~ res:", res) + // res.address: "浙江省嘉兴市南湖区景宜路" + // res.name: "嘉兴市南湖区人民政府(景宜路西)" + // res.latitude: 30.74744 + // res.longitude: 120.78483 + form.address = res.address + form.longitude = res.longitude + form.latitude = res.latitude + }, + fail: (err) => { + console.log("🚀 ~ err:", err) + } + }) }, // 添加地址 @@ -229,10 +250,10 @@ return } - if (!form.province || !form.city || !form.district) { - toast.info('请选择省市区') - return - } + // if (!form.province || !form.city || !form.district) { + // toast.info('请选择省市区') + // return + // } if (!form.address) { toast.info('请填写具体地址') diff --git a/src/bundle_b/pages/tea-specialist/detail.vue b/src/bundle_b/pages/tea-specialist/detail.vue index a172673..c72cb4e 100644 --- a/src/bundle_b/pages/tea-specialist/detail.vue +++ b/src/bundle_b/pages/tea-specialist/detail.vue @@ -91,7 +91,7 @@ + :indicator="{ type: 'dots-bar' }" :list="info.image_arr" mode="aspectFit"> @@ -99,27 +99,34 @@ {{ info.name }} - + {{ info.star }} 推荐 - 已预约 {{ info.reservation_num > 10 ? info.reservation_num + '+' : info.reservation_num }} + 已预约 {{ Number(info.sold) > 10 ? Number(info.sold) + '+' : Number(info.sold) }} + + + + + + + 商家认证 - - 90后茶艺师 + + {{ info.age_range }}后茶艺师 - + - 距离您{{ info.distance }}km 预计{{ info.speed }}分钟 + 距离您{{ info.distance }}km {{ info.is_time }} @@ -129,22 +136,22 @@ 性别 - {{ info.real.gender == 1 ? '男' : '女' }} + {{ info.sex == 1 ? '男' : '女' }} 年龄 - {{ info.real.both }} + {{ info.both }} 身高 - {{ info.real.height }}cm + {{ info.height }}cm 体重 - {{ info.real.weight }}kg + {{ info.weight }}kg @@ -162,7 +169,7 @@ 兴趣爱好 - “{{ info.real.interests }}” + {{ info.hobby_introduce }} @@ -171,17 +178,16 @@ - - - {{ item.content }} - - + + + + - - + + 费用说明 @@ -206,7 +212,7 @@ 车马费 - ¥{{ info.fare_price }}/公里 + ¥{{ info.mileage_price }}/公里 @@ -238,22 +244,84 @@ + + - - - + + + + 项目介绍 + + - - - + 自饮七步 + + + ① 选茶 + ② 择器 + ③ 备水 + + + ④ 入境 + ⑤ 冲泡 + ⑥ 品茗 + ⑦ 回味 - 温馨提示 + + + 对饮八式 + + + ① 洗尘 + ② 坦呈 + ③ 苏酲 + ④ 法度 + + + ⑤ 养成 + ⑥ 身受 + ⑦ 分享 + ⑧ 放下 + + + + + - - - 茶艺师需提前一小时预约,两小时起订 + + + + 禁忌说明 + + + 绿色正规茶艺师综合服务平台, + 为确保平台营运的合法合规和避免不必要的纠纷禁止茶师私添加客户微信, + 禁止茶师私自收款(现金、微信、支付宝红包或转帐等), + 禁止茶师私下接受宴请, + 以及从事除平台项目之外的其它内容和活动。 + + + + + + + 下单须知 + + + 茶艺师出发后,客户取消订单,车费不予返还,敬请谅解! + + + + + + 温馨提示 + + + + + 茶艺师需提前一小时预约,两小时起订 @@ -262,7 +330,7 @@ - + 立即邀约 @@ -283,7 +351,7 @@