更新正式环境部署
This commit is contained in:
@@ -4,31 +4,31 @@
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="`关于我们`" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
<view class="dec-view">
|
||||
<web-view src="https://chat.qxmier.com/api/Page/page_show?id=20"></web-view>
|
||||
<web-view :src="`${httpUrl}/api/Page/page_show?id=20`"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
// import headerHeight from '@/component/headerHeight.vue';
|
||||
import config from '@/until/config.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
export default {
|
||||
components: {
|
||||
// headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight:0,
|
||||
ThemeData:null
|
||||
ThemeData:null,
|
||||
httpUrl:null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.httpUrl = config.BASE_URL
|
||||
const {
|
||||
h
|
||||
} = options
|
||||
this.currentIndex = type !== undefined ? +type : 0
|
||||
this.statusBarHeight = h
|
||||
if(uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg ?? $config.PRIMARY_BGURL}')`}">
|
||||
<navBar :navTitle="`规则说明`" :style="{'margin-top' : `${statusBarHeight || 0}px`}">
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg ?? $config.PRIMARY_BGURL}')`}">
|
||||
<navBar :navTitle="`规则说明`" :style="{'margin-top' : `${statusBarHeight || 0}px`}">
|
||||
</navBar>
|
||||
<view class="dec-view" v-if="flagIndex !== null">
|
||||
<web-view :src="`https://chat.qxmier.com/api/Page/page_show?id=${flagIndex === 1 ? 10 : 11}`"></web-view>
|
||||
<web-view :src="`${httpUrl}/api/Page/page_show?id=${flagIndex === 1 ? 10 : 11}`"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -11,24 +11,28 @@
|
||||
|
||||
<script>
|
||||
import navBar from '@/component/nav.vue';
|
||||
import config from '@/until/config.js';
|
||||
export default {
|
||||
components: {
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight:0,
|
||||
flagIndex:null,
|
||||
ThemeData:null
|
||||
httpUrl: null,
|
||||
statusBarHeight: 0,
|
||||
flagIndex: null,
|
||||
ThemeData: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
h,flag
|
||||
h,
|
||||
flag
|
||||
} = options
|
||||
this.flagIndex = +flag
|
||||
this.httpUrl = config.BASE_URL
|
||||
this.statusBarHeight = h
|
||||
if(uni.getStorageSync('Theme_Data')) {
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
}
|
||||
@@ -42,9 +46,11 @@
|
||||
// background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
img{
|
||||
width: 100%;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dec-view {
|
||||
min-height: calc(99vh - 160rpx);
|
||||
position: relative;
|
||||
|
||||
@@ -4,85 +4,95 @@
|
||||
<img src="/static/image/task/rule.png" alt="" />
|
||||
</view>
|
||||
<view class="dec-view" style="background-color: transparent !important;">
|
||||
<web-view :style="{ backgroundColor: 'transparent' }" :webview-styles="webviewStyles" src="https://chat.qxmier.com/api/Page/page_show?id=17"></web-view>
|
||||
<web-view :style="{ backgroundColor: 'transparent' }" :webview-styles="webviewStyles"
|
||||
:src="`${httpUrl}/api/Page/page_show?id=17`"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 关键配置:设置 WebView 样式
|
||||
webviewStyles: {
|
||||
progress: {
|
||||
color: 'transparent' // 隐藏进度条
|
||||
},
|
||||
// 安卓专用配置
|
||||
android: {
|
||||
hardwareAccelerated: true, // 开启硬件加速
|
||||
backgroundColor: 'transparent'
|
||||
},
|
||||
// iOS 专用配置
|
||||
ios: {
|
||||
allowsInlineMediaPlayback: true,
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
// #ifdef APP-PLUS
|
||||
// 获取 WebView 实例进行原生设置
|
||||
const pages = getCurrentPages();
|
||||
const page = pages[pages.length - 1];
|
||||
const currentWebview = page.$getAppWebview();
|
||||
|
||||
setTimeout(() => {
|
||||
const webview = currentWebview.children()[0];
|
||||
|
||||
// 安卓原生设置
|
||||
// #ifdef APP-ANDROID
|
||||
webview.setStyle({
|
||||
background: 'transparent'
|
||||
});
|
||||
// #endif
|
||||
|
||||
// iOS 原生设置
|
||||
// #ifdef APP-IOS
|
||||
webview.setStyle({
|
||||
opaque: false
|
||||
});
|
||||
// #endif
|
||||
}, 300); // 延迟确保 WebView 加载完成
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
import config from '@/until/config.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
httpUrl: null,
|
||||
// 关键配置:设置 WebView 样式
|
||||
webviewStyles: {
|
||||
progress: {
|
||||
color: 'transparent' // 隐藏进度条
|
||||
},
|
||||
// 安卓专用配置
|
||||
android: {
|
||||
hardwareAccelerated: true, // 开启硬件加速
|
||||
backgroundColor: 'transparent'
|
||||
},
|
||||
// iOS 专用配置
|
||||
ios: {
|
||||
allowsInlineMediaPlayback: true,
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.httpUrl = config.BASE_URL
|
||||
},
|
||||
onReady() {
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 获取 WebView 实例进行原生设置
|
||||
const pages = getCurrentPages();
|
||||
const page = pages[pages.length - 1];
|
||||
const currentWebview = page.$getAppWebview();
|
||||
|
||||
setTimeout(() => {
|
||||
const webview = currentWebview.children()[0];
|
||||
|
||||
// 安卓原生设置
|
||||
// #ifdef APP-ANDROID
|
||||
webview.setStyle({
|
||||
background: 'transparent'
|
||||
});
|
||||
// #endif
|
||||
|
||||
// iOS 原生设置
|
||||
// #ifdef APP-IOS
|
||||
webview.setStyle({
|
||||
opaque: false
|
||||
});
|
||||
// #endif
|
||||
}, 300); // 延迟确保 WebView 加载完成
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::-webkit-scrollbar {
|
||||
display: none !important;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 重要:设置页面背景透明 */
|
||||
page {
|
||||
background-color: transparent !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
|
||||
/* 隐藏 WebView 默认容器背景 */
|
||||
uni-web-view > div {
|
||||
background-color: transparent !important;
|
||||
uni-web-view>div {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.view-page {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
min-width: calc(100% - 40rpx);
|
||||
padding: 0 20rpx;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background-color: transparent !important;
|
||||
background-color: transparent !important;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
.image{
|
||||
|
||||
.image {
|
||||
width: calc(100% - 40rpx);
|
||||
// min-height: 100vh;
|
||||
position: absolute;
|
||||
@@ -91,6 +101,7 @@ export default {
|
||||
right: 20rpx;
|
||||
// bottom: 0;
|
||||
}
|
||||
|
||||
.dec-view {
|
||||
width: calc(100% - 40rpx - 48rpx);
|
||||
min-height: calc(60% - 48rpx);
|
||||
|
||||
Reference in New Issue
Block a user