Browse Source

bug修改

feature
mk 1 year ago
parent
commit
a19700f02d
  1. 1
      package.json
  2. 1
      public/index.html
  3. 7
      src/api/user.js
  4. 43
      src/views/Enjoyableservices/detail.vue
  5. 2
      src/views/Enjoyableservices/index.vue
  6. 21
      src/views/activity/detail.vue
  7. 4
      src/views/activity/index.vue
  8. 10
      src/views/home/index.vue
  9. 2
      src/views/selectAgency/index.vue
  10. 4
      vue.config.js

1
package.json

@ -10,6 +10,7 @@
"build": "vue-cli-service build", "build": "vue-cli-service build",
"build:dev": "vue-cli-service build --mode development", "build:dev": "vue-cli-service build --mode development",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"build:prod": "vue-cli-service build --mode production",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"deps": "yarn upgrade-interactive --latest" "deps": "yarn upgrade-interactive --latest"
}, },

1
public/index.html

@ -14,7 +14,6 @@
<div id="app"></div> <div id="app"></div>
<script src="//res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script> <script src="//res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script> <script src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script>
<script src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"></script>
<!-- <script type="text/javascript" src="//mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"></script>--> <!-- <script type="text/javascript" src="//mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"></script>-->
</body> </body>
</html> </html>

7
src/api/user.js

@ -140,10 +140,9 @@ export function myCommonsService(data) {
}) })
} }
//获取可享服务详情 //获取可享服务详情
export function icServiceWarmRecord(data) { export function icServiceWarmRecord(id) {
return request({ return request({
url: `/governance/icServiceWarmRecord/detail`, url: `/governance/policy/policyDetail/${id}`,
method: 'post', method: 'get',
data
}) })
} }

43
src/views/Enjoyableservices/detail.vue

@ -2,32 +2,31 @@
<div> <div>
<div class="container"> <div class="container">
<div class="card"> <div class="card">
<div class="font-size21 font-bold">{{ DetailList.title }}</div> <div class="font-size21 font-bold">{{ info.title }}</div>
<div class="flex flex-x flex-center2 m-top10 m-bottom10"> <div class="flex flex-x flex-center2 m-top10 m-bottom10">
<van-tag v-if="DetailList.status" color="#EBF1FE" text-color="#3974F6" size="large">{{ <van-tag :color="info.expiredFlag?'#EBF1FE':'#F5F5F5'" :text-color="info.expiredFlag?'#3974F6':'#AAAAAA'" size="large">{{
DetailList.status ? "进行中" : "已结束" }}</van-tag> info.expiredFlag ? "进行中" : "已结束" }}</van-tag>
<van-tag v-if="!DetailList.status" color="#F5F5F5" text-color="#AAAAAA" size="large">{{ <div class="font-size13 C1 m-left12">{{ info.data }}</div>
DetailList.status ? "进行中" : "已结束" }}</van-tag>
<div class="font-size13 C1 m-left12">{{ DetailList.data }}</div>
</div> </div>
<div class="y66666 font-size15 m-bottom5">享受服务条件{{ DetailList.condition }}</div> <div class="y66666 font-size15 m-bottom5">享受服务条件{{ info.resiSearchTagName }}</div>
<div class="y66666 font-size15 m-bottom5">服务提供方{{ DetailList.provider }}</div> <div class="y66666 font-size15 m-bottom5">服务提供方{{ info.assignText|| '--' }}</div>
<div class="flex flex-x"> <div class="flex flex-x ">
<div class="y66666 font-size15 nowrap">服务时间 </div> <div class="y66666 font-size15 nowrap">服务时间{{ info.assignInfo.serviceTimeStart }} </br>{{ info.assignInfo.serviceTimeEnd }} </div>
<div class="y66666 font-size15">{{ DetailList.serviceData }} </div> <div class="y66666 font-size15">{{ info.serviceData }} </div>
</div> </div>
<div v-html="DetailList.content"></div> <van-divider />
<div v-html="info.content"></div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { icServiceWarmRecord } from '@/api/user'
export default { export default {
data() { data() {
return { return {
info: {
DetailList: {
title: '鞠源社区为退役待就业的军人提供 就业岗位', title: '鞠源社区为退役待就业的军人提供 就业岗位',
content: '<p>县级以上地方人民政府退役士兵安置工作主管部门组织自主就业的退役士兵参加职业教育</p><p>县级以上地方人民政府退役士兵安置工作主管部门组织自主就业的退役士兵参加职业教育</p>', data: '2024-05-08 09:30' content: '<p>县级以上地方人民政府退役士兵安置工作主管部门组织自主就业的退役士兵参加职业教育</p><p>县级以上地方人民政府退役士兵安置工作主管部门组织自主就业的退役士兵参加职业教育</p>', data: '2024-05-08 09:30'
, status: 1, condition: '退役军人 40-60岁', provider: 'XXX就业指导中心', serviceData: "2024-05-08 13:00至2024-6-22 13:00" , status: 1, condition: '退役军人 40-60岁', provider: 'XXX就业指导中心', serviceData: "2024-05-08 13:00至2024-6-22 13:00"
@ -35,10 +34,22 @@ export default {
} }
}, },
created() { created() {
},
mounted(){
if(this.$route.query){
this.icServiceWarmRecord(this.$route.query.id)
}
}, },
methods: { methods: {
async icServiceWarmRecord(id){
let res = await icServiceWarmRecord(id)
if(res){
this.info = res;
if(res.assignFlag === 1){
this.info.assignText = res.assignInfo.serviceScopeList.map(item=>item.objectName).join(',')
}
}
}
}, },
} }
</script> </script>

2
src/views/Enjoyableservices/index.vue

@ -3,7 +3,7 @@
<div class="container"> <div class="container">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="myCommonsService" class="card" <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="myCommonsService" class="card"
:offset="50"> :offset="50">
<div class="card m-bottom10" v-for="(item,index) in EnjoyableList" :key="index" @click="$router.push({ path: `/detailServices`,query:{id:item.serviceId} })"> <div class="card m-bottom10" v-for="(item,index) in EnjoyableList" :key="index" @click="$router.push({ path: `/detailServices`,query:{id:item.id} })">
<div class="flex flex-x flex-center2"> <div class="flex flex-x flex-center2">
<van-tag v-if="item.status" color="#EBF1FE" text-color="#3974F6" size="large">{{ item.status? "进行中":"已结束" }}</van-tag> <van-tag v-if="item.status" color="#EBF1FE" text-color="#3974F6" size="large">{{ item.status? "进行中":"已结束" }}</van-tag>
<van-tag v-if="!item.status" color="#F5F5F5" text-color="#AAAAAA" size="large">{{ item.status? "进行中":"已结束" }}</van-tag> <van-tag v-if="!item.status" color="#F5F5F5" text-color="#AAAAAA" size="large">{{ item.status? "进行中":"已结束" }}</van-tag>

21
src/views/activity/detail.vue

@ -9,7 +9,7 @@
<van-cell :border="false" :title-style="{ 'max-width': '115px' }" title="报名开始时间:" <van-cell :border="false" :title-style="{ 'max-width': '115px' }" title="报名开始时间:"
:value=" info.startTime "></van-cell> :value=" info.startTime "></van-cell>
<van-cell :border="false" :title-style="{ 'max-width': '115px' }" title="报名截止时间:" <van-cell :border="false" :title-style="{ 'max-width': '115px' }" title="报名截止时间:"
:value="info.endTime"></van-cell> :value="info.cutOffTime || '--'"></van-cell>
<van-cell :border="false" :title-style="{ 'max-width': '80px' }" title="活动地点:" <van-cell :border="false" :title-style="{ 'max-width': '80px' }" title="活动地点:"
:value="info.address"></van-cell> :value="info.address"></van-cell>
<van-cell :border="false" :title-style="{ 'max-width': '65px' }" title="举办方:" <van-cell :border="false" :title-style="{ 'max-width': '65px' }" title="举办方:"
@ -23,7 +23,7 @@
<van-cell-group v-for="(item, index) in signUp" :border="false"> <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].name" required :label="`姓名${index + 1}`" placeholder="请输入用户名" />
<van-field v-model="signUp[index].mobile" required label="联系电话" placeholder="请输入您的电话号码" /> <van-field v-model="signUp[index].mobile" required label="联系电话" placeholder="请输入您的电话号码" />
<van-field v-model="signUp[index].remark" required label="备注" placeholder="请输入" rows="3" autosize <van-field v-model="signUp[index].remark" label="备注" placeholder="请输入" rows="3" autosize
type="textarea" /> type="textarea" />
</van-cell-group> </van-cell-group>
<div class="flex flex-center1 m-top12"> <div class="flex flex-center1 m-top12">
@ -34,11 +34,11 @@
</div> </div>
</div> </div>
<div class="bot_btn flex flex-center2" style="height: 50px;"> <div class="bot_btn flex flex-center2" style="height: 50px;">
<div class="flex1 flex flex-center1 flex-center2">报名人数<span class="orange font-size18">30</span> /35</div> <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> <div class="flex1 flex flex-center1 flex-center2"> <van-button size="small" class="m-right7" round>
<template #icon> <template #icon>
<img src="@/assets/images/icons/share.png" alt="" class="img_20"> <img src="@/assets/images/icons/share.png" alt="" class="img_20">
</template> 转发</van-button> <van-button type="info" size="small" round @click="save" v-if="info.online === 1"></van-button></div> </template> 转发</van-button> <van-button type="info" size="small" round @click="save" v-if="info.online === 1" :disabled="isPast"></van-button></div>
</div> </div>
</div> </div>
</template> </template>
@ -52,7 +52,8 @@ export default {
signUp: [ signUp: [
{ name: "", mobile: "", remark: "" }, { name: "", mobile: "", remark: "" },
], ],
info:{} info:{},
isPast:false
}; };
}, },
created() { created() {
@ -64,10 +65,18 @@ export default {
} }
}, },
methods: { methods: {
checkIfPast() {
const currentTimestamp = Date.now();
const specifiedTimestamp = new Date(this.info.cutOffTime.replace(/-/g, '/')).getTime();
this.isPast = specifiedTimestamp < currentTimestamp;
},
async detail(id){ async detail(id){
let res = await detail(id) let res = await detail(id)
if(res){ if(res){
this.info = res this.info = res;
if(res.cutOffTime){
this.checkIfPast()
}
} }
}, },
handelAddResi() { handelAddResi() {

4
src/views/activity/index.vue

@ -10,11 +10,11 @@
<div class="time gray font-size14">时间{{ item.startTime }}</div> <div class="time gray font-size14">时间{{ item.startTime }}</div>
<div class="flex flex-end" v-if="item.online === 1"> <div class="flex flex-end" v-if="item.online === 1">
<div> <div>
<span>报名人数</span> <span class="font-size18 orange">{{ item.participants }}</span>/<span <span>报名人数</span> <span class="font-size18 orange">{{ item.currentParticipants }}</span>/<span
class="font-size14">{{ item.participants }}</span> class="font-size14">{{ item.participants }}</span>
</div> </div>
<van-button type="info" size="small" round @click="handelClickJump('activityDetail',item)" <van-button type="info" size="small" round @click="handelClickJump('activityDetail',item)"
:disabled="item.online !== 1">报名</van-button> :disabled="new Date(item.cutOffTime.replace(/-/g, '/')).getTime()<Date.now()">报名</van-button>
</div> </div>
</div> </div>
</div> </div>

10
src/views/home/index.vue

@ -45,7 +45,7 @@
</div> </div>
<div class="flex flex-centr2 flex-mean m-top18"> <div class="flex flex-centr2 flex-mean m-top18">
<div class="flex-y flex flex-center1 flex-center2 nav font-size13 " v-for="(item, index) in tabList" <div class="flex-y flex flex-center1 flex-center2 nav font-size13 " v-for="(item, index) in tabList"
@click="handelClickJump(item.path)" :key="index"> @click="handelClickJump(item.path,'tab')" :key="index">
<img :src="item.imgSrc" alt=""> <img :src="item.imgSrc" alt="">
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
</div> </div>
@ -64,11 +64,11 @@
<div class="time gray font-size14">时间{{ item.startTime }}</div> <div class="time gray font-size14">时间{{ item.startTime }}</div>
<div class="flex flex-end"> <div class="flex flex-end">
<div> <div>
<span>报名人数</span> <span class="font-size18 orange">{{ item.participants }}</span>/<span <span>报名人数</span> <span class="font-size18 orange">{{ item.currentParticipants }}</span>/<span
class="font-size14">{{ item.participants }}</span> class="font-size14">{{ item.participants }}</span>
</div> </div>
<van-button type="info" size="small" round @click="handelClickJump(`activityDetail`,item)" <van-button type="info" size="small" round @click="handelClickJump(`activityDetail`,item)"
:disabled="item.online !== 1">报名</van-button> :disabled="new Date(item.cutOffTime.replace(/-/g, '/')).getTime()<Date.now()">报名</van-button>
</div> </div>
</div> </div>
</div> </div>
@ -199,7 +199,6 @@ export default {
if(item.coverPic){ if(item.coverPic){
this.$router.push({name:'communityPublicityDetail',query:{item:JSON.stringify(item)}}) this.$router.push({name:'communityPublicityDetail',query:{item:JSON.stringify(item)}})
} }
}, },
async querystaffmessage(){ async querystaffmessage(){
let parm = { let parm = {
@ -297,7 +296,6 @@ export default {
let res = await communityPublicity(parm) let res = await communityPublicity(parm)
if (res) { if (res) {
this.PublicityList = res.list.slice(0, 2) this.PublicityList = res.list.slice(0, 2)
console.log(this.PublicityList,"s dsfd fs");
this.PublicityListImg = res.list.filter((item)=>item.coverPic) this.PublicityListImg = res.list.filter((item)=>item.coverPic)
} }
}, },
@ -317,7 +315,7 @@ export default {
} }
}, },
handelClickJump(path,item) { handelClickJump(path,item) {
if (path === 'event' || path === 'service' || path === 'activity') { if (path === 'event' || path === 'service' || path === 'activity' || path === 'Enjoyableservices' || item === 'tab') {
if (this.$store.state.app.userInfo.mobile) { if (this.$store.state.app.userInfo.mobile) {
this.$router.push({ path: `/${path}` }); this.$router.push({ path: `/${path}` });
} else { } else {

2
src/views/selectAgency/index.vue

@ -11,7 +11,7 @@
</div> </div>
</span> </span>
</div> </div>
<van-button v-show="false" type="info" size="small" round class="m-right10">手动选择</van-button> <van-button type="info" size="small" round class="m-right10">手动选择</van-button>
</div> </div>
<div class="container"> <div class="container">
<van-list finished-text="没有更多了" class="selectAgency"> <van-list finished-text="没有更多了" class="selectAgency">

4
vue.config.js

@ -8,10 +8,10 @@ const resolve = dir => path.join(__dirname, dir)
const name = defaultSettings.title || 'vue mobile template' const name = defaultSettings.title || 'vue mobile template'
// 生产环境,测试和正式 // 生产环境,测试和正式
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV) const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
const PUBLIC_PATH = process.env.PUBLIC_PATH
const { defineConfig } = require('@vue/cli-service') const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({ module.exports = defineConfig({
publicPath: process.env.NODE_ENV === 'development' ? '/' : '', // 署应用包时的基本 URL。 vue-router hash 模式使用 publicPath: process.env.NODE_ENV === 'development' ? '/' : PUBLIC_PATH, // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: process.env.NODE_ENV === 'development' ? '/' : '/h5', //署应用包时的基本 URL。 vue-router history模式使用 // publicPath: process.env.NODE_ENV === 'development' ? '/' : '/h5', //署应用包时的基本 URL。 vue-router history模式使用
outputDir: `dist/${OUTPUT_FILE_NAME}`, // 生产环境构建文件的目录 outputDir: `dist/${OUTPUT_FILE_NAME}`, // 生产环境构建文件的目录
assetsDir: 'static', // outputDir的静态资源(js、css、img、fonts)目录 assetsDir: 'static', // outputDir的静态资源(js、css、img、fonts)目录

Loading…
Cancel
Save