修改首页及样式
This commit is contained in:
18
src/App.vue
18
src/App.vue
@@ -4,16 +4,16 @@
|
|||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLaunch } from '@dcloudio/uni-app';
|
// import { onLaunch } from '@dcloudio/uni-app';
|
||||||
onLaunch((opt) => {
|
// onLaunch((opt) => {
|
||||||
console.log("onLaunch")
|
// console.log("onLaunch")
|
||||||
|
|
||||||
uni.preloadPage({ url: "/pages/login/login" });
|
// uni.preloadPage({ url: "/pages/login/login" });
|
||||||
uni.preloadPage({ url: "/pages/home/home" });
|
// uni.preloadPage({ url: "/pages/home/home" });
|
||||||
uni.preloadPage({ url: "/pages/business/business" });
|
// uni.preloadPage({ url: "/pages/business/business" });
|
||||||
uni.preloadPage({ url: "/pages/notice/notice" });
|
// uni.preloadPage({ url: "/pages/notice/notice" });
|
||||||
uni.preloadPage({ url: "/pages/userinfo/userinfo" });
|
// uni.preloadPage({ url: "/pages/userinfo/userinfo" });
|
||||||
})
|
// })
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -58,15 +58,15 @@ const handleBack = () => {
|
|||||||
margin-left:-375rpx;
|
margin-left:-375rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
background: url('@/static/images/bg-Blue-header.png') no-repeat;
|
/* background: url('@/static/images/bg-Blue-header.png') no-repeat;
|
||||||
background-size:750rpx 160rpx;
|
background-size:750rpx 160rpx;
|
||||||
height:160rpx;
|
height:160rpx; */
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
/* #ifndef APP-PLUS */
|
/* #ifndef APP-PLUS */
|
||||||
background: url('@/static/images/bg-Blue-header2.png') no-repeat;
|
/* background: url('@/static/images/bg-Blue-header2.png') no-repeat;
|
||||||
background-size:750rpx 116rpx;
|
background-size:750rpx 116rpx;
|
||||||
height:116rpx;
|
height:116rpx; */
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,11 @@
|
|||||||
<view class="con-body">
|
<view class="con-body">
|
||||||
<view class="con-bg">
|
<view class="con-bg">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<customHeader ref="customHeaderRef" :title="'业务中心'"
|
<customHeader ref="customHeaderRef" :title="!searchShow?'业务中心':'搜索'"
|
||||||
:leftFlag="false" :rightFlag="false" v-if="!searchShow"
|
:leftFlag="!searchShow?false:true"
|
||||||
></customHeader>
|
:rightFlag="false"
|
||||||
<customHeader v-else ref="customHeaderRef" :title="'搜索'"
|
@back="handleBack"
|
||||||
:leftFlag="true" :rightFlag="false"
|
:searchType="searchShow?1:undefined"
|
||||||
@back="handleBack" :searchType="1"
|
|
||||||
></customHeader>
|
></customHeader>
|
||||||
<!-- 高度来避免头部遮挡 -->
|
<!-- 高度来避免头部遮挡 -->
|
||||||
<view class="top-height"></view>
|
<view class="top-height"></view>
|
||||||
@@ -68,7 +67,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref,onMounted } from 'vue'
|
import { ref,onMounted } from 'vue'
|
||||||
import { onLoad,onShow } from '@dcloudio/uni-app';
|
import { onLoad,onHide } from '@dcloudio/uni-app';
|
||||||
import customHeader from '@/components/customHeader.vue';
|
import customHeader from '@/components/customHeader.vue';
|
||||||
import customSearch from '@/components/customSearch.vue'
|
import customSearch from '@/components/customSearch.vue'
|
||||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||||
@@ -99,6 +98,10 @@ let searchShow = ref(false);
|
|||||||
let searchText = ref(undefined);
|
let searchText = ref(undefined);
|
||||||
let searchTypeObj = ref({typeId:2});
|
let searchTypeObj = ref({typeId:2});
|
||||||
|
|
||||||
|
onHide(()=>{
|
||||||
|
searchShow.value=false;
|
||||||
|
})
|
||||||
|
|
||||||
// 搜索返回操作
|
// 搜索返回操作
|
||||||
const handleBack=()=>{
|
const handleBack=()=>{
|
||||||
searchShow.value=false;
|
searchShow.value=false;
|
||||||
@@ -173,7 +176,7 @@ let handleJump=(url)=>{
|
|||||||
<style scope>
|
<style scope>
|
||||||
.scroll-h{
|
.scroll-h{
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
height: calc(100vh - 120px) !important;
|
height: calc(100vh - 130px) !important;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifndef APP-PLUS */
|
/* #ifndef APP-PLUS */
|
||||||
height: calc(100vh - 140px) !important;
|
height: calc(100vh - 140px) !important;
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="con-body">
|
<view class="con-body">
|
||||||
<view class="con-bg">
|
<view class="con-bg">
|
||||||
|
<!-- 头部 -->
|
||||||
|
<customHeader ref="customHeaderRef" :title="'首页'"
|
||||||
|
:leftFlag="false" :rightFlag="false"
|
||||||
|
></customHeader>
|
||||||
|
<!-- 高度来避免头部遮挡 -->
|
||||||
|
<view class="top-height"></view>
|
||||||
<!-- 下拉刷新 -->
|
<!-- 下拉刷新 -->
|
||||||
<mescroll-uni ref="mescrollRef" @init="mescrollInit"
|
<mescroll-uni ref="mescrollRef" @init="mescrollInit"
|
||||||
:down="downOption" @down="downCallback"
|
:down="downOption" @down="downCallback"
|
||||||
:fixed="false" class="scroll-h" :style="{ paddingTop: navBarPaddingTop + 'px' }"
|
:fixed="false" class="scroll-h"
|
||||||
>
|
>
|
||||||
<!-- #ifdef H5 -->
|
|
||||||
<view style="height:50rpx"></view>
|
|
||||||
<!-- #endif -->
|
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<!-- 删除设备ID--测试用 -->
|
<!-- 删除设备ID--测试用 -->
|
||||||
<view class="del-cache" @click="handleDelete">
|
<view class="del-cache" @click="handleDelete">
|
||||||
@@ -16,24 +19,6 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
<!-- 搜索 @confirm="handleSearch" -->
|
|
||||||
<customSearch v-if="searchShow"
|
|
||||||
:searchKeywords="searchText"
|
|
||||||
:searchType="searchTypeObj"
|
|
||||||
@confirm="handleSearchConfirm"
|
|
||||||
></customSearch>
|
|
||||||
<view class="search search-sao" v-else>
|
|
||||||
<uni-search-bar class="custom-search" radius="28"
|
|
||||||
placeholder="请输入您想查询的内容或服务"
|
|
||||||
clearButton="auto" cancelButton="none"
|
|
||||||
bgColor="#6FA2F8" textColor="#ffffff"
|
|
||||||
@focus="handleSearchFocus"
|
|
||||||
v-model="searchText"
|
|
||||||
/>
|
|
||||||
<uni-icons custom-prefix="iconfont" color="#ffffff" type="icon-phonesaoyisao" size="20"></uni-icons>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<block v-if="!searchShow">
|
|
||||||
<!-- 待办内容 -->
|
<!-- 待办内容 -->
|
||||||
<view class="backlog-bg">
|
<view class="backlog-bg">
|
||||||
<view class="backlog-b-item">
|
<view class="backlog-b-item">
|
||||||
@@ -150,7 +135,6 @@
|
|||||||
|
|
||||||
<!-- 底部加高度来避免tabbar遮挡 -->
|
<!-- 底部加高度来避免tabbar遮挡 -->
|
||||||
<view class="bottom-height"></view>
|
<view class="bottom-height"></view>
|
||||||
</block>
|
|
||||||
</mescroll-uni>
|
</mescroll-uni>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -159,6 +143,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref,onMounted,computed } from 'vue';
|
import { ref,onMounted,computed } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
import customHeader from '@/components/customHeader.vue'
|
||||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||||
import customSteps from '@/components/customSteps.vue'
|
import customSteps from '@/components/customSteps.vue'
|
||||||
import customSearch from '@/components/customSearch.vue'
|
import customSearch from '@/components/customSearch.vue'
|
||||||
@@ -204,7 +189,7 @@ onLoad(async(opt) => {
|
|||||||
// 初始化调用方法
|
// 初始化调用方法
|
||||||
const initLoad =()=>{
|
const initLoad =()=>{
|
||||||
try {
|
try {
|
||||||
showLoading("加载中...")
|
showLoading("加载中...");
|
||||||
getBackBlogCount();
|
getBackBlogCount();
|
||||||
getSwiperList();
|
getSwiperList();
|
||||||
getStepData();
|
getStepData();
|
||||||
@@ -251,24 +236,6 @@ onMounted(() => {
|
|||||||
navBarPaddingTop.value = getNavBarPaddingTop()*2;
|
navBarPaddingTop.value = getNavBarPaddingTop()*2;
|
||||||
})
|
})
|
||||||
|
|
||||||
// 搜索处理
|
|
||||||
let searchShow = ref(false);
|
|
||||||
let searchTypeObj = ref({typeId:1});
|
|
||||||
let searchText = ref(undefined);
|
|
||||||
|
|
||||||
// 获取input 焦点跳转
|
|
||||||
const handleSearchFocus=()=>{
|
|
||||||
searchShow.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 搜索完返回处理
|
|
||||||
const handleSearchConfirm = (param1,param2)=>{
|
|
||||||
// console.log(param1,param2)
|
|
||||||
searchText.value=param2.value;;
|
|
||||||
searchShow.value=false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let backBlogObj = ref({
|
let backBlogObj = ref({
|
||||||
count1:0,
|
count1:0,
|
||||||
count2:0,
|
count2:0,
|
||||||
@@ -409,10 +376,10 @@ const formatDateStr =(times)=>{
|
|||||||
|
|
||||||
.scroll-h{
|
.scroll-h{
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
height:calc(100vh - 30px) !important;
|
height:calc(100vh - 78px) !important;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifndef APP-PLUS */
|
/* #ifndef APP-PLUS */
|
||||||
height: calc(100vh - 30px) !important;
|
height: calc(100vh - 80px) !important;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
:deep(.mescroll-upwarp){
|
:deep(.mescroll-upwarp){
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ let versionData = ref({}); //版本参数
|
|||||||
onLoad(async(opt) => {
|
onLoad(async(opt) => {
|
||||||
console.log("onLoad");
|
console.log("onLoad");
|
||||||
|
|
||||||
uni.preloadPage({url: "/pages/login/login"});
|
// uni.preloadPage({url: "/pages/login/login"});
|
||||||
uni.preloadPage({url: "/pages/deviceAuth/deviceAuth"});
|
// uni.preloadPage({url: "/pages/deviceAuth/deviceAuth"});
|
||||||
uni.preloadPage({url: "/pages/home/home"});
|
// uni.preloadPage({url: "/pages/home/home"});
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 查询版本接口
|
// 查询版本接口
|
||||||
|
|||||||
@@ -2,17 +2,18 @@
|
|||||||
<view class="con-body">
|
<view class="con-body">
|
||||||
<view class="con-bg">
|
<view class="con-bg">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<customHeader ref="customHeaderRef" :title="'消息'" :leftFlag="false" :rightFlag="true" v-if="!searchShow">
|
<customHeader ref="customHeaderRef" :title="!searchShow?'消息':'搜索'"
|
||||||
<template #right>
|
:leftFlag="!searchShow?false:true"
|
||||||
|
:rightFlag="true"
|
||||||
|
@back="handleBack" :searchType="searchShow?1:undefined"
|
||||||
|
>
|
||||||
|
<template #right v-if="!searchShow">
|
||||||
<view class="head-right" @click="handleRead">
|
<view class="head-right" @click="handleRead">
|
||||||
<img :src="'static/images/icon-clean@2x.png'" />清除未读
|
<img :src="'static/images/icon-clean@2x.png'" />清除未读
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</customHeader>
|
</customHeader>
|
||||||
<customHeader v-else ref="customHeaderRef" :title="'搜索'"
|
|
||||||
:leftFlag="true" :rightFlag="false"
|
|
||||||
@back="handleBack" :searchType="1"
|
|
||||||
></customHeader>
|
|
||||||
<!-- 高度来避免头部遮挡 -->
|
<!-- 高度来避免头部遮挡 -->
|
||||||
<view class="top-height"></view>
|
<view class="top-height"></view>
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted,computed } from 'vue'
|
import { ref, onMounted,computed } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad,onHide } from '@dcloudio/uni-app';
|
||||||
import customHeader from '@/components/customHeader.vue'
|
import customHeader from '@/components/customHeader.vue'
|
||||||
import customSearch from '@/components/customSearch.vue'
|
import customSearch from '@/components/customSearch.vue'
|
||||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||||
@@ -85,6 +86,9 @@ let noticeTypeList=ref([
|
|||||||
]);
|
]);
|
||||||
let notictTypeCheck = ref({});//选中类型
|
let notictTypeCheck = ref({});//选中类型
|
||||||
|
|
||||||
|
onHide(()=>{
|
||||||
|
searchShow.value=false;
|
||||||
|
})
|
||||||
|
|
||||||
// 搜索返回操作
|
// 搜索返回操作
|
||||||
const handleBack=()=>{
|
const handleBack=()=>{
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ onMounted(() => {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.scroll-h{
|
.scroll-h{
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
height:calc(100vh - 30px) !important;
|
height:calc(100vh - 50px) !important;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifndef APP-PLUS */
|
/* #ifndef APP-PLUS */
|
||||||
height: calc(100vh - 30px) !important;
|
height: calc(100vh - 30px) !important;
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ page {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: #F5F5F5;
|
background-color: #307AF5;
|
||||||
|
/* background-color: #F5F5F5; */
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,26 +20,30 @@ page {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
background-color: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.con-bg {
|
.con-bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
background: url('@/static/images/bg-Blue.png') no-repeat;
|
background-color: #F5F5F5;
|
||||||
background-size: 100vw 761rpx;
|
background-image: url('@/static/images/bg-Blue.png');
|
||||||
width: 100vw;
|
background-repeat: no-repeat;
|
||||||
height: 761rpx;
|
background-size: 750rpx 761rpx;
|
||||||
|
width: 750rpx;
|
||||||
|
/* height: 761rpx; */
|
||||||
left: 0;
|
left: 0;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifndef APP-PLUS */
|
/* #ifndef APP-PLUS */
|
||||||
background: url('@/static/images/bg-Blue.png') no-repeat;
|
background-color: #F5F5F5;
|
||||||
|
background-image: url('@/static/images/bg-Blue.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
background-size: 750rpx 761rpx;
|
background-size: 750rpx 761rpx;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 761rpx;
|
/* height: 761rpx; */
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -375rpx;
|
margin-left: -375rpx;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
@@ -187,7 +192,7 @@ page {
|
|||||||
/* width:690rpx; */
|
/* width:690rpx; */
|
||||||
width:630rpx;
|
width:630rpx;
|
||||||
height:56rpx;
|
height:56rpx;
|
||||||
margin:0 auto 30rpx;
|
margin:10rpx auto 30rpx;
|
||||||
padding:0 30rpx;
|
padding:0 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
color:#fff;
|
color:#fff;
|
||||||
|
|||||||
Reference in New Issue
Block a user