Browse Source

'线上第一版'

main
hflllll 1 week ago
parent
commit
1463e1e81c
53 changed files with 82 additions and 155 deletions
  1. +1
    -1
      config/index.js
  2. +1
    -9
      pages/index/home.vue
  3. +12
    -3
      pages/index/user.vue
  4. BIN
      static/bannerImage.png
  5. BIN
      static/主页.png
  6. BIN
      static/主页_点击.png
  7. BIN
      static/兑换失败.png
  8. BIN
      static/兑换成功.png
  9. BIN
      static/可用积分背景图.png
  10. BIN
      static/商城.png
  11. BIN
      static/商城_商品1.png
  12. BIN
      static/商城_商品2.png
  13. BIN
      static/商城_点击.png
  14. BIN
      static/商城_积分明细框.png
  15. BIN
      static/图标.zip
  16. BIN
      static/失败弹窗.png
  17. BIN
      static/志愿者箭头.png
  18. BIN
      static/成为志愿者.png
  19. BIN
      static/成功弹窗.png
  20. BIN
      static/我的_兑换记录.png
  21. BIN
      static/我的_关于我们.png
  22. BIN
      static/我的_商品收藏.png
  23. BIN
      static/我的_我的报名.png
  24. BIN
      static/我的_我的资料.png
  25. BIN
      static/我的_活动收藏.png
  26. BIN
      static/我的_点击.png
  27. BIN
      static/我的_积分.png
  28. BIN
      static/我的_背景.png
  29. BIN
      static/我的_退出登录.png
  30. BIN
      static/报名成功.png
  31. BIN
      static/推荐活动.png
  32. BIN
      static/提交成功.png
  33. BIN
      static/活动.png
  34. BIN
      static/活动_点击.png
  35. BIN
      static/活动日历.png
  36. BIN
      static/活动箭头.png
  37. BIN
      static/社区.png
  38. BIN
      static/社区_点击.png
  39. BIN
      static/社区_背景.png
  40. BIN
      static/社区_背景2.png
  41. BIN
      static/积分图标.png
  42. BIN
      static/积分排行榜.png
  43. BIN
      static/签到成功.png
  44. BIN
      static/组织介绍.png
  45. BIN
      static/组织箭头.png
  46. BIN
      static/首页_小喇叭.png
  47. +0
    -2
      stores/index.js
  48. +45
    -115
      subPages/home/RAArecord.vue
  49. +2
    -8
      subPages/home/maintainanceSubmit.vue
  50. +2
    -4
      subPages/home/repairSubmit.vue
  51. +2
    -6
      subPages/repair/maintainSubmit.vue
  52. +14
    -6
      utils/common.js
  53. +3
    -1
      utils/index.js

+ 1
- 1
config/index.js View File

@ -12,7 +12,7 @@ const envParam = {
prod: 'production',
}
const env = 'testing'
const env = envParam['test']
// 全局配置
const config = {


+ 1
- 9
pages/index/home.vue View File

@ -17,15 +17,7 @@
<view class="category-section" @click="openPicker">
<view class="category-label">{{ selectedCategory.label ||'展品分类' }}</view>
<uv-icon name="arrow-down-fill" size="14" color="#C70019"></uv-icon>
<!-- <uv-picker
ref="picker"
v-model="categoryShow"
:columns="columns"
mode="selector"
@confirm="onCategoryConfirm"
confirmColor="#C70019"
>
</uv-picker> -->
<uv-picker ref="picker" confirmColor="#C70019" :columns="[columns[0], columns[1][0]]" keyName="label" @confirm="onCategoryConfirm" @change="onCategoryChange"></uv-picker>
</view>


+ 12
- 3
pages/index/user.vue View File

@ -39,8 +39,9 @@
<uv-icon name="arrow-right" size="24" color="#000"></uv-icon>
</view>
<!-- 退出登录 -->
<view class="function-item" @click="logout">
<view class="function-item" @click="logout" v-if="isLogin">
<view class="item-left">
<uv-icon name="minus-circle" size="24" color="#C70019"></uv-icon>
<text class="item-text">退出登录</text>
@ -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: '退出成功',


BIN
static/bannerImage.png View File

Before After
Width: 709  |  Height: 275  |  Size: 158 KiB

BIN
static/主页.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.2 KiB

BIN
static/主页_点击.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.2 KiB

BIN
static/兑换失败.png View File

Before After
Width: 254  |  Height: 101  |  Size: 8.8 KiB

BIN
static/兑换成功.png View File

Before After
Width: 254  |  Height: 101  |  Size: 8.8 KiB

BIN
static/可用积分背景图.png View File

Before After
Width: 724  |  Height: 290  |  Size: 27 KiB

BIN
static/商城.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.6 KiB

BIN
static/商城_商品1.png View File

Before After
Width: 227  |  Height: 227  |  Size: 99 KiB

BIN
static/商城_商品2.png View File

Before After
Width: 229  |  Height: 229  |  Size: 68 KiB

BIN
static/商城_点击.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.9 KiB

BIN
static/商城_积分明细框.png View File

Before After
Width: 149  |  Height: 65  |  Size: 2.9 KiB

BIN
static/图标.zip View File


BIN
static/失败弹窗.png View File

Before After
Width: 632  |  Height: 835  |  Size: 33 KiB

BIN
static/志愿者箭头.png View File

Before After
Width: 56  |  Height: 29  |  Size: 1.1 KiB

BIN
static/成为志愿者.png View File

Before After
Width: 334  |  Height: 451  |  Size: 20 KiB

BIN
static/成功弹窗.png View File

Before After
Width: 632  |  Height: 835  |  Size: 34 KiB

BIN
static/我的_兑换记录.png View File

Before After
Width: 65  |  Height: 65  |  Size: 2.4 KiB

BIN
static/我的_关于我们.png View File

Before After
Width: 65  |  Height: 65  |  Size: 3.4 KiB

BIN
static/我的_商品收藏.png View File

Before After
Width: 65  |  Height: 65  |  Size: 2.7 KiB

BIN
static/我的_我的报名.png View File

Before After
Width: 65  |  Height: 65  |  Size: 1.9 KiB

BIN
static/我的_我的资料.png View File

Before After
Width: 65  |  Height: 65  |  Size: 2.9 KiB

BIN
static/我的_活动收藏.png View File

Before After
Width: 140  |  Height: 140  |  Size: 8.4 KiB

BIN
static/我的_点击.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.2 KiB

BIN
static/我的_积分.png View File

Before After
Width: 140  |  Height: 140  |  Size: 10 KiB

BIN
static/我的_背景.png View File

Before After
Width: 750  |  Height: 394  |  Size: 12 KiB

BIN
static/我的_退出登录.png View File

Before After
Width: 65  |  Height: 65  |  Size: 2.7 KiB

BIN
static/报名成功.png View File

Before After
Width: 254  |  Height: 101  |  Size: 11 KiB

BIN
static/推荐活动.png View File

Before After
Width: 158  |  Height: 50  |  Size: 3.6 KiB

BIN
static/提交成功.png View File

Before After
Width: 254  |  Height: 101  |  Size: 11 KiB

BIN
static/活动.png View File

Before After
Width: 48  |  Height: 48  |  Size: 803 B

BIN
static/活动_点击.png View File

Before After
Width: 48  |  Height: 48  |  Size: 736 B

BIN
static/活动日历.png View File

Before After
Width: 322  |  Height: 213  |  Size: 8.6 KiB

BIN
static/活动箭头.png View File

Before After
Width: 45  |  Height: 24  |  Size: 694 B

BIN
static/社区.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.6 KiB

BIN
static/社区_点击.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.5 KiB

BIN
static/社区_背景.png View File

Before After
Width: 375  |  Height: 188  |  Size: 59 KiB

BIN
static/社区_背景2.png View File

Before After
Width: 375  |  Height: 188  |  Size: 66 KiB

BIN
static/积分图标.png View File

Before After
Width: 18  |  Height: 18  |  Size: 651 B

BIN
static/积分排行榜.png View File

Before After
Width: 193  |  Height: 52  |  Size: 4.4 KiB

BIN
static/签到成功.png View File

Before After
Width: 512  |  Height: 175  |  Size: 24 KiB

BIN
static/组织介绍.png View File

Before After
Width: 321  |  Height: 213  |  Size: 10 KiB

BIN
static/组织箭头.png View File

Before After
Width: 45  |  Height: 24  |  Size: 743 B

BIN
static/首页_小喇叭.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.4 KiB

+ 0
- 2
stores/index.js View File

@ -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) {


+ 45
- 115
subPages/home/RAArecord.vue View File

@ -34,17 +34,8 @@
</view>
</view>
</view>
<!-- 时间选择器 -->
<!-- <uv-picker
ref="timePicker"
:columns="timeColumns"
@confirm="onTimeConfirm"
@cancel="onTimeCancel"
title="选择时间范围"
confirmColor="#C70019"
></uv-picker> -->
<!-- 日期选择器 -->
<!-- 日期选择器 -->
<uv-datetime-picker
confirm-color="#C70019"
ref="timePicker"
@ -66,18 +57,22 @@
<!-- 内容区域 -->
<view class="content-area">
<!-- 记录item -->
<view class="record-item" v-for="(record, index) in list" :key="index">
<!-- 加载动画容器 -->
<view v-if="isLoading" class="loading-icon">
<uv-loading-icon mode="circle" size="48"></uv-loading-icon>
</view>
<view class="record-item" v-else-if="list.length" v-for="(record, index) in list" :key="index">
<!-- 维修记录 -->
<template v-if="activeMainTab === 'repair'">
<!-- 基本信息 -->
<view class="info-row">
<text class="label">维修人</text>
<text class="value">{{ record.repairPerson }}</text>
<text class="value">{{ record.repairName }}</text>
</view>
<view class="info-row">
<text class="label">联系方式</text>
<text class="value">{{ record.contactPhone }}</text>
<text class="value">{{ record.phone }}</text>
</view>
<view class="info-row">
@ -91,7 +86,7 @@
<!-- 处理内容文本区域 -->
<view class="content-text">
<text>{{ record.processContent }}</text>
<text>{{ record.content }}</text>
</view>
<!-- 上传图片 -->
@ -100,13 +95,13 @@
</view>
<view class="image-container" v-if="!collapsedStates[index]">
<image class="uploaded-image" :src="record.uploadImage" mode="aspectFill"></image>
<image class="uploaded-image" v-for="(value, index) in record.image.split(',')" :key="index" :src="value" mode="aspectFill"></image>
</view>
<!-- 是否产生费用 -->
<view class="info-row">
<text class="label">是否产生费用</text>
<text class="value red-text">{{ record.hasCost }}</text>
<text class="value red-text">{{ record.isExpend === '1' || record.isExpend === 1 ? '是' : '否' }}</text>
</view>
</template>
@ -115,7 +110,7 @@
<!-- 基本信息 -->
<view class="info-row">
<text class="label">保养人</text>
<text class="value">{{ record.maintainPerson }}</text>
<text class="value">{{ record.maintenanceName }}</text>
</view>
<view class="info-row">
@ -129,14 +124,14 @@
<!-- 保养前状态文本区域 -->
<view class="content-text">
<text>{{ record.beforeStatus }}</text>
<text>{{ record.stateFrontText }}</text>
</view>
<!-- 保养前图片 -->
<view class="image-container" v-if="!collapsedStates[index]">
<image
class="uploaded-image"
v-for="(img, imgIndex) in record.beforeImages"
v-for="(img, imgIndex) in record.stateFrontImage.split(',')"
:key="imgIndex"
:src="img"
mode="aspectFill"
@ -149,14 +144,14 @@
<!-- 保养后状态文本区域 -->
<view class="content-text" v-if="!collapsedStates[index]">
<text>{{ record.afterStatus }}</text>
<text>{{ record.stateBackText }}</text>
</view>
<!-- 保养后图片 -->
<view class="image-container" v-if="!collapsedStates[index]">
<image
class="uploaded-image"
v-for="(img, imgIndex) in record.afterImages"
v-for="(img, imgIndex) in record.stateBackImage.split(',')"
:key="'after-' + imgIndex"
:src="img"
mode="aspectFill"
@ -166,20 +161,14 @@
<!-- 是否产生费用 -->
<view class="info-row" v-if="!collapsedStates[index]">
<text class="label">是否产生费用</text>
<text class="value red-text">{{ record.hasCost }}</text>
<text class="value red-text">{{ record.isExpend === '1'||record.isExpend === 1 ? '是' : '否' }}</text>
</view>
</template>
<!-- 查看全部按钮收起状态时显示 -->
<!-- <view class="view-all-btn" v-if="collapsedStates[index]" @click="toggleCollapse(index)">
<text class="view-all-text">查看全部</text>
<text class="view-all-icon"></text>
</view> -->
<!-- 产生费用 -->
<view class="info-row" v-if="!collapsedStates[index]">
<text class="label">产生费用</text>
<text class="value red-text">{{ record.totalCost }}</text>
<text class="value red-text">{{ record.amount }}</text>
</view>
<!-- 费用详情表格 -->
@ -190,9 +179,14 @@
<text class="header-cell">金额</text>
</view>
<view class="table-row" v-for="(item, costIndex) in record.costDetails" :key="costIndex">
<text class="cell">{{ item.name }}</text>
<text class="cell">{{ item.quantity }}</text>
<view class="table-row" v-for="(item, costIndex) in record.exhibitMaintenanceExpenses" :key="costIndex">
<text class="cell">{{ item.title }}</text>
<text class="cell">{{ item.num }}</text>
<text class="cell">{{ item.amount }}</text>
</view>
<view class="table-row" v-for="(item, costIndex) in record.exhibitRepairExpenseList" :key="costIndex">
<text class="cell">{{ item.title }}</text>
<text class="cell">{{ item.num }}</text>
<text class="cell">{{ item.amount }}</text>
</view>
</view>
@ -225,12 +219,12 @@
<!-- 附件信息文本区域 -->
<view class="content-text" v-if="!collapsedStates[index]">
<text>{{ record.attachmentInfo }}</text>
<text>{{ record.remarkText }}</text>
</view>
<!-- 附件图片 -->
<view class="image-container" v-if="!collapsedStates[index]">
<image class="uploaded-image" :src="record.attachmentImage" mode="aspectFill"></image>
<image class="uploaded-image" v-for="(value, index) in record.remarkImage.split(',')" :src="value" :key="index" mode="aspectFill"></image>
</view>
<!-- 保养备注 -->
@ -240,7 +234,7 @@
<!-- 保养备注文本区域 -->
<view class="content-text" v-if="!collapsedStates[index]">
<text>{{ record.maintainRemark }}</text>
<text>{{ record.remark }}</text>
</view>
</template>
@ -250,6 +244,9 @@
<text class="collapse-icon">{{ collapsedStates[index] ? '▼' : '▲' }}</text>
</view>
</view>
<view v-else>
<uv-empty icon="/static/暂无搜索结果.png" />
</view>
</view>
</view>
</template>
@ -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;


+ 2
- 8
subPages/home/maintainanceSubmit.vue View File

@ -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)
},
//


+ 2
- 4
subPages/home/repairSubmit.vue View File

@ -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)
},
// 使


+ 2
- 6
subPages/repair/maintainSubmit.vue View File

@ -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)
},
//


+ 14
- 6
utils/common.js View File

@ -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
}

+ 3
- 1
utils/index.js View File

@ -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


Loading…
Cancel
Save