diff --git a/config/index.js b/config/index.js
index 014e709..a7cee55 100644
--- a/config/index.js
+++ b/config/index.js
@@ -12,7 +12,7 @@ const envParam = {
prod: 'production',
}
-const env = 'testing'
+const env = envParam['test']
// 全局配置
const config = {
diff --git a/pages/index/home.vue b/pages/index/home.vue
index 3a122c8..9265b51 100644
--- a/pages/index/home.vue
+++ b/pages/index/home.vue
@@ -17,15 +17,7 @@
{{ selectedCategory.label ||'展品分类' }}
-
+
diff --git a/pages/index/user.vue b/pages/index/user.vue
index 8871dea..5e24b6e 100644
--- a/pages/index/user.vue
+++ b/pages/index/user.vue
@@ -39,8 +39,9 @@
+
-
+
退出登录
@@ -70,12 +71,19 @@ export default {
headImage: '/static/默认头像.png',
nickName: '请先登录',
id: 'XXXXX'
- }
+ },
+ isLogin: uni.getStorageSync('token')
}
},
+ computed: {
+ // 检查是否已登录
+
+ },
onShow() {
+ this.isLogin = uni.getStorageSync('token')
// 如果没登陆过 就别登了
if (uni.getStorageSync('token')) {
+
this.getUserInfo();
}
},
@@ -117,7 +125,6 @@ export default {
if (res.confirm) {
// 清除本地存储的用户信息
uni.removeStorageSync('token')
- // uni.removeStorageSync('userInfo')
// 重置用户信息
this.userInfo = {
@@ -126,6 +133,8 @@ export default {
id: 'XXXXX'
}
+ this.isLogin = false;
+
// 显示退出成功提示
uni.showToast({
title: '退出成功',
diff --git a/static/bannerImage.png b/static/bannerImage.png
deleted file mode 100644
index 59e330e..0000000
Binary files a/static/bannerImage.png and /dev/null differ
diff --git a/static/主页.png b/static/主页.png
deleted file mode 100644
index bbbc124..0000000
Binary files a/static/主页.png and /dev/null differ
diff --git a/static/主页_点击.png b/static/主页_点击.png
deleted file mode 100644
index f88844e..0000000
Binary files a/static/主页_点击.png and /dev/null differ
diff --git a/static/兑换失败.png b/static/兑换失败.png
deleted file mode 100644
index efb2028..0000000
Binary files a/static/兑换失败.png and /dev/null differ
diff --git a/static/兑换成功.png b/static/兑换成功.png
deleted file mode 100644
index 811d1e6..0000000
Binary files a/static/兑换成功.png and /dev/null differ
diff --git a/static/可用积分背景图.png b/static/可用积分背景图.png
deleted file mode 100644
index e5df7dc..0000000
Binary files a/static/可用积分背景图.png and /dev/null differ
diff --git a/static/商城.png b/static/商城.png
deleted file mode 100644
index 1e3521e..0000000
Binary files a/static/商城.png and /dev/null differ
diff --git a/static/商城_商品1.png b/static/商城_商品1.png
deleted file mode 100644
index 0d03818..0000000
Binary files a/static/商城_商品1.png and /dev/null differ
diff --git a/static/商城_商品2.png b/static/商城_商品2.png
deleted file mode 100644
index 1dddc7d..0000000
Binary files a/static/商城_商品2.png and /dev/null differ
diff --git a/static/商城_点击.png b/static/商城_点击.png
deleted file mode 100644
index 3566170..0000000
Binary files a/static/商城_点击.png and /dev/null differ
diff --git a/static/商城_积分明细框.png b/static/商城_积分明细框.png
deleted file mode 100644
index e9d7947..0000000
Binary files a/static/商城_积分明细框.png and /dev/null differ
diff --git a/static/图标.zip b/static/图标.zip
deleted file mode 100644
index 968b44e..0000000
Binary files a/static/图标.zip and /dev/null differ
diff --git a/static/失败弹窗.png b/static/失败弹窗.png
deleted file mode 100644
index 7c68022..0000000
Binary files a/static/失败弹窗.png and /dev/null differ
diff --git a/static/志愿者箭头.png b/static/志愿者箭头.png
deleted file mode 100644
index 9c04030..0000000
Binary files a/static/志愿者箭头.png and /dev/null differ
diff --git a/static/成为志愿者.png b/static/成为志愿者.png
deleted file mode 100644
index e92433d..0000000
Binary files a/static/成为志愿者.png and /dev/null differ
diff --git a/static/成功弹窗.png b/static/成功弹窗.png
deleted file mode 100644
index f8b213d..0000000
Binary files a/static/成功弹窗.png and /dev/null differ
diff --git a/static/我的_兑换记录.png b/static/我的_兑换记录.png
deleted file mode 100644
index c4c85b1..0000000
Binary files a/static/我的_兑换记录.png and /dev/null differ
diff --git a/static/我的_关于我们.png b/static/我的_关于我们.png
deleted file mode 100644
index 8f9b8eb..0000000
Binary files a/static/我的_关于我们.png and /dev/null differ
diff --git a/static/我的_商品收藏.png b/static/我的_商品收藏.png
deleted file mode 100644
index e0fe55a..0000000
Binary files a/static/我的_商品收藏.png and /dev/null differ
diff --git a/static/我的_我的报名.png b/static/我的_我的报名.png
deleted file mode 100644
index 9527a3f..0000000
Binary files a/static/我的_我的报名.png and /dev/null differ
diff --git a/static/我的_我的资料.png b/static/我的_我的资料.png
deleted file mode 100644
index 13d2515..0000000
Binary files a/static/我的_我的资料.png and /dev/null differ
diff --git a/static/我的_活动收藏.png b/static/我的_活动收藏.png
deleted file mode 100644
index 24725df..0000000
Binary files a/static/我的_活动收藏.png and /dev/null differ
diff --git a/static/我的_点击.png b/static/我的_点击.png
deleted file mode 100644
index ce87d42..0000000
Binary files a/static/我的_点击.png and /dev/null differ
diff --git a/static/我的_积分.png b/static/我的_积分.png
deleted file mode 100644
index 9e3a144..0000000
Binary files a/static/我的_积分.png and /dev/null differ
diff --git a/static/我的_背景.png b/static/我的_背景.png
deleted file mode 100644
index 0765ce8..0000000
Binary files a/static/我的_背景.png and /dev/null differ
diff --git a/static/我的_退出登录.png b/static/我的_退出登录.png
deleted file mode 100644
index f70071d..0000000
Binary files a/static/我的_退出登录.png and /dev/null differ
diff --git a/static/报名成功.png b/static/报名成功.png
deleted file mode 100644
index cda8d00..0000000
Binary files a/static/报名成功.png and /dev/null differ
diff --git a/static/推荐活动.png b/static/推荐活动.png
deleted file mode 100644
index dd526b8..0000000
Binary files a/static/推荐活动.png and /dev/null differ
diff --git a/static/提交成功.png b/static/提交成功.png
deleted file mode 100644
index 8ceb47c..0000000
Binary files a/static/提交成功.png and /dev/null differ
diff --git a/static/活动.png b/static/活动.png
deleted file mode 100644
index aa3c548..0000000
Binary files a/static/活动.png and /dev/null differ
diff --git a/static/活动_点击.png b/static/活动_点击.png
deleted file mode 100644
index 8de4449..0000000
Binary files a/static/活动_点击.png and /dev/null differ
diff --git a/static/活动日历.png b/static/活动日历.png
deleted file mode 100644
index 9cb93fb..0000000
Binary files a/static/活动日历.png and /dev/null differ
diff --git a/static/活动箭头.png b/static/活动箭头.png
deleted file mode 100644
index 57f6228..0000000
Binary files a/static/活动箭头.png and /dev/null differ
diff --git a/static/社区.png b/static/社区.png
deleted file mode 100644
index 05604f0..0000000
Binary files a/static/社区.png and /dev/null differ
diff --git a/static/社区_点击.png b/static/社区_点击.png
deleted file mode 100644
index 9c6f2c3..0000000
Binary files a/static/社区_点击.png and /dev/null differ
diff --git a/static/社区_背景.png b/static/社区_背景.png
deleted file mode 100644
index 36b81e0..0000000
Binary files a/static/社区_背景.png and /dev/null differ
diff --git a/static/社区_背景2.png b/static/社区_背景2.png
deleted file mode 100644
index 7a93662..0000000
Binary files a/static/社区_背景2.png and /dev/null differ
diff --git a/static/积分图标.png b/static/积分图标.png
deleted file mode 100644
index a265514..0000000
Binary files a/static/积分图标.png and /dev/null differ
diff --git a/static/积分排行榜.png b/static/积分排行榜.png
deleted file mode 100644
index f18f537..0000000
Binary files a/static/积分排行榜.png and /dev/null differ
diff --git a/static/签到成功.png b/static/签到成功.png
deleted file mode 100644
index 398a31e..0000000
Binary files a/static/签到成功.png and /dev/null differ
diff --git a/static/组织介绍.png b/static/组织介绍.png
deleted file mode 100644
index 686cb11..0000000
Binary files a/static/组织介绍.png and /dev/null differ
diff --git a/static/组织箭头.png b/static/组织箭头.png
deleted file mode 100644
index af692d0..0000000
Binary files a/static/组织箭头.png and /dev/null differ
diff --git a/static/首页_小喇叭.png b/static/首页_小喇叭.png
deleted file mode 100644
index 8b5e8c4..0000000
Binary files a/static/首页_小喇叭.png and /dev/null differ
diff --git a/stores/index.js b/stores/index.js
index 7fda6a4..52a0e12 100644
--- a/stores/index.js
+++ b/stores/index.js
@@ -44,11 +44,9 @@ const store = new Vuex.Store({
value: 0
}])
})
- console.log('父数组','子数组',parentArray, childArray);
// 组装最终结果
state.categoryList = [parentArray, childArray]
- console.log('最终数组', state.categoryList);
},
setConfigList(state, data) {
diff --git a/subPages/home/RAArecord.vue b/subPages/home/RAArecord.vue
index 1677ed6..a6a6faf 100644
--- a/subPages/home/RAArecord.vue
+++ b/subPages/home/RAArecord.vue
@@ -34,17 +34,8 @@
-
-
-
+
-
+
+
+
+
+
维修人
- {{ record.repairPerson }}
+ {{ record.repairName }}
联系方式
- {{ record.contactPhone }}
+ {{ record.phone }}
@@ -91,7 +86,7 @@
- {{ record.processContent }}
+ {{ record.content }}
@@ -100,13 +95,13 @@
-
+
是否产生费用
- {{ record.hasCost }}
+ {{ record.isExpend === '1' || record.isExpend === 1 ? '是' : '否' }}
@@ -115,7 +110,7 @@
保养人
- {{ record.maintainPerson }}
+ {{ record.maintenanceName }}
@@ -129,14 +124,14 @@
- {{ record.beforeStatus }}
+ {{ record.stateFrontText }}
- {{ record.afterStatus }}
+ {{ record.stateBackText }}
是否产生费用
- {{ record.hasCost }}
+ {{ record.isExpend === '1'||record.isExpend === 1 ? '是' : '否' }}
-
-
-
产生费用
- {{ record.totalCost }}
+ {{ record.amount }}
@@ -190,9 +179,14 @@
-
- {{ item.name }}
- {{ item.quantity }}
+
+ {{ item.title }}
+ {{ item.num }}
+ {{ item.amount }}
+
+
+ {{ item.title }}
+ {{ item.num }}
{{ item.amount }}
@@ -225,12 +219,12 @@
- {{ record.attachmentInfo }}
+ {{ record.remarkText }}
-
+
@@ -240,7 +234,7 @@
- {{ record.maintainRemark }}
+ {{ record.remark }}
@@ -250,6 +244,9 @@
{{ collapsedStates[index] ? '▼' : '▲' }}
+
+
+
@@ -266,6 +263,9 @@ export default {
activeMainTab: 'repair', // 当前激活的主Tab
activeFilter: 0, // 当前激活的筛选器
collapsedStates: [], // 控制每个记录项的展开/收起状态
+ afterUpdateDataFn(list) {
+ this.collapsedStates = new Array(list.length).fill(true)
+ },
filterOptions: [
{ name: '时间' },
{ name: '人员' }
@@ -275,77 +275,7 @@ export default {
timeColumns: [
['今天', '昨天', '本周', '本月', '上月', '自定义']
],
- personColumns: [ ],
- // 维修记录数据
- repairData: [
- {
- repairPerson: '李华',
- contactPhone: '15845623255',
- repairDate: '2025-08-14',
- processContent: '文字内容文字内容文字内容',
- uploadImage: '/static/商城_商品2.png',
- hasCost: '是',
- totalCost: '300.00',
- costDetails: [
- { name: '天然粘胶剂', quantity: '2', amount: '100.00' },
- { name: '达玛树脂', quantity: '1', amount: '200.00' }
- ],
- isResolved: '是',
- remark: '文字内容',
- },
- {
- repairPerson: '李华',
- contactPhone: '15845623255',
- repairDate: '2025-08-14',
- processContent: '文字内容文字内容文字内容',
- uploadImage: '/static/商城_商品2.png',
- hasCost: '是',
- totalCost: '300.00',
- costDetails: [
- { name: '天然粘胶剂', quantity: '2', amount: '100.00' },
- { name: '达玛树脂', quantity: '1', amount: '200.00' }
- ],
- isResolved: '是',
- remark: '文字内容'
- },
- ],
- // 保养记录数据
- maintainData: [
- {
- maintainPerson: '李华',
- maintainDate: '2025-08-19',
- beforeStatus: '文字内容文字内容文字内容',
- beforeImages: ['/static/商城_商品2.png', '/static/商城_商品2.png'],
- afterStatus: '文字内容文字内容文字内容',
- afterImages: ['/static/商城_商品2.png', '/static/商城_商品2.png'],
- hasCost: '是',
- totalCost: '300.00',
- costDetails: [
- { name: '天然粘胶剂', quantity: '2', amount: '100.00' },
- { name: '达玛树脂', quantity: '1', amount: '200.00' }
- ],
- attachmentInfo: '附件信息',
- maintainRemark: '文字内容',
- attachmentImage: '/static/商城_商品2.png'
- },
- {
- maintainPerson: '李华',
- maintainDate: '2025-08-19',
- beforeStatus: '文字内容文字内容文字内容',
- beforeImages: ['/static/商城_商品2.png', '/static/商城_商品2.png'],
- afterStatus: '文字内容文字内容文字内容',
- afterImages: ['/static/商城_商品2.png', '/static/商城_商品2.png'],
- hasCost: '是',
- totalCost: '300.00',
- costDetails: [
- { name: '天然粘胶剂', quantity: '2', amount: '100.00' },
- { name: '达玛树脂', quantity: '1', amount: '200.00' }
- ],
- attachmentInfo: '附件信息',
- maintainRemark: '文字内容',
- attachmentImage: '/static/商城_商品2.png'
- }
- ]
+ personColumns: [ ]
}
},
computed: {
@@ -384,18 +314,15 @@ export default {
this.mixinListApi = this.activeMainTab === 'repair' ? 'exhibit.queryRepairList' : 'exhibit.queryMaintenanceList'
this.onFilterChange()
this.initPage()
- await this.getList(true)
- this.initCollapsedStates()
- },
- initCollapsedStates() {
- this.collapsedStates = new Array(this.list.length).fill(true)
+ this.getList(true)
+ // this.initCollapsedStates()
},
+
onFilterChange() {
// this.activeFilter = index
// 切换筛选器时清空选择
this.selectedTime = ''
this.selectedPerson = ''
-
},
showTimePicker() {
this.$refs.timePicker.open()
@@ -404,8 +331,7 @@ export default {
this.$refs.personPicker.open()
},
onTimeConfirm(e) {
- const date = new Date(e.value)
- this.selectedTime = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`
+ this.selectedTime = this.$utils.formatTime(e.value)
this.initPage()
this.getList(true)
},
@@ -428,7 +354,7 @@ export default {
},
async onLoad(args){{
this.showpieceId = args.id
- this.initCollapsedStates()
+
const userRes = await this.$api.config.queryUserList()
this.personColumns = [[...userRes.result.records.map(item => ({
label: item.nickName,
@@ -521,6 +447,10 @@ export default {
.content-area {
padding: 22rpx 29rpx;
+ .loading-icon {
+ margin-top: 60rpx;
+ }
+
.record-item {
background: #fff;
border-radius: 16rpx;
diff --git a/subPages/home/maintainanceSubmit.vue b/subPages/home/maintainanceSubmit.vue
index df7997d..ac272b4 100644
--- a/subPages/home/maintainanceSubmit.vue
+++ b/subPages/home/maintainanceSubmit.vue
@@ -297,10 +297,7 @@ export default {
// 确认日期
confirmDate(e) {
// uv-datetime-picker返回的是时间戳,需要转换为日期格式
- const date = new Date(e.value)
- this.maintenanceDate = date.getFullYear() + '-' +
- String(date.getMonth() + 1).padStart(2, '0') + '-' +
- String(date.getDate()).padStart(2, '0')
+ this.maintenanceDate = this.$utils.formatTime(e.value)
},
// 显示下次保养日期选择器
@@ -311,10 +308,7 @@ export default {
// 确认下次保养日期
confirmNextDate(e) {
// uv-datetime-picker返回的是时间戳,需要转换为日期格式
- const date = new Date(e.value)
- this.malfunctionDate = date.getFullYear() + '-' +
- String(date.getMonth() + 1).padStart(2, '0') + '-' +
- String(date.getDate()).padStart(2, '0')
+ this.malfunctionDate = this.$utils.formatTime(e.value)
},
// 选择是否产生费用
diff --git a/subPages/home/repairSubmit.vue b/subPages/home/repairSubmit.vue
index 4f6a7ac..a944d6b 100644
--- a/subPages/home/repairSubmit.vue
+++ b/subPages/home/repairSubmit.vue
@@ -325,8 +325,7 @@ export default {
// 确认日期选择
confirmDate(e) {
- const date = new Date(e.value)
- this.malfunctionDate = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`
+ this.malfunctionDate = this.$utils.formatTime(e.value)
},
// 显示紧急程度选择器
@@ -366,8 +365,7 @@ export default {
// 确认故障首次发生时间
confirmFirstOccurTime(e) {
- const date = new Date(e.value)
- this.firstDate = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`
+ this.firstDate = this.$utils.formatTime(e.value)
},
// 显示影响使用选择器
diff --git a/subPages/repair/maintainSubmit.vue b/subPages/repair/maintainSubmit.vue
index 51675ae..c06d1cc 100644
--- a/subPages/repair/maintainSubmit.vue
+++ b/subPages/repair/maintainSubmit.vue
@@ -573,12 +573,8 @@ export default {
},
// 确认日期
- confirmDate(e) {
- const date = new Date(e.value)
- const year = date.getFullYear()
- const month = String(date.getMonth() + 1).padStart(2, '0')
- const day = String(date.getDate()).padStart(2, '0')
- this.processData.repairDate = `${year}-${month}-${day}`
+ confirmDate(e) {
+ this.processData.repairDate = this.$utils.formatTime(e.value)
},
// 上传图片
diff --git a/utils/common.js b/utils/common.js
index 4a8cce3..e33c974 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -48,18 +48,26 @@ const authorize = ({
// 检验手机号格式
const checkPhone = (phone) => {
if (!phone || !/^1[3-9]\d{9}$/.test(phone)) {
- // uni.showToast({
- // title: '请输入手机号',
- // icon: 'none'
- // })
return false
}
return true;
}
+// 转换时间戳为yyyy-mm-dd
+const formatTime = (time) => {
+ if (!time) {
+ return '时间格式错误,需要传入时间戳'
+ }
+ const date = new Date(time)
+ const year = date.getFullYear()
+ const month = String(date.getMonth() + 1).padStart(2, '0')
+ const day = String(date.getDate()).padStart(2, '0')
+ return `${year}-${month}-${day}`
+}
+
export {
authorize,
- checkPhone
-
+ checkPhone,
+ formatTime
}
\ No newline at end of file
diff --git a/utils/index.js b/utils/index.js
index 574db3f..3925288 100644
--- a/utils/index.js
+++ b/utils/index.js
@@ -1,6 +1,7 @@
import {
authorize,
- checkPhone
+ checkPhone,
+ formatTime
} from '@/utils/common'
import {
@@ -12,6 +13,7 @@ import {
export default {
authorize,
checkPhone,
+ formatTime,
uploadImage,
chooseAndUpload,
getFileExtension