Browse Source

人民意见征集分享,二维码的样式

feature
是小王呀\24601 9 months ago
parent
commit
c61409f926
  1. BIN
      src/assets/images/livingCircle/address1.png
  2. BIN
      src/assets/images/livingCircle/tel.png
  3. BIN
      src/assets/images/peoSuggestion/2.png
  4. BIN
      src/assets/images/peoSuggestion/3.png
  5. BIN
      src/assets/images/peoSuggestion/4.png
  6. 4
      src/components/Share/index.vue
  7. 6
      src/router/router.config.js
  8. 68
      src/views/livingCircle/detail.vue
  9. 372
      src/views/peoSuggestion/explain.vue
  10. 364
      src/views/peoSuggestion/index.vue
  11. 4
      vue.config.js

BIN
src/assets/images/livingCircle/address1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
src/assets/images/livingCircle/tel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
src/assets/images/peoSuggestion/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
src/assets/images/peoSuggestion/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
src/assets/images/peoSuggestion/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 KiB

4
src/components/Share/index.vue

@ -25,6 +25,10 @@ export default {
required: false
},
},
created(){
console.log("sdlkfjlsdf");
},
computed: {
},

6
src/router/router.config.js

@ -137,6 +137,12 @@ export const constantRouterMap = [
component: () => import('@/views/peoSuggestion'),
meta: { title: '人民意见征集', keepAlive: false }
},
{
path: '/peoSuggestionexplain',
name: 'peoSuggestionexplain',
component: () => import('@/views/peoSuggestion/explain.vue'),
meta: { title: '征集说明', keepAlive: false }
},
{
path: '/sing',
name: 'sing',

68
src/views/livingCircle/detail.vue

@ -4,7 +4,7 @@
<!-- <van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" placeholder="请输入搜索关键词" />
<van-button round type="applyList" class="custom-button font-size13 m-top10 m-right12" @click="onSearch()">查询</van-button> -->
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img :src="applyList.attrs[0].url" style="width: 100%; height: 150px;" />
<img :src="applyList.attrs && applyList.attrs[0] && applyList.attrs[0].url ? applyList.attrs[0].url : 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240927/087bb3a330a6494b9b09b5341c309ced.png'" style="width: 100%; height: 150px;" />
</div>
<div class='' style="position: relative;top: -10px;">
<div class="card">
@ -15,14 +15,26 @@
text-color="#ff8707">{{applyList.type}}/{{typeNames}}</van-tag>
</div>
<div>
<div class="flex flex-x flex-center2 flex-end">
<div>
<van-tag v-for=" (item,index) in tabs" round type="warning" color="#f2f2f2" size="medium" text-color="#6e6e6e">{{item.tab}}</van-tag>
<div style="font-size: 16px;color: #999999; line-height: 30px;">
<img src="">
<span>活动时间:
</span><span>{{ applyList.strTime }} {{ applyList.endTime}}</span></div>
<van-tag v-for=" (item,index) in tabs" round type="warning" color="#f2f2f2" size="medium"
text-color="#6e6e6e">{{item.tab}}</van-tag>
<div style="font-size: 16px;color: #999999; line-height: 30px;">
<img style="width: 14px; height: 14px;"
src="../../assets/images/livingCircle/address1.png">
<span>{{ applyList.address }} </span>
</div>
</div>
<img style="width: 40px; height: 40px;" src="../../assets/images/livingCircle/navigation.png">
</div>
<div class="">
<span style="font-size: 16px;color: #999999;"> 营业时间:</span>
<span style="font-size: 16px;color: #000000;"> 营业时间:</span>
</div>
<div class="">
<span style="font-size: 16px;color: #999999;"> 联系电话:</span>
<span style="font-size: 16px;color: #000000;"> 营业时间:</span>
<img style="width: 15px ;height: 15px;" src="../../assets/images/livingCircle/tel.png">
</div>
</div>
@ -30,12 +42,31 @@
</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>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>所属项目: </span><span
style="color: black;">{{applyList.projectName}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>招募截止: </span><span
style="color: black;">{{applyList.deadline}}</span></div>
<div class="m-top10 p0">
<h2 style="margin-bottom: 10px; font-size: 21px;">优惠卷</h2>
<div class="container" style="background:linear-gradient(0deg, #FFF9F5 65%, #FEF1E9 100%)">
<div class="card">
<div class="flex flex-x flex-center2 flex-end">
<div>
<h2 style="margin: 0; font-size: 21px; ">{{ applyList.name }}</h2>
<van-tag v-for=" (item, index) in tabs" style=" border: 1px solid #FFAA07; " round type="warning" color="#FFFFFF"
size="medium" text-color="#FFAA07">{{ item.tab }}</van-tag>
<div style="font-size: 16px;color: #999999; line-height: 30px;">
<span>有效期至</span> <span>{{ applyList.address }} </span>
</div>
</div>
<button style="width: 40px; height: 40px;"
></button>
</div>
</div>
</div>
<div style="margin-top: 10px;">
<span style=" font-size: 14px;
color: #999999;">使用方法凭当前页面进点享受优惠</span>
</div>
<!-- <div style="font-size: 16px;color: #999999; line-height: 30px;"><span>招募截止: </span><span
style="color: black;">{{applyList.deadline}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>签到时间: </span><span
style="color: black;">{{applyList.signInTime+' 至 '+applyList.signOutTime}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动名额: </span><span
@ -51,19 +82,10 @@
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动时长: </span><span
style="color: black;">{{applyList.serviceTime}}小时</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>积分奖励: </span><span
style="color: black;">{{applyList.points}}</span></div>
style="color: black;">{{applyList.points}}</span></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>
<div v-html="applyList.conditions"></div>
</div>
</div>
</div>
<Android @send-number="handleNumber" />
</div>

372
src/views/peoSuggestion/explain.vue

@ -0,0 +1,372 @@
<template>
<div>
<div class="flex flex-mean" style="background-color: #FFFFFF; height: 150px;">
<!-- <van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" placeholder="请输入搜索关键词" />
<van-button round type="applyList" class="custom-button font-size13 m-top10 m-right12" @click="onSearch()">查询</van-button> -->
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img :src="applyList.attrs && applyList.attrs[0] && applyList.attrs[0].url ? applyList.attrs[0].url : 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240927/087bb3a330a6494b9b09b5341c309ced.png'" 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 flex-center2">
<h2 style="margin: 0; font-size: 21px; ">{{ applyList.name }}</h2>
<van-tag size="medium" color="#ffefd6" style="margin-left: 10px;"
text-color="#ff8707">{{applyList.type}}/{{typeNames}}</van-tag>
</div>
<div class="flex flex-x flex-center2 flex-end">
<div>
<van-tag v-for=" (item,index) in tabs" round type="warning" color="#f2f2f2" size="medium"
text-color="#6e6e6e">{{item.tab}}</van-tag>
<div style="font-size: 16px;color: #999999; line-height: 30px;">
<img style="width: 14px; height: 14px;"
src="../../assets/images/livingCircle/address1.png">
<span>{{ applyList.address }} </span>
</div>
</div>
<img style="width: 40px; height: 40px;" src="../../assets/images/livingCircle/navigation.png">
</div>
<div class="">
<span style="font-size: 16px;color: #999999;"> 营业时间:</span>
<span style="font-size: 16px;color: #000000;"> 营业时间:</span>
</div>
<div class="">
<span style="font-size: 16px;color: #999999;"> 联系电话:</span>
<span style="font-size: 16px;color: #000000;"> 营业时间:</span>
<img style="width: 15px ;height: 15px;" src="../../assets/images/livingCircle/tel.png">
</div>
</div>
</div>
</div>
<div class='container' style="position: relative;top: -10px;">
<div class="card">
<div class="m-top10 p0">
<h2 style="margin-bottom: 10px; font-size: 21px;">优惠卷</h2>
<div class="container" style="background:linear-gradient(0deg, #FFF9F5 65%, #FEF1E9 100%)">
<div class="card">
<div class="flex flex-x flex-center2 flex-end">
<div>
<h2 style="margin: 0; font-size: 21px; ">{{ applyList.name }}</h2>
<van-tag v-for=" (item, index) in tabs" style=" border: 1px solid #FFAA07; " round type="warning" color="#FFFFFF"
size="medium" text-color="#FFAA07">{{ item.tab }}</van-tag>
<div style="font-size: 16px;color: #999999; line-height: 30px;">
<span>有效期至</span> <span>{{ applyList.address }} </span>
</div>
</div>
<button style="width: 40px; height: 40px;"
></button>
</div>
</div>
</div>
<div style="margin-top: 10px;">
<span style=" font-size: 14px;
color: #999999;">使用方法凭当前页面进点享受优惠</span>
</div>
<!-- <div style="font-size: 16px;color: #999999; line-height: 30px;"><span>招募截止: </span><span
style="color: black;">{{applyList.deadline}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>签到时间: </span><span
style="color: black;">{{applyList.signInTime+' 至 '+applyList.signOutTime}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动名额: </span><span
style="color: black;"><span v-if="applyList.notQuota === 1">{{applyList.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;">{{applyList.linkman}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>联系电话: </span><span
style="color: black;">{{applyList.linkman}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动时长: </span><span
style="color: black;">{{applyList.serviceTime}}小时</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>积分奖励: </span><span
style="color: black;">{{applyList.points}}</span></div> -->
</div>
</div>
</div>
<Android @send-number="handleNumber" />
</div>
</template>
<script>
import {sphereLifeSearcdetail } from "@/api/lingCircle"
import Share from "@/components/Share"
import registerDialog from '@/components/registerDialog';
import { setConfig } from '@/utils/jweixin'
import { Toast, Dialog } from 'vant'
export default {
data() {
return {
options: [
{
"children": [
{
"pv": "1",
"value": "11",
"label": "托儿所"
},
{
"pv": "1",
"value": "12",
"label": "幼儿园"
},
{
"pv": "1",
"value": "13",
"label": "小学"
},
{
"pv": "1",
"value": "14",
"label": "中学"
},
{
"pv": "1",
"value": "15",
"label": "培训机构"
},
{
"pv": "1",
"value": "16",
"label": "其它"
}
],
"value": "1",
"label": "教育培训"
},
{
"children": [
{
"pv": "2",
"value": "21",
"label": "门诊"
},
{
"pv": "2",
"value": "22",
"label": "社区医院"
},
{
"pv": "2",
"value": "23",
"label": "医院"
},
{
"pv": "2",
"value": "24",
"label": "其它"
}
],
"value": "2",
"label": "医疗卫生"
},
{
"children": [
{
"pv": "3",
"value": "31",
"label": "餐饮"
},
{
"pv": "3",
"value": "32",
"label": "超市"
},
{
"pv": "3",
"value": "33",
"label": "理发"
},
{
"pv": "3",
"value": "34",
"label": "书店"
},
{
"pv": "3",
"value": "35",
"label": "便利店"
},
{
"pv": "3",
"value": "36",
"label": "市场"
},
{
"pv": "3",
"value": "37",
"label": "五金"
},
{
"pv": "3",
"value": "38",
"label": "照相"
},
{
"pv": "3",
"value": "39",
"label": "综合修理"
},
{
"pv": "3",
"value": "30",
"label": "服务站"
},
{
"pv": "3",
"value": "330",
"label": "农贸市场"
},
{
"pv": "3",
"value": "331",
"label": "其它"
}
],
"value": "3",
"label": "商业服务"
},
{
"children": [
{
"pv": "4",
"value": "41",
"label": "电影院"
},
{
"pv": "4",
"value": "42",
"label": "歌剧院"
},
{
"pv": "4",
"value": "43",
"label": "图书馆"
},
{
"pv": "4",
"value": "44",
"label": "游泳馆"
},
{
"pv": "4",
"value": "45",
"label": "活动中心"
},
{
"pv": "4",
"value": "46",
"label": "体育馆"
},
{
"pv": "4",
"value": "47",
"label": "其它"
}
],
"value": "4",
"label": "文化体育"
},
{
"value": "5",
"label": "其它"
}
],
tabs:[],
applyList:{},
};
},
created() {
},
async mounted() {
// setConfig(['updateAppMessageShareData', 'onMenuShareAppMessage', 'updateTimelineShareData'])
if (this.$route.query.id) {
console.log(this.$route.query.id);
this.sphereLifeId= 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.$route.query.id)
// this.activitySignIn(1)
// this.activitySignIn(0)
}
},
methods: {
//
activityApplyList(id) {
sphereLifeSearcdetail(id).then(res => {
if (res.code === 0) {
this.applyList = res.data
this.tabs = res.data.tags.split(',').map(tag => ({ tab: tag.trim() }))
console.log(tabs, "sdalkjflksdf");
}
}).catch(err => {
})
},
},
components: { Share, registerDialog },
computed: {
disabledRecord() {
return (item) => {
if (!item.cutOffTime || item.online != 1) return true
let flag = new Date(item.cutOffTime.replace(/-/g, '/')).getTime() < Date.now() || item.currentParticipants >= item.participants || item.currentParticipants >= item.participants;
return flag || false
}
},
},
watch: {},
}
</script>
<style lang='less' scoped>
.phone{
height: 50px;
bottom:8vh;
}
:deep img{
max-width: 100%;
}
:deep(.p0>.van-cell) {
padding: 0;
}
:deep(.van-cell) {
padding: 16px 8px;
}
:deep(.van-cell__title) {
color: #666666;
display: flex;
&>span {
flex: 1;
}
}
:deep(.van-cell__value) {
text-align: left;
}
:deep(.van-cell--required) {
&::before {
left: -5px;
}
}
</style>

364
src/views/peoSuggestion/index.vue

@ -8,7 +8,7 @@
</div>
<div class='container' style="position: relative;top: -35px;">
<div class="flex flex-x flex-end">
<img src="../../assets/images/peoSuggestion/special.png" style="width: 180px;">
<img @click="onClickdaily" src="../../assets/images/peoSuggestion/special.png" style="width: 180px;">
<img src="../../assets/images/peoSuggestion/daily.png" style="width: 180px;">
</div>
</div>
@ -56,7 +56,7 @@
<span @click="$router.push('/activity')">更多</span>
</div>
<van-tabs v-model="tagActive" style="width: 100%;" @change="handelChangeTags" :title-style="titleStyle" title-class="custom-title-class">
<van-tabs v-model="tagActive" style="width: 100%;" :title-style="titleStyle" title-class="custom-title-class">
<van-tab v-for="item in tagList" :key="item.id" :title="item.tagName">
</van-tab>
@ -83,8 +83,21 @@
</div>
</div>
</div>
<div style="position: fixed; right: 0px; bottom:40px;display: flex; flex-direction:column;" >
<img @click="onClickQCcode" style="width: 80px; height: 80px;" src="../../assets/images/peoSuggestion/2.png">
<img @click="onClickShare" style="width: 80px; height: 80px;" src="../../assets/images/peoSuggestion/3.png">
</div>
<Android @send-number="handleNumber" />
<Share :show="showShare" @closeShare="showShare = false"></Share>
<van-popup v-model="showQCcode">
<div class="QCcode" >
<div style="padding: 30px">
<img width="230px" height="230px" src="../../assets/images/peoSuggestion/3.png">
<div style="padding: 20px; text-align: center;">人民意见征集二维码</div>
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" round @click="submit">下载二维码</van-button>
</div>
</div>
</van-popup>
</div>
</template>
@ -92,30 +105,31 @@
<script>
import { activitySignIn,activityApply,addActivityRecord,cancelSignUp1, detail,
communityActivityApplicationRecordDelete,getById,activityApplySave} from "@/api/activity"
import Share from "@/components/Share"
import Share from "@/components/Share/"
import registerDialog from '@/components/registerDialog';
import { setConfig } from '@/utils/jweixin'
// import { Share } from '@/components/Share'
import { Toast, Dialog } from 'vant'
export default {
data() {
return {
showQCcode:false,
tagActive:"",
showShare:false,
titleStyle: {
color: "#007FF1", //
fontSize: "16px", //
},
tagList:[{
id:"1",
tagName:"标签1"
id:"0",
tagName:"日常征集"
},
{
id:"2",
tagName:"标签1"
id:"1",
tagName:"专题征集"
},
{
id:"3",
tagName:"标签1"
}],
],
eventList:[{
title:"70岁以上高龄老人补贴发放定在1月1日",
total:1,
@ -126,25 +140,7 @@ export default {
total:1,
data:"2000-00-00 13:00:00"
}],
applyedTimeType:false,
ActName:"",
info: null,
signInList: [],
applyType: false,
activityId: null,
realTimeList: [],
projectList: [],
realTimeList:[],
signInList:[],
applyList:[],
activityList: [],
signUp: [
{ name: "", mobile: "", remark: "" },
],
info: {},
isPast: false,
showShare: false,
showRegister: false,
phone:""
};
},
@ -152,21 +148,19 @@ 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: {
onClickQCcode(){
this.showQCcode=true
},
closeShare(){
this.showShare=false
},
onClickShare(){
this.showShare=true
console.log(this.showShare);
},
toSign(e) {
console.log(e.currentTarget.dataset, "e.currentTarget.dataset ");
this.$router.push({ path: `/sing`, query: { id: this.activityId,type:e.currentTarget.dataset.type } });
@ -174,277 +168,15 @@ export default {
// url: `/subpages/activity/pages/sign/sign?activityId=${this.data.activityId}&type=${e.currentTarget.dataset.type}&latitude=${e.currentTarget.dataset.latitude}&longitude=${e.currentTarget.dataset.longitude}`,
// })
},
//
cancelSignUp() {
Dialog.confirm({
title: '标题',
message: '弹窗内容',
})
.then(() => {
console.log("用户点击了确认");
cancelSignUp1(this.activityId).then(res => {
console.log(res, "取消报名返回结果");
if (res.code === 0) {
this.applyType = true; //
this.$toast.success("取消报名成功"); //
} else {
this.$toast.fail(res.message || "取消报名失败");
}
})
})
.catch(() => {
console.log("取消");
});
// Dialog.confirm({
// title: '',
// message: '',
// })
// .then(() => {
// //
// console.log("");
// cancelSignUp1(this.data.activityId)
// .then(res => {
// console.log(res, "");
// if (res.code === 0) {
// this.applyType = true; //
// this.$toast.success(""); //
// } else {
// this.$toast.fail(res.message || "");
// }
// })
// .catch(error => {
// console.error("", error);
// this.$toast.fail("");
// })
// .finally(() => {
// // loading
// });
// })
// .catch(() => {
// //
// console.log("");
// });
},
//
toApply() {
console.log("dsklfjklsf");
Dialog.confirm({
title: '提示',
message: '您确定要报名吗?',
})
.then(() => {
activityApplySave(this.activityId).then(res => {
console.log(res,"sdflkjlsfjd");
Dialog.alert({
// title: '',
message: '报名成功',
})
// 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) {
wx.ready(function () {
wx.updateAppMessageShareData({
title: than.info.activityName || '活动详情',
desc: '',
link: `https://epmet-preview.elinkservice.cn/epmet-wx-pa/#/activityDetail?id=${than.$route.query.id}&appId=${than.$store.state.app.appId}&flag=share`,
imgUrl: than.info.coverPic || 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png',
success: function () {}
})
wx.updateTimelineShareData({
title: than.info.activityName,
desc: '',
link: `https://epmet-preview.elinkservice.cn/epmet-wx-pa/#/activityDetail?id=${than.$route.query.id}&appId=${than.$store.state.app.appId}`,
imgUrl: than.info.coverPic || 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png',
success: function () {}
})
});
} else {
wx.onMenuShareAppMessage({
title: than.info.activityName,
desc: '',
link: `https://epmet-preview.elinkservice.cn/epmet-wx-pa/#/activityDetail?id=${than.$route.query.id}&appId=${than.$store.state.app.appId}`,
imgUrl: than.info.coverPic || 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png',
success: function () {}
})
}
},
//
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
},
checkIfPast() {
const currentTimestamp = Date.now();
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.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);
// }
let res = await detail(id);
handleResponse(res);
},
async getById(id) {
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();
}
}
};
if (delId) {
this.signUp = this.signUp.filter(item => item.id != delId);
}
let res = await getById(id);
handleResponse(res);
},
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
communityActivityApplicationRecordDelete([item.id]).then(res => {
if (res.code === 0) {
than.detail(this.$route.query.id, item.id);
}
}).catch(err => {
console.log(err);
})
} else {
this.signUp.splice(index, 1)
}
},
async save() {
if (this.$store.state.app.userInfo.mobile) {
this.signUp.forEach((item) => {
item.activityId = this.info.id;
item.applicationId = this.$store.state.app.userInfo.id;
item.customerId = this.$store.state.app.userInfo.customerId;
})
if(this.signUp.findIndex(item=>!item.name) != -1){
this.$toast('人员姓名不能为空')
return
}
if(this.signUp.findIndex(item=>!item.mobile) != -1){
this.$toast('联系电话不能为空')
return
}
let parm = {
formDTOList: this.signUp
}
let res = await addActivityRecord(parm)
if (res.code === 0) {
this.$toast.success(res.data)
this.signUp = [{ name: "", mobile: "", remark: "" }]
this.detail(this.$route.query.id)
}
} else {
this.showRegister = true;
}
},
},
components: { Share, registerDialog },
components: { Share, registerDialog,Share },
computed: {
disabledRecord() {
return (item) => {
@ -522,4 +254,18 @@ export default {
color: #007FF1; /* 激活文字颜色 */
font-weight: bold; /* 加粗字体 */
}
.QCcode{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 300px;
height: 400px;
background-image: url(../../assets/images/peoSuggestion/4.png);
background-size: contain; /* 图片按比例缩放以适应容器 */
background-repeat: no-repeat; /* 防止重复 */
overflow: hidden; /* 防止超出边界 */
background-origin: padding-box; /* 背景图片从内边距区域开始显示 */
background-clip: padding-box; /* 背景只显示在padding区域内 */
}
</style>

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