Browse Source

知识库

h5_css
yanyan 3 years ago
parent
commit
a77cad598d
  1. 8
      pages.json
  2. 54
      pages/knowledge/knowledge.vue
  3. 33
      subpkg/complete/complete.vue
  4. 1
      subpkg/message/message.vue
  5. 38
      subpkg/role/role.vue

8
pages.json

@ -170,6 +170,14 @@
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
},
{
"path" : "knowledgeInfo/knowledgeInfo",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
}]
}],
"globalStyle": {

54
pages/knowledge/knowledge.vue

@ -1,26 +1,20 @@
<template>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar">
<view class="title">知识库</view>
</view>
<view class="mainwrap2">
<view class="subwrap">
<view class="artlist">
<view class="timetop">2024-02-19 04:21</view>
<view class="txtlist">凌晨突发6.2级地震这份逃生避险指南请收藏</view>
<view class="message-list">
<view class="artlist" v-for="(item, i) in knowledgeList" :key="i" @click="navClickHandler(item)">
<view class="timetop">{{item.createTime}}</view>
<view class="txtlist">{{item.title}}</view>
</view>
<view class="artlist">
<view class="timetop">2024-02-19 04:21</view>
<view class="txtlist">应急科普 | 注意防范大范围雨雪进入鼎盛期 </view>
</view>
</view>
</view>
<tabbar :page="page"></tabbar>
</view>
</template>
@ -30,17 +24,49 @@
data() {
return {
page: "",
queryObj:{
pageNum:1,
pageSize:10
},
total:0,
isloading:false,
//
knowledgeList:[]
};
},
onShow() {
this.page= "know"
},
methods: {
onLoad() {
this.getContentList();
},
components: {tabbar}
methods:{
async getContentList() {
this.isloading = true
const {
data: res
} = await uni.$http.post('/small/library/listApp',this.queryObj)
this.isloading = false
res.rows.forEach(item=>{
item.uploadPath = uni.$http.baseUrl +item.uploadPath
})
this.knowledgeList =[...this.knowledgeList,...res.rows]
this.total = res.total
},
navClickHandler(item) {
uni.navigateTo({
url: '/subpkg/knowledgeInfo/knowledgeInfo?guid='+item.guid
})
}
},
onReachBottom(){
if(this.queryObj.pageNum * this.queryObj.pageSize >= this.total) return uni.$showMsg('已展示所有内容')
if(this.isloading) return
this.queryObj.pageNum++
this.getContentList()
},
components: {tabbar},
}
</script>

33
subpkg/complete/complete.vue

@ -6,7 +6,7 @@
<image class="animg" src="/static/images/joy.png"></image>
</view>
<view class="mainwrap3">
<view class="mainwrap">
<view class="title">恭喜完成本次演练</view>
<view class="question-wrap">
<view class="question-list">
@ -52,7 +52,7 @@
</view>
</view>
<view class="popup-share" v-if="showShare">
<label class="closesty" @click="closeShare()"></label>
<view @click="closeShare()" style="margin-left: 250px;">关闭</view>
<label class="medimg"><image src="/static/images/medal_1.png"></image></label>
<view class="congrat">恭喜你获得1枚成就勋章</view>
<view class="perinfo">
@ -77,7 +77,6 @@
return {
"questionFreId":"59088ceb55644b03b8d0c7d48d2f7d39",
"roleId":"5f96b1baae1a47fbb17215a5dc46f5ce",
"sceneId": "",
questionList: [],
recordList: [],
"ask":"",
@ -111,7 +110,7 @@
this.showMedal = false
this.showLayer = false
clearTimeout(this.timer)
}, 1000)
}, 5000)
//this.roleId = options.roleId
//this.questionFreId = options.questionFreId
this.getQuestionList()
@ -150,15 +149,6 @@
//uni.$showMsg('')
},
async editUserMedal() {
const {
data: res
} = await uni.$http.post('/small/wechat/editUserMedal',{medal:this.sceneId})
if (!res.success) return uni.$showMsg()
// this.recordList = res.data
//uni.$showMsg('')
},
backIndex(){
uni.switchTab({
url:'/pages/index/index'
@ -203,7 +193,7 @@
z-index: 999;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .35);
background-color: rgba(0, 0, 0, .5);
}
.popup-layer, .popup-share {
//display: none;
@ -251,11 +241,6 @@
}
}
.mainwrap3 {
top: 56rpx;
overflow-y: auto;
}
.title {
margin: 50rpx 0;
color: #333;
@ -293,12 +278,12 @@
}
.answer-content {
//display: none;
position: relative;
position: absolute;
z-index: 100;
margin: 2% 3%;
padding: 2%;
width: 90%;
min-height: 400rpx;
height: 400rpx;
background: #fff;
border: 1px solid #18c569;
border-radius: 10px;
@ -333,14 +318,14 @@
}
view {
color: #666;
line-height: 1.5;
line-height: 1.75;
}
}
.question-record {
margin: 3% 3% 5%;
margin: 6% 3% 10%;
width: 94%;
height: 25%;
height: 45%;
overflow: hidden;
label {
font-size: 32rpx;

1
subpkg/message/message.vue

@ -31,7 +31,6 @@
},
navClickHandler(item) {
console.log(item)
uni.navigateTo({
url: '/subpkg/messageInfo/messageInfo?guid='+item.guid
})

38
subpkg/role/role.vue

@ -1,22 +1,22 @@
<template>
<view class="role-container">
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"> <label class="back" @click="back()"></label></view>
<view class="secbar"> <span class="back" @click="back()"></span></view>
<view class="mainwrap3">
<img src="/static/images/bg_role.jpg" alt=""/>
<view class="role_wrap">
<view class="contit">请选择您在<font style="color:#fd6d1f;">{{sceneName}}</font>演练中的角色</view>
<view class="<strong>contit</strong>">请选择您在<font style="color:#fd6d1f;">{{sceneName}}</font>演练中的角色</view>
<view class="role_box">
<block class="role-item" v-for="(item,i) in roleList" :key="i">
<span :class="item.choose === 'true' ? 'change_color':''" @click="chooseRole(item)">{{item.name}}</span>
<!-- <span class="spanitem" @click="chooseRole(item)">{{item.name}}</span> -->
</block>
</view>
<!-- <view class="more_role" @click="showMoreRole()"><a>更多角色</a></view> -->
<view class="more_role" @click="showMoreRole()"><a>更多角色</a></view>
</view>
<view :class="practice"><image src="/static/images/btn_start.png" @click="startPractice()"></image><a>开始演练</a></view>
<view class="startbtn"><image src="/static/images/btn_start.png" @click="startPractice()"></image><a>开始演练</a></view>
</view>
<view class="cnote">题目来源深圳市******有限公司</view>
@ -70,8 +70,7 @@
sceneName:"",
roleId:"",
roleList:[],
practice:"startbtn"
practice:false
};
},
onLoad(options) {
@ -100,12 +99,10 @@
if (item.choose === "true") {
this.$set(item, 'choose', 'false')
this.roleId = ''
this.practice = 'startbtn'
} else if(item.choose === "false"){
this.roleList.forEach(item=>{this.$set(item, 'choose', 'false')})
this.$set(item, 'choose', 'true')
this.roleId = item.guid
this.practice = 'startbtn.active'
}
},
startPractice(item) {
@ -114,7 +111,7 @@
}
uni.navigateTo({
url: '/subpkg/practice/practice?roleId='+this.roleId
// url: '/subpkg/respractice/respractice?roleId='+this.roleId
//url: '/subpkg/practice/respractice?roleId='+this.roleId
})
},
back(){
@ -132,9 +129,17 @@
width: 100%;
height: 100%;
}
.secbar {
top: 0;
z-index: 1;
}
.secbar ._span.back {
top: 50px;
}
.mainwrap3 {
top: 90rpx;
top: 0;
height: calc(100% - 70px);
overflow: hidden;
}
.mainwrap3 > img {
@ -150,10 +155,6 @@
width: 94%;
}
.contit {
margin: 3% 0;
}
.role_box {
margin: 1% 0 2% 4%;
width: 96%;
@ -307,9 +308,8 @@
line-height: 3.0;
letter-spacing: 2px;
}
.change_color {
background: #1367fe;
color: #fff !important;
.change_color{
background:rgba(138, 162, 254, 1.0);
}

Loading…
Cancel
Save