12.3
This commit is contained in:
parent
f4c8df1950
commit
22104881f1
21
pages.json
21
pages.json
@ -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": {
|
||||
|
||||
@ -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({
|
||||
|
||||
@ -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
|
||||
};
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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-view距离顶部的距离以及自己的高度,单位为px
|
||||
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-view距离顶部的距离以及自己的高度,单位为px
|
||||
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);
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -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});
|
||||
|
||||
|
||||
@ -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{
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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
13
utils/platform.js
Normal 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
|
||||
@ -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,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user