213
This commit is contained in:
parent
6b60e6fbb4
commit
92cd0af40c
|
|
@ -12,7 +12,8 @@ export interface PlannerItem {
|
|||
name: string
|
||||
avatar: string
|
||||
title: string
|
||||
intro: string
|
||||
introduction: string
|
||||
tags: string
|
||||
price: number
|
||||
sort: number
|
||||
status: number
|
||||
|
|
@ -29,7 +30,8 @@ export interface CreatePlannerRequest {
|
|||
name: string
|
||||
avatar: string
|
||||
title?: string
|
||||
intro?: string
|
||||
introduction?: string
|
||||
tags?: string
|
||||
price: number
|
||||
sort: number
|
||||
status: number
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" min-width="100" />
|
||||
<el-table-column prop="title" label="职称" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="tags" label="标签" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="price" label="价格" width="100" align="right">
|
||||
<template #default="{ row }">
|
||||
<span class="price">¥{{ row.price.toFixed(2) }}</span>
|
||||
|
|
@ -90,8 +91,11 @@
|
|||
<el-form-item label="职称" prop="title">
|
||||
<el-input v-model="formData.title" placeholder="请输入职称" maxlength="100" />
|
||||
</el-form-item>
|
||||
<el-form-item label="简介" prop="intro">
|
||||
<el-input v-model="formData.intro" type="textarea" :rows="4" placeholder="请输入简介" maxlength="500" show-word-limit />
|
||||
<el-form-item label="简介" prop="introduction">
|
||||
<el-input v-model="formData.introduction" type="textarea" :rows="4" placeholder="请输入简介" maxlength="500" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-form-item label="标签" prop="tags">
|
||||
<el-input v-model="formData.tags" type="textarea" :rows="2" placeholder="多个标签用逗号分隔,如:10年教育经验,公办学校教师" maxlength="500" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input-number v-model="formData.price" :min="0.01" :precision="2" :step="10" controls-position="right" style="width: 200px" />
|
||||
|
|
@ -159,7 +163,8 @@ const formData = reactive<Partial<CreatePlannerRequest> & { id?: number }>({
|
|||
name: '',
|
||||
avatar: '',
|
||||
title: '',
|
||||
intro: '',
|
||||
introduction: '',
|
||||
tags: '',
|
||||
price: 0,
|
||||
sort: 0,
|
||||
status: 1
|
||||
|
|
@ -237,7 +242,8 @@ const handleAdd = () => {
|
|||
name: '',
|
||||
avatar: '',
|
||||
title: '',
|
||||
intro: '',
|
||||
introduction: '',
|
||||
tags: '',
|
||||
price: 0,
|
||||
sort: 0,
|
||||
status: 1
|
||||
|
|
@ -253,7 +259,8 @@ const handleEdit = (row: PlannerItem) => {
|
|||
name: row.name,
|
||||
avatar: row.avatar,
|
||||
title: row.title,
|
||||
intro: row.intro,
|
||||
introduction: row.introduction,
|
||||
tags: row.tags,
|
||||
price: row.price,
|
||||
sort: row.sort,
|
||||
status: row.status
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const plannerInfo = ref({
|
|||
id: 0,
|
||||
name: '',
|
||||
avatar: '',
|
||||
intro: '',
|
||||
introduction: '',
|
||||
price: 0
|
||||
})
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ async function loadPlannerDetail() {
|
|||
id: res.data.id || plannerId.value,
|
||||
name: res.data.name || plannerName.value || '规划师',
|
||||
avatar: res.data.avatar || res.data.photo || '',
|
||||
intro: res.data.intro || res.data.introduction || '',
|
||||
introduction: res.data.introduction || '',
|
||||
price: res.data.price || 0
|
||||
}
|
||||
} else {
|
||||
|
|
@ -428,7 +428,7 @@ onLoad(async (options) => {
|
|||
/>
|
||||
<view class="planner-info">
|
||||
<view class="planner-name">{{ plannerInfo.name }}</view>
|
||||
<view class="planner-intro">{{ plannerInfo.intro || '专业学业规划师' }}</view>
|
||||
<view class="planner-intro">{{ plannerInfo.introduction || '专业学业规划师' }}</view>
|
||||
</view>
|
||||
<view class="planner-price">
|
||||
<text class="price-symbol">¥</text>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user