Browse Source

h5的页面进行修改

feature
是小王呀\24601 10 months ago
parent
commit
3c86775442
  1. 20
      src/api/activity.js
  2. 8
      src/api/dynamic.js
  3. 20
      src/api/home.js
  4. 8
      src/api/servicephone.js
  5. 0
      src/assets/images/home/how2.png
  6. 0
      src/assets/images/home/how3.png
  7. BIN
      src/assets/images/user1.png
  8. 2
      src/plugins/vant.js
  9. 6
      src/router/router.config.js
  10. 2
      src/utils/request.js
  11. 260
      src/views/activity/detail.vue
  12. 24
      src/views/activity/index.vue
  13. 4
      src/views/communityPublicity/detail.vue
  14. 192
      src/views/dynamic/index.vue
  15. 138
      src/views/home/index.vue
  16. 2
      src/views/search/index.vue
  17. 23
      src/views/serviceList/reservationService.vue
  18. 75
      src/views/servicePhone/index.vue
  19. 4
      vue.config.js

20
src/api/activity.js

@ -11,7 +11,7 @@ export function addActivityRecord(data) {
}
export function detail(id) {
return request({
url: `/actual/base/communityActivity/detail/${id}`,
url: `/voluntary/activityInfo/detail/${id}`,
method: 'get',
})
}
@ -30,3 +30,21 @@ export function communityActivityApplicationRecordDelete(data) {
data
})
}
//报名列表
export function activityApply(data) {
return request({
url: `/voluntary/activityApply/list?activityId=${data.activityId}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`,
method: 'get',
})
}
//活动打卡记录
export function activitySignIn(data) {
return request({
url: `/voluntary/activitySignIn/list?activityId=${data.activityId}&pageNo=${data.pageNo}&pageSize=${data.pageSize}&whether=${data.whether}`,
method: 'get',
})
}

8
src/api/dynamic.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
//扫描二维码获取房屋信息
export function newsTrendsdetail(id) {
return request({
url: `/voluntary/newsTrends/detail/${id}`,
method: 'get',
})
}

20
src/api/home.js

@ -4,7 +4,15 @@ import request from '@/utils/request'
// 【社区服务】活动列表+轮播图
export function communityActivity(data) {
return request({
url: `/actual/base/communityActivity/page`,
url: `/voluntary/activityInfo/list`,
method: 'post',
data
})
}
//获取新闻列表
export function newsTrends(data) {
return request({
url: `/voluntary/newsTrends/list`,
method: 'post',
data
})
@ -29,7 +37,15 @@ export function icEventOldDiscuss(data) {
// 【办事指南】菜单
export function listAllCategory(data) {
return request({
url: `/actual/base/serviceitem/listAllCategory`,
url: `/govrnance/guide/list`,
method: 'post',
data
})
}
// 【办事指南】菜单
export function guidecategorylist(data) {
return request({
url: `/govrnance/guidecategory/page`,
method: 'post',
data
})

8
src/api/servicephone.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
export function allgrids(data) {
return request({
url: `/gov/org/grid/allgrids`,
method: 'post',
data
})
}

0
src/assets/images/home/火热进行中2@2x.png → src/assets/images/home/how2.png

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

0
src/assets/images/home/火热进行中3@2x.png → src/assets/images/home/how3.png

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
src/assets/images/user1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

2
src/plugins/vant.js

@ -31,7 +31,7 @@ import {
Overlay,
Cascader,
TreeSelect,
DatetimePicker
DatetimePicker,
} from 'vant'
Vue.use(Button)
.use(Field)

6
src/router/router.config.js

@ -193,6 +193,12 @@ export const constantRouterMap = [
name: 'integral',
component: () => import('@/views/mine/integral'),
meta: { title: '积分记录', keepAlive: false }
},
{
path: '/dynamic',
name: 'dynamic',
component: () => import('@/views/dynamic'),
meta: { title: '动态详情', keepAlive: false }
}
]

2
src/utils/request.js

@ -15,6 +15,7 @@ const service = axios.create({
// request拦截器 request interceptor
service.interceptors.request.use(
config => {
console.log(config,"请求拦截器");
// 不传递默认开启loading
if (!config.hideloading) {
// loading
@ -45,6 +46,7 @@ service.interceptors.request.use(
// respone拦截器
service.interceptors.response.use(
response => {
console.log(response,"响应拦截器");
Toast.clear()
const res = response.data
if (res.status && res.status !== 200) {

260
src/views/activity/detail.vue

@ -4,16 +4,20 @@
<!-- <van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" placeholder="请输入搜索关键词" />
<van-button round type="info" class="custom-button font-size13 m-top10 m-right12" @click="onSearch()">查询</van-button> -->
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img :src="info.coverPic" style="width: 100%; height: 150px;" />
<img :src="info.imgs" style="width: 100%; height: 150px;" />
</div>
<div class='' style="position: relative;top: -10px;">
<div class="card">
<div class=" flex flex-y p0">
<div class="flex flex-x"> <van-tag color="#feba19" size="small" text-color="#fff7e5">未开始</van-tag>
<h2 style="margin: 0; font-size: 21px; margin-left: 10px;">{{ info.activityName }}</h2>
<div class="flex flex-x"> <van-tag
:color="info.status ===1? '#0a998c':info.status ===0?'#f79b41':'#dbdbdb'" size="small"
text-color="#fff7e5">{{info.status === 0?'未开始':info.status === 1?'进行中':'已结束'}}</van-tag>
<h2 style="margin: 0; font-size: 21px; margin-left: 10px;">{{ info.title }}</h2>
</div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动地点: </span><span>{{ info.address }}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动时间: </span><span>山东路南昌路</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动地点: </span><span>{{
info.address }}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动时间:
</span><span>{{info.strTime}} {{info.endTime}}</span></div>
<!-- <van-cell class="m-top15" :border="false" :title-style="{ 'max-width': '100px' }"
:value-style="{ 'max-width': '250px' }" title="活动时间:"
:value="`${info.startTime} 至 ${info.endTime}`"></van-cell>
@ -34,29 +38,26 @@
<div class="card">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">活动信息</h2>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>所属项目: </span><span style="color: black;">山东路南昌路</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>招募截止: </span><span style="color: black;">{{info.cutOffTime}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>签到时间: </span><span style="color: black;">山东路南昌路</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动名额: </span><span style="color: black;">山东路南昌路</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>主办方: </span><span style="color: black;">山东路南昌路</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>联系人: </span><span style="color: black;">山东路南昌路</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>联系电话: </span><span style="color: black;">山东路南昌路</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动时长: </span><span style="color: black;">山东路南昌路</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>积分奖励: </span><span style="color: black;">山东路南昌路</span></div>
<!-- <h2 style="margin: 0; font-size: 21px;">{{ info.activityName }}</h2> -->
<!-- <van-cell class="m-top15" :border="false" :title-style="{ 'max-width': '100px' }"
:value-style="{ 'max-width': '250px' }" title="活动时间:"
:value="`${info.startTime} 至 ${info.endTime}`"></van-cell>
<van-cell :border="false" :title-style="{ 'max-width': '140px' }" title="报名开始时间:"
:value="info.startTime"></van-cell>
<van-cell :border="false" :title-style="{ 'max-width': '140px' }" title="报名截止时间:"
:value="info.cutOffTime || '--'"></van-cell>
<van-cell :border="false" :title-style="{ 'max-width': '100px' }" title="活动地点:"
:value="info.address"></van-cell>
<van-cell :border="false" :title-style="{ 'max-width': '80px' }" title="举办方:"
:value="info.assistingParty"></van-cell>
<van-divider />
<div v-html="info.content"></div> -->
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>所属项目: </span><span
style="color: black;">{{info.projectName}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>招募截止: </span><span
style="color: black;">{{info.deadline}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>签到时间: </span><span
style="color: black;">{{info.signInTime+' 至 '+info.signOutTime}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动名额: </span><span
style="color: black;"><span v-if="info.notQuota === 1">{{info.quota}}</span>
<tspanext v-else>不限名额</tspanext>
</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>主办方: </span><span
style="color: black;">{{ActName?ActName:'-'}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>联系人: </span><span
style="color: black;">{{info.linkman}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>联系电话: </span><span
style="color: black;">{{info.linkman}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动时长: </span><span
style="color: black;">{{info.serviceTime}}小时</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>积分奖励: </span><span
style="color: black;">{{info.points}}</span></div>
</div>
</div>
</div>
@ -64,6 +65,7 @@
<div class="card">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">招募要求</h2>
<div v-html="info.conditions"></div>
</div>
</div>
</div>
@ -71,40 +73,63 @@
<div class="card">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">活动详情</h2>
<div v-html="info.content"></div>
</div>
</div>
</div>
<div class='container' style="position: relative;top: -10px;">
<div class="card">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">报名志愿者</h2>
<h2 style="margin: 0; font-size: 21px;">报名志愿者{{applyList.length}}</h2>
<div v-for="(item, index) in applyList" :key="index" class="flex m-top12"
style="width: 100%; overflow-x: scroll;overflow-y: hidden;">
<div>
<img :src="item.headImg" style="width: 35px; height: 35px;">
<div> <span style="font-size: 14px;">{{item.realName}}</span></div>
</div>
</div>
</div>
</div>
</div>
<div class='container m-bot50' :style="this.phone=='Phone'?'':'height: 85vh; overflow: auto;'">
<div class="card m-top10" >
<div class="card m-top10">
<div class="title"><span>活动打卡</span></div>
<van-cell-group v-for="(item, index) in signUp" :border="false">
<van-field v-model="signUp[index].name" required :label="`姓名${index + 1}`" placeholder="请输入用户名" />
<van-field v-model="signUp[index].mobile" required label="联系电话" placeholder="请输入您的电话号码" />
<van-field v-model="signUp[index].remark" label="备注" placeholder="请输入" rows="3" autosize
type="textarea" />
<div class="flex flex-center1 m-top12">
<div class="flex flex-center2 flex-center1 flex1" @click="handelAddResi"
v-if="index + 1 === signUp.length"> <img src="@/assets/images/icons/add.png" alt=""
class="img_20 m-right7">添加</div>
<div class="flex flex-center2 flex-center1 flex1" v-show="signUp.length > 1"
@click="handelDelResi(item, index)">
<img src="@/assets/images/icons/del.png" alt="" class="img_20 m-right7">删除
</div>
</div>
</van-cell-group>
<div v-for="(item, index) in signInList" :key="index" class="m-top15 p0">
<div class="flex flex-x">
<img :src="item.headImg?item.headImg:require('@/assets/images/user1.png')"
style="width: 35px; height: 35px;">
<div class="m-left12">
<div style="font-size: 14px;">{{item.realName}}</div>
<div style="font-size: 14px;">{{item.applyTime}}</div>
</div>
<div class="bot_btn flex flex-center2 "
</div>
<div class="van-hairline--bottom"></div>
</div>
</div>
<div class="card m-top10">
<div class="title"><span>活动实况</span></div>
<div v-for="(item, index) in realTimeList" :key="index" class="m-top15 p0">
<div>
<div class="flex flex-x">
<img :src="item.headImg ? item.headImg : require('@/assets/images/user1.png')"
style="width: 35px; height: 35px;">
<div class="m-left12">
<div style="font-size: 14px;">{{ item.realName }}</div>
<div style="font-size: 14px;">{{ item.applyTime }}</div>
</div>
</div>
<div>{{ item.content }}</div>
</div>
</div>
</div>
<div class="bot_btn flex flex-center2 flex-center1 "
:style="this.phone=='Phone'?'height:50px;bottom:0':'height: 50px;bottom:5vh;'">
<div class="flex1 flex flex-center1 flex-center2">报名人数<span class="orange font-size18">{{
<!-- <div class="flex1 flex flex-center1 flex-center2">报名人数<span class="orange font-size18">{{
info.currentParticipants || 0 }}</span> / {{ info.participants }}</div>
<div class="flex1 flex flex-center1 flex-center2">
<van-button size="small" class="m-right7" round @click="showShare = true">
@ -113,6 +138,20 @@
</template> 转发</van-button>
<van-button type="info" size="small" :disabled="disabledRecord(info)" round @click="save"
v-if="info.online === 1">立即报名</van-button>
</div> -->
<div v-if="info.status === 1 || info.status === 0">
<van-button round @click="toApply"
custom-style="background-color:#ffecec;height:76rpx;width:240rpx;"style="background-color:#ffecec;height:76rpx;width:240rpx;" color="#fd4845" plain
hairline v-if="applyType && applyedTimeType">报名</van-button>
<van-button v-if="!applyType && info.signFlag != 1" round
custom-style="height:76rpx;color:#333333;font-weight: 600;margin-right:73rpx; width:240rpx;"
color="#333333" plain hairline type="info" @click="cancelSignUp">取消报名</van-button>
<van-button v-if="!applyType && signOutTimeType && info.signFlag !== 1" round @click="toSign"
custom-style="background-color:#ffecec;height:76rpx;width:240rpx;" color="#fd4845" plain
hairline data-type="sign">打卡签到</van-button>
<van-button v-if="info.signFlag === 1" round @click="toSign"
custom-style="background-color:#ffecec;height:76rpx;width:240rpx;" color="#fd4845" plain
hairline>发布实况</van-button>
</div>
</div>
<Share :show="showShare" @closeShare="showShare = false" />
@ -126,7 +165,7 @@
</template>
<script>
import { addActivityRecord, detail, communityActivityApplicationRecordDelete,getById } from "@/api/activity"
import { activitySignIn,activityApply,addActivityRecord, detail, communityActivityApplicationRecordDelete,getById } from "@/api/activity"
import Share from "@/components/Share"
import registerDialog from '@/components/registerDialog';
import { setConfig } from '@/utils/jweixin'
@ -135,6 +174,17 @@ import { setConfig } from '@/utils/jweixin'
export default {
data() {
return {
applyedTimeType:false,
ActName:"",
info:null,
signInList:[],
applyType:true,
activityId:null,
realTimeList:[],
projectList:[],
realTimeList:[],
signInList:[],
applyList:[],
activityList: [],
signUp: [
{ name: "", mobile: "", remark: "" },
@ -150,16 +200,47 @@ export default {
},
async mounted() {
setConfig(['updateAppMessageShareData', 'onMenuShareAppMessage', 'updateTimelineShareData'])
if (this.$route.query.id) {
this.activityId= this.$route.query.id
await this.detail(this.$route.query.id)
if(this.$route.query.flag === 'share'){
await this.getById(this.$route.query.id)
}
await this.share()
this.activityApplyList()
this.activitySignIn(1)
this.activitySignIn(0)
}
},
methods: {
toApply() {
console.log("dsklfjklsf");
Dialog.confirm({
title: '提示',
message: '您确定要报名吗?',
})
.then(() => {
activityApplySave(this.data.activityId).then(res => {
wx.showToast({
title: '报名成功',
duration: 2000,
success: () => {
setTimeout(() => {
wx.navigateBack()
}, 2000)
}
})
}).catch(err => {
console.log(err);
})
})
.catch(() => {
// on cancel
});
},
share() {
let than = this
if (wx.updateAppMessageShareData) {
@ -189,6 +270,46 @@ export default {
})
}
},
//
activitySignIn(whether) {
let parm = {
pageNo: 1,
pageSize: 100,
activityId: this.activityId,
whether: whether
}
activitySignIn(parm).then(res => {
if (res.code === 0) {
if (whether === 1) {
this.signInList=res.data.list
} else {
this.realTimeList=res.data.list
}
}
}).catch(err => {
})
},
//
activityApplyList() {
let parm = {
pageNo: 1,
pageSize: 100,
activityId: this.activityId
}
activityApply(parm).then(res => {
if (res.code === 0) {
this.applyList=res.data.list
}
}).catch(err => {
})
},
handleNumber(value){
console.log(value,"wl kgnsl, ");
this.phone=value
@ -198,24 +319,32 @@ export default {
const specifiedTimestamp = new Date(this.info.cutOffTime.replace(/-/g, '/')).getTime();
this.isPast = specifiedTimestamp < currentTimestamp;
},
//
async detail(id, delId) {
const handleResponse = (res) => {
if (res.code === 0) {
this.info = res.data;
this.info.participants = res.data.participants;
this.info.currentParticipants = res.data.currentParticipants;
if (res.data.recordList && res.data.recordList.length > 0) {
this.signUp = res.data.recordList;
}
if (res.data.cutOffTime) {
this.checkIfPast();
}
this.info.signInTime=res.data.signInTime.slice(0, 16),
this.info.signOutTime=res.data.signOutTime.slice(0, 16),
console.log(this.info,"wl info");
// this.applyType = res.data.applyed === 0 ? true : false,
this.applyedTimeType = this.isCurrentTimeBefore(res.data.deadline),
console.log(this.applyedTimeType,"sdfkjdskfl");
this.signOutTimeType = this.isCurrentTimeBetween(res.data.signInTime, res.data.signOutTime)
// this.info.participants = res.data.participants;
// this.info.currentParticipants = res.data.currentParticipants;
// if (res.data.recordList && res.data.recordList.length > 0) {
// this.signUp = res.data.recordList;
// }
// if (res.data.cutOffTime) {
// this.checkIfPast();
// }
}
};
if (delId) {
this.signUp = this.signUp.filter(item => item.id != delId);
}
// if (delId) {
// this.signUp = this.signUp.filter(item => item.id != delId);
// }
let res = await detail(id);
handleResponse(res);
},
@ -243,6 +372,17 @@ export default {
handelAddResi() {
this.signUp.push({ name: "", mobile: "", remark: "", })
},
isCurrentTimeBetween(startTime, endTime) {
const current = new Date().getTime();
const startTimestamp = new Date(startTime).getTime();
const endTimestamp = new Date(endTime).getTime();
return current >= startTimestamp && current <= endTimestamp;
},
isCurrentTimeBefore(targetTime) {
const current = new Date().getTime();
const targetTimestamp = new Date(targetTime).getTime();
return current < targetTimestamp;
},
handelDelResi(item, index) {
if (item.id) {
let than = this

24
src/views/activity/index.vue

@ -4,11 +4,11 @@
:offset="50">
<div class="activity_content flex" v-for="(item, index) in activityList" :key="index"
@click="handelClickJump('activityDetail', item)">
<img :src="item.coverPic" alt="" class="mr10 img_round" style="width: 75px;height: 95px;">
<img :src="item.imgs" alt="" class="mr10 img_round" style="width: 75px;height: 95px;">
<div class="flex flex-y flex1 flex-end" style="overflow: hidden;">
<div class="van-ellipsis">{{ item.activityName }}</div>
<div class="address font-size14 van-ellipsis gray">地点{{ item.address }}</div>
<div class="time gray font-size14">时间{{ item.startTime }}</div>
<div class="time gray font-size14">时间{{ item.strTime }} {{ item.endTime }} </div>
<div class="flex flex-end" v-if="item.online === 1">
<div>
<span>报名人数</span> <span class="font-size18 orange">{{ item.currentParticipants
@ -47,16 +47,18 @@ export default {
methods: {
async communityActivity() {
let parm = {
pageSize: this.pageSize,
pageNo: this.pageNo++,
agencyId: this.agencyId,
activityName: "",
status: "",
typeId: "",
startTime: "",
content: '',
pageNo: 1,
pageSize: 100,
online: '1',
endTime: "",
address: "",
assistingParty: "",
progessFlag: 1,
strTime: "",
title: "",
district: "",
type: "",
status: "",
progessFlag: 1
}
let res = await communityActivity(parm)
if (res.code === 0) {

4
src/views/communityPublicity/detail.vue

@ -4,12 +4,12 @@
<!-- <van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" placeholder="请输入搜索关键词" />
<van-button round type="info" class="custom-button font-size13 m-top10 m-right12" @click="onSearch()">查询</van-button> -->
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img src="../../assets/images/servicePhone/banner (1).png" style="width: 100%;" />
<img :src=" info.coverPic" style="width: 100%; height: 150px;" />
</div>
<div class='container m-bot50' :style="this.phone=='Phone'?'':'height: 85vh; overflow: auto;'"style="position: relative;top: -47px;">
<div class="card">
<div class=" p0">
<div class="text1">{{ info.title }}</div>
<div class="text1">{{c }}</div>
<div class="flex flex-x text2">
<div class="font-size13 y66666">{{ info.agencyName }}</div>
<div class="font-size13 y66666 m-left5">{{ info.releaseTime }}</div>

192
src/views/dynamic/index.vue

@ -0,0 +1,192 @@
<template>
<div>
<div class="flex flex-mean" style="background-color: #FFFFFF;">
<!-- <van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" placeholder="请输入搜索关键词" />
<van-button round type="info" class="custom-button font-size13 m-top10 m-right12" @click="onSearch()">查询</van-button> -->
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img :src="discussionList.coverImg" style="width: 100%; height: 150px; " />
</div>
<div class='' style="position: relative;top: -10px;">
<div class="activity_content card" >
<div class="van-multi-ellipsis--l2 text">
{{ discussionList.title }}
</div>
<div class="flex flex-end">
<div class="font-size13 flex flex-y">
<!-- <img src="@/assets/images/icons/resi.png" class="img_17"> -->
<!-- <div class="text3"><span class="text2">联系人:</span>{{ discussionList.releaseTime }}</div> -->
<div class="text3"><span class="text2">发布单位:</span>{{ discussionList.agencyName }}</div>
</div>
</div>
<div class="van-hairline--bottom"></div>
<div v-html="discussionList.content" ></div>
</div>
<register-dialog v-if="showRegister" @close="showRegister = false" :registerFlag="registerFlag" :content="'请您先进行注册。'"></register-dialog>
</div>
<Android></Android>
</div>
</template>
<script>
// import { communityActivity,icEventOldDiscuss,handelClicsupport } from '@/api/home';
import {newsTrendsdetail} from '@/api/dynamic'
import registerDialog from '@/components/registerDialog';
export default {
data() {
return {
discussionList: [
],
pageSize: 5,
pageNo: 1,
agencyId: null,
finished: false,
loading: false,
showRegister: false,
searchValue: "",
userId:""
};
},
created() {
this.id = this.$route.query.id?this.$route.query.id:'';
this.userId = this.$store.state.app.appId;
this.newsTrendsdetail()
},
methods: {
callPhone(phone){
window.location.href = `tel:${phone}`;
},
async newsTrendsdetail(){
let res = await newsTrendsdetail(this.id)
if (res.code === 0) {
this.discussionList = res.data
}
},
handelClickJump(path) {
if (path === 'activityDetail') {
if (this.$store.state.app.userInfo.mobile) {
this.$router.push({ path: `/${path}` });
} else {
this.showRegister = true;
}
}
}
},
components: { registerDialog },
computed: {},
watch: {},
}
</script>
<style lang='less' scoped>
.text{
font-family: PingFang SC;
font-weight: 600;
font-size: 16px;
color: #000000;
}
.text2{
font-family: PingFang SC;
font-weight: 500;
font-size: 15px;
color: #999999;
line-height:25px
}
.text3{
font-family: PingFang SC;
font-weight: 500;
font-size: 15px;
color: #333333;
line-height:25px
}
.custom-button {
width: 60px;
height: 33px;
}
.activity_content {
padding-bottom: 10px;
box-sizing: border-box;
width: 100%;
min-height: 50px;
.img {
width: 231px;
height: 33px;
margin: 5px 3px 0 3px;
}
&:last-child {
border-bottom: none;
}
.content {
width: 325px;
height: 40px;
font-family: PingFang SC;
font-weight: 500;
font-size: 16px;
color: #333333;
line-height: 23px;
}
.dianzan {
width: 325px;
height: 20px;
display: flex;
font-size: 13px;
color: #AAAAAA;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
.img {
width: 14.5px;
height: 15px;
}
}
}
.header {}
.header .input_search {
width: 279px;
height: 33px;
background: rgba(193, 193, 193, 0.16);
border-radius: 17px;
// flex: 1;
color: #333333;
border: none;
/* 取消边框 */
margin-left: 10px;
}
.header .btn_search {
width: 60px;
height: 33px;
background: #3974F6;
border-radius: 17px;
font-family: PingFang SC;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
line-height: 23px;
border: none;
/* 取消边框 */
margin-right: 10px;
}
</style>

138
src/views/home/index.vue

@ -20,8 +20,8 @@
</div>
<div class="swipe">
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item v-for="item in PublicityListImg">
<img :src="item.coverPic" alt="" @click="toDetail(item)"
<van-swipe-item v-for="item in noticeListOrg">
<img :src="item.coverImg" alt="" @click="toDetail(item)"
style="width: 100%;height: 150px; margin: 0 auto;border-radius: 15px;">
</van-swipe-item>
</van-swipe>
@ -29,7 +29,7 @@
<div class=" flex flex-end flex-center2 notice">
<img src="@/assets/images/home/laba.png" class="img_17" alt="">
<div class="van-ellipsis flex-1">
<van-notice-bar color="#555555" background="#ffffff" :text="messageText" />
<van-notice-bar scrollable color="#555555" background="#ffffff" :text="noticeText" />
</div>
<!-- <span class="gray notice_time">{{day}}</span> -->
<span class="gray" @click="$router.push('/messages')">...</span>
@ -64,13 +64,15 @@
<div class="flex flex-centr2 flex-mean m-top18">
<div style="width: 100px; height: 100px;"
class="flex-y flex flex-center1 flex-center2 font-size13 "
v-for="(item, index) in activityList" @click="handelClickJump(item.path,'tab')" :key="index">
<div class="img_100" :style="{ backgroundImage: `url(${item.coverPic})` }">
v-for="(item, index) in activityList" :key="index">
<div class="img_100" :style="{ backgroundImage: `url(${item.imgs})` }" @click="$router.push({name:'activityDetail',query:{id:item.id}})">
<div class="content-wrapper">
<!-- 顶部图片 -->
<img style="height: 23px; width: 80px;" src="@/assets/images/home/how1.png" />
<img v-if="index==0" style="height: 23px; width: 60px;" src="@/assets/images/home/how1.png" />
<img v-if="index==1" style="height: 23px; width: 80px;" src="@/assets/images/home/how2.png" />
<img v-if="index==2" style="height: 23px; width: 80px;" src="@/assets/images/home/how3.png" />
<!-- 底部标题 -->
<div class="title1">{{ item.activityName }}111</div>
<div class="title1">{{ item.title }}111</div>
</div>
</div>
@ -88,9 +90,9 @@
</div>
<div class="activity_content flex">
<van-tabs v-model="tagActive" style="width: 100%;" @change="handelChangeTags">
<van-tab v-for="item in tagList" :key="item.id" :title="item.tagName">
<div class="flex flex-y flex1 flex-end" v-if="PublicityList.length !== 0">
<div class="activity_content flex flex-y" v-for="(item, index) in PublicityList"
<van-tab v-for="item in listguidecategory" :key="item.id" :title="item.categoryName">
<div class="flex flex-y flex1 flex-end" v-if="AllCategorylist.length !== 0">
<div class="activity_content flex flex-y" v-for="(item, index) in AllCategorylist"
:key="index"
@click="$router.push({name:'communityPublicityDetail',query:{id:item.id}})">
<div class="flex flex1 ">
@ -102,9 +104,9 @@
</div>
<div class="flex flex-end flex-center gray m-top10 font-size13">
<!-- <div class="flex"> -->
<div class="flex flex-center m-right26" v-if="item.tagId && tagList">
{{filterTagId(item.tagId)}}</div>
<div class="flex1 text-align-right">{{item.releaseTime}}</div>
<div class="flex flex-center m-right26" >
{{filterTagId(item.categoryName)}}</div>
<div class="flex1 text-align-right">{{item.updatedTime}}</div>
<!-- </div> -->
<!-- <div class="flex flex-center" @click.stop="communityPublicityGiveLike(item.id)">
<img src="@/assets/images/icons/support.png" alt=""
@ -148,7 +150,8 @@
<span>支持 {{ item.supportNum }}</span>
</div>
<div class="flex flex-center m-left18" @click.stop="handelClicopposeNum(item.eventId)">
<img src="../../assets/images/home/dianzan/2.png"alt="" class="img_16 m-right7"><span>反对
<img src="../../assets/images/home/dianzan/2.png" alt=""
class="img_16 m-right7"><span>反对
{{ item.opposeNum }}</span>
</div>
</div>
@ -213,13 +216,16 @@
<script>
import registerDialog from '@/components/registerDialog';
import { communityActivity, icEventOldDiscuss, advertisingTag, communityPublicity,handelClicsupport,communityPublicityGiveLike } from '@/api/home';
import { guidecategorylist,newsTrends,communityActivity, icEventOldDiscuss, advertisingTag, communityPublicity,handelClicsupport,communityPublicityGiveLike,listAllCategory } from '@/api/home';
import { querystaffmessage } from '@/api/message';
import { inspRecord } from '@/api/satisfaction';
var timer = null
export default {
data() {
return {
AllCategorylist:[],//
listguidecategory:[],//
noticeText:'',//
searchKey: null,//
tabList: [
{
@ -263,7 +269,9 @@ export default {
pageSize: 5,
pageNo: 1,
list: {},
questionnaireUrl:""
questionnaireUrl:"",
noticeIndex:[],
noticeListOrg:[]
};
},
created() {
@ -280,8 +288,45 @@ export default {
this.mounth = this.$dayjs(date).format('M');
this.data=this
this.inspRecord()
this.newsTrends()
this.listAllCategory()
this.guidecategorylist()
var that = this;
timer = setInterval(function () {
that.changefunction();
}, 7000)
},
methods: {
//
changefunction() {
// console.log(this.noticeList);
let length = this.noticeList.length;
if (this.noticeIndex <= length) {
this.noticeIndex=this.noticeIndex + 1
} else {
this.noticeIndex=0
}
this.noticeText=this.noticeList[this.noticeIndex]//testflaseturefalse
},
//
newsTrends() {
let parm = {
"title": "",
"releaseTime": "",
"columnId": 0,
"online": 0
}
newsTrends(parm).then(res => {
// res.data.list.unshift({
// coverImg: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240927/087bb3a330a6494b9b09b5341c309ced.png",
// title: null
// });
this.noticeList=res.data.list.map(item => item.title),
this.noticeText=res.data.list[0].title || '',
this.noticeListOrg=res.data.list
// })
})
},
async inspRecord() {
let parm = {
pageSize:this.pageSize,
@ -323,9 +368,8 @@ export default {
},
toDetail(item){
console.log(item.id,"sldkf")
if(item.coverPic){
this.$router.push({name:'communityPublicityDetail',query:{id:item.id}})
}
this.$router.push({name:'dynamic',query:{id:item.id}})
},
async querystaffmessage(){
let parm = {
@ -380,21 +424,22 @@ export default {
},
async communityActivity() {
let parm = {
pageSize: 10,
content: '',
pageNo: 1,
agencyId: this.agencyId,
activityName: "",
status: "",
typeId: "",
startTime: "",
pageSize: 3,
online: '1',
endTime: "",
address: "",
assistingParty: "",
online:1
progessFlag: 1,
strTime: "",
title: "",
district: "",
type: "",
status: "",
progessFlag: 1
}
let res = await communityActivity(parm)
if (res.code === 0) {
this.activityList = res.data.list.slice(0, 3);
this.activityList = res.data.list
}
},
async icEventOldDiscuss() {
@ -409,6 +454,33 @@ export default {
this.eventList = res.data.list.slice(0, 3)
}
},
//
async listAllCategory() {
let parm = {
pageSize: 10,
agencyId: "",
categoryCode:"",
guideTitle:"",
pageNo: 1,
status: 1,
}
let res = await listAllCategory(parm)
if (res.code === 0) {
this.AllCategorylist = res.data.list.splice(0, 3);
// this.AllCategorylist.unshift({ tagName: '', id: 'new' })
}
},
//
async guidecategorylist() {
let parm = {
customerId: this.customerId
}
let res = await listAllCategory(parm)
if (res.code === 0) {
this.listguidecategory = res.data.list;
this.listguidecategory.unshift({ tagName: '最新', id: 'new' })
}
},
async advertisingTag() {
let parm = {
pageSize: 10,
@ -465,6 +537,8 @@ export default {
}
},
handelClickJump(path,item) {
console.log(path,item,"sdkljslkfk");
if (path === 'event' || path === 'Enjoyableservices') {
if(path === 'event'){
if (this.$store.state.app.userInfo.mobile) {
@ -483,7 +557,8 @@ export default {
this.showRegister = true;
}
}
} else if(item){
}
else if(item){
this.$router.push({ path: `/${path}`,query:{id:item.id} })
}else{
this.$router.push({ path: `/${path}` })
@ -541,6 +616,7 @@ export default {
}
.content-wrapper {
padding:10px;
display: flex;
flex-direction: column;
height: 100%; /* 让内容填满整个父容器 */

2
src/views/search/index.vue

@ -51,9 +51,7 @@ export default {
},
methods: {
toDetail(item) {
if (item.type == 'activity') {
this.$router.push({ path: '/activityDetail',query:{id:item.id} })
}
},
handelBlurSearch() {
this.searchFlag = this.searchKey ? true : false;

23
src/views/serviceList/reservationService.vue

@ -80,6 +80,29 @@ export default {
},
methods: {
submit() {
// saveOfficialAccountEvent({
// agencyId:this.agencyId,
// duration: this.audio.duration,
// serverId: this.audio.serverId,
// imageList: this.fileList.map(item => item.url),
// latitude: this.latitude,
// longitutd: this.longitude,
// address: this.address,
// reporterName: this.name,
// reporterMobile: this.phone,
// eventContent: this.eventContent ? this.eventContent : '',
// userId: this.$store.state.app.userInfo.userId,
// customerId: this.$store.state.app.userInfo.customerId,
// openFlag : 0,
// categoryId: this.categoryId,
// }).then(() => {
// this.$toast.success('')
// this.type = 1
// // this.$router.replace('/appeal')
// })
},
confirm(value){
console.log(value)
this.serviceTime=dayjs(value).format('YYYY-MM-DD HH:mm:ss').toString()

75
src/views/servicePhone/index.vue

@ -10,18 +10,18 @@
<van-list class="card m-bottom10" :offset="50" v-for="(item, index) in discussionList" :key="index" >
<div class="activity_content " >
<div class="van-multi-ellipsis--l2 text">
<!-- {{ item.eventContent }} -->朝阳社区
{{ item.gridName }}
</div>
<div class="flex flex-end">
<div class="font-size13 flex flex-y">
<!-- <img src="@/assets/images/icons/resi.png" class="img_17"> -->
<div class="text3"><span class="text2">联系人:</span>{{ item.total }}</div>
<div class="text3"><span class="text2"> :</span>{{ item.total }}</div>
<div class="text3"><span class="text2">联系人:</span>{{ item.contacts }}</div>
<div class="text3"><span class="text2"> :</span>{{ item.mobile }}</div>
</div>
<!-- <div class="font-size13 flex flex-center2"><img src="@/assets/images/icons/support.png" class="img_17" @click="handelClicsupport(item.eventId)"> {{ item.supportNum }}</div> -->
<!-- <div class="font-size13 flex flex-center2"><img src="@/assets/images/icons/oppose.png" class="img_17" @click="handelClicopposeNum(item.eventId)">反对 {{ item.opposeNum }}</div> -->
<div><img src="../../assets//images//servicePhone/phone.png" style="width:40px;height:40px;"></div>
<div @click="callPhone(item.mobile)" ><img src="../../assets//images//servicePhone/phone.png" style="width:40px;height:40px;"></div>
<!-- <van-button @click="callPhone" round type="primary">拨打</van-button> -->
</div>
</div>
@ -36,7 +36,8 @@
</template>
<script>
import { communityActivity,icEventOldDiscuss,handelClicsupport } from '@/api/home';
// import { communityActivity,icEventOldDiscuss,handelClicsupport } from '@/api/home';
import {allgrids} from '@/api/servicephone'
import registerDialog from '@/components/registerDialog';
export default {
data() {
@ -56,69 +57,21 @@ export default {
created() {
this.agencyId = this.$route.query.agencyId?this.$route.query.agencyId: this.$store.state.app.agencyId;
this.userId = this.$store.state.app.appId;
this.icEventOldDiscuss();
this.allgrids()
},
methods: {
callPhone(phone){
window.location.href = 'tel:15666628220';
window.location.href = `tel:${phone}`;
},
async onSearch(){
async allgrids(){
let parm = {
pageSize: 10,
pageNo: 1,
agencyId: this.agencyId,
icEventId:null,
content:this.searchValue
}
let res = await icEventOldDiscuss(parm)
let res = await allgrids(parm)
if (res.code === 0) {
this.discussionList = res.data.list
}
},
async handelClicsupport(data){
let parm = {
eventId:data,
agencyId: this.agencyId,
userId: this.userId,
opinionFlag:0
}
console.log(parm);
let res = await handelClicsupport(parm)
if(res.code === 0){
this.icEventOldDiscuss()
}
},
async handelClicopposeNum(data){
let parm = {
eventId:data,
agencyId: this.agencyId,
userId: this.userId,
opinionFlag:1
console.log(res,"dkafdlsjf");
this.discussionList = res.data
}
console.log(parm);
let res = await handelClicsupport(parm)
if(res.code === 0){
this.icEventOldDiscuss()
}
},
async icEventOldDiscuss(){
let parm = {
pageSize: 10,
pageNo: 1,
agencyId: this.agencyId,
icEventId:null
}
let res = await icEventOldDiscuss(parm)
if (res.code === 0) {
this.discussionList = res.data.list
}
},
handelClickJump(path) {
@ -151,14 +104,14 @@ export default {
font-weight: 500;
font-size: 15px;
color: #999999;
line-height:20px
line-height:25px
}
.text3{
font-family: PingFang SC;
font-weight: 500;
font-size: 15px;
color: #333333;
line-height:20px
line-height:25px
}
.custom-button {

4
vue.config.js

@ -32,8 +32,8 @@ module.exports = defineConfig({
//配置跨域
'/api': {
// target: `https://epmet-preview.elinkservice.cn`,
target: `http://219.146.91.110:30801`,
// target: `http://192.168.1.140`,
// target: `http://219.146.91.110:30801`,
target: `http://192.168.1.140`,
// target: `http://127.0.0.1:8080`,
changeOrigin: true,
ws: false,

Loading…
Cancel
Save