Browse Source

fix:添加更新版本号、修改党员服务、活动风采查询

master
xiaohei 1 year ago
parent
commit
8346af3f39
8 changed files with 135 additions and 8 deletions
  1. +1
    -0
      index.html
  2. +14
    -0
      src/App.vue
  3. +8
    -4
      src/packages/people/pages/activity-mien/detail.vue
  4. +2
    -2
      src/packages/people/pages/activity-mien/index.vue
  5. +18
    -1
      src/packages/people/pages/party-newspaper/index.vue
  6. +83
    -0
      src/packages/people/pages/volunteering/index.vue
  7. +6
    -1
      src/pages.json
  8. +3
    -0
      src/utils/version.json

+ 1
- 0
index.html View File

@@ -2,6 +2,7 @@
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="720000">
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))


+ 14
- 0
src/App.vue View File

@@ -14,6 +14,20 @@
// console.log('微信全局配置:', __wxConfig);
}

let params = {
"version": "1.0.10"
}

// 路由中判断 version 是否是最新版本
let oldV = localStorage.getItem('version');

if (oldV != params.version) {
//如果有更新,保存最新版本
localStorage.setItem('version',params.version)
//帮用户刷新页面
window.location.reload();
}
// 微信API支持Promise风格
promisifyAll();
export default {


+ 8
- 4
src/packages/people/pages/activity-mien/detail.vue View File

@@ -1,6 +1,5 @@
<template>
<view>
<custom-nav-bar position="fixed" color="black" left-text="" left-arrow />

<view class="dateil">
<view class="title multi-line">{{detailObj.activityTitle}}</view>
@@ -8,9 +7,10 @@
<view class="nickName">发布人:{{detailObj.userName}}</view>
<view class="time">{{getDateTime(detailObj.createTime,1)}}</view>
</view>

<view class="line"></view>
<mp-html class="rich-text" :content="detailObj.activityContent" />
</view>
<view style="height: 100rpx;"></view>
<view style="padding: 60rpx 20rpx;">
<mp-html class="rich-text" :content="detailObj.activityContent" />
</view>
</view>
</template>
@@ -50,7 +50,11 @@

<style lang="less" scoped>
.dateil {
position: fixed;
top: 88rpx;
width: 100%;
padding: 10rpx 40rpx;
background-color: #fff;

.title {
font-size: 34rpx;


+ 2
- 2
src/packages/people/pages/activity-mien/index.vue View File

@@ -5,7 +5,7 @@
<view class="search">
<view class="flex flex-between search-input">
<input class="input" :value="searchValue" type="text" confirm-type="search"
placeholder-class="placeholder-style" placeholder="请输入搜索商户名称" @input="onSearch" @confirm="onChange" />
placeholder-class="placeholder-style" placeholder="请输入搜索活动标题" @input="onSearch" @confirm="onChange" />
<view class="search-icon flex flex-center" @click="onSearch">
<image class="imgage" src="/static/images/search.png"></image>
</view>
@@ -91,7 +91,7 @@
pageSize: 10,
};
if (this.searchValue) {
param.key = this.searchValue;
param.activityTitle = this.searchValue;
}
const res = await peopleApi.activityPageApi(param);
if (res.data) {


+ 18
- 1
src/packages/people/pages/party-newspaper/index.vue View File

@@ -75,6 +75,7 @@
<script>
import * as peopleApi from '@/api/peopleApi';
import * as publicApi from '@/api/publicApi';
import * as myApi from '@/api/myApi'; // 我的
import utils from '@/utils/util.map'
export default {
data() {
@@ -101,12 +102,15 @@
},
onLoad(option) {
this.option = option
this.userRoles = uni.getStorageSync('userRoles')
this.userRoles = uni.getStorageSync('userRoles') || uni.getStorageSync('roles')[0]
this.getTypeApi('people_volunteer_project_serviceStatus', 'statusList');
this.recursionApi();
this.volunteerProject();
this.newsPageApi(false)
},
onShow() {
this.getUserInfo();
},
methods: {
headerUserRoles(item, key) {
if (item.remark !== '') {
@@ -124,6 +128,15 @@
getStatusText(list, key) {
return utils.getStatusText(list, key)
},
// 获取我的信息
async getUserInfo() {
const res = await myApi.getProfileUserInfoApi();
if (res.data) {
this.userInfo = res.data
this.userInfo.userId = res.data.id
uni.setStorageSync("userInfoData", this.userInfo);
}
},
// 获取群众点单字典
async getTypeApi(dictType, list) {
const res = await publicApi.getDictDataApi({
@@ -140,6 +153,8 @@
const res = await peopleApi.volunteerProjectApi({
pageNo: this.voluntPageNo,
pageSize: 10,
communityId:uni.getStorageSync('userInfoData').communityId,
// villageId:uni.getStorageSync('userInfoData').villageId
});
if (res.data) {
this.volunteerProjectList = res.data.list
@@ -186,6 +201,8 @@
const param = {
pageNo: 1,
pageSize: 10,
communityId:uni.getStorageSync('userInfoData').communityId,
// villageId:uni.getStorageSync('userInfoData').villageId
};
if (this.searchValue) {
param.title = this.searchValue;


+ 83
- 0
src/packages/people/pages/volunteering/index.vue View File

@@ -3,6 +3,33 @@
<custom-nav-bar position="fixed" color="black" left-text="志愿服务发布" left-arrow />

<view class="form-list">
<view class="form-body form-col">
<view class="label">
<text>常住地社区</text>
<text class="red">*</text>
</view>
<view class="label-value picker flex flex-v-center flex-between">
<view :class="form.communityId ? 'picker-line' : 'picker-text'" data-name="常住地社区" @tap="onOpenVisible">
{{ form.communityName }}
</view>
<image class="ic-xia" src="/static/packages/people/images/ic-xia.png" @tap="onOpenVisible"></image>
</view>
</view>

<view class="form-body form-col">
<view class="label">
<text>服务地点</text>
<!-- <text class="red">*</text> -->
</view>
<view class="label-value picker flex flex-v-center flex-between">
<input class="flex1 textarea-class" @input="headleInput" :value="form.servicePoint" type="text" data-name="servicePoint"
placeholder="请输入服务地点" />
<!-- <view :class="form.villageId ? 'picker-line' : 'picker-text'" @tap="onOpenVisible">{{ form.villageName }}
</view>
<image class="ic-xia" src="/static/packages/people/images/ic-xia.png" @tap="onOpenVisible"></image> -->
</view>
</view>

<view class="form-body">
<view class="flex flex-v-center flex-between">
<view class="label">
@@ -102,6 +129,11 @@
<van-button v-if="checked" @click="handSubmit" block color="#FE3B53">发布信息</van-button>
<van-button v-else disabled block color="#C1C1C1">发布信息</van-button>
</view>
<van-popup v-model:show="isVisible" round position="bottom">
<van-cascader v-model="currentValue" :title="cascaderTitle" :options="optionData" :field-names="defaultFieldNames"
@finish="onCloseVisible" @close="onCloseVisible" @change="onChangeVisible" />
</van-popup>

</view>
</template>
@@ -130,17 +162,42 @@
effectDate: '',
serviceStatus: '',
serviceStatusName: '',
communityId: '',
communityName: '请选择',
villageId: '',
villageName: '请选择',
},
checked: false,

minDate: new Date(2020, 0, 1),
maxDate: new Date(2025, 5, 1),

// 级连选择器数据 start
cascaderTitle: '',
isVisible: false,
FiledVisible: true,

optionData: [],
currentTile: '请选择',

// 选择后的名称
currentValue: null,

// 选择后的id
// 级联选择默认显示字段
// 级连选择器数据 end
defaultFieldNames: {
text: 'name',
value: 'id',
children: 'children'
},
}
},
onLoad(options) {
this.options = options
this.getTypeApi('people_volunteer_project_type', 'projectTypeList');
this.getTypeApi('people_volunteer_project_serviceStatus', 'serviceStatusList');
this.deptTreeApi();
},
methods: {
// 获取群众点单字典
@@ -154,6 +211,13 @@
this[list] = res.data.list
}
},
async deptTreeApi() {
// 获取所在村/社区
const res = await publicApi.deptTreeApi();
if (res.data && res.data.length) {
this.optionData = res.data
}
},
bindPickerChange(e) {
const {
name,
@@ -192,6 +256,7 @@
this.appealEnclosure.push(res.data);
},
beforeDelete(file, dateil) {
this.fileList.splice(dateil.index, 1);
this.appealEnclosure.splice(dateil.index, 1);
},
handSubmit() {
@@ -244,6 +309,24 @@
});
}
},
onOpenVisible(e) {
this.isVisible = true
this.cascaderTitle = e.currentTarget.dataset.name
},

onCloseVisible() {
this.isVisible = false
},

onChangeVisible(e) {
if (this.cascaderTitle === '常住地社区') {
this.form.communityName = e.selectedOptions[e.tabIndex].name
this.form.communityId = e.value
} else {
this.form.villageName = e.selectedOptions[e.tabIndex].name
this.form.villageId = e.value
}
}
}
}
</script>


+ 6
- 1
src/pages.json View File

@@ -260,7 +260,12 @@
{
"path": "pages/activity-mien/detail",
"name": "people",
"style": {}
"style": {
"navigationBarTitleText": "",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/volunteering/index",


+ 3
- 0
src/utils/version.json View File

@@ -0,0 +1,3 @@
{
"version":"1.0"
}

||||||
x
 
000:0
Loading…
Cancel
Save