From bd43cf042d48087d2f75237c0fe27ffb56fed5f4 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 21 Feb 2022 19:45:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
---
leafletMapOur/grabOrdersMap/js/vueMain.js | 64 ++++++++--
pages/home/home.vue | 12 +
pages/registerUser/registerUser.vue | 69 ++++++++--
pages/issue/issue.vue | 20 ++
api/mock/home.js | 8
pages/article/article.vue | 41 ++++--
pages/business/business.vue | 115 +++++++++++--------
pages/myself/myself.vue | 21 ++-
8 files changed, 240 insertions(+), 110 deletions(-)
diff --git a/api/mock/home.js b/api/mock/home.js
index 77b4bc2..acd0611 100644
--- a/api/mock/home.js
+++ b/api/mock/home.js
@@ -20,12 +20,12 @@
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',
diff --git a/leafletMapOur/grabOrdersMap/js/vueMain.js b/leafletMapOur/grabOrdersMap/js/vueMain.js
index 5e850b4..43b7ccf 100644
--- a/leafletMapOur/grabOrdersMap/js/vueMain.js
+++ b/leafletMapOur/grabOrdersMap/js/vueMain.js
@@ -39,19 +39,57 @@
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)
@@ -65,7 +103,7 @@
});
} else if (that.data.butCT == "begin") {
// 开始任务
- that.setUniAppMsg({
+ that.setUniAppMsg("hBackMsg", {
type: "start",
data: {
id: that.data.id,
@@ -372,6 +410,7 @@
if (typeof res.intlat === "string") {
// that.parent.showTip("获取定位失败")
//向uniapp传值
+ that.setUniAppMsg("showTip")
} else {
that.addIcon([res.intlat[1], res.intlat[0]]);
@@ -677,6 +716,7 @@
});
this.domMove.init();
// console.log(window.parent.setIntLat)
+ that.setUniAppMsg("setIntLat")
// window.parent.setIntLat({
// rid: this.data.id,
// fn: (out) => {
diff --git a/pages/article/article.vue b/pages/article/article.vue
index 1368359..41279d9 100644
--- a/pages/article/article.vue
+++ b/pages/article/article.vue
@@ -6,14 +6,13 @@
: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">
@@ -26,13 +25,12 @@
</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">
@@ -51,9 +49,9 @@
</scroll-view>
<!-- <view class="article-content">
-
</view> -->
-
+
+ <u-toast ref="uToast" />
<!-- 底部导航条 -->
<u-tabbar :list="tabbar" :mid-button="true"></u-tabbar>
</view>
@@ -69,8 +67,9 @@
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, //是否加载中
@@ -139,6 +138,9 @@
{
label: '知识讨论',
value: 'hyq003',
+ }, {
+ label: '个人',
+ value: 'hyq004',
}
],
options4: [{
@@ -173,7 +175,7 @@
query
.select('#articleBox')
.boundingClientRect(data => {
- that.swiperHeight = (safeArea.bottom - data.top - 50);
+ that.swiperHeight = (safeArea.bottom - data.top - 70);
})
.exec();
@@ -183,7 +185,6 @@
//上拉加载更多
onReachBottom() {
- console.log(2323232)
if (this.status == 'nomore') return;
this.page = ++this.page;
setTimeout(() => {
@@ -199,18 +200,17 @@
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() {
@@ -242,6 +242,7 @@
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) {
@@ -251,7 +252,7 @@
if (res.data.data.records.length < that.pagesize) {
//如果数量小于分页数量,则为最后一页
that.status = 'nomore'
- } else {
+ } else {
//否则继续加载更多数据
that.status = 'loading';
}
@@ -271,6 +272,14 @@
change(e) {
this.page = 1;
this.getArtcilePageList(e);
+ },
+ open(e) {
+ if (e >= 2) {
+ this.$refs.uToast.show({
+ title: '功能研发中',
+ type: 'warning',
+ })
+ }
},
refreshing() {
if (this.isRefreshing) {
@@ -293,7 +302,7 @@
</script>
<style>
-
+
</style>
<style lang="scss" scoped>
diff --git a/pages/business/business.vue b/pages/business/business.vue
index 148010c..90c3168 100644
--- a/pages/business/business.vue
+++ b/pages/business/business.vue
@@ -10,36 +10,10 @@
<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>
@@ -51,22 +25,10 @@
<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>
@@ -74,6 +36,7 @@
</view>
</view>
+ <u-toast ref="uToast" />
<!-- 底部导航条 -->
<u-tabbar :list="tabbar" :mid-button="true"></u-tabbar>
</view>
@@ -83,11 +46,67 @@
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>
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 151c9ca..f705576 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -115,7 +115,7 @@
</view>
<!-- 新闻模块 end -->
</view>
-
+ <u-toast ref="uToast" />
<!-- 底部导航条 -->
<u-tabbar :list="tabbar" :mid-button="true" height="50px" icon-size="40"></u-tabbar>
</view>
@@ -200,7 +200,6 @@
let detail = {
id: e.id
};
-
if(e.articleType.indexOf("ksp") != -1){
//去跳转
uni.navigateTo({
@@ -230,13 +229,18 @@
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
})
@@ -261,7 +265,7 @@
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,
diff --git a/pages/issue/issue.vue b/pages/issue/issue.vue
index dcf8aa6..3a5d17a 100644
--- a/pages/issue/issue.vue
+++ b/pages/issue/issue.vue
@@ -40,6 +40,7 @@
<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>
@@ -82,13 +83,22 @@
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
}
@@ -101,8 +111,10 @@
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) {
diff --git a/pages/myself/myself.vue b/pages/myself/myself.vue
index e689ecc..c74dc24 100644
--- a/pages/myself/myself.vue
+++ b/pages/myself/myself.vue
@@ -36,7 +36,7 @@
</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>
@@ -77,11 +77,11 @@
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',
@@ -137,6 +137,15 @@
},
methods: {
goToAttendance(){
+
+ if(this.$store.state.UserData.stype != "1"){
+ this.$refs.uToast.show({
+ title: '功能暂未开放',
+ type: 'warning',
+ });
+ return;
+ }
+
uni.navigateTo({
url:'../clockSignIn/clockSignIn'
})
diff --git a/pages/registerUser/registerUser.vue b/pages/registerUser/registerUser.vue
index ce91e85..a52da80 100644
--- a/pages/registerUser/registerUser.vue
+++ b/pages/registerUser/registerUser.vue
@@ -285,36 +285,39 @@
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: [{
@@ -393,17 +396,51 @@
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))
+ // });
+ // }
+ // });
}
});
--
Gitblit v1.9.3