Browse Source

样式

h5_css
蟑螂恶霸 3 years ago
parent
commit
5258789af4
  1. 4
      main.js
  2. 6
      pages.json
  3. 2
      pages/index/index.vue
  4. 13
      pages/knowledge/knowledge.vue
  5. 2
      static/base_css.css
  6. 7
      subpkg/list/list.vue
  7. 16
      subpkg/medal/medal.vue
  8. 30
      subpkg/practice/practice.vue
  9. 2
      subpkg/rechallenge/rechallenge.vue
  10. 2
      subpkg/review/review.vue
  11. 25
      subpkg/role/role.vue
  12. 4
      utils/config.js

4
main.js

@ -13,8 +13,8 @@ import * as filters from '@/utils/formatFilter'
uni.$http = $http uni.$http = $http
Vue.prototype.$api = api Vue.prototype.$api = api
// $http.baseUrl = 'http://146.56.223.227:9527' $http.baseUrl = 'http://146.56.223.227:9527'
$http.baseUrl = 'http://localhost:9527' // $http.baseUrl = 'http://localhost:9527'
$http.beforeRequest = function(options) { $http.beforeRequest = function(options) {
uni.showLoading({ uni.showLoading({

6
pages.json

@ -26,7 +26,8 @@
"path": "pages/knowledge/knowledge", "path": "pages/knowledge/knowledge",
"style": { "style": {
"navigationBarTitleText": "全民演练", "navigationBarTitleText": "全民演练",
"enablePullDownRefresh": true "enablePullDownRefresh": true,
"navigationStyle": "custom"
} }
} }
], ],
@ -71,7 +72,8 @@
"style" : "style" :
{ {
"navigationBarTitleText" : "", "navigationBarTitleText" : "",
"enablePullDownRefresh" : true "enablePullDownRefresh" : true,
"navigationStyle": "custom"
} }
}, },
{ {

2
pages/index/index.vue

@ -67,7 +67,7 @@
}, },
onLoad() { onLoad() {
this.getSwiperList(); this.getSwiperList();
// this.checkLogin() this.checkLogin()
}, },
onShow() { onShow() {
this.page= "home" this.page= "home"

13
pages/knowledge/knowledge.vue

@ -1,9 +1,14 @@
<template> <template>
<view> <view class="wrap">
知识库页面 <view class="stabar"></view>
<view class="secbar">
<view class="title">知识库</view>
</view>
<view class="mainwrap2">
<tabbar :page="page"></tabbar> <tabbar :page="page"></tabbar>
</view> </view>
</view>
</template> </template>
<script> <script>
@ -17,10 +22,10 @@
onShow() { onShow() {
this.page= "know" this.page= "know"
}, },
components: {tabbar} components: {tabbar},
} }
</script> </script>
<style lang="scss"> <style lang="scss">
@import url("@/static/base_css.css");
</style> </style>

2
static/base_css.css

@ -275,7 +275,7 @@ h3.contit span {
.mainwrap3 { .mainwrap3 {
top: 0; top: 0;
height: calc(100% - 90rpx); height: calc(100% - 160rpx);
overflow-y: hidden; overflow-y: hidden;
} }

7
subpkg/list/list.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="wrap"> <view class="wrap">
<view class="stabar"></view> <view class="stabar"></view>
<view class="secbar"> <span class="back" @click="back()"></span> <view class="secbar"> <label class="back" @click="back()"></label>
<view class="title">场景演练</view> <view class="title">场景演练</view>
</view> </view>
<view class="mainwrap3"> <view class="mainwrap3">
@ -131,6 +131,7 @@
.mainwrap3 { .mainwrap3 {
top: 50rpx; top: 50rpx;
height: calc(100% - 90rpx)
} }
swiper { swiper {
@ -154,9 +155,11 @@
top: 50rpx; top: 50rpx;
justify-content: space-around; justify-content: space-around;
margin: 4% 3%; margin: 4% 3%;
padding: 0 0 8%;
width: 94%; width: 94%;
height: 62%; height: 55%;
overflow-y: auto; overflow-y: auto;
.nav-item { .nav-item {
position: relative; position: relative;
margin-bottom: 20rpx; margin-bottom: 20rpx;

16
subpkg/medal/medal.vue

@ -1,5 +1,9 @@
<template> <template>
<view> <view class="wrap">
<view class="stabar"></view>
<view class="secbar"> <label class="back" @click="back()"></label>
<view class="title">演练回顾</view>
</view>
<view class="index-background"> <view class="index-background">
<image src="/static/medal_top.jpg"></image> <image src="/static/medal_top.jpg"></image>
<view class="panel-list"> <view class="panel-list">
@ -28,6 +32,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
@ -84,12 +89,19 @@
}, },
myMedal(){ myMedal(){
this.showMedal = false this.showMedal = false
} },
back(){
uni.navigateBack({
delta:1,//2
})
},
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
@import url("@/static/base_css.css");
.nav-list { .nav-list {
display: flex; display: flex;
justify-content: left; justify-content: left;

30
subpkg/practice/practice.vue

@ -1,13 +1,12 @@
<template> <template>
<view class="role-container">
<view class="wrap"> <view class="wrap">
<!-- <view class="video-wrapper" id="video-container"></view> --> <!-- <view class="video-wrapper" id="video-container"></view> -->
<view class="secbar"> <span class="back" @click="back()"></span></view> <view class="stabar"></view>
<view class="secbar"> <label class="back" @click="back()"></label></view>
<view class="mainwrap3"> <view class="mainwrap3">
<view class="role_wrap"><sVideo :jsonId="jsonId"></sVideo></view> <view class="role_wrap"><sVideo :jsonId="jsonId"></sVideo></view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
@ -54,30 +53,15 @@
<style lang="scss"> <style lang="scss">
@import url("@/static/base_css.css"); @import url("@/static/base_css.css");
.role-container {
width: 100%;
height: 100%;
}
.secbar {
top: 0;
z-index: 1;
}
.secbar ._span.back {
top: 50px;
}
.mainwrap3 { .mainwrap3 {
top: 0; top: 90rpx;
height: calc(100% - 70px); background-color: #000;
overflow: hidden;
} }
.role_wrap { .role_wrap {
position: absolute; position: relative;
top: 5%; top: -62rpx;
margin: 0; margin: 0;
width: 100%; width: 100%;
height: 100%;
} }
</style> </style>

2
subpkg/rechallenge/rechallenge.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="wrap"> <view class="wrap">
<view class="stabar"></view> <view class="stabar"></view>
<view class="secbar"> <span class="back" @click="back()"></span> <view class="secbar"> <label class="back" @click="back()"></label>
<view class="title">重新挑战</view> <view class="title">重新挑战</view>
</view> </view>
<view class="mainwrap2"> <view class="mainwrap2">

2
subpkg/review/review.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="wrap"> <view class="wrap">
<view class="stabar"></view> <view class="stabar"></view>
<view class="secbar"> <span class="back" @click="back()"></span> <view class="secbar"> <label class="back" @click="back()"></label>
<view class="title">演练回顾</view> <view class="title">演练回顾</view>
</view> </view>
<view class="mainwrap2"> <view class="mainwrap2">

25
subpkg/role/role.vue

@ -1,18 +1,19 @@
<template> <template>
<view class="role-container"> <view class="role-container">
<view class="wrap"> <view class="wrap">
<view class="secbar"> <span class="back" @click="back()"></span></view> <view class="stabar"></view>
<view class="secbar"> <label class="back" @click="back()"></label></view>
<view class="mainwrap3"> <view class="mainwrap3">
<img src="/static/images/bg_role.jpg" alt=""/> <img src="/static/images/bg_role.jpg" alt=""/>
<view class="role_wrap"> <view class="role_wrap">
<view class="<strong>contit</strong>">请选择您在<font style="color:#fd6d1f;">{{sceneName}}</font>演练中的角色</view> <view class="contit">请选择您在<font style="color:#fd6d1f;">{{sceneName}}</font>演练中的角色</view>
<view class="role_box"> <view class="role_box">
<block class="role-item" v-for="(item,i) in roleList" :key="i"> <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="item.choose === 'true' ? 'change_color':''" @click="chooseRole(item)">{{item.name}}</span>
<!-- <span class="spanitem" @click="chooseRole(item)">{{item.name}}</span> --> <!-- <span class="spanitem" @click="chooseRole(item)">{{item.name}}</span> -->
</block> </block>
</view> </view>
<view class="more_role" @click="showMoreRole()"><a>更多角色</a></view> <!-- <view class="more_role" @click="showMoreRole()"><a>更多角色</a></view> -->
</view> </view>
<view :class="practice"><image src="/static/images/btn_start.png" @click="startPractice()"></image><a>开始演练</a></view> <view :class="practice"><image src="/static/images/btn_start.png" @click="startPractice()"></image><a>开始演练</a></view>
@ -112,8 +113,8 @@
return uni.$showMsg('请先选择一个角色') return uni.$showMsg('请先选择一个角色')
} }
uni.navigateTo({ uni.navigateTo({
// url: '/subpkg/practice/practice?roleId='+this.roleId url: '/subpkg/practice/practice?roleId='+this.roleId
url: '/subpkg/practice/respractice?roleId='+this.roleId //url: '/subpkg/practice/respractice?roleId='+this.roleId
}) })
}, },
back(){ back(){
@ -131,14 +132,10 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.secbar {
top: 0;
z-index: 1;
}
.secbar ._span.back {
top: 100rpx;
}
.mainwrap3 {
top: 90rpx;
}
.mainwrap3 > img { .mainwrap3 > img {
width: 100%; width: 100%;
@ -153,6 +150,10 @@
width: 94%; width: 94%;
} }
.contit {
margin: 3% 0;
}
.role_box { .role_box {
margin: 1% 0 2% 4%; margin: 1% 0 2% 4%;
width: 96%; width: 96%;

4
utils/config.js

@ -1,3 +1,3 @@
// let url_config = 'http://146.56.223.227:9527/' let url_config = 'http://146.56.223.227:9527/'
let url_config = 'http://localhost:9527/' // let url_config = 'http://localhost:9527/'
export default url_config export default url_config
Loading…
Cancel
Save