This commit is contained in:
zoujiandong 2025-12-03 17:31:08 +08:00
parent f4c8df1950
commit 22104881f1
13 changed files with 104 additions and 65 deletions

View File

@ -9,16 +9,17 @@
}
},
"pages": [
{
"path": "pages/loading/loading",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"app": {
"bounce": "none"
}
}
},
// {
// "path": "pages/loading/loading",
// "style": {
// "navigationBarTitleText": "",
// "navigationStyle": "custom",
// "app": {
// "bounce": "none"
// }
// }
// },
{
"path": "pages/index/index",
"style": {

View File

@ -269,6 +269,7 @@ import { encryptAesEcb, decryptAesEcb } from "@/utils/aesEcb.js";
import { getCameraPermission } from "@/utils/permission.js";
import topTip from "@/components/topTip/topTip.vue";
import lazyImg from "@/static/default_news_iv.png";
import isAndroid from "@/utils/platform.js";
//
const isTimePopupShow = ref(false);
const isLocationPopupShow = ref(false);
@ -438,23 +439,25 @@ const sendWebsocketMsg = (code) => {
// });
};
const handleScanCode = () => {
getCameraPermission(scanCode);
// uni.sendNativeEvent('getScanCodeAuth', {
// msg: 'getScanCodeAuth'
// }, ret => {
// console.log('getScanCodeAuth');
// console.log(ret);
// if(ret.code==200){
// scanCode()
// }else{
// uni.showToast({
// title: '',
// icon: 'none'
// });
// }
// })
if(isAndroid){
getCameraPermission(scanCode);
}else{
console.log('ios执行');
uni.sendNativeEvent('getScanCodeAuth', {
msg: 'getScanCodeAuth'
}, ret => {
console.log('getScanCodeAuth回调数据');
console.log(ret);
if(ret.code==200){
scanCode()
}else{
uni.showToast({
title: '请在iPhone的"设置-隐私-相机"中允许肝胆相照专家端访问相机',
icon: 'none'
});
}
})
}
}
const scanCode = () => {
uni.scanCode({

View File

@ -122,9 +122,9 @@
<view class="bottom-box">
<view class="storage-info">
<text
>手机存储:总空间{{ storageInfo.total }}G/剩余{{
>手机存储:总空间{{ storageInfo.total }}/剩余{{
storageInfo.available
}}G可用</text
}}可用</text
>
</view>
<view class="footer-btn" v-if="isEditMode">
@ -157,8 +157,8 @@ const selectedItems = ref([]);
const activeTab = ref("completed"); // completed: , downloading:
const isEditMode = ref(false);
const storageInfo = ref({
total: "461.31",
available: "312.92",
total: "461.31G",
available: "312.92G",
});
const delTask=()=>{
if(selectedItems.value.length === 0){
@ -360,11 +360,16 @@ const getStorageInfo = () => {
//
// #ifdef APP-PLUS
if (uni.getSystemInfoSync().platform !== 'android') {
console.log('此方法仅适用于Android平台');
return;
}
// 1. Android
uni.sendNativeEvent('getSysSpace',{
msg: 'getSysSpace'
},(res) => {
storageInfo.value = {
total: res.total,
available: res.available,
};
});
}else{
// 1. Android
const Environment = plus.android.importClass("android.os.Environment");
const StatFs = plus.android.importClass("android.os.StatFs");
@ -402,14 +407,17 @@ const getStorageInfo = () => {
//
storageInfo.value = {
total: totalSizeInGB,
available: availableSizeInGB,
total: totalSizeInGB+"G",
available: availableSizeInGB+"G",
};
} catch (error) {
console.error('获取存储信息时发生错误:', error);
return null;
}
}
// #endif
};

View File

@ -1,13 +1,14 @@
<template>
<view class="reply-page">
<!-- 导航栏 -->
<uni-nav-bar
<view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
title="回复"
@clickLeft="goBack"
fixed
color="#8B2316"
height="180rpx"
:border="false"
backgroundColor="#eee"
>
@ -17,6 +18,7 @@
</view>
</template>
</uni-nav-bar>
</view>
<!-- 主内容区域 -->
<view class="main-content">
@ -86,7 +88,7 @@ onUnmounted(() => {
//
const goBack = () => {
uni.navigateBack()
uni.navigateBack();
}
const confirmReply = async () => {
@ -300,8 +302,9 @@ $blue: #007aff;
//
.main-content {
flex: 1;
padding: 20px 16px;
padding: 10px 16px;
background-color: #fff;
margin-top: calc(var(--status-bar-height) + 44px);
.input-container {
position: relative;
background-color: $white;

View File

@ -27,14 +27,14 @@
</view>
<!-- <video
v-if="showVideo"
v-if="showVideo && !isAndroid"
class="player-wrapper"
:style="{width: videoWidth + 'px'}"
:src="videoSrc"
controls
object-fit="contain"
:autoplay="false"
></video> -->
></video> -->
<sunny-video
v-if="showVideo"
class="player-wrapper"
@ -210,6 +210,7 @@ import sinaImg from "@/static/share_sina.png";
import wxImg from "@/static/share_weixin.png";
import friendImg from "@/static/share_wxc.png";
import logoImg from "@/static/weiboShare.png";
import isAndroid from "@/utils/platform.js";
import api from "@/api/api";
import docUrl from "@/utils/docUrl";
import navTo from "@/utils/navTo";
@ -960,6 +961,7 @@ $theme-color: #8b2316;
position: relative;
top: calc(var(--status-bar-height) + 44px);
z-index: 0;
height:220px;
overflow: hidden;
}
.share-img {

View File

@ -134,9 +134,11 @@ onLoad((query) => {
summary.value = shareTitle.value;
}
// #ifdef APP-PLUS
const resInfo = uni.getSystemInfoSync(); // 使 uni.getSystemInfo({...}).then(res => {...})
let statusBarHeight = resInfo.statusBarHeight;
let wv = plus.webview.create("", "custom-webview", {
top: "140rpx",
bottom:"0rpx",
top: (statusBarHeight+44) + "px",
bottom:"0rpx",
});
wv.loadURL( safeUrl.value);
@ -148,7 +150,7 @@ onLoad((query) => {
currentWebview.append(wv);
setTimeout(function () {
wv = currentWebview.children()[0];
wv.setStyle({ top: 80,height: height- 80,bottom:0,scalable:true, videoFullscreen: 'landscape',zIndex:-1});
wv.setStyle({ top: (statusBarHeight+44)+"px",height: height- 80,bottom:0,scalable:true, videoFullscreen: 'landscape',zIndex:-1});
}, 300); //
wv.onloaded = (e) => {
@ -165,7 +167,7 @@ onLoad((query) => {
console.log('键盘高度',res.height);
setTimeout(function() {
wv.setStyle({ //web-viewpx
top:80,
top:(statusBarHeight+44)+"px",
videoFullscreen: 'landscape',
height: height-res.size.windowHeight+100,
scalable: true, //webview
@ -178,7 +180,7 @@ onLoad((query) => {
} else {
setTimeout(function() {
wv.setStyle({ //web-viewpx
top:80,
top:(statusBarHeight+44)+"px",
height:height-80,
videoFullscreen: 'landscape',
scalable: true, //webview
@ -346,11 +348,16 @@ function createNativePopup() {
console.log(`图标 ${idx} (${it.text}): left=${left}, itemW=${itemW.toFixed(2)}, iconLeft=${iconLeftPx}, iconTop=${iconTopPx}, iconSize=${iconSizePx}`);
//
//
// - Android 使 convertLocalFileSystemURL file://
// - iOS plus.nativeObj.View.drawBitmap file://
// 使 "_www"
// 使 "_www/static/xxx.png" Android iOS
let iconPath = null;
try {
// 使
const iconFile = iconFiles[idx];
iconPath = plus.io.convertLocalFileSystemURL('_www/static/' + iconFile);
// 使 _www iOS file://
iconPath = '_www/static/' + iconFile;
console.log(`图标 ${it.text} 路径: ${iconPath}`);
} catch (e) {
console.log('构建图标路径失败:', e);

View File

@ -12,7 +12,7 @@
:object-fit="objectFit"
:style="{width: addUnit(videoWidth), height: addUnit(videoHeight)}"
@play="play"
@pause="emit('pause')"
@pause="pauseVideo"
@ended="ended"
@error="(e) => emit('playError', e)"
@timeupdate="timeupdate"
@ -321,6 +321,11 @@
state.enablePlayGesture = true
emit('play', e)
};
function pauseVideo() {
state.isPlay = false;
emit('pause',e)
}
/**
* 视频播放进度变化 - 会触发emit事件
* @param {Object} e event.detail = {currentTime, duration}

View File

@ -1,7 +1,7 @@
console.log('打印app');
//let BASE_URL='https://dev-app.igandan.com/app';
let BASE_URL='https://app.igandan.com/app'
let BASE_URL='https://dev-app.igandan.com/app';
//let BASE_URL='https://app.igandan.com/app'
// try {
// const app = getApp({allowDefault: true});

View File

@ -1,6 +1,6 @@
//const app = getApp({allowDefault: true});
//let DOC_URL='https://dev-doc.igandan.com/app/';
let DOC_URL='https://doc.igandan.com/app/'
let DOC_URL='https://dev-doc.igandan.com/app/';
//let DOC_URL='https://doc.igandan.com/app/'
// if(app.globalData.apiHost.indexOf('dev')>-1){
// DOC_URL='https://dev-doc.igandan.com/app/'
// }else{

View File

@ -17,11 +17,7 @@ function navTo(obj) {
token = uni.getStorageSync('DEV_AUTH_TOKEN_App');
}
}else{
if (BASE_URL.indexOf('dev') == -1) {
token = uni.getStorageSync('AUTH_TOKEN_App');
} else {
token = uni.getStorageSync('DEV_AUTH_TOKEN_App');
}
token = uni.getStorageSync('AUTH_TOKEN_App');
}
if (!token) {
// let page_url = pageUrl();

View File

@ -1,5 +1,5 @@
//let OTHER_HOST='https://dev-wx.igandan.com'
let OTHER_HOST='https://wx.igandan.com'
let OTHER_HOST='https://dev-wx.igandan.com'
//let OTHER_HOST='https://wx.igandan.com'
//const app = getApp({allowDefault: true});
// if(app.globalData.apiHost && app.globalData.apiHost.indexOf('dev')>-1){
// OTHER_HOST='https://dev-wx.igandan.com'

13
utils/platform.js Normal file
View File

@ -0,0 +1,13 @@
let isAndroid = false;
uni.getSystemInfo({
success: (res) => {
console.log(res);
if(res.os == 'android'){
isAndroid = true;
}else{
isAndroid = false;
}
}
})
export default isAndroid

View File

@ -40,6 +40,7 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
token = uni.getStorageSync('AUTH_TOKEN_App');
}
let header = {
'content-type': contentType,
}