Merge branch '1114'

This commit is contained in:
WindowBird 2025-11-17 13:39:59 +08:00
commit c4f875d979
11 changed files with 949 additions and 47 deletions

View File

@ -26,4 +26,7 @@ export * from './customer';
export * from './common';
// 导入审批相关 API
export * from './verify';
export * from './verify';
// 导入项目相关 API
export * from './project';

102
api/project.js Normal file
View File

@ -0,0 +1,102 @@
/**
* 项目相关 API
*/
/**
* 获取项目列表
* @param {Object} params 请求参数
* @param {number} params.pageNum 页码
* @param {number} params.pageSize 每页数量
* @param {string} params.orderByColumn 排序字段
* @param {string} params.isAsc 排序方式ascending/descending
* @param {number[]} params.statusList 项目状态列表
* @param {string} params.createId 创建人ID
* @param {string} params.ownerId 负责人ID
* @param {string[]} params.keys 搜索关键词数组
* @returns {Promise} 返回项目列表
*/
export const getProjectList = (params = {}) => {
const queryParams = [];
// 分页参数
if (params.pageNum !== undefined) {
queryParams.push(`pageNum=${params.pageNum}`);
}
if (params.pageSize !== undefined) {
queryParams.push(`pageSize=${params.pageSize}`);
}
// 排序参数
if (params.orderByColumn !== undefined && params.orderByColumn !== '') {
queryParams.push(`orderByColumn=${encodeURIComponent(params.orderByColumn)}`);
}
if (params.isAsc !== undefined && params.isAsc !== '') {
queryParams.push(`isAsc=${encodeURIComponent(params.isAsc)}`);
}
// 状态列表
if (params.statusList !== undefined && Array.isArray(params.statusList) && params.statusList.length > 0) {
params.statusList.forEach((status, index) => {
queryParams.push(`statusList=${status}`);
});
}
// 创建人ID
if (params.createId !== undefined && params.createId !== '') {
queryParams.push(`createId=${params.createId}`);
}
// 负责人ID
if (params.ownerId !== undefined && params.ownerId !== '') {
queryParams.push(`ownerId=${params.ownerId}`);
}
// 搜索关键词
if (params.keys !== undefined && Array.isArray(params.keys) && params.keys.length > 0) {
params.keys.forEach((key, index) => {
queryParams.push(`keys[${index}]=${encodeURIComponent(key)}`);
});
}
// 项目名称搜索
if (params.projectName !== undefined && params.projectName !== '') {
queryParams.push(`projectName=${encodeURIComponent(params.projectName)}`);
}
// 项目编号搜索
if (params.projectId !== undefined && params.projectId !== '') {
queryParams.push(`projectId=${encodeURIComponent(params.projectId)}`);
}
// 客户名称搜索
if (params.customerName !== undefined && params.customerName !== '') {
queryParams.push(`customerName=${encodeURIComponent(params.customerName)}`);
}
// 成员ID搜索
if (params.memberId !== undefined && params.memberId !== '') {
queryParams.push(`memberId=${params.memberId}`);
}
const queryString = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
return uni.$uv.http.get(`bst/project/list${queryString}`, {
custom: {
auth: true // 启用 token 认证
}
});
};
/**
* 获取项目详情
* @param {string} id 项目ID
* @returns {Promise} 返回项目详情
*/
export const getProjectDetail = (id) => {
return uni.$uv.http.get(`bst/project/${id}`, {
custom: {
auth: true
}
});
};

View File

@ -106,7 +106,8 @@ export const applyTaskDelay = (payload) => {
export const createTask = (payload) => {
return uni.$uv.http.post('/bst/task', payload, {
custom: {
auth: true
auth: true,
catch: true // 允许在 catch 中处理错误
}
});
};

View File

@ -62,6 +62,12 @@ const handleClick = (item) => {
uni.switchTab({ url: '/pages/index/index' });
return;
}
if (item.key === 'project') {
uni.navigateTo({
url: '/pages/project/list/index'
});
return;
}
//
uni.showToast({ title: '开发中', icon: 'none' });
};

View File

@ -137,6 +137,12 @@
"navigationBarTitleText": "修改跟进记录",
"navigationStyle": "custom"
}
},
{
"path": "pages/project/list/index",
"style": {
"navigationBarTitleText": "项目管理"
}
}
],

View File

@ -0,0 +1,661 @@
<template>
<view class="project-list-page">
<!-- 筛选区域 -->
<view class="filter-section">
<view class="filter-row">
<view class="filter-item">
<text class="filter-label">客户</text>
<input
class="filter-input"
v-model="filterParams.customerName"
placeholder="请输入客户名称"
@confirm="handleSearch"
/>
</view>
<view class="filter-item">
<text class="filter-label">项目编号</text>
<input
class="filter-input"
v-model="filterParams.projectId"
placeholder="请输入项目编号"
@confirm="handleSearch"
/>
</view>
</view>
<view class="filter-row">
<view class="filter-item">
<text class="filter-label">项目名称</text>
<input
class="filter-input"
v-model="filterParams.projectName"
placeholder="请输入项目名称"
@confirm="handleSearch"
/>
</view>
<view class="filter-item">
<text class="filter-label">成员</text>
<picker
mode="selector"
:range="memberOptions"
range-key="userName"
@change="handleMemberChange"
>
<view class="filter-picker">
<text class="picker-text">{{ selectedMemberName || '请选择用户' }}</text>
<text class="picker-arrow"></text>
</view>
</picker>
</view>
</view>
<!-- 开发超期筛选 -->
<view class="filter-row">
<text class="filter-label">开发超期</text>
<view class="radio-group">
<view
class="radio-item"
:class="{ active: filterParams.overdue === '' }"
@click="filterParams.overdue = ''; handleSearch()"
>
<text>全部</text>
</view>
<view
class="radio-item"
:class="{ active: filterParams.overdue === true }"
@click="filterParams.overdue = true; handleSearch()"
>
<text></text>
</view>
<view
class="radio-item"
:class="{ active: filterParams.overdue === false }"
@click="filterParams.overdue = false; handleSearch()"
>
<text></text>
</view>
</view>
</view>
<!-- 状态标签 -->
<view class="status-tabs">
<view
class="status-tab"
v-for="tab in statusTabs"
:key="tab.value"
:class="{ active: activeStatusTab === tab.value }"
@click="handleStatusTabClick(tab.value)"
>
<text>{{ tab.label }}</text>
</view>
</view>
<!-- 操作按钮 -->
<view class="action-buttons">
<uv-button type="primary" size="small" @click="handleSearch">
<text class="btn-icon">🔍</text>
<text>搜索</text>
</uv-button>
<uv-button size="small" @click="handleReset">
<text>重置</text>
</uv-button>
</view>
</view>
<!-- 项目列表 -->
<scroll-view
class="project-scroll"
scroll-y
@scrolltolower="handleScrollToLower"
>
<view class="project-container">
<view
class="project-card"
v-for="project in projects"
:key="project.id"
@click="goToProjectDetail(project)"
>
<!-- 状态标签和过期时间 -->
<view class="project-header">
<view class="status-badge">
<uv-tags
:text="getStatusText(project.status)"
:type="getStatusType(project.status)"
size="mini"
:plain="false"
></uv-tags>
</view>
<view class="expire-time">
<text class="expire-label">过期时间:</text>
<text class="expire-value">{{ formatDate(project.expireTime) }}</text>
</view>
</view>
<!-- 项目信息 -->
<view class="project-content">
<text class="project-name">{{ project.projectName }}</text>
<text class="project-description">{{ project.description }}</text>
<view class="project-meta">
<text class="meta-item">创建人: {{ project.createName }}</text>
<text class="meta-item">负责人: {{ getOwnerNames(project.memberList) }}</text>
<view class="meta-row">
<text class="meta-item">提交: {{ project.submitCount || 0 }}</text>
<text class="meta-item">接收: {{ project.receivedCount || 0 }}</text>
</view>
</view>
<!-- 逾期提示 -->
<view class="overdue-tip" v-if="project.overdue">
<text class="overdue-text"> 已逾期</text>
</view>
</view>
</view>
<!-- 加载状态 -->
<view class="empty-state" v-if="loading">
<text class="empty-text">加载中...</text>
</view>
<!-- 空状态 -->
<view class="empty-state" v-else-if="isEmpty">
<text class="empty-text">暂无项目数据</text>
</view>
<!-- 加载更多提示 -->
<view class="load-more-tip" v-if="!isEmpty && !loading && !noMore">
<text class="load-more-text">上拉加载更多</text>
</view>
<view class="load-more-tip" v-if="!isEmpty && noMore">
<text class="load-more-text">没有更多数据了</text>
</view>
</view>
</scroll-view>
</view>
</template>
<script setup>
import { ref, computed, watch, onMounted, nextTick } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { getProjectList, getUserList } from '@/api';
import { usePagination } from '@/composables';
import { useDictStore } from '@/store/dict';
import { useUserStore } from '@/store/user';
import { getDictLabel } from '@/utils/dict';
const dictStore = useDictStore();
const userStore = useUserStore();
//
const filterParams = ref({
customerName: '',
projectId: '',
projectName: '',
memberId: '',
overdue: '', // '', true, false
});
//
const statusTabs = ref([
{ label: '待开始', value: '1' },
{ label: '开发中', value: '2' },
{ label: '开发完成', value: '4' },
{ label: '已验收', value: '5' },
{ label: '维护中', value: '6' },
{ label: '维护到期', value: '7' },
{ label: '开发超期', value: '8' }
]);
const activeStatusTab = ref('2'); // ""
//
const memberOptions = ref([]);
const selectedMemberName = ref('');
// 使
const {
list,
noMore,
isEmpty,
loading,
getList,
loadMore,
updateParams,
refresh,
queryParams,
reset
} = usePagination({
fetchData: async (params) => {
//
const requestParams = {
...params,
orderByColumn: 'expireTime',
isAsc: 'ascending'
};
//
if (activeStatusTab.value) {
// statusList
const statusMap = {
'1': [1], //
'2': [2], //
'4': [4], //
'5': [5], //
'6': [6], //
'7': [7], //
'8': [2] // 2overdue=true
};
if (activeStatusTab.value === '8') {
//
requestParams.statusList = [2];
requestParams.overdue = true;
} else {
requestParams.statusList = statusMap[activeStatusTab.value] || [];
}
}
//
if (filterParams.value.customerName) {
requestParams.customerName = filterParams.value.customerName;
}
if (filterParams.value.projectId) {
requestParams.projectId = filterParams.value.projectId;
}
if (filterParams.value.projectName) {
requestParams.projectName = filterParams.value.projectName;
}
if (filterParams.value.memberId) {
requestParams.memberId = filterParams.value.memberId;
}
if (filterParams.value.overdue !== '' && activeStatusTab.value !== '8') {
// ""使overdue
requestParams.overdue = filterParams.value.overdue;
}
//
const userId = userStore.getUserInfo?.user?.userId || userStore.getUserInfo?.userId;
const privateView = userStore.privateView;
if (userId && privateView) {
requestParams.ownerId = userId;
requestParams.createId = userId;
}
const res = await getProjectList(requestParams);
return res;
},
mode: 'loadMore',
pageSize: 20,
defaultParams: {}
});
//
const projects = computed(() => list.value);
//
const getStatusText = (status) => {
if (!status && status !== 0) return '未知';
// 使
const dictLabel = getDictLabel('project_status', status);
if (dictLabel && dictLabel !== String(status)) {
return dictLabel;
}
//
const statusMap = {
'1': '待开始',
'2': '开发中',
'4': '开发完成',
'5': '已验收',
'6': '维护中',
'7': '维护到期'
};
return statusMap[String(status)] || `状态${status}`;
};
//
const getStatusType = (status) => {
if (!status && status !== 0) return 'primary';
const typeMap = {
'1': 'primary', //
'2': 'warning', //
'4': 'success', //
'5': 'info', //
'6': 'primary', //
'7': 'warning' //
};
return typeMap[String(status)] || 'primary';
};
//
const formatDate = (dateStr) => {
if (!dateStr) return '未知';
return dateStr.split(' ')[0];
};
//
const getOwnerNames = (memberList) => {
if (!Array.isArray(memberList) || memberList.length === 0) return '未分配';
return memberList.map(member => member.userName || member.name || '').filter(name => name).join('、');
};
//
const handleStatusTabClick = (value) => {
activeStatusTab.value = value;
handleSearch();
};
//
const handleMemberChange = (e) => {
const index = e.detail.value;
const member = memberOptions.value[index];
if (member) {
filterParams.value.memberId = member.userId;
selectedMemberName.value = member.userName;
} else {
filterParams.value.memberId = '';
selectedMemberName.value = '';
}
};
//
const handleSearch = () => {
reset();
getList();
};
//
const handleReset = () => {
filterParams.value = {
customerName: '',
projectId: '',
projectName: '',
memberId: '',
overdue: ''
};
selectedMemberName.value = '';
activeStatusTab.value = '2';
handleSearch();
};
//
const handleScrollToLower = () => {
if (!noMore.value && !loading.value) {
loadMore();
}
};
//
const goToProjectDetail = (project) => {
// TODO:
uni.showToast({
title: '项目详情功能开发中',
icon: 'none'
});
};
//
const loadMemberList = async () => {
try {
const res = await getUserList({ pageSize: 200 });
if (res && res.rows) {
memberOptions.value = res.rows || [];
}
} catch (err) {
console.error('加载成员列表失败:', err);
}
};
//
const isInitialized = ref(false);
//
watch(() => userStore.privateView, () => {
if (isInitialized.value) {
handleSearch();
}
});
onMounted(() => {
//
if (!dictStore.isLoaded) {
dictStore.loadDictData();
}
//
loadMemberList();
});
onLoad(() => {
nextTick(() => {
isInitialized.value = true;
handleSearch();
});
});
</script>
<style lang="scss" scoped>
.project-list-page {
width: 100%;
height: 100vh;
background: #f5f5f5;
display: flex;
flex-direction: column;
}
.filter-section {
background: #fff;
padding: 16px;
margin-bottom: 8px;
}
.filter-row {
display: flex;
gap: 12px;
margin-bottom: 12px;
&:last-child {
margin-bottom: 0;
}
}
.filter-item {
flex: 1;
display: flex;
flex-direction: column;
gap: 6px;
}
.filter-label {
font-size: 12px;
color: #666;
}
.filter-input {
height: 36px;
padding: 0 12px;
background: #f5f6f7;
border-radius: 6px;
font-size: 14px;
}
.filter-picker {
height: 36px;
padding: 0 12px;
background: #f5f6f7;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: space-between;
}
.picker-text {
font-size: 14px;
color: #333;
}
.picker-arrow {
font-size: 12px;
color: #999;
}
.radio-group {
display: flex;
gap: 12px;
margin-top: 6px;
}
.radio-item {
padding: 6px 16px;
background: #f5f6f7;
border-radius: 16px;
font-size: 14px;
color: #666;
&.active {
background: #2885ff;
color: #fff;
}
}
.status-tabs {
display: flex;
gap: 8px;
margin: 12px 0;
flex-wrap: wrap;
}
.status-tab {
padding: 6px 16px;
background: #f5f6f7;
border-radius: 16px;
font-size: 14px;
color: #666;
&.active {
background: #2885ff;
color: #fff;
}
}
.action-buttons {
display: flex;
gap: 12px;
margin-top: 12px;
}
.btn-icon {
margin-right: 4px;
}
.project-scroll {
flex: 1;
width: 100%;
}
.project-container {
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
}
.project-card {
background: #fff;
border-radius: 12px;
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.project-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.status-badge {
display: flex;
align-items: center;
}
.expire-time {
display: flex;
align-items: center;
gap: 6px;
}
.expire-label {
font-size: 12px;
color: #999;
}
.expire-value {
font-size: 14px;
color: #333;
}
.project-content {
display: flex;
flex-direction: column;
gap: 8px;
}
.project-name {
font-size: 16px;
font-weight: 600;
color: #333;
}
.project-description {
font-size: 14px;
color: #666;
line-height: 1.5;
}
.project-meta {
display: flex;
flex-direction: column;
gap: 6px;
margin-top: 8px;
}
.meta-item {
font-size: 12px;
color: #999;
}
.meta-row {
display: flex;
gap: 16px;
}
.overdue-tip {
margin-top: 8px;
}
.overdue-text {
font-size: 12px;
color: #ff4444;
}
.empty-state {
padding: 40px 0;
text-align: center;
}
.empty-text {
font-size: 14px;
color: #999;
}
.load-more-tip {
padding: 20px 0;
text-align: center;
}
.load-more-text {
font-size: 12px;
color: #999;
}
</style>

View File

@ -436,7 +436,8 @@ const handleSubmit = async () => {
});
try {
await createTask(payload);
const res = await createTask(payload);
console.log('@@@@@@@@@@',res);
uni.hideLoading();
uni.showToast({
title: '创建成功',
@ -448,14 +449,11 @@ const handleSubmit = async () => {
}, 1200);
} catch (error) {
uni.hideLoading();
submitting.value = false;
console.error('创建任务失败:', error);
uni.showToast({
title: error.message || '创建失败,请重试',
icon: 'none'
});
//
} finally {
submitting.value = false;
console.log('submitting', submitting.value);
}
};
@ -843,7 +841,7 @@ onLoad(async (options) => {
}
.form-label {
flex: 1;
font-size: 15px;
color: #333;
}

View File

@ -88,6 +88,21 @@
/>
</view>
</view>
<!-- 任务文件展示 -->
<view class="task-files-wrapper" v-if="task.files && task.files.length > 0">
<view
class="file-attachment-item"
v-for="(file, fileIndex) in task.files"
:key="fileIndex"
@click="previewTaskFile(file)"
>
<text class="file-icon">{{ getFileIcon(file.name) }}</text>
<view class="file-info">
<text class="file-name">{{ file.name }}</text>
<text class="file-size" v-if="file.size > 0">{{ formatFileSize(file.size) }}</text>
</view>
</view>
</view>
<view class="delay-btn-wrapper">
<uv-button type="error" size="small" @click="applyDelay">申请延期</uv-button>
</view>
@ -269,23 +284,19 @@ const determineTaskStatus = (status, expireTime) => {
const now = new Date();
// 0便
now.setHours(0, 0, 0, 0);
expireDate.setHours(23, 59, 59, 999);
// now.setHours(0, 0, 0, 0);
// expireDate.setHours(23, 59, 59, 999);
//
if (expireDate.getTime() < now.getTime()) {
return 'overdue';
}
//
const diffTime = expireDate.getTime() - now.getTime();
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
// 3
if (diffDays <= 3 && diffDays > 0) {
return 'imminent';
}
//
return 'pending';
};
@ -329,6 +340,32 @@ const isImageUrl = (url) => {
return /\.(jpg|jpeg|png|gif|bmp|webp)(\?|$)/i.test(url);
};
//
const parseTaskAttachments = (attachStr) => {
if (!attachStr) return { pictures: [], files: [] };
if (typeof attachStr !== 'string') return { pictures: [], files: [] };
const urls = parseAttachUrls(attachStr);
const pictures = [];
const files = [];
urls.forEach(url => {
if (isImageUrl(url)) {
pictures.push(url);
} else {
// URL
const fileName = url.split('/').pop().split('?')[0] || '文件';
files.push({
name: fileName,
path: url,
size: 0 // API0
});
}
});
return { pictures, files };
};
//
const transformSubmitRecords = (submitList) => {
if (!Array.isArray(submitList) || submitList.length === 0) {
@ -492,6 +529,73 @@ const previewTaskImages = (imageUrls, index) => {
}
};
// /
const previewTaskFile = (file) => {
if (!file.path) {
uni.showToast({
title: '文件路径不存在',
icon: 'none'
});
return;
}
// 使
const imageExts = ['jpg', 'jpeg', 'png', 'gif', 'webp'];
const ext = file.name ? file.name.split('.').pop().toLowerCase() : '';
if (imageExts.includes(ext)) {
uni.previewImage({
urls: [file.path],
current: file.path
});
} else {
//
// #ifdef H5
window.open(file.path, '_blank');
// #endif
// #ifdef APP-PLUS
plus.runtime.openURL(file.path);
// #endif
// #ifndef H5 || APP-PLUS
uni.showToast({
title: '正在下载文件...',
icon: 'loading',
duration: 2000
});
//
uni.downloadFile({
url: file.path,
success: (res) => {
if (res.statusCode === 200) {
uni.openDocument({
filePath: res.tempFilePath,
success: () => {
console.log('打开文档成功');
},
fail: (err) => {
console.error('打开文档失败:', err);
uni.showToast({
title: '无法打开此文件',
icon: 'none'
});
}
});
}
},
fail: (err) => {
console.error('下载文件失败:', err);
uni.showToast({
title: '下载文件失败',
icon: 'none'
});
}
});
// #endif
}
};
//
const previewRecordImages = (imageUrls, index) => {
if (imageUrls && imageUrls.length > 0) {
@ -683,8 +787,16 @@ const loadTaskData = async (taskId) => {
//
const submitRecords = transformSubmitRecords(res.submitList || []);
// URL
const taskPictures = res.picture ? parseAttachUrls(res.picture) : [];
//
// 使 file 使 picture
let taskAttachments = { pictures: [], files: [] };
if (res.file) {
// API file
taskAttachments = parseTaskAttachments(res.file);
} else if (res.picture) {
// picture
taskAttachments = parseTaskAttachments(res.picture);
}
//
task.value = {
@ -698,7 +810,8 @@ const loadTaskData = async (taskId) => {
responsible: getOwnerNames(res.memberList || []),
publishTime: res.createTime ? formatTimeToChinese(res.createTime) : '',
content: res.description || '',
pictures: taskPictures, //
pictures: taskAttachments.pictures, //
files: taskAttachments.files, //
submitRecords: submitRecords,
// 使
rawData: res
@ -722,24 +835,26 @@ onLoad((options) => {
task.value.id = taskId;
// API
loadTaskData(taskId);
} else {
// taskId Pinia store
const taskStore = useTaskStore();
const storedTask = taskStore.getTaskDetail;
if (storedTask) {
task.value = {
...task.value,
...storedTask
};
} else {
uni.showToast({
title: '缺少任务ID',
icon: 'none'
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
}
}
else {
// // taskId Pinia store
// const taskStore = useTaskStore();
// const storedTask = taskStore.getTaskDetail;
// if (storedTask) {
// task.value = {
// ...task.value,
// ...storedTask
// };
// }
// else {
// uni.showToast({
// title: 'ID',
// icon: 'none'
// });
// setTimeout(() => {
// uni.navigateBack();
// }, 1500);
// }
}
});
@ -1187,6 +1302,14 @@ onShow(() => {
object-fit: cover;
}
/* 任务文件展示 */
.task-files-wrapper {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 16px;
}
/* 提交记录图片展示(一行三个) */
.record-images-wrapper {
display: flex;

View File

@ -87,7 +87,7 @@
</template>
<script setup>
import { ref, computed, watch, onMounted, onUnmounted } from 'vue';
import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { getStatusText, getTaskStatusType, getTaskStatusStyle } from '@/utils/taskConfig.js';
import {getTaskList} from '@/api';
@ -285,9 +285,9 @@ const determineTaskStatus = (item, expireTime) => {
const now = new Date();
// 0便
now.setHours(0, 0, 0, 0);
expireDate.setHours(23, 59, 59, 999);
// now.setHours(0, 0, 0, 0);
// expireDate.setHours(23, 59, 59, 999);
//
if (expireDate.getTime() < now.getTime()) {
return 'overdue';
@ -298,7 +298,7 @@ const determineTaskStatus = (item, expireTime) => {
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
// 3
if (diffDays <= 3 && diffDays > 0) {
if (diffDays <= 3 && diffDays >= 0) {
return 'imminent';
}
@ -431,7 +431,7 @@ watch(() => userStore.privateView, () => {
//
onLoad((options) => {
//
// isInitialized falsewatch
if (options.status) {
statusFilter.value = options.status;
} else if (options.label) {
@ -446,9 +446,12 @@ onLoad((options) => {
});
}
//
isInitialized.value = true;
loadTaskList();
// tick
// watch isInitialized false
nextTick(() => {
isInitialized.value = true;
loadTaskList();
});
});
</script>

View File

@ -321,7 +321,6 @@ const handleSubmit = async () => {
}
.form-label {
flex: 1;
font-size: 15px;
color: #333;
}

View File

@ -10,7 +10,7 @@ export const Request = () => {
// 初始化请求配置
uni.$uv.http.setConfig((config) => {
/* config 为默认全局配置*/
config.baseURL = 'http://192.168.1.5:4001'; /* 根域名 */
config.baseURL = 'http://192.168.1.9:4001'; /* 根域名 */
// config.baseURL = 'https://pm.ccttiot.com/prod-api'; /* 根域名 */
return config
})