fanghuisheng 2 роки тому
батько
коміт
4391502705

+ 79 - 0
src/pages/info/fireBase/fireBase.vue

@@ -0,0 +1,79 @@
+<template>
+	<view class="fireBashWrapper">
+		
+		<block>
+			<view class="" style="margin-top:0">
+				<view class="cu-list menu-avatar ">
+					<view class="cu-item" v-for="(item,index) in this.getData" :key="index"  @tap="goDetail(item)">
+						
+						<view class="cu-avatar">
+							<image class="image-bg" src="@/static/images/info/fire-base1.png" />
+						</view>
+						
+						<view class="content">
+							<view class="pro-title">
+								<view class="cut">{{item.title}}</view>
+							</view>
+							<view class="pro-des  ">
+								<view class="text-cut">
+									{{item.author}}
+								</view>
+							</view>
+							<view class="pro-date">{{item.release_time}}</view>
+						</view>
+						
+					</view>
+				</view>
+			</view>
+		</block>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				getData:[]
+			};
+		},
+		onLoad:function(option){
+			this.getFireBaseList({'company_code':uni.getStorageSync('selectedCode')})
+		
+		},
+		methods: {
+			
+			
+			// 列表数据请求
+			async getFireBaseList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'KnowledgeBase/getKnowledgeBaseList',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data.data;
+				console.log(this.getData)
+			},
+
+			
+			// 页面跳转
+			
+			goDetail(item){
+				uni.navigateTo({
+					url: '/pages/info/fireBashDetail/fireBashDetail?id='+item.id+'&title='+item.title,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+
+	.processList{
+		position:static;
+	}
+	
+</style>

+ 91 - 0
src/pages/info/fireBashDetail/fireBashDetail.vue

@@ -0,0 +1,91 @@
+<template>
+  <view class="padding fireBashDetailWrapper">
+    <view class="margin-bottom fireD-tit">{{ this.getData.title }}</view>
+    <view class="flex justify-between align-center">
+      <view>
+        <!-- <view class="cu-avatar round" style="background-image:url(@/static/images/info/fireBase.png)"></view> -->
+
+        <image class="cu-avatar round" src="@/static/images/info/fireBase.png" />
+
+        <text class="margin-left-sm margin-right-sm text-sm">{{
+          this.getData.author
+        }}</text>
+        <text>{{ this.getData.release_time }}</text>
+      </view>
+      <view style="color: #999">阅读:{{ this.getData.frequency }}</view>
+    </view>
+
+    <view class="fireD-content margin-top padding-top-xs">
+      <view class="">
+        <view v-html="this.getData.content"></view>
+      </view>
+    </view>
+
+    <view class="preAndNext" style="display: none">
+      <view class="flex align-top">
+        <view style="width: 120rpx">上一篇:</view>
+        <view style="width: calc(100% - 120rpx)">火灾逃生十大要诀</view>
+      </view>
+      <view class="flex align-top">
+        <view style="width: 120rpx">下一篇:</view>
+        <view style="width: calc(100% - 120rpx)">火灾逃生十大要诀</view>
+      </view>
+    </view>
+
+    <!-- <view class="share grid col-3">
+			<view class="share-item align">
+				<text class="icon iconfont margin-right-xs margin-left-lg">&#xe60c;</text>
+				分享
+			</view>
+			<view class="share-item" @click="clickPraise()" :class="[praise?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg"  >&#xe62a;</text>收藏</view>
+			<view class="share-item"  @click="clickZan()" :class="[zan?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg">&#xe600;</text>点赞</view>
+		</view> -->
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      praise: false,
+      zan: false,
+      getData: {},
+    };
+  },
+
+  onLoad: function (option) {
+    this.getFireBaseDetail({
+      company_code: uni.getStorageSync("selectedCode"),
+      id: option.id,
+    });
+    console.log("option");
+    console.log(option);
+    uni.setNavigationBarTitle({
+      title: option.title,
+    });
+  },
+
+  methods: {
+    // 详情页数据请求
+    async getFireBaseDetail(params = {}) {
+      const res = await this.$myRequest({
+        url: "KnowledgeBase/getKnowledgeBaseDetails",
+        data: params,
+        showLoading: true,
+      });
+      this.getData = res.data.data[0];
+      console.log(this.getData);
+    },
+
+    clickPraise() {
+      this.praise = !this.praise;
+    },
+    clickZan() {
+      this.zan = !this.zan;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 72 - 0
src/pages/info/info.vue

@@ -0,0 +1,72 @@
+<template>
+  <view class="analyse-wrapper info-wrapper" style="height: 100%">
+    <view class="justify-center align-center text-center">
+      <u-image src="@/static/images/info/info-bg.png" width="100%" height="273rpx" :showLoading="false" :fade="false"></u-image>
+    </view>
+
+    <scroll-view scroll-y style="height: calc(100% - 273rpx)">
+      <view class="cu-list menu-avatar padding-lr-sm padding-top-sm">
+        <view class="cu-item margin-bottom-sm" @tap="goFireBase()">
+          <view class="cu-avatar">
+            <image class="image-bg" src="@/static/images/info/fireBase.png" />
+          </view>
+          <view class="content">
+            <view class="">消防知识库</view>
+          </view>
+          <view class="nav-right">
+            <view class="text-grey">
+              <text class="icon iconfont margin-right-xs margin-left-lg"> &#xe629; </text>
+            </view>
+          </view>
+        </view>
+        <!-- <view class="cu-item " @tap="goPushList()">
+				<view class="cu-avatar " style="background-image:url(@/static/images/info/pushList.png)"></view>
+				<view class="content">
+					<view class="">消息推送</view>
+				</view>
+				<view class="nav-right">
+					<view class="text-grey">
+						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+					</view>
+				</view>
+			</view> -->
+      </view>
+    </scroll-view>
+  </view>
+</template>
+
+<script>
+import indexBackgroundImage from "@/static/images/info/fireBase.png";
+
+export default {
+  data() {
+    return {
+      indexBackgroundImage: indexBackgroundImage,
+    };
+  },
+  methods: {
+    goFireBase() {
+      uni.navigateTo({
+        url: "/pages/info/fireBase/fireBase",
+        success: (res) => {},
+        fail: () => {},
+        complete: () => {},
+      });
+    },
+    goPushList() {
+      uni.navigateTo({
+        url: "/pages/info/pushList/pushList",
+        success: (res) => {},
+        fail: () => {},
+        complete: () => {},
+      });
+    },
+  },
+};
+</script>
+
+<style>
+body {
+  background: #fff;
+}
+</style>

+ 192 - 0
src/pages/info/pushList/pushList.vue

@@ -0,0 +1,192 @@
+<template>
+	<view class="fireBashWrapper pushListWrapper ">
+		<view style="height:90rpx"></view>
+		<view class="ding">
+			<scroll-view scroll-x class="bg-white nav text-center">
+				<view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav"
+					:key="index" @tap="tabSelect" :data-id="index">
+					<view class="cu-tag badge">
+						<block class="cu-tag badge" v-if="item.badge!=1">99</block>
+					</view>
+					{{tabNav[index]}}
+				</view>
+			</scroll-view>
+		</view>
+
+		<block v-if="TabCur==0">
+			<view class="" style="margin-top:0">
+				<view class="cu-list menu-avatar ">
+					<view class="cu-item" v-for="(item,index) in unporcessList" :key="index" @tap="goFireBaseDetail">
+						<view class="cu-avatar" style="background-image:url(@/static/images/info/push-list.png);"></view>
+						<view class="content">
+							<view class="pro-title">
+								<view class="cut">{{item.title}}</view>
+							</view>
+							<view class="pro-des  ">
+								<view class="text-cut">
+									{{item.subtit}}
+								</view>
+							</view>
+							<view class="pro-date">{{item.time}}</view>
+						</view>
+
+					</view>
+				</view>
+			</view>
+		</block>
+		<block v-if="TabCur==1">
+			<view class="" style="margin-top:0">
+				<view class="cu-list menu-avatar ">
+					<view class="cu-item" v-for="(item,index) in unporcessList" :key="index" @tap="goFireBaseDetail">
+						<view class="cu-avatar" style="background-image:url(@/static/images/info/push-list.png);"></view>
+						<view class="content">
+							<view class="pro-title">
+								<view class="cut">{{item.title}}</view>
+							</view>
+							<view class="pro-des  ">
+								<view class="text-cut">
+									{{item.subtit}}
+								</view>
+							</view>
+							<view class="pro-date">{{item.time}}</view>
+						</view>
+
+					</view>
+				</view>
+			</view>
+		</block>
+
+	</view>
+</template>
+
+<script>
+	import json from '../../../data/json.js';
+	export default {
+		data() {
+			return {
+				unporcessList: [{
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					}, {
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					}, {
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					}, {
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					}, {
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					}, {
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					},
+					{
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					},
+					{
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					},
+					{
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					},
+					{
+						title: '火灾逃生九大要诀',
+						time: '2020-02-12',
+						subtit: 'admin'
+					}
+				],
+
+				processedList: json.processedList,
+
+				type: '0',
+				modalName: null,
+				listTouchStart: 0,
+				listTouchDirection: null,
+				CustomBar: this.CustomBar,
+				TabCur: 0,
+				tabNav: ['未读', '已读']
+			};
+		},
+
+		methods: {
+			tabSelect(e) {
+				this.TabCur = e.currentTarget.dataset.id;
+				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
+			},
+
+			// 页面跳转
+			goUnprocessDetail() {
+				uni.navigateTo({
+					url: '/pages/unprocessDetail/unprocessDetail?type=1',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			goProcessedDetail() {
+				uni.navigateTo({
+					url: '/pages/processedDetail/processedDetail?type=1',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			goVideoUnprocessDetail() {
+				uni.navigateTo({
+					url: '/pages/unprocessDetail/unprocessDetail?type=2',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			goVideoProcessedDetail() {
+				uni.navigateTo({
+					url: '/pages/processedDetail/processedDetail?type=2',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	//已处理未处理消息个数样式
+
+	.nav .cu-item.cur {
+		position: relative;
+		border-bottom: 8rpx solid;
+	}
+
+	.cu-tag.badge {
+		top: 14rpx;
+		right: 96rpx;
+	}
+
+	.nav .cu-item {
+		width: 50%;
+		margin: 0;
+
+		.text-blue,
+		.line-blue,
+		.lines-blue {
+			color: #4274E7
+		}
+	}
+</style>

BIN
src/static/images/info/fire-base1.png


BIN
src/static/images/info/fireBase.png


BIN
src/static/images/info/fireD-img.png


BIN
src/static/images/info/info-bg.png


BIN
src/static/images/info/push-list.png


BIN
src/static/images/info/pushList.png