Browse Source

修改 bug

master
王泽彦 8 months ago
parent
commit
fc2068a46f
  1. 4
      admin/src/api/contract.ts
  2. 1
      admin/src/app/views/contract/contract.vue
  3. 1
      niucloud/app/adminapi/controller/document/DocumentTemplate.php
  4. 1
      niucloud/app/adminapi/route/document_template.php
  5. 53
      niucloud/app/api/controller/apiController/CoachStudent.php
  6. 3
      niucloud/app/api/controller/apiController/StudentManager.php
  7. 3
      niucloud/app/api/route/route.php
  8. 2
      niucloud/app/model/document/DocumentDataSourceConfig.php
  9. 10
      niucloud/app/service/admin/document/DocumentTemplateService.php
  10. 381
      niucloud/app/service/api/apiService/CoachStudentService.php
  11. 86
      niucloud/app/service/api/apiService/StudentService.php
  12. 4
      uniapp/api/apiRoute.js
  13. 9
      uniapp/pages-coach/coach/student/student_list.vue
  14. 2
      uniapp/pages/student/home/index.vue
  15. 20
      uniapp/pages/student/profile/index.vue

4
admin/src/api/contract.ts

@ -61,6 +61,10 @@ export const contractTemplateApi = {
savePlaceholderConfig: (contractId: number, data: any) =>
request.post(`/document_template/config/save`, data),
// 保存数据源配置到独立表
saveDataSourceConfig: (contractId: number, data: any) =>
request.post(`/document_template/config/datasource/save`, { contract_id: contractId, configs: data }),
// 更新模板状态
updateStatus: (id: number, status: string) =>
request.post(`/document_template/update_status/${id}`, { contract_status: status }),

1
admin/src/app/views/contract/contract.vue

@ -913,6 +913,7 @@ const handleConfigSuccess = async () => {
console.log('📦 保存数据结构:', saveData)
// JSON
await contractTemplateApi.savePlaceholderConfig(currentContractId.value, saveData)
console.log('✅ 保存成功')

1
niucloud/app/adminapi/controller/document/DocumentTemplate.php

@ -113,6 +113,7 @@ class DocumentTemplate extends BaseAdminController
}
try {
// 保存配置(现在会同时保存到JSON字段和独立的school_document_data_source_config表)
(new DocumentTemplateService())->savePlaceholderConfig($data['template_id'], $data['configs']);
return success('配置保存成功');
} catch (\Exception $e) {

1
niucloud/app/adminapi/route/document_template.php

@ -32,6 +32,7 @@ Route::group('document_template', function () {
// 占位符配置
Route::post('config/save', 'document.DocumentTemplate/savePlaceholderConfig');
Route::post('config/datasource/save', 'document.DocumentTemplate/saveDataSourceConfig');
Route::get('datasources', 'document.DocumentTemplate/getDataSources');
// 文档生成

53
niucloud/app/api/controller/apiController/CoachStudent.php

@ -0,0 +1,53 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\api\controller\apiController;
use app\Request;
use app\service\api\apiService\CoachStudentService;
use core\base\BaseApiService;
/**
* 教练端学员管理相关接口
* Class CoachStudent
* @package app\api\controller\apiController
*/
class CoachStudent extends BaseApiService
{
/**
* 获取教练端学员列表
* @param Request $request
* @return \think\Response
*/
public function getMyStudents(Request $request)
{
try {
$data = $this->request->params([
["name", ""], // 学员姓名搜索
["phone", ""], // 联系电话搜索
["campus_id", 0], // 校区ID
["status", 0], // 学员状态
["course_id", 0], // 课程ID搜索
["class_id", 0], // 班级ID搜索
["debug", false] // 调试模式
]);
$result = (new CoachStudentService())->getMyStudents($data);
if ($result['code'] === 1) {
return success('获取成功', $result['data']);
} else {
return fail($result['msg']);
}
} catch (\Exception $e) {
return fail('获取我的学员列表失败:' . $e->getMessage());
}
}
}

3
niucloud/app/api/controller/apiController/StudentManager.php

@ -89,7 +89,8 @@ class StudentManager extends BaseApiService
["leaveCount", ""], // 请假次数搜索
["courseId", 0], // 课程ID搜索
["classId", 0], // 班级ID搜索
["type", ""] // 查询类型
["type", ""], // 查询类型
["debug", false] // 调试模式
]);
$result = (new StudentService())->getList($data);

3
niucloud/app/api/route/route.php

@ -261,6 +261,9 @@ Route::group(function () {
//销售端-学员-列表
Route::get('student/list', 'apiController.StudentManager/list');
//教练端-学员-我的学员列表
Route::get('coach/students/my', 'apiController.CoachStudent/getMyStudents');
//沟通记录-添加
Route::post('communicationRecords/add', 'apiController.CommunicationRecords/add');
Route::post('communicationRecords/edit', 'apiController.CommunicationRecords/edit');

2
niucloud/app/model/document/DocumentDataSourceConfig.php

@ -11,7 +11,7 @@ use app\model\contract\Contract;
class DocumentDataSourceConfig extends BaseModel
{
protected $pk = 'id';
protected $name = 'document_data_source_config';
protected $name = 'school_document_data_source_config';
/**
* 关联合同表

10
niucloud/app/service/admin/document/DocumentTemplateService.php

@ -415,11 +415,14 @@ class DocumentTemplateService extends BaseAdminService
// 开启事务
\think\facade\Db::startTrans();
try {
// 保存配置到合同表的placeholder_config字段
// 1. 保存配置到合同表的placeholder_config字段(保持兼容性)
$template->placeholder_config = json_encode($configData);
$template->updated_at = date('Y-m-d H:i:s');
$template->save();
// 2. 同时保存到独立的数据源配置表(用户期望的表)
$this->saveConfigToDataSourceTable($templateId, $configData);
\think\facade\Db::commit();
return true;
} catch (\Exception $e) {
@ -447,9 +450,12 @@ class DocumentTemplateService extends BaseAdminService
$insertData[] = [
'contract_id' => $contractId,
'placeholder' => $placeholder,
'data_type' => $settings['data_type'] ?? 'user_input',
'table_name' => $settings['table_name'] ?? '',
'field_name' => $settings['field_name'] ?? '',
'field_type' => $settings['field_type'] ?? 'string',
'system_function' => $settings['system_function'] ?? '',
'user_input_value' => $settings['user_input_value'] ?? '',
'field_type' => $settings['field_type'] ?? 'text',
'is_required' => $settings['is_required'] ?? 0,
'default_value' => $settings['default_value'] ?? '',
'created_at' => date('Y-m-d H:i:s')

381
niucloud/app/service/api/apiService/CoachStudentService.php

@ -0,0 +1,381 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\service\api\apiService;
use core\base\BaseApiService;
use think\facade\Db;
/**
* 教练端学员服务层
* Class CoachStudentService
* @package app\service\api\apiService
*/
class CoachStudentService extends BaseApiService
{
public function __construct()
{
parent::__construct();
}
/**
* 获取教练端学员列表
* @param array $data
* @return array
*/
public function getMyStudents(array $data)
{
$res = [
'code' => 0,
'msg' => '操作失败',
'data' => []
];
try {
// 获取当前登录教练的ID
$coachId = $this->getCurrentCoachId();
if (empty($coachId)) {
$res['code'] = 1;
$res['data'] = [];
$res['msg'] = '获取成功';
return $res;
}
// 查询教练负责的所有学员ID
$studentIds = $this->getCoachStudentIds($coachId, $data);
if (empty($studentIds)) {
$res['code'] = 1;
$res['data'] = [];
$res['msg'] = '获取成功';
return $res;
}
// 构建学员基础查询条件
$where = [];
$where[] = ['s.deleted_at', '=', 0];
$where[] = ['s.id', 'in', $studentIds];
// 支持搜索参数
if (!empty($data['name'])) {
$where[] = ['s.name', 'like', '%' . $data['name'] . '%'];
}
if (!empty($data['phone'])) {
$where[] = ['s.contact_phone', 'like', '%' . $data['phone'] . '%'];
}
if (!empty($data['campus_id'])) {
$where[] = ['s.campus_id', '=', $data['campus_id']];
}
if (!empty($data['status'])) {
$where[] = ['s.status', '=', $data['status']];
}
// 查询学员基础信息
$list = Db::table('school_student s')
->leftJoin('school_campus c', 's.campus_id = c.id')
->where($where)
->field('s.*, c.campus_name as campus')
->order('s.created_at', 'desc')
->select()
->toArray();
// 为每个学员添加教练专属信息
foreach ($list as &$student) {
// 获取学员最新有效的课程信息
$courseInfo = $this->getStudentLatestCourse($student['id']);
$student = array_merge($student, $courseInfo);
// 获取教练与学员的关系信息
$coachRelation = $this->getCoachStudentRelation($coachId, $student['id']);
$student = array_merge($student, $coachRelation);
// 查询该学员的课程安排记录,按日期排序获取一访和二访信息
$visitRecords = Db::table('school_person_course_schedule pcs')
->leftJoin('school_course_schedule cs', 'pcs.schedule_id = cs.id')
->where([
['pcs.student_id', '=', $student['id']],
['pcs.person_type', '=', 'student'],
['pcs.deleted_at', '=', 0],
['cs.deleted_at', '=', 0]
])
->where(function($query) use ($coachId) {
$query->where('cs.coach_id', $coachId)
->whereOr('cs.education_id', $coachId);
})
->field('pcs.*, cs.course_date, cs.start_time, cs.end_time')
->order('cs.course_date', 'asc')
->select()
->toArray();
// 初始化到访信息
$student['first_visit_time'] = '';
$student['second_visit_time'] = '';
$student['first_visit_status'] = '未到访';
$student['second_visit_status'] = '未到访';
// 设置一访和二访信息
if (!empty($visitRecords)) {
if (isset($visitRecords[0])) {
$student['first_visit_time'] = $visitRecords[0]['course_date'];
$student['first_visit_status'] = '已到访';
}
if (isset($visitRecords[1])) {
$student['second_visit_time'] = $visitRecords[1]['course_date'];
$student['second_visit_status'] = '已到访';
}
}
// 保留原始访问记录数据供前端使用
$student['visit_records'] = $visitRecords;
// 计算教练相关的课时统计
$student['coach_class_count'] = count($visitRecords);
$student['total_class_hours'] = array_sum(array_column($visitRecords, 'class_hours'));
}
$res['code'] = 1;
$res['data'] = $list;
} catch (\Exception $e) {
$res['msg'] = '获取失败:' . $e->getMessage();
}
return $res;
}
/**
* 获取教练负责的学员ID集合
* @param int $coachId 教练ID
* @param array $data 查询条件
* @return array
*/
private function getCoachStudentIds($coachId, $data = [])
{
// 1. 从 school_student_courses 表中查询 main_coach_id 或 education_id 是当前教练的学员
$courseStudentIds = Db::table('school_student_courses')
->where(function($query) use ($coachId) {
$query->where('main_coach_id', $coachId)
->whereOr('education_id', $coachId);
})
->column('student_id');
// 2. 从 school_person_course_schedule 和 school_course_schedule 表联查,获取教练负责的学员
$scheduleStudentIds = Db::table('school_person_course_schedule pcs')
->leftJoin('school_course_schedule cs', 'pcs.schedule_id = cs.id')
->where(function($query) use ($coachId) {
$query->where('cs.education_id', $coachId)
->whereOr('cs.coach_id', $coachId);
})
->where('pcs.person_type', 'student')
->where('pcs.deleted_at', 0)
->where('cs.deleted_at', 0)
->column('pcs.student_id');
// 3. 合并并去重学生ID
$allStudentIds = array_merge($courseStudentIds, $scheduleStudentIds);
$uniqueStudentIds = array_unique($allStudentIds);
return array_values($uniqueStudentIds);
}
/**
* 获取学员最新有效的课程信息
* @param int $studentId 学员ID
* @return array
*/
private function getStudentLatestCourse($studentId)
{
// 先从学员课程表获取课程信息
$courseInfo = Db::table('school_student_courses sc')
->leftJoin('school_course c', 'sc.course_id = c.id')
->where([
['sc.student_id', '=', $studentId]
])
->field('sc.total_hours, sc.gift_hours, sc.use_total_hours, sc.use_gift_hours, sc.end_date, sc.resource_id, c.course_name')
->order('sc.created_at', 'desc')
->find();
// 获取学员对应的资源共享ID
$resourceSharingId = 0;
if (!empty($courseInfo) && !empty($courseInfo['resource_id'])) {
// 通过resource_id查找对应的资源共享记录,获取最新的一条
$resourceSharing = Db::table('school_resource_sharing')
->where('resource_id', $courseInfo['resource_id'])
->field('id')
->order('shared_at', 'desc')
->find();
if (!empty($resourceSharing)) {
$resourceSharingId = $resourceSharing['id'];
}
}
// 如果没有找到资源共享ID,尝试通过学员的user_id查找
if (empty($resourceSharingId)) {
$student = Db::table('school_student')
->where('id', $studentId)
->field('user_id')
->find();
if (!empty($student['user_id'])) {
// 方法1:先尝试直接用user_id作为resource_id查找
$resourceSharing = Db::table('school_resource_sharing')
->where('resource_id', $student['user_id'])
->field('id')
->order('shared_at', 'desc')
->find();
if (!empty($resourceSharing)) {
$resourceSharingId = $resourceSharing['id'];
} else {
// 方法2:通过客户资源表查找
$customerResource = Db::table('school_customer_resources')
->where('member_id', $student['user_id'])
->where('deleted_at', 0)
->field('id')
->order('created_at', 'desc')
->find();
if (!empty($customerResource)) {
// 通过客户资源ID查找资源共享记录
$resourceSharing = Db::table('school_resource_sharing')
->where('resource_id', $customerResource['id'])
->field('id')
->order('shared_at', 'desc')
->find();
if (!empty($resourceSharing)) {
$resourceSharingId = $resourceSharing['id'];
}
}
}
}
}
if (empty($courseInfo)) {
return [
'total_hours' => 0,
'gift_hours' => 0,
'use_total_hours' => 0,
'use_gift_hours' => 0,
'end_date' => '',
'resource_sharing_id' => $resourceSharingId,
'course_name' => ''
];
}
// 返回课程信息,包含resource_sharing_id
return [
'total_hours' => $courseInfo['total_hours'] ?? 0,
'gift_hours' => $courseInfo['gift_hours'] ?? 0,
'use_total_hours' => $courseInfo['use_total_hours'] ?? 0,
'use_gift_hours' => $courseInfo['use_gift_hours'] ?? 0,
'end_date' => $courseInfo['end_date'] ?? '',
'resource_sharing_id' => $resourceSharingId,
'course_name' => $courseInfo['course_name'] ?? ''
];
}
/**
* 获取教练与学员的关系信息
* @param int $coachId 教练ID
* @param int $studentId 学员ID
* @return array
*/
private function getCoachStudentRelation($coachId, $studentId)
{
// 检查教练在学员课程中的角色
$courseRelation = Db::table('school_student_courses')
->where('student_id', $studentId)
->where(function($query) use ($coachId) {
$query->where('main_coach_id', $coachId)
->whereOr('education_id', $coachId);
})
->field('main_coach_id, education_id')
->find();
$relation_type = '';
if (!empty($courseRelation)) {
if ($courseRelation['main_coach_id'] == $coachId) {
$relation_type = '主教练';
} elseif ($courseRelation['education_id'] == $coachId) {
$relation_type = '教务';
}
}
// 如果没有在课程表中找到关系,检查课程安排表
if (empty($relation_type)) {
$scheduleRelation = Db::table('school_person_course_schedule pcs')
->leftJoin('school_course_schedule cs', 'pcs.schedule_id = cs.id')
->where('pcs.student_id', $studentId)
->where('pcs.person_type', 'student')
->where('pcs.deleted_at', 0)
->where('cs.deleted_at', 0)
->where(function($query) use ($coachId) {
$query->where('cs.coach_id', $coachId)
->whereOr('cs.education_id', $coachId);
})
->field('cs.coach_id, cs.education_id')
->find();
if (!empty($scheduleRelation)) {
if ($scheduleRelation['coach_id'] == $coachId) {
$relation_type = '授课教练';
} elseif ($scheduleRelation['education_id'] == $coachId) {
$relation_type = '教务';
}
}
}
return [
'coach_relation_type' => $relation_type ?: '相关教练'
];
}
/**
* 获取当前登录教练ID
* @return int
*/
private function getCurrentCoachId()
{
try {
// 从请求头获取token
$token = request()->header('token') ?: request()->header('Authorization');
if (empty($token)) {
return 0;
}
// 去掉Bearer前缀
$token = str_replace('Bearer ', '', $token);
// 使用项目的TokenAuth类解析token,类型为personnel(员工端)
$tokenInfo = \core\util\TokenAuth::parseToken($token, 'personnel');
if (!empty($tokenInfo)) {
// 从jti中提取用户ID(格式:用户ID_类型)
$jti = $tokenInfo['jti'] ?? '';
if (!empty($jti)) {
$parts = explode('_', $jti);
if (count($parts) >= 2) {
return (int)$parts[0];
}
}
}
return 0;
} catch (\Exception $e) {
return 0;
}
}
}

86
niucloud/app/service/api/apiService/StudentService.php

@ -95,8 +95,8 @@ class StudentService extends BaseApiService
try {
// 获取当前登录人员的ID
$currentUserId = $this->getUserId();
if (empty($currentUserId)) {
// 用户未登录或不是有效用户,返回空数据
$res['code'] = 1;
$res['data'] = [];
$res['msg'] = '获取成功';
@ -104,10 +104,9 @@ class StudentService extends BaseApiService
}
// 查询符合条件的学生ID集合
$studentIds = $this->getCoachStudentIds($currentUserId, $data);
$studentIds = $this->getStudentIds($currentUserId, $data);
if (empty($studentIds)) {
// 当前教练没有负责的学员,返回空数据
$res['code'] = 1;
$res['data'] = [];
$res['msg'] = '获取成功';
@ -192,6 +191,42 @@ class StudentService extends BaseApiService
return $res;
}
/**
* 获取学生ID集合(支持资源ID过滤)
* @param int $userId 当前用户ID
* @param array $data 查询条件
* @return array
*/
private function getStudentIds($userId, $data = [])
{
// 如果指定了parent_resource_id,则查询该资源下的学生
if (!empty($data['parent_resource_id'])) {
$resourceId = $data['parent_resource_id'];
// 验证当前用户是否有权限访问该资源
$resource = Db::table('school_customer_resources')
->where('id', $resourceId)
->where('consultant', $userId)
->where('deleted_at', 0)
->find();
if (empty($resource)) {
// 用户无权限访问该资源
return [];
}
// 查询该资源关联的学生ID
$studentIds = Db::table('school_student_courses')
->where('resource_id', $resourceId)
->column('student_id');
return array_values(array_unique($studentIds));
}
// 如果没有指定资源ID,则查询当前用户(教练)负责的所有学生
return $this->getCoachStudentIds($userId, $data);
}
/**
* 获取教练负责的学生ID集合
* @param int $coachId 教练ID
@ -208,10 +243,6 @@ class StudentService extends BaseApiService
})
->column('student_id');
// 调试日志
error_log("Coach ID: " . $coachId);
error_log("Course Student IDs: " . json_encode($courseStudentIds));
// 2. 从 school_person_course_schedule 和 school_course_schedule 表联查,获取教练负责的学生
$scheduleStudentIds = Db::table('school_person_course_schedule pcs')
->leftJoin('school_course_schedule cs', 'pcs.schedule_id = cs.id')
@ -224,14 +255,10 @@ class StudentService extends BaseApiService
->where('cs.deleted_at', 0)
->column('pcs.student_id');
error_log("Schedule Student IDs: " . json_encode($scheduleStudentIds));
// 3. 合并并去重学生ID
$allStudentIds = array_merge($courseStudentIds, $scheduleStudentIds);
$uniqueStudentIds = array_unique($allStudentIds);
error_log("Final Student IDs: " . json_encode($uniqueStudentIds));
return array_values($uniqueStudentIds);
}
@ -273,28 +300,33 @@ class StudentService extends BaseApiService
*/
private function getUserId()
{
// 员工端通过JWT token获取用户信息,支持token和Authorization两种header
$token = request()->header('token') ?: request()->header('Authorization');
if (empty($token)) {
return 0; // 返回0而不是抛异常,让上层处理
}
try {
// 从请求头获取token
$token = request()->header('token') ?: request()->header('Authorization');
if (empty($token)) {
return 0;
}
// 去掉Bearer前缀
$token = str_replace('Bearer ', '', $token);
// 去掉Bearer前缀
$token = str_replace('Bearer ', '', $token);
try {
// 解析JWT token
$decoded = \Firebase\JWT\JWT::decode($token, new \Firebase\JWT\Key(config('app.app_key'), 'HS256'));
// 使用项目的TokenAuth类解析token,类型为personnel(员工端)
$tokenInfo = \core\util\TokenAuth::parseToken($token, 'personnel');
// 检查token是否过期
if ($decoded->exp < time()) {
return 0; // token过期返回0
if (!empty($tokenInfo)) {
// 从jti中提取用户ID(格式:用户ID_类型)
$jti = $tokenInfo['jti'] ?? '';
if (!empty($jti)) {
$parts = explode('_', $jti);
if (count($parts) >= 2) {
return (int)$parts[0];
}
}
}
// 返回用户ID
return $decoded->user_id ?? 0;
return 0;
} catch (\Exception $e) {
return 0; // token解析失败返回0
return 0;
}
}
}

4
uniapp/api/apiRoute.js

@ -495,6 +495,10 @@ export default {
async xs_getStudentList(data = {}) {
return await http.get('/student/list', data);
},
//教练端-我的学员列表
async coach_getMyStudents(data = {}) {
return await http.get('/coach/students/my', data);
},
//销售端-沟通记录-添加
async xs_communicationRecordsAdd(data = {}) {
return await http.post('/communicationRecords/add', data);

9
uniapp/pages-coach/coach/student/student_list.vue

@ -160,13 +160,12 @@ import apiRoute from '@/api/apiRoute.js';
},
async getStudentList() {
try {
//
const params = { type: 'all' };
const res = await apiRoute.xs_getStudentList(Object.assign(params, this.searchForm));
console.log('获取学员列表响应:', res);
// 使
const res = await apiRoute.coach_getMyStudents(this.searchForm);
console.log('获取教练端学员列表响应:', res);
if(res.code == 1) {
this.studentList = res.data || [];
console.log('学员列表更新成功:', this.studentList);
console.log('教练端学员列表更新成功:', this.studentList);
} else {
console.error('API返回错误:', res);
uni.showToast({

2
uniapp/pages/student/home/index.vue

@ -343,7 +343,7 @@
const studentId = this.selectedStudent.student_id || this.selectedStudent.id
console.log('准备跳转到个人信息管理页面, 学员ID:', studentId)
const url = `/pages-student/profile/index?student_id=${studentId}`
const url = `/pages/student/profile/index?student_id=${studentId}`
console.log('跳转URL:', url)
uni.navigateTo({

20
uniapp/pages/student/profile/index.vue

@ -25,8 +25,8 @@
</view>
<view class="student_name">{{ studentInfo.name || '学员姓名' }}</view>
<view class="student_basic_info">
<text class="info_tag">{{ studentInfo.gender_text }}</text>
<text class="info_tag">{{ studentInfo.ageText }}</text>
<text class="info_tag" v-if="genderText">{{ genderText }}</text>
<text class="info_tag" v-if="ageText">{{ ageText }}</text>
</view>
</view>
@ -48,7 +48,7 @@
<view class="form_item">
<view class="form_label">性别</view>
<fui-input
v-model="genderText"
:value="genderText"
placeholder="请选择性别"
borderColor="transparent"
backgroundColor="#f8f9fa"
@ -67,23 +67,17 @@
<view class="form_item">
<view class="form_label">生日</view>
<fui-date-picker
:show="showDatePicker"
v-model="formData.birthday"
@change="changeBirthday"
@cancel="showDatePicker = false"
>
<picker mode="date" :value="formData.birthday" @change="changeBirthday">
<fui-input
:value="birthdayText"
placeholder="请选择生日"
borderColor="transparent"
backgroundColor="#f8f9fa"
readonly
@click="showDatePicker = true"
>
<fui-icon name="arrowdown" color="#B2B2B2" :size="40"></fui-icon>
</fui-input>
</fui-date-picker>
</picker>
</view>
<view class="form_item">
@ -208,7 +202,6 @@
},
saving: false,
showGenderPicker: false,
showDatePicker: false,
genderOptions: [
{ value: '1', text: '男' },
{ value: '2', text: '女' }
@ -304,8 +297,7 @@
},
changeBirthday(e) {
this.formData.birthday = e.result
this.showDatePicker = false
this.formData.birthday = e.detail.value
},
async uploadAvatar() {

Loading…
Cancel
Save