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