修改主页
This commit is contained in:
@@ -62,7 +62,7 @@ const install = (Vue, vm) => {
|
||||
getWarnEventInfo:(params = {}, alarmId) => vm.$u.get(config.adminPath+`/sis/alarmEventProcess/query/result/${alarmId}`,params),
|
||||
getWarnImages:(params = {}, alarmId) => vm.$u.get(config.adminPath+`/sis/alarmEventAttachments/query/${alarmId}`,params),
|
||||
|
||||
getImageUrl:(params = {}) => vm.$u.get(config.adminPath+'/resource/oss/listByIds/'+params.img),
|
||||
getImageUrl:(params = {}, ossIds) => vm.$u.get(config.adminPath+`/resource/oss/listByIds/${ossIds}`,params),
|
||||
//巡检任务列表
|
||||
getInspection:(params = {})=>vm.$u.get(config.adminPath+'/property/item/list',params),
|
||||
|
||||
@@ -134,6 +134,13 @@ const install = (Vue, vm) => {
|
||||
getMyVisitor:(params = {})=>vm.$u.get(config.adminPath+'/property/xcx/visitorManagement/list/'+params.type),
|
||||
addVisitor:(params = {})=>vm.$u.post(config.adminPath+'/property/xcx/visitorManagement',params),
|
||||
qrCodeVisitor:(params = {})=>vm.$u.get(config.adminPath+'/property/xcx/visitorManagement/qrCode/'+params.id),
|
||||
},
|
||||
//活动管理
|
||||
activity:{
|
||||
//我的访客列表
|
||||
getActivity:(params = {})=>vm.$u.get(config.adminPath+'/property/xcx/activity/list',params),
|
||||
queryActivityById:(params = {})=>vm.$u.post(config.adminPath+'/property/xcx/activity/'+params.id),
|
||||
qrCodeVisitor:(params = {})=>vm.$u.get(config.adminPath+'/property/xcx/visitorManagement/qrCode/'+params.id),
|
||||
},
|
||||
// 增删改查例子
|
||||
testData: {
|
||||
|
@@ -52,14 +52,14 @@
|
||||
<text class="hot-more">全部热门活动 ></text>
|
||||
</view>
|
||||
<view class="hot-list">
|
||||
<view class="hot-card" v-for="(item, idx) in hotList" :key="idx">
|
||||
<image :src="item.img" class="hot-img" mode="aspectFill" />
|
||||
<view class="hot-card" v-for="(item, idx) in hotList" :key="idx" @click="goActivityDetail(item)">
|
||||
<image :src="item.activityImgUrl" class="hot-img" mode="aspectFill" />
|
||||
<view class="hot-info">
|
||||
<text class="hot-tag">#热门活动</text>
|
||||
<text class="hot-tag">{{item.title}}</text>
|
||||
<text class="hot-desc">{{ item.title }}</text>
|
||||
<view class="hot-meta">
|
||||
<text class="hot-date">{{ item.date }}</text>
|
||||
<text class="hot-status">进行中</text>
|
||||
<text class="hot-status">{{ getStatusText(item.status) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -84,89 +84,86 @@
|
||||
],
|
||||
current: 0,
|
||||
gridList: [
|
||||
// {
|
||||
// icon: '/static/aaaa_gd.png',
|
||||
// text: '工单',
|
||||
// url:'/pages/sys/workbench/order/order'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaaa_yjcl.png',
|
||||
// text: '预警处理',
|
||||
// url:'/pages/sys/workbench/earlyWarning/earlyWarning'
|
||||
//
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaaa_jk.png',
|
||||
// text: '监控',
|
||||
// url:'/pages/sys/workbench/monitor/monitors'
|
||||
// },
|
||||
{
|
||||
icon: '/static/aaaa_bsbx.png',
|
||||
text: '报事报修',
|
||||
url:'/pages/sys/user/myRepair/myRepair'
|
||||
},
|
||||
// {
|
||||
// icon: '/static/aaa_bsbx.png',
|
||||
// text: '报事报修',
|
||||
// url:'/pages/sys/user/myRepair/myRepair'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaa_tcjf.png',
|
||||
// text: '停车缴费',
|
||||
// url:'/pages/sys/user/myPayment/myPayment'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaa_shfw.png',
|
||||
// text: '生活服务'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaa_fwzx.png',
|
||||
// text: '服务中心',
|
||||
// url:'/pages/sys/user/serviceCenter/serviceCenter'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaa_hyyy.png',
|
||||
// text: '会议预约',
|
||||
// url:'/pages/sys/workbench/meet/meet'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaa_gdgl.png',
|
||||
// text: '工单管理',
|
||||
// url:'/pages/sys/workbench/order/order'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaa_fkgl.png',
|
||||
// text: '访客管理',
|
||||
// url:'/pages/sys/user/myVisitor/myVisitor'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaa_jqqd.png',
|
||||
// text: '敬请期待'
|
||||
// }
|
||||
],
|
||||
newsList: [
|
||||
'数智南川|最新资讯1',
|
||||
'数智南川|最新资讯2',
|
||||
'数智南川|最新资讯3'
|
||||
],
|
||||
hotList: [{
|
||||
img: '/static/aaa_hd1.png',
|
||||
title: '世界骑行日 低碳出行 让城市更美好',
|
||||
date: '2025-07-03'
|
||||
},
|
||||
{
|
||||
img: '/static/aaa_hd2.png',
|
||||
title: '仲夏之夜低碳出行·绿色生活让城市更美好',
|
||||
date: '2025-07-03'
|
||||
}
|
||||
]
|
||||
hotList: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getActivityList()
|
||||
},
|
||||
methods: {
|
||||
onBannerChange(e) {
|
||||
this.current = e.detail.current;
|
||||
},
|
||||
getStatusText(status) {
|
||||
const statusMap = {
|
||||
'1': '待进行',
|
||||
'2': '进行中',
|
||||
'3': '已完成'
|
||||
};
|
||||
return statusMap[status] || '未知状态';
|
||||
},
|
||||
async getActivityList() {
|
||||
let res = await this.$u.api.activity.getActivity();
|
||||
if (res.code == '200') {
|
||||
this.hotList = res.rows;
|
||||
// 处理图片链接
|
||||
await this.getImageUrl();
|
||||
}
|
||||
},
|
||||
async getImageUrl() {
|
||||
// 收集所有需要获取链接的图片ID
|
||||
const imgIds = [];
|
||||
const imgIdToIndexMap = []; // 保存图片ID对应的hotList索引
|
||||
|
||||
for (let i = 0; i < this.hotList.length; i++) {
|
||||
const item = this.hotList[i];
|
||||
if (item.activityImgUrl) {
|
||||
imgIds.push(item.activityImgUrl);
|
||||
imgIdToIndexMap.push({
|
||||
id: item.activityImgUrl,
|
||||
index: i
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有图片ID需要处理,则调用API一次获取所有图片链接
|
||||
if (imgIds.length > 0) {
|
||||
try {
|
||||
const imgRes = await this.$u.api.getImageUrl({}, imgIds.join(','));
|
||||
if (imgRes.code == 200 && imgRes.data) {
|
||||
// 将返回的图片URL映射回对应的hotList项
|
||||
imgRes.data.forEach(imgItem => {
|
||||
const mapping = imgIdToIndexMap.find(m => m.id === imgItem.ossId);
|
||||
if (mapping) {
|
||||
this.$set(this.hotList[mapping.index], 'activityImgUrl', imgItem.url);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取图片链接失败:', error);
|
||||
}
|
||||
}
|
||||
},
|
||||
goActivityDetail(item){
|
||||
let params = {}
|
||||
params.title = item.title
|
||||
params.content = item.activityContent
|
||||
params.time = item.startTime
|
||||
params.img = item.activityImgUrl
|
||||
const itemStr = encodeURIComponent(JSON.stringify(params));
|
||||
uni.navigateTo({ url: '/pages/sys/user/serviceCenter/questionDetail?item=' + itemStr });
|
||||
},
|
||||
// 扫码功能
|
||||
goToScan() {
|
||||
uni.scanCode({
|
||||
|
@@ -104,8 +104,7 @@ export default {
|
||||
if (res.code == "200") {
|
||||
this.userInfo =res.data;
|
||||
this.userInfo.sexLabel = this.genderOptions[this.userInfo.gender-1].label;
|
||||
params.img = this.userInfo.img;
|
||||
this.$u.api.getImageUrl(params).then(res=>{
|
||||
this.$u.api.getImageUrl({}, this.userInfo.img).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.imgUrl=res.data[0].url;
|
||||
}
|
||||
|
@@ -4,15 +4,17 @@
|
||||
<view class="scroll-content">
|
||||
<!-- 问题标题 -->
|
||||
<view class="question-title">
|
||||
包月停车、临时停车的办理流程及收费标准
|
||||
{{info.title}}
|
||||
<view class="title-underline"></view>
|
||||
</view>
|
||||
<!-- 内容区 -->
|
||||
<view class="question-content">
|
||||
<view class="question-desc">
|
||||
您好:本项目只有8组团为包月停车,办理流程为:业主携带身份证至物业客户中心前台办理,租户带租赁合同和身份证到前台办理即可;5,6,7,9,10,11组团无包月停车,无需办理包月停车手续;临时停车无需办理。5,6组团为私家车位,无需收费。8组团包月停车的收费标准为:500元/8组团临时停车的收费标准为:小区内9,10,11组团临时停车的收费标准为:二轮车:每小时1元,12小时内5元/次,24小时内10元/次;小型车:每小时3元,12小时内10元/次,24小时内20元/次;大型车:每小时4元,12小时内15元/次,24小时内25元/次
|
||||
{{info.content}}
|
||||
</view>
|
||||
<image src="/static/ic_q_d_01.png" class="question-img" mode="widthFix" />
|
||||
|
||||
<image src="info.img" class="question-img" mode="widthFix" />
|
||||
<view class="question-time">{{info.time}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -20,9 +22,22 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.item) {
|
||||
const item = JSON.parse(decodeURIComponent(options.item));
|
||||
this.info = item;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -40,15 +55,18 @@ export default {
|
||||
width: 15rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
|
||||
.detail-title {
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.scroll-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.question-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
@@ -57,6 +75,7 @@ export default {
|
||||
position: relative;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.title-underline {
|
||||
width: 120rpx;
|
||||
height: 6rpx;
|
||||
@@ -64,22 +83,33 @@ export default {
|
||||
border-radius: 3rpx;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.question-content {
|
||||
min-height: 600rpx;
|
||||
margin: 34rpx 24rpx 0 24rpx;
|
||||
background: #EDF6FF;
|
||||
border-radius: 12rpx;
|
||||
border: 2rpx dashed #bfc8d6;
|
||||
padding: 32rpx 24rpx 24rpx 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.question-desc {
|
||||
font-size: 28rpx;
|
||||
color: #4A4A4A;
|
||||
line-height: 1.8;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.question-time {
|
||||
font-size: 28rpx;
|
||||
color: #4A4A4A;
|
||||
line-height: 1.8;
|
||||
align-self: flex-end;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.question-img {
|
||||
width: 100%;
|
||||
border-radius: 8rpx;
|
||||
|
Reference in New Issue
Block a user