Browse Source

适应小程序样式修改

h5_css
蟑螂恶霸 3 years ago
parent
commit
f09f82a196
  1. 3
      pages.json
  2. 6
      pages/index/index.vue
  3. 4
      pages/my/my.vue
  4. 3
      pages/scan/scan.vue
  5. 14
      static/base_css.css

3
pages.json

@ -3,7 +3,8 @@
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "全民演练", "navigationBarTitleText": "全民演练",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"navigationStyle": "custom"
} }
}, },
{ {

6
pages/index/index.vue

@ -6,9 +6,9 @@
<img :src="topImg"></img> <img :src="topImg"></img>
</view> </view>
<view class="banbox"> <view class="banbox">
<swiper style="height: 450px;" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :circular="true"> <swiper style="height: 100%;" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :circular="true">
<swiper-item v-for="(item, i) in swiperList" :key="i"> <swiper-item v-for="(item, i) in swiperList" :key="i">
<navigator class="swiper-item"> <navigator style="height: 100%;" class="swiper-item">
<img :src="item"></img> <img :src="item"></img>
</navigator> </navigator>
</swiper-item> </swiper-item>
@ -67,7 +67,7 @@
}, },
onLoad() { onLoad() {
this.getSwiperList(); this.getSwiperList();
this.checkLogin() // this.checkLogin()
}, },
onShow() { onShow() {
this.page= "home" this.page= "home"

4
pages/my/my.vue

@ -8,9 +8,9 @@
</view> </view>
</view> </view>
<view class="banbox_sec perinfo"> <view class="banbox_sec perinfo">
<swiper :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000" :circular="true"> <swiper style="height: 100%;" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000" :circular="true">
<swiper-item v-for="(item, i) in swiperList" :key="i"> <swiper-item v-for="(item, i) in swiperList" :key="i">
<navigator class="swiper-item"> <navigator style="height: 100%;" class="swiper-item">
<img :src="item"></img> <img :src="item"></img>
</navigator> </navigator>
</swiper-item> </swiper-item>

3
pages/scan/scan.vue

@ -1,5 +1,5 @@
<template> <template>
<view> <view class="wrap">
<view class="footbox"> <view class="footbox">
<tabbar :page="page"></tabbar> <tabbar :page="page"></tabbar>
</view> </view>
@ -44,5 +44,6 @@
</script> </script>
<style lang="scss"> <style lang="scss">
@import url("@/static/base_css.css");
</style> </style>

14
static/base_css.css

@ -58,7 +58,7 @@ img {
.mainwrap { .mainwrap {
margin-top: 0px; margin-top: 40px;
padding-bottom: 5%; padding-bottom: 5%;
height: calc(100% - 100px); height: calc(100% - 100px);
width: 100%; width: 100%;
@ -70,23 +70,23 @@ img {
.topcont { .topcont {
position: relative; position: relative;
top: 4%; top: 1%;
width: 100%; width: 100%;
height: 10.5%; height: 17.5%;
text-align: center; text-align: center;
} }
.topcont img { .topcont img {
width: 80%; width: 80%;
height: auto; height: 100%;
} }
.banbox { .banbox {
position: relative; position: relative;
top: 4%; top: -3.5%;
z-index: 1; z-index: 1;
margin: 0 auto; margin: 0 auto;
height: 60%; height: 65%;
width: 94%; width: 94%;
box-sizing: content-box; box-sizing: content-box;
border-radius: 10px; border-radius: 10px;
@ -95,7 +95,7 @@ img {
.itembox { .itembox {
display: flex; display: flex;
position: relative; position: relative;
top: 4%; top: -3.5%;
margin: 3.5% auto 0; margin: 3.5% auto 0;
width: 94%; width: 94%;
height: 21%; height: 21%;

Loading…
Cancel
Save