27 files modified
3 files added
| | |
| | | }, { |
| | | "path": "pages/voting/vote", |
| | | "style": { |
| | | "navigationBarTitleText": "投票发起", |
| | | "navigationBarTitleText": "参与投票", |
| | | "navigationBarBackgroundColor": "#103289", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | ], |
| | | ,{ |
| | | "path" : "pages/voting/votRanking", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "投票排名", |
| | | "navigationBarBackgroundColor": "#103289", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | |
| | | } |
| | | ], |
| | | "globalStyle": { //将组件安装在项目的components目录下,并符合components/组件名称/组件名称.vue目录结构。可以不用引用、注册,直接在页面中使用。 |
| | | "autoscan": true |
| | | }, |
| | |
| | | <u-row gutter="16"> |
| | | <u-col span="7"> |
| | | <view class="bom-text">当前积分</view> |
| | | <view class="bom-int">483</view> |
| | | <view class="bom-int">{{dqjf}}</view> |
| | | </u-col> |
| | | <u-col span="5"> |
| | | <view class="bom-text">累计积分</view> |
| | | <view class="bom-int">856</view> |
| | | <view class="bom-int">{{ljjf}}</view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | |
| | | <view v-for="i in data" class="advisory-model" @click="goDetail(i)"> |
| | | <view class="advisory-left"> |
| | | <view class="advisory-title-top"> |
| | | <view class="advisory-title">{{i.title}}</view> |
| | | <view class="advisory-title">{{i.access}}</view> |
| | | </view> |
| | | <view class="advisory-title-down"> |
| | | <view class="advisory-title-time">{{i.createTime}}</view> |
| | | <view class="advisory-title-time">{{i.time}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="advisory-right"> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dqjf:"暂无", |
| | | ljjf:"暂无", |
| | | list: [{ |
| | | name: '积分明细' |
| | | }, { |
| | |
| | | } |
| | | ], |
| | | value1: 1, |
| | | data: [{ |
| | | title: "义务巡逻", |
| | | integral: "2", |
| | | type:"1", |
| | | createTime: "2021-02-03" |
| | | }, { |
| | | title: "商品兑换", |
| | | integral: "3", |
| | | type:"2", |
| | | createTime: "2021-02-03" |
| | | }, { |
| | | title: "视频浏览", |
| | | integral: "4", |
| | | type:"1", |
| | | createTime: "2021-02-03" |
| | | }, ], |
| | | data: [], |
| | | swiperHeight: 0 |
| | | } |
| | | }, |
| | | methods: { |
| | | onLoad() { |
| | | this.getData(1); |
| | | }, |
| | | getData(e){ |
| | | var that = this; |
| | | uni.request({ |
| | | url:that.$store.state.piAPI + '/integral/selectCount?uid='+this.$store.state.puserID+"&type="+e, |
| | | method:'POST', |
| | | success(res) { |
| | | that.dqjf = res.data.data.sjf; |
| | | that.ljjf = res.data.data.zjf.integral; |
| | | that.data = res.data.data.list; |
| | | } |
| | | }); |
| | | }, |
| | | goDetail() { |
| | | |
| | | }, |
| | | change(e){ |
| | | alert(e) |
| | | this.getData(e); |
| | | }, |
| | | onReady() { |
| | | let that = this; |
| | |
| | | query |
| | | .select('#articleBox') |
| | | .boundingClientRect(data => { |
| | | |
| | | that.swiperHeight = (safeArea.bottom - data.top - 50); |
| | | |
| | | }) |
| | | .exec(); |
| | | } |
| | |
| | | <scroll-view id="articleBox" :style="{ height: swiperHeight + 'px' }" class="article-content" scroll-y |
| | | style="width: 100%; margin-top: 15rpx;"> |
| | | <view v-for="(i, index) in data" class="advisory-model"> |
| | | <u-cell-group> |
| | | <u-cell-group > |
| | | <u-cell-item :arrow='false' icon="man-add" @click="goDetail(index)" :title="i.organization" |
| | | :label="i.time.substring(0,11)" |
| | | :value="i.type=='0'?'审核中':i.type=='1'?'通过':i.type=='2'?'未通过':'未通过'"> |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | .article-content{ |
| | | margin-top: 40rpx !important; |
| | | } |
| | | |
| | | /* 搜索框 */ |
| | | .search-ico, |
| | | .search-ico-1 { |
| | |
| | | query |
| | | .select('#articleBox') |
| | | .boundingClientRect(data => { |
| | | |
| | | that.swiperHeight = (safeArea.bottom - data.top - 50); |
| | | |
| | | }) |
| | |
| | | <view class="list"> |
| | | <u-grid :col="4" :border="false"> |
| | | <u-grid-item bg-color="transparent"> |
| | | <navigator url="/pages/alarm_list/alarm_list" hover-class="none" class="nav-item"> |
| | | <navigator url="" hover-class="none" class="nav-item"> |
| | | <image src="../../static/workbench/task1.png" mode="widthFix" class="nav-item-img"></image> |
| | | <view class="nav-item-name">群防任务</view> |
| | | </navigator> |
| | |
| | | </navigator> |
| | | </u-grid-item> |
| | | <u-grid-item bg-color="transparent"> |
| | | <navigator url="/pages/groupChat/groupChat?txlType=2" hover-class="none" class="nav-item"> |
| | | <!-- url="/pages/groupChat/groupChat?txlType=2" --> |
| | | <navigator hover-class="none" class="nav-item"> |
| | | <image src="../../static/workbench/task8.png" mode="widthFix" class="nav-item-img"></image> |
| | | <view class="nav-item-name">积分商城</view> |
| | | </navigator> |
| | | </u-grid-item> |
| | | <u-grid-item bg-color="transparent"> |
| | | <!-- url="/pages/groupChat/groupChat?txlType=2" --> |
| | | <navigator hover-class="none" class="nav-item"> |
| | | <image src="../../static/workbench/task4.png" mode="widthFix" class="nav-item-img"></image> |
| | | <view class="nav-item-name">通讯录</view> |
| | | </navigator> |
| | |
| | | <u-grid-item bg-color="transparent"> |
| | | <navigator url="/pages/voting/voteManage" hover-class="none" class="nav-item"> |
| | | <image src="../../static/workbench/task5.png" mode="widthFix" class="nav-item-img"></image> |
| | | <view class="nav-item-name">我的投票</view> |
| | | <view class="nav-item-name">参与投票</view> |
| | | </navigator> |
| | | </u-grid-item> |
| | | <u-grid-item bg-color="transparent"> |
| | | <navigator url="/pages/voting/vote" hover-class="none" class="nav-item"> |
| | | <image src="../../static/workbench/task6.png" mode="widthFix" class="nav-item-img"></image> |
| | | <image src="../../static/workbench/task7.png" mode="widthFix" class="nav-item-img"></image> |
| | | <view class="nav-item-name">投票发起</view> |
| | | </navigator> |
| | | </u-grid-item> |
| | | <u-grid-item bg-color="transparent"> |
| | | <navigator url="/pages/voting/votRanking" hover-class="none" class="nav-item"> |
| | | <image src="../../static/workbench/task6.png" mode="widthFix" class="nav-item-img"></image> |
| | | <view class="nav-item-name">投票排行</view> |
| | | </navigator> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | </view> |
| | | </view> |
| | |
| | | { |
| | | name: '群组' |
| | | }, |
| | | { |
| | | name: '通讯录' |
| | | } |
| | | // { |
| | | // name: '通讯录' |
| | | // } |
| | | ], |
| | | swiperHeight: 0, |
| | | zhanwei: '', //因为小程序中底部和顶部栏占位置,uniapp中不占位置 |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | |
| | | label="活动标题" :label-style="{ fontSize: '16px', fontWeight: 'bold' }"> |
| | | <u-input v-model="obj.activityTitle" maxlength="5000" placeholder="请输入活动标题" /> |
| | | </u-form-item> |
| | | <u-form-item :border-bottom="false" left-icon="edit-pen-fill" :left-icon-style="{ fontSize: '16px', color: '#103289' }" |
| | | label="投票介绍" :label-style="{ fontSize: '16px', fontWeight: 'bold' }"> |
| | | <u-form-item :border-bottom="false" left-icon="edit-pen-fill" |
| | | :left-icon-style="{ fontSize: '16px', color: '#103289' }" label="投票介绍" |
| | | :label-style="{ fontSize: '16px', fontWeight: 'bold' }"> |
| | | <u-input v-model="obj.voteIntroduce" maxlength="5000" placeholder="请输入投票介绍" /> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | | |
| | | |
| | | <view class="content_1 voteOptionContent"> |
| | | <view class="titleOption">选项管理</view> |
| | | <u-form label-position="top"> |
| | |
| | | <text>{{ obj.endTime }}</text> |
| | | </view> |
| | | </u-form-item> |
| | | <u-form-item left-icon="grid-fill" :left-icon-style="{ fontSize: '16px', color: '#103289' }" |
| | | <!-- <u-form-item left-icon="grid-fill" :left-icon-style="{ fontSize: '16px', color: '#103289' }" |
| | | label="投票次数" :label-style="{ fontSize: '16px', fontWeight: 'bold' }"> |
| | | <view style="width:100%;text-align: end;" @click="ShowNun()"> |
| | | <text>{{ obj.voteMoreTxt }}</text> |
| | | <u-icon name="arrow-right" color="#103289" size="32"></u-icon> |
| | | </view> |
| | | </u-form-item> |
| | | <u-form-item :border-bottom="false" left-icon="home-fill" :left-icon-style="{ fontSize: '16px', color: '#103289' }" |
| | | label="是否置顶展示" :label-style="{ fontSize: '16px', fontWeight: 'bold' }"> |
| | | </u-form-item> --> |
| | | <u-form-item :border-bottom="false" left-icon="home-fill" |
| | | :left-icon-style="{ fontSize: '16px', color: '#103289' }" label="是否置顶展示" |
| | | :label-style="{ fontSize: '16px', fontWeight: 'bold' }"> |
| | | <u-switch slot="right" v-model="obj.switchVal"></u-switch> |
| | | </u-form-item> |
| | | </u-form> |
| | |
| | | </view> --> |
| | | |
| | | <view class="but"> |
| | | <u-button class="custom-style" type="primary" @click="submitData" :ripple="true">发布投票</u-button> |
| | | <u-button class="custom-style" type="primary" @click="submitData" :ripple="true">发布投票</u-button> |
| | | </view> |
| | | |
| | | <!-- 弹窗 --> |
| | |
| | | this.obj.voteMore = obj[1].value; |
| | | }, |
| | | submitData() { |
| | | var that = this; |
| | | uni.showLoading({ |
| | | title: '发布中' |
| | | }); |
| | |
| | | this.obj.status = 2; |
| | | } |
| | | let app = this; |
| | | uniCloud.callFunction({ |
| | | name: 'add_vote', |
| | | data: this.obj, |
| | | var optionList = this.obj.voteItemlist; |
| | | var option = []; |
| | | for (var i = 0; i < optionList.length; i++) { |
| | | option.push(optionList[i].content) |
| | | } |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/vote/vote/sav?", |
| | | method: 'POST', |
| | | data: { |
| | | "votename": this.obj.activityTitle, |
| | | "introduce": this.obj.voteIntroduce, |
| | | "uid": that.$store.state.UserData.user_id, |
| | | "starttime": this.obj.startTime, |
| | | "endtime": this.obj.endTime, |
| | | "istopping": this.obj.switchVal, |
| | | "type": "1", |
| | | "G": option |
| | | }, |
| | | success(res) { |
| | | uni.hideLoading(); |
| | | if (res.result.code == 200) { |
| | | if (res.data.code == 200) { |
| | | uni.showToast({ |
| | | title: res.result.msg, |
| | | title: "发起成功", |
| | | duration: 2000 |
| | | }); |
| | | setTimeout(() => { |
| | | app.clearData(); |
| | | uni.switchTab({ |
| | | url: '/pages/index/index' |
| | | url: '/pages/business/business' |
| | | }); |
| | | }, 500); |
| | | }, 2000); |
| | | } else { |
| | | app.$refs.uToast.show({ |
| | | title: res.result.msg, |
| | |
| | | position: 'top' |
| | | }); |
| | | } |
| | | }, |
| | | fail(error) { |
| | | uni.hideLoading(); |
| | | app.$refs.uToast.show({ |
| | | title: '发布失败,请稍后重试!', |
| | | type: 'error', |
| | | position: 'top' |
| | | }); |
| | | } |
| | | }); |
| | | // uniCloud.callFunction({ |
| | | // name: 'add_vote', |
| | | // data: this.obj, |
| | | // success(res) { |
| | | // uni.hideLoading(); |
| | | // if (res.result.code == 200) { |
| | | // uni.showToast({ |
| | | // title: res.result.msg, |
| | | // duration: 2000 |
| | | // }); |
| | | // setTimeout(() => { |
| | | // app.clearData(); |
| | | // uni.switchTab({ |
| | | // url: '/pages/index/index' |
| | | // }); |
| | | // }, 500); |
| | | // } else { |
| | | // app.$refs.uToast.show({ |
| | | // title: res.result.msg, |
| | | // type: 'error', |
| | | // position: 'top' |
| | | // }); |
| | | // } |
| | | // }, |
| | | // fail(error) { |
| | | // uni.hideLoading(); |
| | | // app.$refs.uToast.show({ |
| | | // title: '发布失败,请稍后重试!', |
| | | // type: 'error', |
| | | // position: 'top' |
| | | // }); |
| | | // } |
| | | // }); |
| | | } else { |
| | | uni.hideLoading(); |
| | | } |
| | |
| | | font-family: Source Han Sans CN; |
| | | font-weight: 500; |
| | | color: #000000; |
| | | |
| | | |
| | | &::before { |
| | | content |
| | | : ""; |
| | | content: ""; |
| | | display: block; |
| | | width: 5rpx; |
| | | height: 36rpx; |
| | |
| | | line-height: 86rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx; |
| | | background-color: #103289; |
| | | background-color: #103289 !important; |
| | | color: #ffffff; |
| | | } |
| | | |
| | |
| | | <template> |
| | | <view> |
| | | |
| | | <view class="vote-bg"> |
| | | <u-tabs :list="list" bg-color="#f7f7f7" :is-scroll="false" :current="current" @change="change"></u-tabs> |
| | | |
| | | <view style="padding: 20rpx 30rpx 0rpx 30rpx;"> |
| | | <u-search height="80" placeholder="请输入关键字" shape="square" :show-action="false" v-model="keyword"></u-search> |
| | | </view> |
| | | |
| | | <scroll-view id="articleBox" :style="{ height: swiperHeight + 'px' }" class="article-content" scroll-y |
| | | style="width: 100%; margin-top: 100rpx;"> |
| | | <view v-for="i in data" class="advisory-model" @click="goDetail(i)"> |
| | | <view class="advisory-left"> |
| | | <view class="advisory-title-top"> |
| | | <view class="advisory-title">{{i.votename}}</view> |
| | | </view> |
| | | <view class="advisory-title-down"> |
| | | <view class="advisory-title-name">{{i.introduce}}</view> |
| | | <view class="advisory-title-time">截止{{i.endtime.substring(0,11)}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="advisory-right"> |
| | | <image src="../../static/workbench/task7.png"></image> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | list: [{ |
| | | name: '正在进行' |
| | | }, { |
| | | name: '已投票' |
| | | }], |
| | | current: 0, |
| | | swiperHeight: 0, |
| | | data: [], |
| | | keyword: '', |
| | | } |
| | | }, |
| | | onReady() { |
| | | let that = this; |
| | | uni.getSystemInfo({ |
| | | success(e) { |
| | | console.log(e); |
| | | let { |
| | | windowWidth, |
| | | windowHeight, |
| | | safeArea |
| | | } = e; |
| | | const query = uni.createSelectorQuery().in(that); |
| | | query |
| | | .select('#articleBox') |
| | | .boundingClientRect(data => { |
| | | that.swiperHeight = (safeArea.bottom - data.top - 50); |
| | | }) |
| | | .exec(); |
| | | } |
| | | }); |
| | | }, |
| | | onLoad() { |
| | | this.getVoteData(); |
| | | }, |
| | | methods: { |
| | | |
| | | change(index) { |
| | | this.current = index; |
| | | }, |
| | | getVoteData(){ |
| | | var that = this; |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/vote/vote/page?", |
| | | method: 'GET', |
| | | data: { |
| | | |
| | | }, |
| | | success(res) { |
| | | that.data = res.data.data.records; |
| | | } |
| | | }); |
| | | }, |
| | | goDetail(e){ |
| | | uni.navigateTo({ |
| | | url: './voteDetail?detailData=' + (JSON.stringify(e)) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | <style lang="scss" scoped> |
| | | .vote-bg { |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: #f7f7f7; |
| | | |
| | | .article-content { |
| | | margin-top: 0.5rem !important; |
| | | width: 100%; |
| | | // background-color: #00FF00; |
| | | |
| | | .advisory-model { |
| | | width: 94%; |
| | | margin: 0 auto; |
| | | height: 4.5rem; |
| | | background-color: #FFF; |
| | | border-radius: 8px; |
| | | margin-top: 0.5rem; |
| | | |
| | | |
| | | .advisory-left { |
| | | width: 64%; |
| | | height: 80%; |
| | | float: left; |
| | | position: relative; |
| | | // background-color: #00FFFF; |
| | | position: relative; |
| | | left: 3%; |
| | | top: 10%; |
| | | |
| | | |
| | | .advisory-title-top { |
| | | // background-color: #2692FD; |
| | | width: 100%; |
| | | height: 75%; |
| | | |
| | | .advisory-title { |
| | | width: 92%; |
| | | font-size: 15px; |
| | | font-weight: 550; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | .advisory-title-down { |
| | | // background-color: #0078A8; |
| | | width: 100%; |
| | | height: 25%; |
| | | font-size: 12px; |
| | | font-weight: 550; |
| | | color: #808080; |
| | | |
| | | .advisory-title-name { |
| | | width: 240rpx; |
| | | float: left; |
| | | letter-spacing: 1px; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 1; |
| | | -webkit-box-orient: vertical; |
| | | // background-color:#0078A8; |
| | | } |
| | | |
| | | .advisory-title-time { |
| | | position: relative; |
| | | left: 30rpx; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .advisory-right { |
| | | // background-color: #222222; |
| | | width: 33%; |
| | | height: 80%; |
| | | left: 65%; |
| | | position: relative; |
| | | top: 10%; |
| | | |
| | | image { |
| | | position: relative; |
| | | left: 120rpx; |
| | | top: -90%; |
| | | width: 90rpx; |
| | | height: 90rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | logPath: '', |
| | | piAPI: 'http://223.82.109.183:2082/api/', |
| | | //piAPI: 'http://192.168.0.110:83/', |
| | | //piAPI: 'http://192.168.1.100:83/', |
| | | puserName: '', |
| | | puserID: '', |
| | | puserIphone: '', |