修改样式
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<style>
|
||||
body{
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id" : "H5E705637",
|
||||
"name" : "app",
|
||||
// "appid" : "",
|
||||
// "appid" : "H5E705637",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
|
||||
@@ -145,7 +145,14 @@
|
||||
"navigationBarTitleText": "718友晟",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8",
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
// #ifdef APP-PLUS
|
||||
"style": {
|
||||
"app-plus": {
|
||||
"background":"#F5F5F5"
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#919191",
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'业务中心'"
|
||||
:leftFlag="false" :rightFlag="false"
|
||||
></customHeader>
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'业务中心'"
|
||||
:leftFlag="false" :rightFlag="false"
|
||||
></customHeader>
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 搜索 @confirm="handleSearch" -->
|
||||
<view class="search">
|
||||
<uni-search-bar class="custom-search" radius="28"
|
||||
placeholder="请输入您想查询的内容或服务"
|
||||
clearButton="auto" cancelButton="none"
|
||||
bgColor="#6FA2F8" textColor="#ffffff"
|
||||
@focus="handleFocus"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 下拉刷新 -->
|
||||
<mescroll-uni ref="mescrollRef" @init="mescrollInit"
|
||||
:down="downOption" @down="downCallback"
|
||||
:fixed="false" class="scroll-h"
|
||||
>
|
||||
<!-- 首页日常服务 -->
|
||||
<view class="white-bg">
|
||||
<view class="w-b-title">
|
||||
首页日常服务
|
||||
<view type="primary" @click="handleJump('/pages/business/editDaily')" class="btn-edit">编 辑</view>
|
||||
</view>
|
||||
<!-- 搜索 @confirm="handleSearch" -->
|
||||
<view class="search">
|
||||
<uni-search-bar class="custom-search" radius="28"
|
||||
placeholder="请输入您想查询的内容或服务"
|
||||
clearButton="auto" cancelButton="none"
|
||||
bgColor="#6FA2F8" textColor="#ffffff"
|
||||
@focus="handleFocus"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 业务列表 -->
|
||||
<view class="white-bg" v-for="(item,index) in list" :key="index">
|
||||
<view class="w-b-title" @click="handleExpand(item)">{{ item.bizName }}
|
||||
<text>{{item.expandFlag?'展开':'收起'}}<i :class="{iconfont:true,'icon-up':!item.expandFlag,'icon-down':item.expandFlag}"></i></text>
|
||||
</view>
|
||||
<block v-if="!item.expandFlag">
|
||||
<view class="logo-list" v-if="item.children&&item.children.length>0">
|
||||
<block v-for="(item2,index2) in item.children">
|
||||
<view class="l-l-item"
|
||||
@click="handleJump(item2.bizUrl)">
|
||||
<img :src="'static/images/business/'+item2.icon+'.png'" />
|
||||
<text class="font-gray">{{ item2.bizName }}</text>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 下拉刷新 -->
|
||||
<mescroll-uni ref="mescrollRef" @init="mescrollInit"
|
||||
:down="downOption" @down="downCallback"
|
||||
:fixed="false" class="scroll-h"
|
||||
>
|
||||
<!-- 首页日常服务 -->
|
||||
<view class="white-bg">
|
||||
<view class="w-b-title">
|
||||
首页日常服务
|
||||
<view type="primary" @click="handleJump('/pages/business/editDaily')" class="btn-edit">编 辑</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部加高度来避免tabbar遮挡 -->
|
||||
<view class="bottom-height"></view>
|
||||
</mescroll-uni>
|
||||
<!-- 业务列表 -->
|
||||
<view class="white-bg" v-for="(item,index) in list" :key="index">
|
||||
<view class="w-b-title" @click="handleExpand(item)">{{ item.bizName }}
|
||||
<text>{{item.expandFlag?'展开':'收起'}}<i :class="{iconfont:true,'icon-up':!item.expandFlag,'icon-down':item.expandFlag}"></i></text>
|
||||
</view>
|
||||
<block v-if="!item.expandFlag">
|
||||
<view class="logo-list" v-if="item.children&&item.children.length>0">
|
||||
<block v-for="(item2,index2) in item.children">
|
||||
<view class="l-l-item"
|
||||
@click="handleJump(item2.bizUrl)">
|
||||
<img :src="'static/images/business/'+item2.icon+'.png'" />
|
||||
<text class="font-gray">{{ item2.bizName }}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 底部加高度来避免tabbar遮挡 -->
|
||||
<view class="bottom-height"></view>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref,onMounted } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { onLoad,onShow } from '@dcloudio/uni-app';
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||
import { getNavBarPaddingTop} from '@/utils/system.js'
|
||||
import { businessList } from '@/api/business.js';
|
||||
import {showLoading,hideLoading} from '@/utils/message.js'
|
||||
import { initTree } from '@/utils/common.js'
|
||||
import { initTree } from '@/utils/common.js';
|
||||
|
||||
onLoad(async(opt) => {
|
||||
uni.setStorageSync('page_cache',true);
|
||||
// uni.setStorageSync('page_cache',true);
|
||||
try {
|
||||
showLoading("加载中...")
|
||||
getList();
|
||||
|
||||
@@ -24,7 +24,7 @@ onLoad(async(opt) => {
|
||||
onReady(()=>{
|
||||
setTimeout(()=>{
|
||||
uni.setNavigationBarTitle({
|
||||
title:'app中要设置的标题'
|
||||
title:title.value
|
||||
})
|
||||
},2000)
|
||||
})
|
||||
|
||||
@@ -184,7 +184,7 @@ const handleDelete=()=>{
|
||||
|
||||
|
||||
onLoad(async(opt) => {
|
||||
uni.setStorageSync('page_cache',true);
|
||||
// uni.setStorageSync('page_cache',true);
|
||||
// initLoad();
|
||||
})
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {showAlert} from '@/utils/message.js'
|
||||
import { showAlert } from '@/utils/message.js'
|
||||
|
||||
// 递归算法
|
||||
export const initTree = (arr, parentId = '0', id) => {
|
||||
@@ -13,28 +13,29 @@ export const initTree = (arr, parentId = '0', id) => {
|
||||
return tree;
|
||||
}
|
||||
|
||||
|
||||
// 安卓异步调用
|
||||
export const requestAndroidPermissionAsync = (systemInfo,permissions) => {
|
||||
export const requestAndroidPermissionAsync = (systemInfo, permissions) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
// if (uni.getSystemInfoSync().platform !== 'android') {
|
||||
// resolve({ granted: true, nonSystem: true })
|
||||
// return
|
||||
// }
|
||||
plus.android.requestPermissions(permissions,(result) => {
|
||||
showAlert("result=>"+JSON.stringify(result))
|
||||
plus.android.requestPermissions(permissions, (result) => {
|
||||
showAlert("result=>" + JSON.stringify(result))
|
||||
// const granted = Object.values(result.granted).every(Boolean);
|
||||
|
||||
let granted = false;
|
||||
if(systemInfo.osVersion<13){
|
||||
granted = result.granted.length==2
|
||||
} else if(systemInfo.osVersion==13){
|
||||
granted =result.granted.length==3
|
||||
} else{
|
||||
granted = result.granted.length==1
|
||||
if (systemInfo.osVersion < 13) {
|
||||
granted = result.granted.length == 2
|
||||
} else if (systemInfo.osVersion == 13) {
|
||||
granted = result.granted.length == 3
|
||||
} else {
|
||||
granted = result.granted.length == 1
|
||||
}
|
||||
resolve({ ...result, granted })
|
||||
|
||||
},(error) => {
|
||||
|
||||
}, (error) => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
@@ -47,30 +48,30 @@ export const requestAndroidPermissionAsync = (systemInfo,permissions) => {
|
||||
export const requestAndroidPermission = (systemInfo) => {
|
||||
let granted = false;
|
||||
const Manifest = plus.android.importClass("android.Manifest");
|
||||
const MainActivity = plus.android.runtimeMainActivity();
|
||||
if(systemInfo.osVersion <13){ // 安卓系统版本
|
||||
let permissionStatus = MainActivity.checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||
const MainActivity = plus.android.runtimeMainActivity();
|
||||
if (systemInfo.osVersion < 13) { // 安卓系统版本
|
||||
let permissionStatus = MainActivity.checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||
let perStatus = 0;
|
||||
if (permissionStatus === 0) {
|
||||
perStatus++;
|
||||
}
|
||||
}
|
||||
permissionStatus = MainActivity.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||
if (permissionStatus === 0) {
|
||||
perStatus++;
|
||||
}
|
||||
if(perStatus ==2){
|
||||
granted=true
|
||||
}else{
|
||||
granted=false //"当前文件保存权限被关闭,请到设置中开启才能继续后续操作"
|
||||
}
|
||||
if (perStatus == 2) {
|
||||
granted = true
|
||||
} else {
|
||||
granted = false //"当前文件保存权限被关闭,请到设置中开启才能继续后续操作"
|
||||
goPermission();//调用授权方法去授权
|
||||
}
|
||||
|
||||
}else if(systemInfo.osVersion ==13){
|
||||
let permissionStatus = MainActivity.checkSelfPermission(Manifest.permission.READ_MEDIA_IMAGES);
|
||||
} else if (systemInfo.osVersion == 13) {
|
||||
let permissionStatus = MainActivity.checkSelfPermission(Manifest.permission.READ_MEDIA_IMAGES);
|
||||
let perStatus = 0;
|
||||
if (permissionStatus === 0) {
|
||||
perStatus++;
|
||||
}
|
||||
}
|
||||
permissionStatus = MainActivity.checkSelfPermission(Manifest.permission.READ_MEDIA_VIDEO);
|
||||
if (permissionStatus === 0) {
|
||||
perStatus++;
|
||||
@@ -79,37 +80,37 @@ export const requestAndroidPermission = (systemInfo) => {
|
||||
if (permissionStatus === 0) {
|
||||
perStatus++;
|
||||
}
|
||||
if(perStatus ==3){
|
||||
granted=true
|
||||
}else{
|
||||
granted=false //"当前文件保存权限被关闭,请到设置中开启才能继续后续操作"
|
||||
if (perStatus == 3) {
|
||||
granted = true
|
||||
} else {
|
||||
granted = false //"当前文件保存权限被关闭,请到设置中开启才能继续后续操作"
|
||||
goPermission();//调用授权方法去授权
|
||||
}
|
||||
}else{
|
||||
let permissionStatus = MainActivity.checkSelfPermission(Manifest.permission.READ_MEDIA_VISUAL_USER_SELECTED);
|
||||
} else {
|
||||
let permissionStatus = MainActivity.checkSelfPermission(Manifest.permission.READ_MEDIA_VISUAL_USER_SELECTED);
|
||||
let perStatus = 0;
|
||||
if (permissionStatus === 0) {
|
||||
if (permissionStatus === 0) {
|
||||
perStatus++;
|
||||
}
|
||||
if(perStatus ==1){
|
||||
granted=true
|
||||
}else{
|
||||
granted=false //"当前文件保存权限被关闭,请到设置中开启才能继续后续操作"
|
||||
if (perStatus == 1) {
|
||||
granted = true
|
||||
} else {
|
||||
granted = false //"当前文件保存权限被关闭,请到设置中开启才能继续后续操作"
|
||||
goPermission();//调用授权方法去授权
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return granted
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 弹窗跳授权页面
|
||||
const goPermission=()=>{
|
||||
const goPermission = () => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: "请进行设备授权",
|
||||
cancelText:'去授权',
|
||||
confirmText:'已授权',
|
||||
cancelText: '去授权',
|
||||
confirmText: '已授权',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
@@ -123,17 +124,17 @@ const goPermission=()=>{
|
||||
}
|
||||
|
||||
// 跳转授权按钮
|
||||
const jumpAuthPermission=()=>{
|
||||
const jumpAuthPermission = () => {
|
||||
var main = plus.android.runtimeMainActivity();
|
||||
var Intent = plus.android.importClass('android.content.Intent');
|
||||
var Uri = plus.android.importClass('android.net.Uri');
|
||||
var pkg = main.getPackageName();
|
||||
var intent = new Intent('android.settings.APPLICATION_DETAILS_SETTINGS');
|
||||
intent.setData(Uri.parse('package:' + pkg));
|
||||
main.startActivity(intent);
|
||||
setTimeout(()=>{
|
||||
main.startActivity(intent);
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/loading/loading',
|
||||
});
|
||||
},1000)
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ const requestHooks = {
|
||||
options.header.token = "Bearer "+ token;
|
||||
options.header.Authorization = "Bearer "+ token;
|
||||
// }
|
||||
console.log("request=>",options)
|
||||
// console.log("request=>",options)
|
||||
return options;
|
||||
},
|
||||
// 响应拦截器
|
||||
responseInterceptorsHook(response, config) {
|
||||
console.log("response=>",response)
|
||||
// console.log("response=>",response)
|
||||
// console.log("response=>config=>",config)
|
||||
const { isTransformResponse, isReturnDefaultResponse, isAuth } = config;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user