Commit fea9b811 authored by 张凯旋's avatar 张凯旋

提交iOS 相册修改

parent 9ecb1ed1
...@@ -8,8 +8,9 @@ let ComponentCSS = StyleSheet.create({ ...@@ -8,8 +8,9 @@ let ComponentCSS = StyleSheet.create({
alarmWrapper: { alarmWrapper: {
position: 'absolute', position: 'absolute',
left: Constants.unitWidth * 1, left: Constants.unitWidth * 1,
top: Constants.statusBarHeight + Constants.unitWidth * 128, // top: Constants.statusBarHeight + Constants.unitWidth * 188,
width: Constants.unitWidth * 312, bottom: (Constants.width - Constants.statusBarHeight - Constants.height / 16 * 9) / 2,
width: Constants.unitWidth * 312,
height: Constants.unitWidth * 200, height: Constants.unitWidth * 200,
backgroundColor: '#008A6A' backgroundColor: '#008A6A'
}, },
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
dispatch_sync(dispatch_get_main_queue(), ^{ dispatch_sync(dispatch_get_main_queue(), ^{
self.boardView = [[WhiteBoardView alloc] init]; self.boardView = [[WhiteBoardView alloc] init];
[self.boardView setBackgroundColor:[UIColor colorWithRed:33/255.0 green:35/255.0 blue:42/255.0 alpha:0.6]]; [self.boardView setBackgroundColor:[UIColor colorWithRed:14/255.0 green:92/255.0 blue:74/255.0 alpha:0.6]];
CGFloat width = [RCTConvert CGFloat: [info objectForKey:@"width"]]; CGFloat width = [RCTConvert CGFloat: [info objectForKey:@"width"]];
CGFloat height = [RCTConvert CGFloat: [info objectForKey:@"height"]]; CGFloat height = [RCTConvert CGFloat: [info objectForKey:@"height"]];
self.view.frame = CGRectMake(0, 0, width, height); self.view.frame = CGRectMake(0, 0, width, height);
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
[self.sdk joinRoomWithConfig:roomConfig callbacks:self completionHandler:^(BOOL success, WhiteRoom * _Nonnull room, NSError * _Nonnull error) { [self.sdk joinRoomWithConfig:roomConfig callbacks:self completionHandler:^(BOOL success, WhiteRoom * _Nonnull room, NSError * _Nonnull error) {
if (success) { if (success) {
self.room = room; self.room = room;
[self.room setBackgroundColor: [UIColor colorWithRed:45/255.0 green:48/255.0 blue:55/255.0 alpha:1]]; [self.room setBackgroundColor: [UIColor colorWithRed:14/255.0 green:92/255.0 blue:74/255.0 alpha:1]];
[self.room disableCameraTransform:YES]; [self.room disableCameraTransform:YES];
// 在这里给个回调 // 在这里给个回调
// 允许序列化才能使用 undo redo // 允许序列化才能使用 undo redo
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
- (UIView *)getBoardController - (UIView *)getBoardController
{ {
NSLog(@"nidaye 222"); NSLog(@"nidaye 222");
[self.view setBackgroundColor:[UIColor colorWithRed:33/255.0 green:35/255.0 blue:42/255.0 alpha:1]]; [self.view setBackgroundColor:[UIColor colorWithRed:14/255.0 green:92/255.0 blue:74/255.0 alpha:1]];
return self.view; return self.view;
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* fenghua_student_clientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* fenghua_student_clientTests.m */; }; 00E356F31AD99517003FC87E /* fenghua_student_clientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* fenghua_student_clientTests.m */; };
0404A8AD291D27330097EC84 /* Static.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 0404A8AC291D27330097EC84 /* Static.bundle */; };
048B61F72914F17C00AC4BD9 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 048B61F62914F17C00AC4BD9 /* main.jsbundle */; }; 048B61F72914F17C00AC4BD9 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 048B61F62914F17C00AC4BD9 /* main.jsbundle */; };
048B61F82914F17C00AC4BD9 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 048B61F62914F17C00AC4BD9 /* main.jsbundle */; }; 048B61F82914F17C00AC4BD9 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 048B61F62914F17C00AC4BD9 /* main.jsbundle */; };
049544CF290AC33A007246BD /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049544CE290AC33A007246BD /* File.swift */; }; 049544CF290AC33A007246BD /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049544CE290AC33A007246BD /* File.swift */; };
...@@ -58,6 +59,7 @@ ...@@ -58,6 +59,7 @@
00E356EE1AD99517003FC87E /* fenghua_student_clientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = fenghua_student_clientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356EE1AD99517003FC87E /* fenghua_student_clientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = fenghua_student_clientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* fenghua_student_clientTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = fenghua_student_clientTests.m; sourceTree = "<group>"; }; 00E356F21AD99517003FC87E /* fenghua_student_clientTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = fenghua_student_clientTests.m; sourceTree = "<group>"; };
0404A8AC291D27330097EC84 /* Static.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Static.bundle; path = ../Static.bundle; sourceTree = "<group>"; };
048B61F62914F17C00AC4BD9 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = bundle/main.jsbundle; sourceTree = "<group>"; }; 048B61F62914F17C00AC4BD9 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = bundle/main.jsbundle; sourceTree = "<group>"; };
04954381290A9654007246BD /* iosRTCLibs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = iosRTCLibs; path = ../iosRTCLibs; sourceTree = "<group>"; }; 04954381290A9654007246BD /* iosRTCLibs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = iosRTCLibs; path = ../iosRTCLibs; sourceTree = "<group>"; };
04954382290A96E0007246BD /* AgoraAIDenoiseExtension.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = AgoraAIDenoiseExtension.xcframework; path = ../iosRTCLibs/AgoraAIDenoiseExtension.xcframework; sourceTree = "<group>"; }; 04954382290A96E0007246BD /* AgoraAIDenoiseExtension.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = AgoraAIDenoiseExtension.xcframework; path = ../iosRTCLibs/AgoraAIDenoiseExtension.xcframework; sourceTree = "<group>"; };
...@@ -273,6 +275,7 @@ ...@@ -273,6 +275,7 @@
83CBB9F61A601CBA00E9B192 = { 83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0404A8AC291D27330097EC84 /* Static.bundle */,
049544CE290AC33A007246BD /* File.swift */, 049544CE290AC33A007246BD /* File.swift */,
7EBB9ADA26196E6F009EBC2D /* checkbox-checked.png */, 7EBB9ADA26196E6F009EBC2D /* checkbox-checked.png */,
7EBB9ADB26196E6F009EBC2D /* checkbox.png */, 7EBB9ADB26196E6F009EBC2D /* checkbox.png */,
...@@ -458,6 +461,7 @@ ...@@ -458,6 +461,7 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
7EF33C8E260DD28F00FC3C73 /* Storyboard.storyboard in Resources */, 7EF33C8E260DD28F00FC3C73 /* Storyboard.storyboard in Resources */,
7EBB9ADD26196E6F009EBC2D /* checkbox.png in Resources */, 7EBB9ADD26196E6F009EBC2D /* checkbox.png in Resources */,
0404A8AD291D27330097EC84 /* Static.bundle in Resources */,
048B61F72914F17C00AC4BD9 /* main.jsbundle in Resources */, 048B61F72914F17C00AC4BD9 /* main.jsbundle in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
......
...@@ -52,6 +52,22 @@ ...@@ -52,6 +52,22 @@
<key>UIAppFonts</key> <key>UIAppFonts</key>
<array> <array>
<string>PangMenZhengDao.ttf</string> <string>PangMenZhengDao.ttf</string>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
</array> </array>
<key>UIApplicationSceneManifest</key> <key>UIApplicationSceneManifest</key>
<dict> <dict>
...@@ -77,3 +93,4 @@ ...@@ -77,3 +93,4 @@
<false/> <false/>
</dict> </dict>
</plist> </plist>
module.exports = {
dependencies: {
'react-native-vector-icons': {
platforms: {
ios: null,
},
},
},
};
\ No newline at end of file
...@@ -502,25 +502,25 @@ export default class Index extends Component { ...@@ -502,25 +502,25 @@ export default class Index extends Component {
console.log(self.whoosh) console.log(self.whoosh)
} }
pickFile = async (type) => { pickFile = async (type) => {
let isImage = type == 'image'
try { try {
let res; let res;
if (type == 'image') { if (isImage) {
// res = await DocumentPicker.pick({ // res = await DocumentPicker.pick({
// type: [DocumentPicker.types.images,], // type: [DocumentPicker.types.images,],
// }); // });
res = await ImagePicker.openPicker({ res = await ImagePicker.openPicker({
cropping: false, cropping: false,
multiple: true, multiple: true,
maxFiles: 1, maxFiles: 1,
loadingLabelText: "正在获取图片", loadingLabelText: "正在获取图片",
compressImageQuality: 0.6, compressImageQuality: 0.6,
forceJpg: true, forceJpg: true,
mediaType: 'photo', mediaType: 'photo',
cropperToolbarTitle: "裁剪", cropperToolbarTitle: "裁剪",
// cropperChooseText: "hello" // cropperChooseText: "hello"
}) })
console.log(res,'2323232') console.log(res,'2323232')
return;
} else { } else {
res = await DocumentPicker.pick({ res = await DocumentPicker.pick({
type: [DocumentPicker.types.doc, DocumentPicker.types.docx, DocumentPicker.types.pdf, DocumentPicker.types.ppt, type: [DocumentPicker.types.doc, DocumentPicker.types.docx, DocumentPicker.types.pdf, DocumentPicker.types.ppt,
...@@ -532,14 +532,14 @@ export default class Index extends Component { ...@@ -532,14 +532,14 @@ export default class Index extends Component {
let file = res[0] let file = res[0]
console.log(res, file.uri); console.log(res, file.uri);
Constants.uploadFile(Api.uploadFile({ Constants.uploadFile(Api.uploadFile({
file: file.uri, file:isImage?file.path:file.uri,
folder: 'student', folder: 'student',
name: file.name name:isImage?file.filename: file.name
})).then((response) => { })).then((response) => {
return response.json() return response.json()
}).then(data => { }).then(data => {
console.log('save pickFile', data, JSON.stringify(data)); console.log('save pickFile', data, JSON.stringify(data));
if (type == 'image') { if (isImage) {
let imgList = this.state.pushImgList let imgList = this.state.pushImgList
data.data.fileList.forEach(item => { data.data.fileList.forEach(item => {
imgList.push({ imgList.push({
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { View, FlatList, Text, Image, StyleSheet } from 'react-native'; import { View, FlatList, Text, Image,Platform, StyleSheet } from 'react-native';
import Button from 'react-native-button'; import Button from 'react-native-button';
import Constants from '../../../Constants'; import Constants from '../../../Constants';
// import Picker from 'react-native-picker'; // import Picker from 'react-native-picker';
...@@ -44,9 +44,11 @@ export default class SoundScreen extends Component { ...@@ -44,9 +44,11 @@ export default class SoundScreen extends Component {
} }
build = () => { build = () => {
let audioSrc = this.props.audioSrc; //这个音频放在android\app\src\main\res\raw let audioSrc = this.props.audioSrc; //这个音频放在android\app\src\main\res\raw
let whoosh = new Sound(audioSrc, Sound.MAIN_BUNDLE, (error) => { // Sound.MAIN_BUNDLE
let whoosh = new Sound(audioSrc,Platform.OS == 'ios'?null:Sound.MAIN_BUNDLE, (error) => {
if (error) { if (error) {
alert('加载声音失败'); alert('加载声音失败');
console.log(error)
return; return;
} }
this.setState({ whoosh: whoosh }); this.setState({ whoosh: whoosh });
...@@ -81,7 +83,7 @@ export default class SoundScreen extends Component { ...@@ -81,7 +83,7 @@ export default class SoundScreen extends Component {
// 播放 // 播放
_play = () => { _play = () => {
let whoosh = this.state.whoosh let whoosh = this.state.whoosh
if(whoosh._playing) return; if(whoosh && whoosh._playing) return;
whoosh.play((success) => { whoosh.play((success) => {
if (success) {//播放完成后的逻辑在这里处理 if (success) {//播放完成后的逻辑在这里处理
this._stop() this._stop()
......
...@@ -78,9 +78,10 @@ import PhotoEditor from 'react-native-photo-editor'; ...@@ -78,9 +78,10 @@ import PhotoEditor from 'react-native-photo-editor';
import AddNote from "../components/AddNote"; import AddNote from "../components/AddNote";
import EditNote from "../components/EditNote"; import EditNote from "../components/EditNote";
// import { RNLockScreen } from 'react-native-lock-screen'; // import { RNLockScreen } from 'react-native-lock-screen';
// alert(__DEV__)
let webViewUrl = (Platform.OS === 'android' ? 'file:///android_asset/' : '') + `Static.bundle/dd.html`; let webViewUrl = Platform.OS === 'android' ? 'file:///android_asset/Static.bundle/index.html' :require('../../Static.bundle/index.html')
webViewUrl = `file:///android_asset/Static.bundle/index.html` // webViewUrl = `file:///android_asset/Static.bundle/index.html`
let model = DeviceInfo.getModel(); let model = DeviceInfo.getModel();
...@@ -98,6 +99,7 @@ const roomDistance = (Constants.width - Constants.statusBarHeight - roomHeight) ...@@ -98,6 +99,7 @@ const roomDistance = (Constants.width - Constants.statusBarHeight - roomHeight)
const TopHright = roomHeight * 0.18; //视屏区域加tit区域 tit 为 uniwidth *28 const TopHright = roomHeight * 0.18; //视屏区域加tit区域 tit 为 uniwidth *28
const movingWidth = Constants.height; const movingWidth = Constants.height;
let movingHeight = roomHeight * 0.82; let movingHeight = roomHeight * 0.82;
const movingInitX = Constants.height * 0.5 - Constants.unitWidth * 75; const movingInitX = Constants.height * 0.5 - Constants.unitWidth * 75;
const wgDistanceTopHeight = roomDistance + (TopHright) + Constants.statusBarHeight const wgDistanceTopHeight = roomDistance + (TopHright) + Constants.statusBarHeight
...@@ -573,12 +575,10 @@ export default class Index extends Component<Props, State, HomeState, AppContext ...@@ -573,12 +575,10 @@ export default class Index extends Component<Props, State, HomeState, AppContext
this.sendLessonActivityInOut('in') this.sendLessonActivityInOut('in')
console.log( console.log(
'initEngine', 'initEngine',
{
width: Constants.height, height: Constants.width - Constants.statusBarHeight - Constants.unitWidth * 126
}
) )
WhiteBoardEngine.initEngine(this.state.appIdentifier, { WhiteBoardEngine.initEngine(this.state.appIdentifier, {
width: Constants.height, height: Constants.width - Constants.statusBarHeight - Constants.unitWidth * 126 width: Constants.height, height: movingHeight
}).then((e) => { }).then((e) => {
console.log('init white engine ok 1', e); console.log('init white engine ok 1', e);
this.getNetlessToken(); this.getNetlessToken();
...@@ -2400,7 +2400,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext ...@@ -2400,7 +2400,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
flexDirection: 'column', flexDirection: 'column',
width: Constants.height, width: Constants.height,
// height: Constants.width - Constants.statusBarHeight, // height: Constants.width - Constants.statusBarHeight,
height: Constants.height / 16 * 9 , height: roomHeight ,
backgroundColor:'red' backgroundColor:'red'
}}> }}>
...@@ -2431,7 +2431,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext ...@@ -2431,7 +2431,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
flexDirection: 'row', flexDirection: 'row',
width: movingWidth, width: movingWidth,
// height: movingHeight, // height: movingHeight,
height:'82%', height:movingHeight,
position: 'relative', position: 'relative',
backgroundColor: '#0E5C4A', backgroundColor: '#0E5C4A',
warp: 'renderMovingVideo', warp: 'renderMovingVideo',
...@@ -2556,7 +2556,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext ...@@ -2556,7 +2556,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
this.state.showNetless && <RCTTICBridgeView styleBox={[LiveCSS.wbWrapper, { this.state.showNetless && <RCTTICBridgeView styleBox={[LiveCSS.wbWrapper, {
display: this.state.showNetless2 ? 'flex' : 'none', display: this.state.showNetless2 ? 'flex' : 'none',
zIndex: this.state.canEditWB && this.state.wbTool !== '' ? 100 : -1, zIndex: this.state.canEditWB && this.state.wbTool !== '' ? 100 : -1,
height:'100%', height:movingHeight,
}, },
// !isFhPad?{height:Constants.width - Constants.statusBarHeight - Constants.unitWidth * 86}:'' // !isFhPad?{height:Constants.width - Constants.statusBarHeight - Constants.unitWidth * 86}:''
]} /> ]} />
...@@ -3281,7 +3281,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext ...@@ -3281,7 +3281,7 @@ export default class Index extends Component<Props, State, HomeState, AppContext
// </View> // </View>
<View style={{ width: '100%', height: '100%', overflow: 'hidden', position: 'absolute', zIndex: 11, backgroundColor: '#0E5C4A', }}> <View style={{ width: '100%', height: '100%', overflow: 'hidden', position: 'absolute', zIndex: 11, backgroundColor: '#0E5C4A', }}>
<WebView <WebView
source={{ uri: `${webViewUrl}?token=${Constants.token}&type=${this.state.webViewBoard}}`, method: 'GET', headers: { 'Cache-Control': 'no-cache' } }} source={ Platform.OS === 'android' ? { uri: `${webViewUrl}`, method: 'GET', headers: { 'Cache-Control': 'no-cache' } }:webViewUrl}
style={{ width: '100%', height: '100%' }} style={{ width: '100%', height: '100%' }}
mixedContentMode='compatibility' mixedContentMode='compatibility'
onMessage={this.onMessage} onMessage={this.onMessage}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment