Compare commits

..

No commits in common. "4e9e2d789d5264f4261d60e288fe76bcd9db4c9d" and "3d8ee3b070a658a9f440d49909bb0c7aaa1327e1" have entirely different histories.

15 changed files with 149 additions and 428 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,42 +1,5 @@
var __wxsModules={}; var __wxsModules={};
__wxsModules["2f992f8c"] = (() => {
var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
// <stdin>
var require_stdin = __commonJS({
"<stdin>"(exports, module) {
var inlineTags = {
abbr: true,
b: true,
big: true,
code: true,
del: true,
em: true,
i: true,
ins: true,
label: true,
q: true,
small: true,
span: true,
strong: true,
sub: true,
sup: true
};
module.exports = {
isInline: function(tagName, style) {
return inlineTags[tagName] || (style || "").indexOf("display:inline") !== -1;
}
};
}
});
return require_stdin();
})();
__wxsModules.bca0bb86 = (() => { __wxsModules.bca0bb86 = (() => {
var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() { var __commonJS = (cb, mod) => function __require() {
@ -384,3 +347,40 @@ __wxsModules.bca0bb86 = (() => {
}); });
return require_stdin(); return require_stdin();
})(); })();
__wxsModules["2f992f8c"] = (() => {
var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
// <stdin>
var require_stdin = __commonJS({
"<stdin>"(exports, module) {
var inlineTags = {
abbr: true,
b: true,
big: true,
code: true,
del: true,
em: true,
i: true,
ins: true,
label: true,
q: true,
small: true,
span: true,
strong: true,
sub: true,
sup: true
};
module.exports = {
isInline: function(tagName, style) {
return inlineTags[tagName] || (style || "").indexOf("display:inline") !== -1;
}
};
}
});
return require_stdin();
})();

View File

@ -28,7 +28,6 @@
}, },
"SQLite": {}, "SQLite": {},
"Payment": {}, "Payment": {},
"Webview-x5": {},
"UniNView": { "UniNView": {
"description": "UniNView原生渲染" "description": "UniNView原生渲染"
} }

8
env/.env vendored
View File

@ -11,8 +11,8 @@ VITE_FALLBACK_LOCALE=zh-Hans
# VITE_SERVER_BASEURL = 'http://47.99.70.12:28184/api' # VITE_SERVER_BASEURL = 'http://47.99.70.12:28184/api'
# VITE_UPLOAD_BASEURL = 'http://47.99.70.12:28184' # VITE_UPLOAD_BASEURL = 'http://47.99.70.12:28184'
# VITE_SERVER_BASEURL = 'http://localhost:28184/api' # VITE_SERVER_BASEURL = 'http://localhost:28184/api'
VITE_SERVER_BASEURL = 'http://127.0.0.1:48080/app-api' # VITE_SERVER_BASEURL = 'http://localhost:48080/app-api'
# VITE_SERVER_BASEURL = 'http://47.99.70.12:48080/app-api' VITE_SERVER_BASEURL = 'http://47.99.70.12:48080/app-api'
# VITE_WS_BASEURL = 'ws://47.99.70.12:28184/api' # VITE_WS_BASEURL = 'ws://47.99.70.12:28184/api'
VITE_UPLOAD_BASEURL = 'http://localhost:28184' VITE_UPLOAD_BASEURL = 'http://localhost:28184'
VITE_OSS_BASEURL = 'http://116.204.119.171:9000/linghe' VITE_OSS_BASEURL = 'http://116.204.119.171:9000/linghe'
@ -28,8 +28,8 @@ SHOPRO_VERSION = v1.8.3
SHOPRO_BASE_URL = http://api-dashboard.yudao.iocoder.cn SHOPRO_BASE_URL = http://api-dashboard.yudao.iocoder.cn
# 后端接口 - 测试环境(通过 process.env.NODE_ENV = development # 后端接口 - 测试环境(通过 process.env.NODE_ENV = development
SHOPRO_DEV_BASE_URL = http://127.0.0.1:48080 # SHOPRO_DEV_BASE_URL = http://127.0.0.1:48080
# SHOPRO_DEV_BASE_URL = http://47.99.70.12:48080 SHOPRO_DEV_BASE_URL = http://47.99.70.12:48080
### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc ### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc
# 后端接口前缀(一般不建议调整) # 后端接口前缀(一般不建议调整)

View File

@ -37,20 +37,11 @@ export default defineManifestConfig({
"appkey_android" : "92219e40234c2046f50cb72a1a86e4f7" "appkey_android" : "92219e40234c2046f50cb72a1a86e4f7"
} }
}, },
"amap" : {
"name" : "amapCIxLx5gHo",
"appkey_ios" : "92219e40234c2046f50cb72a1a86e4f7",
"appkey_android" : "92219e40234c2046f50cb72a1a86e4f7",
"key" : "5a270020f3c6b67887c493a416ebd3ad",
"securityJsCode" : "3eabbc7e073e650ae2b1f213f8357422"
},
"maps" : { "maps" : {
"amap" : { "amap" : {
"name" : "amapCIxLx5gHo", "name" : "amapCIxLx5gHo",
"appkey_ios" : "92219e40234c2046f50cb72a1a86e4f7", "appkey_ios" : "92219e40234c2046f50cb72a1a86e4f7",
"appkey_android" : "92219e40234c2046f50cb72a1a86e4f7", "appkey_android" : "92219e40234c2046f50cb72a1a86e4f7"
"key" : "5a270020f3c6b67887c493a416ebd3ad",
"securityJsCode" : "3eabbc7e073e650ae2b1f213f8357422"
} }
}, },
"oauth" : {}, "oauth" : {},
@ -85,8 +76,7 @@ export default defineManifestConfig({
"Geolocation" : {}, "Geolocation" : {},
"Maps" : {}, "Maps" : {},
"SQLite" : {}, "SQLite" : {},
"Payment" : {}, "Payment" : {}
"Webview-x5" : {}
}, },
/* 应用发布信息 */ /* 应用发布信息 */
distribute: { distribute: {

View File

@ -2,8 +2,6 @@
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app' import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
import { notificationService } from './service/notificationService' import { notificationService } from './service/notificationService'
import { ShoproInit } from './sheep' import { ShoproInit } from './sheep'
import { useUserStore } from "@/store";
import { toPath } from "@/utils/commUtils";
onLoad(() => { onLoad(() => {
// //
@ -14,16 +12,9 @@ onLoad(() => {
onLaunch(() => { onLaunch(() => {
console.log('应用正在运行...') console.log('应用正在运行...')
uni.hideTabBar() uni.hideTabBar()
//
const userInfo = useUserStore()
notificationService.startPollingUnreadMessages() notificationService.startPollingUnreadMessages()
// //
ShoproInit() ShoproInit()
if (userInfo.userInfo.token == '' || !userInfo.userInfo.token) {
//
toPath('/pages/login/index')
return
}
}) })
// //

View File

@ -32,8 +32,7 @@
"Geolocation": {}, "Geolocation": {},
"Maps": {}, "Maps": {},
"SQLite": {}, "SQLite": {},
"Payment": {}, "Payment": {}
"Webview-x5": {}
}, },
"distribute": { "distribute": {
"android": { "android": {
@ -188,20 +187,11 @@
"appkey_android": "92219e40234c2046f50cb72a1a86e4f7" "appkey_android": "92219e40234c2046f50cb72a1a86e4f7"
} }
}, },
"amap": {
"name": "amapCIxLx5gHo",
"appkey_ios": "92219e40234c2046f50cb72a1a86e4f7",
"appkey_android": "92219e40234c2046f50cb72a1a86e4f7",
"key": "5a270020f3c6b67887c493a416ebd3ad",
"securityJsCode": "3eabbc7e073e650ae2b1f213f8357422"
},
"maps": { "maps": {
"amap": { "amap": {
"name": "amapCIxLx5gHo", "name": "amapCIxLx5gHo",
"appkey_ios": "92219e40234c2046f50cb72a1a86e4f7", "appkey_ios": "92219e40234c2046f50cb72a1a86e4f7",
"appkey_android": "92219e40234c2046f50cb72a1a86e4f7", "appkey_android": "92219e40234c2046f50cb72a1a86e4f7"
"key": "5a270020f3c6b67887c493a416ebd3ad",
"securityJsCode": "3eabbc7e073e650ae2b1f213f8357422"
} }
}, },
"oauth": {}, "oauth": {},

View File

@ -11,7 +11,7 @@
<image :src="imgUrl('@/static/home/pb.png')" class="quick-service-image" /> <image :src="imgUrl('@/static/home/pb.png')" class="quick-service-image" />
<text class="quick-service-text">宠物陪伴</text> <text class="quick-service-text">宠物陪伴</text>
</view> </view>
<view class="quick-service-card" @click="toPath('/modules/mall/index/index')"> <view class="quick-service-card" @click="toPath('/mall/index/index')">
<image :src="imgUrl('@/static/home/yl.png')" class="quick-service-image" /> <image :src="imgUrl('@/static/home/yl.png')" class="quick-service-image" />
<text class="quick-service-text">定制商城</text> <text class="quick-service-text">定制商城</text>
</view> </view>

View File

@ -39,7 +39,6 @@ import { httpGet, httpPost } from '@/utils/http'
import { useUserStore } from '@/store/user' import { useUserStore } from '@/store/user'
import TopBar from '@/components/TopBar.vue' import TopBar from '@/components/TopBar.vue'
import { imgUrl, toast, toPath } from "@/utils/commUtils"; import { imgUrl, toast, toPath } from "@/utils/commUtils";
import sheep from "@/sheep";
const userStore = useUserStore() const userStore = useUserStore()
@ -85,7 +84,6 @@ const login = async () => {
}) })
return return
} }
const res = await httpPost('/public/login', {}, { phone: phoneNumber.value, code: code.value }) const res = await httpPost('/public/login', {}, { phone: phoneNumber.value, code: code.value })
if (res.code === 200) { if (res.code === 200) {
toast(res.message) toast(res.message)
@ -96,8 +94,6 @@ const login = async () => {
expiresTime: data.expiresTime, expiresTime: data.expiresTime,
refreshToken: data.refreshToken refreshToken: data.refreshToken
}) })
// token
sheep.$store("user").setToken(data.accessToken, data.refreshToken);
const userRes = await httpGet('/user/userinfo') const userRes = await httpGet('/user/userinfo')
if (userRes.code === 200) { if (userRes.code === 200) {
userStore.setUserInfo(userRes.data) userStore.setUserInfo(userRes.data)

View File

@ -1,281 +0,0 @@
<template>
<view class="order-item p-4 mb-4 bg-white shadow rounded-lg">
<!-- 订单头部,包含标题和状态 -->
<view class="order-header flex justify-between items-center mb-2">
<text v-if="serviceInfo && serviceInfo.serviceName" class="order-title font-bold text-lg">
{{ serviceInfo.serviceName }}
</text>
<text class="order-status text-sm text-gray-500">{{ state }}</text>
</view>
<!-- 服务信息 -->
<view class="order-info text-sm text-gray-700 mb-4">
<view>
<text>服务类型:</text>
<text v-if="serviceInfo && serviceInfo.type">{{ serviceInfo.type }}</text>
</view>
<view>
<text>服务地址:</text>
<text v-if="serviceInfo && serviceInfo.address">{{ serviceInfo.address }}</text>
</view>
<view>
<text>预约时间:</text>
{{ reservationTime }}
</view>
<view>
<text>服务时长:</text>
{{ serviceHours }} 小时
</view>
</view>
<!-- 宠物信息 -->
<view class="pet-info flex items-center mb-4">
<image
:src="imgUrl(pet.profileUrl)"
mode="aspectFill"
class="w-16 h-16 rounded-full mr-4"
></image>
<view>
<view>
<text>宠物名称:</text>
{{ pet.name }}
</view>
<view>
<text>宠物品种:</text>
{{ pet.breed }}
</view>
</view>
</view>
<!-- 用户信息 -->
<view class="user-info text-sm text-gray-700 mb-4">
<view>
<text>下单用户:</text>
{{ user.nickname }} ({{ user.phone }})
</view>
<view v-if="address">
<text>用户地址:</text>
{{ address.province }} {{ address.city }} {{ address.district }}
{{ address.detailAddress }}
</view>
</view>
<!-- 支付信息 -->
<view class="payment-info text-sm text-gray-700 mb-4">
<view>
<text>支付方式:</text>
{{ paymentMethod }}
</view>
<view>
<text>支付状态:</text>
{{ isPay ? '已支付' : '未支付' }}
</view>
<view>
<text>总价:</text>
¥{{ price }}
</view>
</view>
<!-- 操作按钮 -->
<view class="flex justify-between items-center">
<text class="text-lg text-red-500">¥{{ price }} 共{{ serviceHours }}小时</text>
<view class="flex">
<button v-if="!isTake" class="btn" @click="toOrderDetail">查看详情</button>
<button v-if="!isTake" class="btn ml-2" @click="cancel">取消订单</button>
<button v-if="!isTake" class="btn-primary ml-2" @click="orderPay">支付</button>
<button v-if="isTake" @click="bookingCancel">取消订单</button>
<button v-if="isTake" @click="confirm">确认订单</button>
<button
v-if="state && state.includes('已预约') && user.userInfo.isPetNursery"
@click="scan"
>
扫描二维码
</button>
</view>
</view>
</view>
</template>
<script setup>
import { payOrder } from '@/logic/pay'
import { imgUrl, scanCodeAsync, showModalAsync, toast } from '@/utils/commUtils'
import { httpPost } from '@/utils/http'
import { defineProps } from 'vue'
const props = defineProps({
id: String,
userId: String,
reservationTime: String,
serviceHours: String,
personalServiceId: String,
personalServiceUserId: String,
price: Number,
isPay: Boolean,
feedback: String,
star: Number,
state: String,
paymentMethod: String,
qrcode: String,
createTime: String,
updateTime: String,
address: Object,
pet: Object,
user: Object,
psUser: Object,
serviceInfo: Object,
isTake: false,
})
const shopRemark = ref('')
const scan = async () => {
// 扫描二维码,获取扫描信息发送给后端
const scan = await scanCodeAsync()
if (scan.result) {
try {
// 发送请求给后端
const res = await httpPost('/order/scan/' + props.id, {}, { qrcode: scan.result })
if (res.code == 200) {
toast('支付成功')
// 刷新数据
uni.$emit('refresh')
} else {
toast(res.message)
}
} catch (e) {
toast(e.data.codeStr)
}
} else {
toast('扫码失败')
}
}
const orderPay = async () => {
try {
const res = await payOrder(props.id)
if (res.code == 200) {
toast('支付成功')
} else {
toast(res.message)
}
} catch (e) {
console.log(e)
toast(e.data.codeStr)
}
}
const cancel = async () => {
const res = await httpPost('/order/cancel/' + props.id)
if (res.code == 200) {
toast('取消成功')
// 刷新数据
uni.$emit('refresh')
} else {
toast(res.message)
}
}
const toOrderDetail = () => {
uni.navigateTo({
url: `/pages/order/order-detail?id=${props.id}`,
})
}
const bookingCancel = async () => {
try {
// 弹出对话框让用户输入取消原因
const res = await showModalAsync({
title: '取消订单',
content: '',
editable: true,
placeholderText: '请输入取消原因!',
})
if (res.confirm) {
// 用户点击确定
shopRemark.value = res.content
// 进行订单取消操作
const response = await httpPost(
'/order/bookingCancel/' + props.id,
{},
{ shopRemark: shopRemark.value },
)
if (response.code == 200) {
toast('取消订单成功!')
// 刷新数据
uni.$emit('refresh')
} else {
toast(response.message)
}
} else if (res.cancel) {
// 用户点击取消
toast('取消操作已取消')
}
} catch (e) {
toast('请求失败,请稍后再试')
console.error(e)
}
}
const confirm = async () => {
try {
const res = await httpPost('/order/confirm/' + props.id)
if (res.code == 200) {
toast('确认订单成功!')
// 刷新数据
uni.$emit('refresh')
} else {
toast(res.message)
}
} catch (e) {
toast(e.data.message)
}
}
</script>
<style scoped>
.order-item {
@apply p-4 mb-4 bg-white shadow rounded-lg;
}
.order-header {
@apply flex justify-between items-center mb-2;
}
.order-title {
@apply font-bold text-lg;
}
.order-status {
@apply text-sm text-gray-500;
}
.order-info {
@apply text-sm text-gray-700 mb-4;
}
.pet-info {
@apply flex items-center mb-4;
}
.user-info {
@apply text-sm text-gray-700 mb-4;
}
.payment-info {
@apply text-sm text-gray-700 mb-4;
}
.btn {
@apply px-2 py-1 bg-gray-100 rounded text-xs;
}
.btn-primary {
@apply px-2 py-1 bg-[#ffc107] text-white rounded text-xs;
}
.text-red-500 {
@apply text-red-500;
}
</style>

View File

@ -1,28 +1,84 @@
<template> <template>
<view class="order-item p-4 mb-4 bg-white shadow rounded-lg"> <view class="order-item p-4 mb-4 bg-white shadow rounded-lg">
<!-- 订单头部包含标题和状态 --> <!-- 订单头部包含标题和状态 -->
<view class="order-header flex mb-2 gap-2"> <view class="order-header flex justify-between items-center mb-2">
<image class="rounded-2 w-[44vw] mt--2" :src="imgUrl(serviceInfo.url)" mode="widthFix" /> <text v-if="serviceInfo && serviceInfo.serviceName" class="order-title font-bold text-lg">
<view class="flex flex-col gap-3"> {{ serviceInfo.serviceName }}
<view class="flex gap-2 w-full justify-between items-center"> </text>
<view v-if="serviceInfo && serviceInfo.serviceName" class="order-title font-bold text-lg"> <text class="order-status text-sm text-gray-500">{{ state }}</text>
{{ serviceInfo.serviceName }} </view>
</view>
<view <!-- 服务信息 -->
class="content-center w-[50px] h-[20px] bg-[#ffc107] text-black rounded-1 text-center items-center" <view class="order-info text-sm text-gray-700 mb-4">
> <view>
<view class="text-size-[12px]">{{ state }}</view> <text>服务类型:</text>
</view> <text v-if="serviceInfo && serviceInfo.type">{{ serviceInfo.type }}</text>
</view> </view>
<view>{{ serviceInfo.description }}</view> <view>
<text>服务地址:</text>
<text v-if="serviceInfo && serviceInfo.address">{{ serviceInfo.address }}</text>
</view>
<view>
<text>预约时间:</text>
{{ reservationTime }}
</view>
<view>
<text>服务时长:</text>
{{ serviceHours }} 小时
</view>
</view>
<!-- 宠物信息 -->
<view class="pet-info flex items-center mb-4">
<image
:src="imgUrl(pet.profileUrl)"
mode="aspectFill"
class="w-16 h-16 rounded-full mr-4"
></image>
<view>
<view> <view>
<text>总价:</text> <text>宠物名称:</text>
¥{{ price }} {{ pet.name }}
</view>
<view>
<text>宠物品种:</text>
{{ pet.breed }}
</view> </view>
</view> </view>
</view> </view>
<!-- 用户信息 -->
<view class="user-info text-sm text-gray-700 mb-4">
<view>
<text>下单用户:</text>
{{ user.nickname }} ({{ user.phone }})
</view>
<view v-if="address">
<text>用户地址:</text>
{{ address.province }} {{ address.city }} {{ address.district }}
{{ address.detailAddress }}
</view>
</view>
<!-- 支付信息 -->
<view class="payment-info text-sm text-gray-700 mb-4">
<view>
<text>支付方式:</text>
{{ paymentMethod }}
</view>
<view>
<text>支付状态:</text>
{{ isPay ? '已支付' : '未支付' }}
</view>
<view>
<text>总价:</text>
¥{{ price }}
</view>
</view>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<view class="flex items-center flex-content-end flex-row-reverse"> <view class="flex justify-between items-center">
<text class="text-lg text-red-500">¥{{ price }} {{ serviceHours }}小时</text>
<view class="flex"> <view class="flex">
<button v-if="!isTake" class="btn" @click="toOrderDetail">查看详情</button> <button v-if="!isTake" class="btn" @click="toOrderDetail">查看详情</button>
<button v-if="!isTake" class="btn ml-2" @click="cancel">取消订单</button> <button v-if="!isTake" class="btn ml-2" @click="cancel">取消订单</button>
@ -212,11 +268,11 @@ const confirm = async () => {
} }
.btn { .btn {
@apply px-2 py-1 bg-gray-100 rounded text-xs w-[25vw] text-size-[15px] py-5px rounded-36; @apply px-2 py-1 bg-gray-100 rounded text-xs;
} }
.btn-primary { .btn-primary {
@apply px-2 py-1 bg-[#ffc107] text-black text-xs text-center w-[25vw] text-size-[15px] py-5px rounded-36; @apply px-2 py-1 bg-[#ffc107] text-white rounded text-xs;
} }
.text-red-500 { .text-red-500 {

View File

@ -12,7 +12,11 @@
<view class="bg-[#F5F5F5] h-[135vh]"> <view class="bg-[#F5F5F5] h-[135vh]">
<!-- 顶部背景和头像 --> <!-- 顶部背景和头像 -->
<view class="relative"> <view class="relative">
<image :src="serviceData.bgUrl" class="w-full h-40 object-cover" mode="widthFix"></image> <image
:src="serviceData.bgUrl"
class="w-full h-40 object-cover"
mode="widthFix"
></image>
<view class="absolute left-4 bottom-[-20px]"> <view class="absolute left-4 bottom-[-20px]">
<image <image
:src="serviceData.userAvatar" :src="serviceData.userAvatar"
@ -101,7 +105,6 @@
<text class="text-lg font-bold mb-2 w-full pl-[20px]" style="text-align: left">服务位置</text> <text class="text-lg font-bold mb-2 w-full pl-[20px]" style="text-align: left">服务位置</text>
<view class="w-full h-[20vh]"> <view class="w-full h-[20vh]">
<Map <Map
v-show="mapShow"
:locationName="'服务位置'" :locationName="'服务位置'"
:initialLatitude="serviceData.latitude" :initialLatitude="serviceData.latitude"
:initialLongitude="serviceData.longitude" :initialLongitude="serviceData.longitude"
@ -110,13 +113,18 @@
</view> </view>
<!-- 底部操作栏 --> <!-- 底部操作栏 -->
<view class="fixed bottom-0 w-full bg-white flex justify-between items-center mt-4 z-10 py-3"> <view
class="fixed bottom-0 w-full bg-white flex justify-between items-center mt-4 z-10 py-3"
>
<text class="text-red-500 text-lg">¥{{ serviceData.price }}/ </text> <text class="text-red-500 text-lg">¥{{ serviceData.price }}/ </text>
<view class="flex space-x-4 pr-10px"> <view class="flex space-x-4 pr-10px">
<button @click="message" class="bg-gray-200 text-gray-600 rounded-full w-100px"> <button @click="message" class="bg-gray-200 text-gray-600 rounded-full w-100px">
消息 消息
</button> </button>
<button class="bg-[#ffc107] text-white rounded-full" @click="openReservationModal"> <button
class="bg-[#ffc107] text-white rounded-full"
@click="openReservationModal"
>
预约宠托师 预约宠托师
</button> </button>
</view> </view>
@ -138,7 +146,10 @@
@click="selectPet(pet.id)" @click="selectPet(pet.id)"
:class="selectedPetId == pet.id ? 'border-4 border-[#ffc107] color-[#ffc107]' : ''" :class="selectedPetId == pet.id ? 'border-4 border-[#ffc107] color-[#ffc107]' : ''"
> >
<image :src="imgUrl(pet.profileUrl)" class="w-20 h-20 rounded-full object-cover"></image> <image
:src="imgUrl(pet.profileUrl)"
class="w-20 h-20 rounded-full object-cover"
></image>
<text class="text-sm">{{ pet.name }}</text> <text class="text-sm">{{ pet.name }}</text>
</view> </view>
</view> </view>
@ -205,7 +216,7 @@
<script lang="js" setup> <script lang="js" setup>
import { ref } from 'vue' import { ref } from 'vue'
import { httpGet } from '@/utils/http' import { httpGet } from '@/utils/http'
import { baseUrl, imgUrl, toast, toPath } from '@/utils/commUtils' import { baseUrl, imgUrl, toast, toPath } from "@/utils/commUtils";
import { pay } from '@/logic/pay' import { pay } from '@/logic/pay'
import TopBar from '@/components/TopBar.vue' import TopBar from '@/components/TopBar.vue'
import Map from '@/components/Map.vue' import Map from '@/components/Map.vue'
@ -228,7 +239,6 @@ const weekFromToday = ref('')
const personalServiceId = ref('') const personalServiceId = ref('')
const hours = ref(1) const hours = ref(1)
const selectedAddress = ref({}) const selectedAddress = ref({})
const mapShow = ref(true)
const hoursHandleChange = ({ value }) => { const hoursHandleChange = ({ value }) => {
if (value >= 1 && value <= 12) { if (value >= 1 && value <= 12) {
@ -278,13 +288,11 @@ const handleAddressChange = (e) => {
// //
const openReservationModal = () => { const openReservationModal = () => {
showReservationModal.value = true showReservationModal.value = true
mapShow.value = false
} }
// //
const closeReservationModal = () => { const closeReservationModal = () => {
showReservationModal.value = false showReservationModal.value = false
mapShow.value = true
} }
// //
@ -305,16 +313,6 @@ const confirmReservation = async () => {
// //
onLoad(async (options) => { onLoad(async (options) => {
loading.value = true loading.value = true
mapShow.value = false
//
setTimeout(() => {
if (!loading.value && mapShow.value) {
loading.value = false
mapShow.value = true
}
}, 5000)
try { try {
if (!options.id) { if (!options.id) {
toast('该服务不存在!') toast('该服务不存在!')
@ -360,7 +358,6 @@ onLoad(async (options) => {
} }
loading.value = false loading.value = false
mapShow.value = true
}) })
</script> </script>

View File

@ -1,3 +1,4 @@
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist-uni' import piniaPersist from 'pinia-plugin-persist-uni'
// 自动注入所有pinia模块 // 自动注入所有pinia模块

View File

@ -19,7 +19,7 @@ const initState = {
} }
export const useUserStore = defineStore( export const useUserStore = defineStore(
'acdrUser', 'user',
() => { () => {
const userInfo = ref({ ...initState }) const userInfo = ref({ ...initState })

View File

@ -17,7 +17,6 @@ import UnoCSS from 'unocss/vite'
import AutoImport from 'unplugin-auto-import/vite' import AutoImport from 'unplugin-auto-import/vite'
import { visualizer } from 'rollup-plugin-visualizer' import { visualizer } from 'rollup-plugin-visualizer'
import ViteRestart from 'vite-plugin-restart' import ViteRestart from 'vite-plugin-restart'
// @ts-ignore
import uniReadPagesV3Plugin from './src/sheep/router/utils/uni-read-pages-v3' import uniReadPagesV3Plugin from './src/sheep/router/utils/uni-read-pages-v3'
import mpliveMainfestPlugin from './src/sheep/libs/mplive-manifest-plugin' import mpliveMainfestPlugin from './src/sheep/libs/mplive-manifest-plugin'