Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
| | |
| | | try { |
| | | const list = [{ |
| | | id: '1', |
| | | img: '/static/images/home/homeTop1.png', |
| | | url: '' |
| | | img: 'http://223.82.109.183:2081/zhba/upload/20210913/3d9fd42a80094268ab83fdd3bcb18541.jpg', |
| | | url: '../article/article_detail?detailData=' + '{"id":"119"}' |
| | | }, { |
| | | id: '2', |
| | | img: '/static/images/home/homeTop2.png', |
| | | url: '' |
| | | img: 'http://223.82.109.183:2081/zhba/upload/20220216/b3d4c45eb7202974b3155318914df829.jpg', |
| | | url: '../article/article_video?detailData=' + '{"id":981,"title":"千万别被“冰墩墩”的诱惑冲昏头 小心被盯上!","content":"","url":"http://223.82.109.183:2081/zhba/upload/20220216/b3d4c45eb7202974b3155318914df829.jpg","videoUrl":"http://223.82.109.183:2081/zhba/upload/depl/aed8c0b92b8f49b18c7c2d5056290af8.mp4","createTime":"2022-02-15 00:00:00","updateTime":"2022-02-16 22:49:21","sourceId":"","sourceName":"中国警察网","articleType":"ksp003","recommend":-1,"publish":"0","iscomment":"","iswords":"0","wordsContent":"","type":0}' |
| | | }, { |
| | | id: '3', |
| | | img: '/static/images/home/homeTop3.png', |
| | |
| | | onPosition: false, //持续定位指示 |
| | | }, |
| | | methods: { |
| | | setUniAppMsg(state, data) { |
| | | let that = this; |
| | | |
| | | state == "hBackMsg" ? window.parent.hBackMsg(data); |
| | | state == "setIntLat" ? window.parent.setIntLat({ |
| | | rid: that.data.id, |
| | | fn: (out) => { |
| | | // console.log(out,"1111"); |
| | | // that.addIcon(out); |
| | | that.addIcon([out[1], out[0]]); |
| | | unis(data) { |
| | | //向uniapp传值 |
| | | uni.postMessage({ |
| | | data: { |
| | | action: data |
| | | } |
| | | }); |
| | | state == "showTip" ? that.parent.showTip("获取定位失败"); |
| | | }, |
| | | setUniAppMsg(state, data) { |
| | | let that = this; |
| | | if (window.parent) { |
| | | console.log("有window.parent") |
| | | if (state == "hBackMsg") { |
| | | window.parent.hBackMsg(data); |
| | | } |
| | | if (state == "setIntLat") { |
| | | window.parent.setIntLat({ |
| | | rid: that.data.id, |
| | | fn: (out) => { |
| | | // console.log(out,"1111"); |
| | | // that.addIcon(out); |
| | | that.addIcon([out[1], out[0]]); |
| | | } |
| | | }); |
| | | } |
| | | if (state == "showTip") { |
| | | that.parent.showTip("获取定位失败"); |
| | | } |
| | | } else { |
| | | console.log("没window.parent") |
| | | if (state == "hBackMsg") { |
| | | // window.parent.hBackMsg(data); |
| | | that.unis("hBackMsg") |
| | | } |
| | | if (state == "setIntLat") { |
| | | // window.parent.setIntLat({ |
| | | // rid: that.data.id, |
| | | // fn: (out) => { |
| | | // // console.log(out,"1111"); |
| | | // // that.addIcon(out); |
| | | // that.addIcon([out[1], out[0]]); |
| | | // } |
| | | // }); |
| | | that.unis("setIntLat") |
| | | } |
| | | if (state == "showTip") { |
| | | // that.parent.showTip("获取定位失败"); |
| | | that.unis("showTip") |
| | | } |
| | | |
| | | } |
| | | }, |
| | | openAPP(type) { |
| | | // console.log(type) |
| | |
| | | }); |
| | | } else if (that.data.butCT == "begin") { |
| | | // 开始任务 |
| | | that.setUniAppMsg({ |
| | | that.setUniAppMsg("hBackMsg", { |
| | | type: "start", |
| | | data: { |
| | | id: that.data.id, |
| | |
| | | if (typeof res.intlat === "string") { |
| | | // that.parent.showTip("获取定位失败") |
| | | //向uniapp传值 |
| | | that.setUniAppMsg("showTip") |
| | | |
| | | } else { |
| | | that.addIcon([res.intlat[1], res.intlat[0]]); |
| | |
| | | }); |
| | | this.domMove.init(); |
| | | // console.log(window.parent.setIntLat) |
| | | that.setUniAppMsg("setIntLat") |
| | | // window.parent.setIntLat({ |
| | | // rid: this.data.id, |
| | | // fn: (out) => { |
| | |
| | | :style="titleNum==index? 'color:#000000':'color:#808080'">{{item}}</view> |
| | | </view> --> |
| | | <view> |
| | | <u-dropdown style="height:0rpx"> |
| | | <u-dropdown style="height:0rpx" @open="open"> |
| | | <u-dropdown-item v-model="value1" title="看新闻" @change="change" :options="options1"></u-dropdown-item> |
| | | <u-dropdown-item v-model="value1" title="看视频" @change="change" :options="options2"></u-dropdown-item> |
| | | <u-dropdown-item v-model="value1" title="行业圈" @change="change" :options="options3"></u-dropdown-item> |
| | | <u-dropdown-item v-model="value1" title="看现场" @change="change" :options="options4"></u-dropdown-item> |
| | | </u-dropdown> |
| | | </view> |
| | | |
| | | <view> |
| | | <view class="search-block" style="height: 35px"> |
| | | <view class="search-ico-wapper"> |
| | |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | <scroll-view id="articleBox" :style="{ height: swiperHeight + 'px' }" class="article-content" scroll-y |
| | | style="width: 100%; margin-top: 100rpx;" :refresher-enabled="refresherFlag" :refresher-threshold="threshold" |
| | | :refresher-triggered="triggered" @refresherrefresh="refreshing" @refresherrestore="refresherrestore"> |
| | | <view style="text-align: center;"> |
| | | <u-loading size="90" mode="flower" :show="loading"></u-loading> |
| | | </view> |
| | | <view v-for="i in data" class="advisory-model" @click="goDetail(i)"> |
| | | <view class="advisory-left"> |
| | | <view class="advisory-title-top"> |
| | |
| | | </scroll-view> |
| | | |
| | | <!-- <view class="article-content"> |
| | | |
| | | </view> --> |
| | | |
| | | |
| | | <u-toast ref="uToast" /> |
| | | <!-- 底部导航条 --> |
| | | <u-tabbar :list="tabbar" :mid-button="true"></u-tabbar> |
| | | </view> |
| | |
| | | return { |
| | | // pathUrl:"http://localhost:89/", |
| | | pathUrl: this.$store.state.piAPI + "", |
| | | loading:true,//加载动画 |
| | | page: 1, |
| | | pagesize: 99999, |
| | | pagesize: 20, |
| | | status: 'loadmore', |
| | | // loadStatus:'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式 |
| | | isLoadMore: false, //是否加载中 |
| | |
| | | { |
| | | label: '知识讨论', |
| | | value: 'hyq003', |
| | | }, { |
| | | label: '个人', |
| | | value: 'hyq004', |
| | | } |
| | | ], |
| | | options4: [{ |
| | |
| | | query |
| | | .select('#articleBox') |
| | | .boundingClientRect(data => { |
| | | that.swiperHeight = (safeArea.bottom - data.top - 50); |
| | | that.swiperHeight = (safeArea.bottom - data.top - 70); |
| | | |
| | | }) |
| | | .exec(); |
| | |
| | | |
| | | //上拉加载更多 |
| | | onReachBottom() { |
| | | console.log(2323232) |
| | | if (this.status == 'nomore') return; |
| | | this.page = ++this.page; |
| | | setTimeout(() => { |
| | |
| | | let detail = { |
| | | id: e.id |
| | | }; |
| | | if(e.articleType.indexOf("ksp") != -1){ |
| | | if (e.articleType.indexOf("ksp") != -1) { |
| | | //去跳转 |
| | | uni.navigateTo({ |
| | | url: './article_video?detailData=' + (JSON.stringify(e)) |
| | | }); |
| | | }else{ |
| | | } else { |
| | | //去跳转 |
| | | uni.navigateTo({ |
| | | url: './article_detail?detailData=' + JSON.stringify(detail) |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | //on input 通过 keyword 关键字查询 |
| | | getKeyword() { |
| | |
| | | data: paramData, |
| | | success: (res) => { |
| | | if (res.data.code == 200) { |
| | | that.loading = false; |
| | | if (res.data.data.records) { |
| | | //如果总数小于pageSize,不做其他操作 |
| | | if (res.data.data.total < that.pagesize) { |
| | |
| | | if (res.data.data.records.length < that.pagesize) { |
| | | //如果数量小于分页数量,则为最后一页 |
| | | that.status = 'nomore' |
| | | } else { |
| | | } else { |
| | | //否则继续加载更多数据 |
| | | that.status = 'loading'; |
| | | } |
| | |
| | | change(e) { |
| | | this.page = 1; |
| | | this.getArtcilePageList(e); |
| | | }, |
| | | open(e) { |
| | | if (e >= 2) { |
| | | this.$refs.uToast.show({ |
| | | title: '功能研发中', |
| | | type: 'warning', |
| | | }) |
| | | } |
| | | }, |
| | | refreshing() { |
| | | if (this.isRefreshing) { |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | |
| | | </style> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | <view class="title">常用工具</view> |
| | | <view class="list"> |
| | | <u-grid :col="4" :border="false"> |
| | | <u-grid-item bg-color="transparent"> |
| | | <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> |
| | | </u-grid-item> |
| | | <u-grid-item bg-color="transparent"> |
| | | <navigator url="/pages/patrol/patrol" hover-class="none" class="nav-item"> |
| | | <image src="../../static/workbench/task2.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/reported/reported" hover-class="none" class="nav-item"> |
| | | <image src="../../static/workbench/task3.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/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> |
| | | <u-grid-item bg-color="transparent" v-for="(item, index) in dataOne" :key="index"> |
| | | <navigator hover-class="none" class="nav-item" @click="goBusinessPage(item.url,index)"> |
| | | <image :src="item.img" mode="widthFix" class="nav-item-img"></image> |
| | | <view class="nav-item-name">{{item.title}}</view> |
| | | </navigator> |
| | | </u-grid-item> |
| | | </u-grid> |
| | |
| | | <view class="title">管理</view> |
| | | <view class="list"> |
| | | <u-grid :col="4" :border="false"> |
| | | <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> |
| | | </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/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> |
| | | <u-grid-item bg-color="transparent" v-for="(item, index) in dataTwo" :key="index"> |
| | | <navigator hover-class="none" class="nav-item" @click="goBusinessPage(item.url,index)"> |
| | | <image :src="item.img" mode="widthFix" class="nav-item-img"></image> |
| | | <view class="nav-item-name">{{item.title}}</view> |
| | | </navigator> |
| | | </u-grid-item> |
| | | </u-grid> |
| | |
| | | </view> |
| | | |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | <!-- 底部导航条 --> |
| | | <u-tabbar :list="tabbar" :mid-button="true"></u-tabbar> |
| | | </view> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | tabbar:this.$store.state.tabbar |
| | | tabbar:this.$store.state.tabbar, |
| | | dataOne:[{ |
| | | title:'群防任务', |
| | | img:'../../static/workbench/task1.png', |
| | | url:'' |
| | | },{ |
| | | title:'巡逻任务', |
| | | img:'../../static/workbench/task2.png', |
| | | url:'/pages/patrol/patrol' |
| | | },{ |
| | | title:'事件上报', |
| | | img:'../../static/workbench/task3.png', |
| | | url:'/pages/reported/reported' |
| | | },{ |
| | | title:'积分商城', |
| | | img:'../../static/workbench/task8.png', |
| | | url:'' |
| | | },{ |
| | | title:'通讯录', |
| | | img:'../../static/workbench/task4.png', |
| | | url:'' |
| | | }], |
| | | dataTwo:[{ |
| | | title:'参与投票', |
| | | img:'../../static/workbench/task5.png', |
| | | url:'/pages/voting/voteManage' |
| | | },{ |
| | | title:'投票发起', |
| | | img:'../../static/workbench/task7.png', |
| | | url:'/pages/voting/vote' |
| | | },{ |
| | | title:'投票排行', |
| | | img:'../../static/workbench/task6.png', |
| | | url:'/pages/voting/votRanking' |
| | | }] |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | |
| | | |
| | | },mounted(){ |
| | | if(this.$store.state.UserData.stype != "1"){ |
| | | this.$refs.uToast.show({ |
| | | title: '功能暂未开放', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | },methods: { |
| | | //页面跳转 |
| | | goBusinessPage(url,index){ |
| | | if(this.$store.state.UserData.stype != "1"){ |
| | | this.$refs.uToast.show({ |
| | | title: '功能暂未开放', |
| | | type: 'warning', |
| | | }); |
| | | return; |
| | | }else{ |
| | | uni.navigateTo({ |
| | | url:url |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </view> |
| | | <!-- 新闻模块 end --> |
| | | </view> |
| | | |
| | | <u-toast ref="uToast" /> |
| | | <!-- 底部导航条 --> |
| | | <u-tabbar :list="tabbar" :mid-button="true" height="50px" icon-size="40"></u-tabbar> |
| | | </view> |
| | |
| | | let detail = { |
| | | id: e.id |
| | | }; |
| | | |
| | | if(e.articleType.indexOf("ksp") != -1){ |
| | | //去跳转 |
| | | uni.navigateTo({ |
| | |
| | | uni.switchTab({ |
| | | url:url |
| | | }) |
| | | }else if(this.$store.state.UserData.stype != "1"){ |
| | | this.$refs.uToast.show({ |
| | | title: '功能暂未开放', |
| | | type: 'warning', |
| | | }) |
| | | return; |
| | | }else if (index==4){ |
| | | uni.navigateTo({ |
| | | url:'../grabOrders/grabOrders?detailData=' + (JSON.stringify(this.cout)) |
| | | }) |
| | | } |
| | | else{ |
| | | console.log("23232"+url+"dasdsada "+index) |
| | | uni.navigateTo({ |
| | | url:url |
| | | }) |
| | |
| | | getArtcilePageList() { |
| | | var that = this; |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + '/article/article/page', |
| | | url: this.$store.state.piAPI + '/article/article/selectArticleG', |
| | | method: 'GET', |
| | | data: { |
| | | current: this.page, |
| | |
| | | <view class="but"> |
| | | <u-button class="custom-style" type="primary" @click="inits"> 我发布</u-button> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | <u-tabbar :list="tabs" :mid-button="true"></u-tabbar> |
| | | </view> |
| | | </template> |
| | |
| | | inits() { |
| | | var datas = this.form; |
| | | var that = this; |
| | | |
| | | if(this.$store.state.UserData.stype != "1"){ |
| | | this.$refs.uToast.show({ |
| | | title: '功能暂未开放', |
| | | type: 'warning', |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | var content = ""; |
| | | var videoUrl = ""; |
| | | if(datas.c == "文字类"){ |
| | | datas.c = "kxw" |
| | | datas.c = "hyq004" |
| | | content = datas.g; |
| | | }else{ |
| | | datas.c = "ksp" |
| | | datas.c = "hyq004" |
| | | videoUrl = that.videos |
| | | } |
| | | |
| | |
| | | publish: 0, |
| | | url:that.fileList[0].url, |
| | | videoUrl:videoUrl, |
| | | sourceName:"群众", |
| | | content:content |
| | | sourceName:uni.getStorageSync("name"), |
| | | sourceId:uni.getStorageSync("ids"), |
| | | content:content, |
| | | type:"1" |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.code == 200) { |
| | |
| | | </view> |
| | | <uniPopup :textmsg="textmsg" @cancel='operation(1)' @confirm='operation(2)' v-show="showTextmsg"> |
| | | </uniPopup> |
| | | |
| | | <u-toast ref="uToast" /> |
| | | <!-- 底部导航条 --> |
| | | <u-tabbar :list="tabbar" :mid-button="true"></u-tabbar> |
| | | </view> |
| | |
| | | imgSrc: '../../static/myself/souc.png', |
| | | open: 'collect' |
| | | }, |
| | | { |
| | | title: '能量树', |
| | | imgSrc: '../../static/myself/shu.png', |
| | | open: 'chenzs' |
| | | }, |
| | | // { |
| | | // title: '能量树', |
| | | // imgSrc: '../../static/myself/shu.png', |
| | | // open: 'chenzs' |
| | | // }, |
| | | { |
| | | title: '关于我们', |
| | | imgSrc: '../../static/myself/us003.png', |
| | |
| | | }, |
| | | methods: { |
| | | goToAttendance(){ |
| | | |
| | | if(this.$store.state.UserData.stype != "1"){ |
| | | this.$refs.uToast.show({ |
| | | title: '功能暂未开放', |
| | | type: 'warning', |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | uni.navigateTo({ |
| | | url:'../clockSignIn/clockSignIn' |
| | | }) |
| | |
| | | faceco: '#000', |
| | | faceMsg: '', |
| | | roleList: [{ |
| | | label: '群众', |
| | | value: "1416225849858883585" |
| | | },{ |
| | | label: '民警', |
| | | value: 1417092295132561409 |
| | | value: "1417092295132561409" |
| | | }, |
| | | { |
| | | label: '治保会队伍', |
| | | value: 1424615693403414529 |
| | | value: "1495714130024673282" |
| | | }, |
| | | { |
| | | label: '内保干部队伍', |
| | | value: 1424615773594312705 |
| | | value: "1495714221926068225" |
| | | }, |
| | | { |
| | | label: '治安巡防队伍', |
| | | value: 1424615835435130881 |
| | | value: "1495714272471625729" |
| | | }, |
| | | { |
| | | label: '信息员队伍', |
| | | value: 1424615909959524354 |
| | | value: "1495714309071122434" |
| | | }, |
| | | { |
| | | label: '保安员队伍', |
| | | value: 1424615972718895106 |
| | | value: "1495714343888039937" |
| | | }, |
| | | { |
| | | label: '警务辅助队伍', |
| | | value: 1424616047083905026 |
| | | value: "1495714378025480193" |
| | | }, |
| | | { |
| | | label: '平安志愿者', |
| | | value: 1494565079268491266 |
| | | value: "1416225906918195201" |
| | | } |
| | | ], |
| | | region: [{ |
| | |
| | | return |
| | | |
| | | } |
| | | |
| | | that.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | var d = that.form; |
| | | uni.navigateTo({ |
| | | url: '/pages/registerUser/idphoto?data= ' + |
| | | encodeURIComponent(JSON.stringify( |
| | | d)) |
| | | |
| | | var that = this; |
| | | var d = that.form; |
| | | var url = that.$store.state.piAPI + '/zc/inster', |
| | | data = { |
| | | // deptid: , |
| | | password: d.pass, |
| | | password2: d.passTwo, |
| | | phone: d.phone, |
| | | sex: d.sex == '男' ? 1 : 2, |
| | | sname: d.name, |
| | | username: d.user, |
| | | deptid:d.objId, |
| | | parentId:d.jsid, |
| | | jurisdiction:d.xqobjId, |
| | | cardid:d.carId |
| | | } |
| | | uni.request({ |
| | | url: url, |
| | | method: 'POST', |
| | | data: data, |
| | | success: (res) => { |
| | | uni.showToast({ |
| | | title: '注册成功,请等待审核', |
| | | icon:'none', |
| | | duration: 2000 |
| | | }); |
| | | setTimeout(function(){ |
| | | uni.navigateTo({ |
| | | url: '/pages/loging/loging' |
| | | }) |
| | | },2000); |
| | | } |
| | | }); |
| | | |
| | | // that.$refs.uForm.validate(valid => { |
| | | // if (valid) { |
| | | // var d = that.form; |
| | | // uni.navigateTo({ |
| | | // url: '/pages/registerUser/idphoto?data= ' + |
| | | // encodeURIComponent(JSON.stringify( |
| | | // d)) |
| | | // }); |
| | | // } |
| | | // }); |
| | | } |
| | | }); |
| | | |