ui修改.
This commit is contained in:
parent
edf68c49c5
commit
1159a6f124
|
|
@ -89,31 +89,42 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="realName" label="预约人" width="100" show-overflow-tooltip />
|
||||
<el-table-column label="联系方式" width="140">
|
||||
<el-table-column label="联系方式" width="180">
|
||||
<template #default="{ row }">
|
||||
<div class="contact-info">
|
||||
<el-tag :type="getContactMethodType(row.contactMethod)" size="small">
|
||||
{{ getContactMethodLabel(row.contactMethod) }}
|
||||
</el-tag>
|
||||
<span class="contact-value">{{ row.contactValue }}</span>
|
||||
<template v-if="row.contactMethod && row.contactValue">
|
||||
<el-tag :type="getContactMethodType(row.contactMethod)" size="small">
|
||||
{{ getContactMethodLabel(row.contactMethod) }}
|
||||
</el-tag>
|
||||
<span class="contact-value">{{ row.contactValue }}</span>
|
||||
</template>
|
||||
<template v-else-if="row.phone || row.whatsapp || row.wechatId">
|
||||
<template v-if="row.phone">
|
||||
<el-tag type="" size="small">电话</el-tag>
|
||||
<span class="contact-value">{{ row.phone }}</span>
|
||||
</template>
|
||||
<template v-else-if="row.whatsapp">
|
||||
<el-tag type="success" size="small">WhatsApp</el-tag>
|
||||
<span class="contact-value">{{ row.whatsapp }}</span>
|
||||
</template>
|
||||
<template v-else-if="row.wechatId">
|
||||
<el-tag type="primary" size="small">微信</el-tag>
|
||||
<span class="contact-value">{{ row.wechatId }}</span>
|
||||
</template>
|
||||
</template>
|
||||
<span v-else>-</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预约时间" width="140">
|
||||
<el-table-column label="预约时间" width="160">
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.appointmentDate">
|
||||
<div>{{ row.appointmentDate }}</div>
|
||||
<div v-if="row.appointmentDate || row.departureDate || row.checkInDate || row.travelDate">
|
||||
<div>{{ row.appointmentDate || row.departureDate || row.checkInDate || row.travelDate }}</div>
|
||||
<div class="time-text">{{ row.appointmentTime || '-' }}</div>
|
||||
</div>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" label="金额" width="100" align="right" sortable="custom">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.amount">¥{{ parseFloat(row.amount).toFixed(2) }}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="getStatusTagType(row.status)" size="small">
|
||||
|
|
@ -345,7 +356,7 @@ const statusOptions = [
|
|||
async function fetchCategories() {
|
||||
try {
|
||||
const response = await api.get('/api/v1/categories')
|
||||
if (response.data.code === 0) {
|
||||
if (response.data.code === 0 || response.data.success) {
|
||||
categories.value = response.data.data.categories || response.data.data || []
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
@ -371,7 +382,8 @@ async function fetchAppointments() {
|
|||
})
|
||||
|
||||
const response = await api.get('/api/v1/admin/appointments', { params })
|
||||
if (response.data.code === 0) {
|
||||
console.log('Appointments response:', response.data)
|
||||
if (response.data.success || response.data.code === 0) {
|
||||
appointments.value = response.data.data.appointments
|
||||
pagination.total = response.data.data.pagination.total
|
||||
pagination.totalPages = response.data.data.pagination.totalPages
|
||||
|
|
@ -389,7 +401,7 @@ async function fetchAppointmentDetails(appointmentId) {
|
|||
detailsLoading.value = true
|
||||
try {
|
||||
const response = await api.get(`/api/v1/admin/appointments/${appointmentId}`)
|
||||
if (response.data.code === 0) {
|
||||
if (response.data.success || response.data.code === 0) {
|
||||
appointmentDetails.value = response.data.data
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
@ -492,7 +504,7 @@ async function confirmUpdateStatus() {
|
|||
status: statusForm.newStatus
|
||||
})
|
||||
|
||||
if (response.data.code === 0) {
|
||||
if (response.data.success || response.data.code === 0) {
|
||||
ElMessage.success('订单状态更新成功')
|
||||
statusDialogVisible.value = false
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|||
import path from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
base: '/admin/',
|
||||
// base: '/admin/',
|
||||
plugins: [
|
||||
vue(),
|
||||
AutoImport({
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ var Config = Config || {}
|
|||
|
||||
// API 基础地址
|
||||
// 注意:微信小程序开发工具无法访问localhost,需要使用本机IP地址
|
||||
Config.API_BASE_URL = 'http://192.168.1.7:3000' // 本地开发环境(使用本机IP)
|
||||
Config.API_BASE_URL = 'https://sub.zpc-xy.com' // 本地开发环境(使用本机IP)
|
||||
// Config.API_BASE_URL = 'http://localhost:3000' // 本地开发环境(浏览器可用)
|
||||
// Config.API_BASE_URL = 'https://your-production-domain.com' // 生产环境(待配置)
|
||||
|
||||
|
|
|
|||
|
|
@ -128,6 +128,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -145,7 +147,12 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -219,7 +226,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'air_logistics',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -243,7 +243,9 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
serviceId: "", // 服务ID,从页面参数获取
|
||||
serviceId: "", // 服务ID(来自分类页)
|
||||
hotServiceId: "", // 热门服务ID(来自热门服务)
|
||||
source: "", // 来源:hot=热门服务,其他=分类页
|
||||
serviceTitle: "", // 服务标题
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -313,7 +315,13 @@
|
|||
this.initDateRange()
|
||||
// 获取页面参数
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
// 根据来源判断是 serviceId 还是 hotServiceId
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -466,8 +474,9 @@
|
|||
try {
|
||||
// 构建预约数据
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceType: 'travel', // 机票属于出行类型
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'flight', // 机票类型
|
||||
realName: this.userName.trim(),
|
||||
// 多联系方式
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -153,6 +153,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -175,7 +177,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -278,7 +285,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'airport_transfer',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
import { updateTabBarI18n } from '@/utils/tabbar-i18n.js'
|
||||
import { AppServer } from '@/modules/api/AppServer.js'
|
||||
import Config from '@/modules/Config.js'
|
||||
import { isLoggedIn } from '@/utils/auth.js'
|
||||
import { isLoggedIn, requireAuth } from '@/utils/auth.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -188,6 +188,11 @@
|
|||
|
||||
// 根据服务类型跳转到对应的预约填写页面
|
||||
goToServiceDetail(service) {
|
||||
// 检查登录状态
|
||||
if (!requireAuth()) {
|
||||
return
|
||||
}
|
||||
|
||||
// 服务类型到页面的映射
|
||||
const servicePageMap = {
|
||||
'flight': 'airfare-info-entry-page',
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -125,7 +127,12 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -181,7 +188,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'exhibition_service',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -122,6 +122,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -141,7 +143,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -226,7 +233,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'guide_translation',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -215,6 +215,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -308,7 +310,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -471,7 +478,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'hotel',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -125,7 +127,12 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -181,7 +188,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'insurance_consultation',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -145,6 +145,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -166,7 +168,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -263,7 +270,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'medical_consultation',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -171,6 +171,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -214,7 +216,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -329,7 +336,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'pet_transportation',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -166,6 +166,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -211,7 +213,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -314,7 +321,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'rail_ticket',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -128,6 +128,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -145,7 +147,12 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -219,7 +226,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'sea_freight',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -137,6 +137,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -157,7 +159,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -248,7 +255,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'special_needs',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -196,6 +196,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -220,7 +222,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -341,7 +348,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'travel_planning',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -171,6 +171,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -193,7 +195,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -290,7 +297,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'unaccompanied_minor',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -176,6 +176,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -199,7 +201,12 @@
|
|||
onLoad(options) {
|
||||
this.initDateRange()
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -290,7 +297,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'vip_lounge',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@
|
|||
data() {
|
||||
return {
|
||||
serviceId: "",
|
||||
hotServiceId: "",
|
||||
source: "",
|
||||
serviceTitle: "",
|
||||
userName: "",
|
||||
userWechat: "",
|
||||
|
|
@ -125,7 +127,12 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.serviceId = options.id
|
||||
this.source = options.source || ''
|
||||
if (this.source === 'hot') {
|
||||
this.hotServiceId = options.id
|
||||
} else {
|
||||
this.serviceId = options.id
|
||||
}
|
||||
}
|
||||
if (options.title) {
|
||||
this.serviceTitle = decodeURIComponent(options.title)
|
||||
|
|
@ -181,7 +188,8 @@
|
|||
|
||||
try {
|
||||
const appointmentData = {
|
||||
hotServiceId: parseInt(this.serviceId) || null,
|
||||
serviceId: this.serviceId || null,
|
||||
hotServiceId: this.hotServiceId ? parseInt(this.hotServiceId) : null,
|
||||
serviceType: 'visa_consultation',
|
||||
realName: this.userName.trim(),
|
||||
wechatId: this.userWechat.trim() || null,
|
||||
|
|
|
|||
|
|
@ -118,9 +118,9 @@
|
|||
const pageName = servicePageMap[this.serviceType]
|
||||
|
||||
if (pageName) {
|
||||
// source=hot 表示来自热门服务
|
||||
uni.navigateTo({
|
||||
url: '/pages/appointment/' + pageName + '?id=' + this.id + '&title=' +
|
||||
encodeURIComponent(this.title)
|
||||
url: `/pages/appointment/${pageName}?id=${this.id}&source=hot&title=${encodeURIComponent(this.title)}`
|
||||
});
|
||||
} else {
|
||||
// 未知服务类型,使用通用提示
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user