提交 0d9e986a authored 作者: 吴强's avatar 吴强

人口上传头像,有点问题,就是无法改名字

上级 3b113569
差异被折叠。
import React, { Component } from 'react'; import React, { Component } from 'react';
import PhotoBrowser from 'react-native-photo-browser'; import {
Platform,
export default class HomeScreen extends Component { ActionSheetIOS,
static navigationOptions = { } from 'react-native';
header: null, import PhotoBrowser from 'react-native-photo-browser';
};
export default class HomeScreen extends Component {
// onSelectionChanged = (media, index, selected) => { static navigationOptions = {
// console.info(`${media.photo} selection status: ${selected}`); header: null,
// }; };
// onActionButton = (media, index) => { onSelectionChanged = (media, index, selected) => {
// if (Platform.OS === 'ios') { console.info(`${media.photo} selection status: ${selected}`);
// ActionSheetIOS.showShareActionSheetWithOptions( };
// {
// url: media.photo, onActionButton = (media, index) => {
// message: media.caption, if (Platform.OS === 'ios') {
// }, ActionSheetIOS.showShareActionSheetWithOptions(
// () => {}, {
// () => {}, url: media.photo,
// ); message: media.caption,
// } else { },
// console.info(`handle sharing on android for ${media.photo}, index: ${index}`); () => {},
// } () => {},
// }; );
} else {
render() { console.info(`handle sharing on android for ${media.photo}, index: ${index}`);
const { }
media, };
initialIndex,
displayNavArrows, render() {
displayActionButton, const {
displaySelectionButtons, media,
startOnGrid, initialIndex,
enableGrid, displayNavArrows,
alwaysDisplayStatusBar, displayActionButton,
} = this.props.navigation.state.params.example; displaySelectionButtons,
startOnGrid,
return ( enableGrid,
<PhotoBrowser alwaysDisplayStatusBar,
onBack={this.props.navigation.pop} } = this.props.navigation.state.params.example;
mediaList={media} return (
initialIndex={initialIndex} <PhotoBrowser
displayNavArrows={displayNavArrows} onBack={this.props.navigation.pop}
displaySelectionButtons={displaySelectionButtons} mediaList={media}
displayActionButton={displayActionButton} initialIndex={initialIndex}
startOnGrid={startOnGrid} displayNavArrows={displayNavArrows}
enableGrid={enableGrid} displaySelectionButtons={displaySelectionButtons}
useCircleProgress displayActionButton={displayActionButton}
onSelectionChanged={this.onSelectionChanged} startOnGrid={startOnGrid}
onActionButton={this.onActionButton} enableGrid={enableGrid}
alwaysDisplayStatusBar={alwaysDisplayStatusBar} useCircleProgress
customTitle={(index, rowCount) => `${index} sur ${rowCount}`} onSelectionChanged={this.onSelectionChanged}
/> onActionButton={this.onActionButton}
); alwaysDisplayStatusBar={alwaysDisplayStatusBar}
} customTitle={(index, rowCount) => `${index} sur ${rowCount}`}
} />
);
}
}
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { import {
View, View,
StyleSheet, StyleSheet,
Text, Text,
TouchableOpacity, TouchableOpacity,
Image, Image,
Platform, Platform,
ScrollView, ScrollView,
} from 'react-native'; } from 'react-native';
import TagInput from 'react-native-tag-input'; import TagInput from 'react-native-tag-input';
import { InputItem } from 'antd-mobile'; import { InputItem } from 'antd-mobile';
import { createOperations, editResource, uploadResource } from '../services/resource'; import { createOperations, editResource, uploadResource } from '../services/resource';
import { currentDomain } from '../services/domain';
const styles = StyleSheet.create({
container: { const styles = StyleSheet.create({
flex: 1, container: {
}, flex: 1,
view_header_container: { },
height: 56, view_header_container: {
backgroundColor: 'white', height: 56,
flexDirection: 'row', backgroundColor: 'white',
alignItems: 'center', flexDirection: 'row',
justifyContent: 'space-around', alignItems: 'center',
}, justifyContent: 'space-around',
text_right_title: { },
color: '#000', text_right_title: {
}, color: '#000',
text_left_title: { },
color: '#000', text_left_title: {
}, color: '#000',
text_title: { },
color: '#000', text_title: {
fontSize: 18, color: '#000',
}, fontSize: 18,
// uploadImage: { },
// height: Dimensions.get('window').height, // uploadImage: {
// width: Dimensions.get('window').width, // height: Dimensions.get('window').height,
// }, // width: Dimensions.get('window').width,
}); // },
const inputProps = { });
keyboardType: 'default', const inputProps = {
placeholder: '如:身份证', keyboardType: 'default',
autoFocus: true, placeholder: '如:身份证',
style: { autoFocus: true,
fontSize: 14, style: {
marginVertical: Platform.OS === 'ios' ? 10 : -2, fontSize: 14,
}, marginVertical: Platform.OS === 'ios' ? 10 : -2,
}; },
class UploadPageComponent extends PureComponent { };
constructor(props) { class UploadPageComponent extends PureComponent {
super(props); constructor(props) {
const { imageURI, tableName, pID } = this.props.navigation.state.params; super(props);
this.state = { const { imageURI, tableName, pID } = this.props.navigation.state.params;
imageURI, this.state = {
tableName, imageURI,
pID, tableName,
tags: ['身份证', '红本', '绿本'], pID,
text: '', tags: ['身份证', '红本', '绿本'],
imageName: '', text: '',
}; imageName: '',
} };
}
onChangeTags = (tags) => {
this.setState({ tags }); onChangeTags = (tags) => {
}; this.setState({ tags });
onChangeText = (text) => { };
this.setState({ text }); onChangeText = (text) => {
this.setState({ text });
const lastTyped = text.charAt(text.length - 1);
const parseWhen = [',', ' ', ';', '\n']; const lastTyped = text.charAt(text.length - 1);
const parseWhen = [',', ' ', ';', '\n'];
if (parseWhen.indexOf(lastTyped) > -1) {
this.setState({ if (parseWhen.indexOf(lastTyped) > -1) {
tags: [...this.state.tags, this.state.text], this.setState({
text: '', tags: [...this.state.tags, this.state.text],
}); text: '',
} });
}; }
};
onCancel = () => {
this.props.onCancel(); onCancel = () => {
}; this.props.onCancel();
onUploadPhoto = () => { };
uploadResource( onUploadPhoto = () => {
this.state.imageURI, uploadResource(
(uploadId, arg) => { this.state.imageURI,
editResource(arg, createOperations().setName(this.state.imageName).setTags(this.state.tags).use(`rel://path/${this.state.tableName}/${this.state.pID}`)).then().catch(err => console.info(`上传后改名字改tag:${err}`)); (uploadId, arg) => console.info(arg),
console.info('跳转'); (uploadId, arg) => {
this.props.navigation.navigate('DSRInfoDetail', this.props.navigation.state.params.pID); currentDomain()
}, .then((result) => {
(uploadId, arg) => console.info(arg), editResource(arg, createOperations().setName(this.state.imageName).setTags(this.state.tags).use(`rel://${result.path}/${this.state.tableName}/${this.state.pID}`)).then(cc => console.info(cc)).catch(err => console.info(`上传后改名字改tag:${err}`));
) console.info('跳转');
.then(uploadId => console.log(`start task ${uploadId}`)) this.props.navigation.navigate('DSRInfoDetail', { id: this.props.navigation.state.params.pID });
.catch(err => console.log(`上传失败:${err}`)); })
}; .catch(err => console.info(err));
setImageName = (val) => { },
console.info(`val:${val}`); )
this.setState({ imageName: val }); .then(uploadId => console.log(`start task ${uploadId}`))
} .catch(err => console.log(`上传失败:${err}`));
labelExtractor = tag => tag; };
renderHeaderMenu = () => { setImageName = (val) => {
return ( console.info(`val:${val}`);
<View style={[styles.view_header_container, { backgroundColor: 'lightgray' }]}> this.setState({ imageName: val });
<TouchableOpacity }
onPress={this.onCancel} labelExtractor = tag => tag;
> renderHeaderMenu = () => {
<Text style={[styles.text_left_title, { color: '#2196F3' }]}>取消</Text> return (
</TouchableOpacity> <View style={[styles.view_header_container, { backgroundColor: 'lightgray' }]}>
<Text style={styles.text_title}>传照片</Text> <TouchableOpacity
<TouchableOpacity onPress={this.onCancel}
onPress={this.onUploadPhoto} >
> <Text style={[styles.text_left_title, { color: '#2196F3' }]}>取消</Text>
<Text style={[styles.text_right_title, { color: '#2196F3' }]}> </TouchableOpacity>
上传 <Text style={styles.text_title}>传照片</Text>
</Text> <TouchableOpacity
</TouchableOpacity> onPress={this.onUploadPhoto}
</View> >
); <Text style={[styles.text_right_title, { color: '#2196F3' }]}>
} 上传
render() { </Text>
return ( </TouchableOpacity>
<View style={styles.container}> </View>
{this.renderHeaderMenu()} );
<ScrollView> }
<Image render() {
style={{ height: 80, width: 80 }} return (
source={{ uri: this.state.imageURI, isStatic: true }} <View style={styles.container}>
/> {this.renderHeaderMenu()}
<InputItem <ScrollView>
placeholder="如:张三" <Image
data-seed="logId" style={{ height: 80, width: 80 }}
onChange={this.setImageName} source={{ uri: this.state.imageURI, isStatic: true }}
>照片名称 />
</InputItem> <InputItem
<View style={{ flexDirection: 'row', alignItems: 'center', backgroundColor: 'lightgray' }}> placeholder="如:张三"
<Text>类型</Text> data-seed="logId"
<TagInput onChange={this.setImageName}
value={this.state.tags} >照片名称
onChange={this.onChangeTags} </InputItem>
labelExtractor={this.labelExtractor} <View style={{ flexDirection: 'row', alignItems: 'center', backgroundColor: 'lightgray' }}>
text={this.state.text} <Text>类型</Text>
onChangeText={this.onChangeText} <TagInput
tagColor="blue" value={this.state.tags}
tagTextColor="white" onChange={this.onChangeTags}
inputProps={inputProps} labelExtractor={this.labelExtractor}
maxHeight={75} text={this.state.text}
/> onChangeText={this.onChangeText}
</View> tagColor="blue"
</ScrollView> tagTextColor="white"
</View> inputProps={inputProps}
); maxHeight={75}
} />
} </View>
</ScrollView>
</View>
export default UploadPageComponent; );
}
}
export default UploadPageComponent;
import { NavigationActions } from 'react-navigation'; import { NavigationActions } from 'react-navigation';
import { login, userInfo } from '../services/login'; import { login, userInfo } from '../services/login';
import { errors } from '../utils/error'; import { errors } from '../utils/error';
import { setToken, setUser } from '../utils/auth'; import { setToken, setUser } from '../utils/auth';
export default { export default {
namespace: 'login', namespace: 'login',
state: {}, state: {},
reducers: { reducers: {
}, },
effects: { effects: {
*login({ payload }, { call, put }) { // 这里的put 代表 跟dispatch一样的功能,只是在effects中叫做put *login({ payload }, { call, put }) { // 这里的put 代表 跟dispatch一样的功能,只是在effects中叫做put
const payloads = { ...payload, type: 'userName', authType: 'password' }; const payloads = { ...payload, type: 'userName', authType: 'password' };
console.info(payloads); const result = yield call(login, payloads);
const result = yield call(login, payloads); const { tokenId, authResponse, remainedAuthRequirements } = result;
const { tokenId, authResponse, remainedAuthRequirements } = result; if (authResponse.status !== 'authed' && authResponse.status !== 'skipped') {
if (authResponse.status !== 'authed' && authResponse.status !== 'skipped') { throw errors.wrongPassword();
throw errors.wrongPassword(); }
} const { requirements } = remainedAuthRequirements;
console.log(authResponse); if (requirements.length > 0) {
const { requirements } = remainedAuthRequirements; throw errors.unsupportedAuthType(requirements);
if (requirements.length > 0) { }
throw errors.unsupportedAuthType(requirements); yield call(setToken, tokenId);// 这里的yield ,跟C#中的await一样
} const uInfo = yield call(userInfo);
console.log(requirements); yield call(setUser, uInfo.id, uInfo.name); // 保存用户名密码
yield call(setToken, tokenId);// 这里的yield ,跟C#中的await一样 yield put(NavigationActions.navigate({
const uInfo = yield call(userInfo); routeName: 'Main',
console.log(uInfo); }));
yield call(setUser, uInfo.id, uInfo.name); // 保存用户名密码 },
yield put(NavigationActions.navigate({ },
routeName: 'Main', subscriptions: {},
})); };
},
},
subscriptions: {},
};
import { AsyncStorage } from 'react-native'; import { AsyncStorage } from 'react-native';
import { NavigationActions } from 'react-navigation'; import { NavigationActions } from 'react-navigation';
// import codePush from 'react-native-code-push'; // import codePush from 'react-native-code-push';
import { checkUpdate } from '../services/update'; import { checkUpdate } from '../services/update';
import { update } from '../native/Updater'; import { update } from '../native/Updater';
import config from '../utils/config'; import config from '../utils/config';
import { encrypt } from '../utils/helper'; import { encrypt } from '../utils/helper';
import app from '../index'; import app from '../index';
export default { export default {
namespace: 'welcome', namespace: 'welcome',
state: { state: {
percent: 0, percent: 0,
}, promptText: '',
reducers: { },
setPercent(state, { payload }) { reducers: {
return { setPercent(state, { payload }) {
...state, return {
percent: payload.progress, ...state,
}; percent: payload.progress,
}, };
}, },
effects: { setPromptText(state, { payload }) {
*init(ignored, { put, call }) { return {
try { ...state,
// yield call(codePush.sync); promptText: payload.promptText,
// const result = yield call(checkUpdate); };
// const { action, deploymentInfo, tokenId } = result; },
// if (action === 'update') { },
// const token = encrypt(tokenId); effects: {
// // console.info(`${config.updateContextPath}/resource/${token}/${encodeURIComponent(deploymentInfo.uri)}`); *init(ignored, { put, call }) {
// console.log('开始'); try {
// yield call( // yield call(codePush.sync);
// update, `${config.updateContextPath}/resource/${token}/${encodeURIComponent(deploymentInfo.uri)}`, const result = yield call(checkUpdate);
// (event) => { console.info(result);
// app.getStore().dispatch({ type: 'welcome/setPercent', payload: { progress: event.progress } }); const { action, deploymentInfo, tokenId } = result;
// }, if (action === 'update' || action === 'rollback') {
// ); yield put({ type: 'setPromptText', payload: { promptText: `${action === 'update' ? '更新中...' : '回滚中'}` } });
// console.log('结束结束结束结束结束结束结束结束结束结束'); const token = encrypt(tokenId);
// } yield call(
} catch (e) { update, `${config.updateContextPath}/resource/${token}/${encodeURIComponent(deploymentInfo.uri)}`,
console.log(e); // eslint-disable-line no-console (event) => {
} app.getStore().dispatch({ type: 'welcome/setPercent', payload: { progress: event.progress } });
const token = yield call(AsyncStorage.getItem, 'token'); },
if (!token) { );
yield put(NavigationActions.navigate({ }
routeName: 'Login', } catch (e) {
})); console.log(e); // eslint-disable-line no-console
} else { }
yield put(NavigationActions.navigate({ const token = yield call(AsyncStorage.getItem, 'token');
routeName: 'Main', if (!token) {
})); yield put(NavigationActions.navigate({
} routeName: 'Login',
}, }));
}, } else {
}; yield put(NavigationActions.navigate({
routeName: 'Main',
}));
}
},
},
};
/** @module native/Updater */ /** @module native/Updater */
import { NativeModules, DeviceEventEmitter } from 'react-native'; import { NativeModules, DeviceEventEmitter } from 'react-native';
const { Updater } = NativeModules; const { Updater } = NativeModules;
/** /**
* @typedef {Object} UpdateEvent 下载事件 * @typedef {Object} UpdateEvent 下载事件
* @property {string} status 事件类型,downloading或downloaded * @property {string} status 事件类型,downloading或downloaded
* @property {number} progress 下载进度,0到100的整数 * @property {number} progress 下载进度,0到100的整数
* @property {number} current 已下载字节数 * @property {number} current 已下载字节数
* @property {number} all 总字节数 * @property {number} all 总字节数
*/ */
/** /**
* @callback UpdateCallback 下载回调 * @callback UpdateCallback 下载回调
* @param {UpdateEvent} event 下载事件 * @param {UpdateEvent} event 下载事件
*/ */
/** /**
* 下载更新包并自动安装, 下载过程中会发送Updater/downloading事件,下载完成时会发送Updater/downloaded事件 * 下载更新包并自动安装, 下载过程中会发送Updater/downloading事件,下载完成时会发送Updater/downloaded事件
* @param {string} url 更新地址 * @param {string} url 更新地址
* @param {UpdateCallback} cb 下载回调 * @param {UpdateCallback} cb 下载回调
* @returns {Promise.<void>} * @returns {Promise.<void>}
*/ */
export const update = async (url, cb) => { export const update = async (url, cb) => {
let handle1; let handle1;
let handle2; let handle2;
if (cb) { if (cb) {
handle1 = DeviceEventEmitter.addListener('Updater/downloading', (event) => { handle1 = DeviceEventEmitter.addListener('Updater/downloading', (event) => {
cb({ cb({
...event, ...event,
status: 'downloading', status: 'downloading',
}); });
}); });
handle2 = DeviceEventEmitter.addListener('Updater/downloaded', (event) => { handle2 = DeviceEventEmitter.addListener('Updater/downloaded', (event) => {
cb({ cb({
...event, ...event,
status: 'downloaded', status: 'downloaded',
}); });
}); });
} }
await Updater.update(url); console.info(Updater);
if (handle1) { await Updater.update(url);
handle1.remove(); if (handle1) {
} handle1.remove();
if (handle2) { }
handle2.remove(); if (handle2) {
} handle2.remove();
}; }
};
/**
* 取消当前更新进程 /**
* @returns {Promise.<void>} * 取消当前更新进程
*/ * @returns {Promise.<void>}
export const cancel = async () => { */
return Updater.cancel(); export const cancel = async () => {
}; return Updater.cancel();
};
/** /**
* Created by zhouhuan on 2017/11/3. * Created by zhouhuan on 2017/11/3.
*/ */
import { StackNavigator } from 'react-navigation'; import { StackNavigator } from 'react-navigation';
import PeopleInfo from './peopelInfo'; import PeopleInfo from './peopelInfo';
import PeopleDetailInfo from './peopleDetailInfo'; import PeopleDetailInfo from './peopleDetailInfo';
import AddPeopleInfo from './addPeopleInfo'; import AddPeopleInfo from './addPeopleInfo';
import peopleDetailEditScreen from "./peopleDetailEditScreen"; import peopleDetailEditScreen from './peopleDetailEditScreen';
import FileViewList from '../dangshireninfo/fileViewList';
const peopleInfoErJiScreen = StackNavigator(
{ const peopleInfoErJiScreen = StackNavigator(
peopleInfoList: { {
screen: PeopleInfo, peopleInfoList: {
}, screen: PeopleInfo,
peopleInfoDetail: { },
screen: PeopleDetailInfo, peopleInfoDetail: {
}, screen: PeopleDetailInfo,
addPeoppleInfo: { },
screen: AddPeopleInfo, addPeoppleInfo: {
}, screen: AddPeopleInfo,
peopleInfoDetailEdit: { },
screen: peopleDetailEditScreen, peopleInfoDetailEdit: {
}, screen: peopleDetailEditScreen,
}, },
{ peopleInfoFileView: {
headerMode: 'none', screen: FileViewList,
navigationOptions: { },
gesturesEnabled: false, },
}, {
}, headerMode: 'none',
); navigationOptions: {
export default peopleInfoErJiScreen; gesturesEnabled: false,
},
},
);
export default peopleInfoErJiScreen;
/** /**
* Created by zhouhuan on 2017/11/2. * Created by zhouhuan on 2017/11/2.
*/ */
import React from 'react'; import React from 'react';
import { View, ScrollView } from 'react-native'; import { View, ScrollView } from 'react-native';
import { List, InputItem, WhiteSpace, WingBlank } from 'antd-mobile'; import { List, WhiteSpace, WingBlank } from 'antd-mobile';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Icon from 'react-native-vector-icons/FontAwesome'; import Icon from 'react-native-vector-icons/FontAwesome';
import { createAction } from '../../../utils'; import { createAction } from '../../../utils';
import { currentDomain } from '../../../services/domain';
@connect(({ peopleInfo }) => ({ peopleInfo }))
class PeopleDetailInfo extends React.Component { @connect(({ peopleInfo }) => ({ peopleInfo }))
componentDidMount() { class PeopleDetailInfo extends React.Component {
const { id } = this.props.navigation.state.params; componentDidMount() {
this.props.dispatch(createAction('peopleInfo/getPeopleDetail')(id)); const { id } = this.props.navigation.state.params;
} this.props.dispatch(createAction('peopleInfo/getPeopleDetail')(id));
onEdit =() => { }
const { id } = this.props.navigation.state.params; onEdit =() => {
this.props.dispatch(createAction('peopleInfo/GoToPeopleDetailEditScreen')(id)); const { id } = this.props.navigation.state.params;
}; this.props.dispatch(createAction('peopleInfo/GoToPeopleDetailEditScreen')(id));
render() { };
const { detailData, metas } = this.props.peopleInfo; goToViewPage =() => {
return ( currentDomain()
<ScrollView> .then((result) => {
<WhiteSpace /> this.props.navigation.navigate('peopleInfoFileView', { usage: `rel://${result.path}/DangShiRenRenKouXinXi/${this.props.navigation.state.params.id}` });
<WhiteSpace /> })
<WingBlank> .catch(err => console.info(err));
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}> // this.props.dispatch(createAction('DSRInfoDetail/setEnable')(true));
{/* <Icon.Button };
name="edit" render() {
backgroundColor="#08BBF9" const { detailData, metas } = this.props.peopleInfo;
onPress={this.onEdit} return (
> <ScrollView>
编辑 <WhiteSpace />
</Icon.Button> */} <WhiteSpace />
</View> <WingBlank>
<WhiteSpace /> <View style={{ flexDirection: 'row', justifyContent: 'flex-end' }}>
<List> <Icon.Button
{ name="eye"
metas.map((m) => { backgroundColor="#08BBF9"
return ( onPress={this.goToViewPage}
<List.Item >
key={m.key} 资料查看
extra={detailData[m.key]} </Icon.Button>
wrap </View>
> <WhiteSpace />
{m.label} <List>
</List.Item> {
); metas.map((m) => {
}) return (
} <List.Item
</List> key={m.key}
</WingBlank> extra={detailData[m.key]}
</ScrollView> wrap
); >
} {m.label}
} </List.Item>
export default PeopleDetailInfo; );
})
}
</List>
</WingBlank>
</ScrollView>
);
}
}
export default PeopleDetailInfo;
import React, { Component } from 'react'; import React, { Component } from 'react';
import { View, StyleSheet, Text } from 'react-native'; import { View, StyleSheet, Text } from 'react-native';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import SplashScreen from 'react-native-splash-screen'; import SplashScreen from 'react-native-splash-screen';
import { createAction } from '../utils/index'; import { createAction } from '../utils/index';
import PercentageCircle from '../components/roundProgressBarComponent'; import PercentageCircle from '../components/roundProgressBarComponent';
@connect(({ welcome }) => ({ welcome })) @connect(({ welcome }) => ({ welcome }))
class WelcomeScreen extends Component { class WelcomeScreen extends Component {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch(createAction('welcome/init')()); dispatch(createAction('welcome/init')());
SplashScreen.hide();// 隐藏启动平 SplashScreen.hide();// 隐藏启动平
} }
// 待改进,改成启动页,目前因为时间和技术的问题,搁置。wq write IsUpdate = () => {
render() { if (this.props.welcome.promptText !== '') {
return ( return <PercentageCircle radius={60} percent={this.props.welcome.percent} color="#3498db" />;
<View style={styles.container}> }
<Text>wlecome</Text> };
<View> // 待改进,改成启动页,目前因为时间和技术的问题,搁置。wq write
<PercentageCircle radius={60} percent={this.props.welcome.percent} color="#3498db" /> render() {
</View> return (
</View> <View style={styles.container}>
); <Text>{this.props.welcome.promptText === '' ? 'welcome' : this.props.welcome.promptText}</Text>
} <View>
} {
this.IsUpdate()
const styles = StyleSheet.create({ }
container: { </View>
flex: 1, </View>
justifyContent: 'center', );
alignItems: 'center', }
backgroundColor: '#ffffff', }
},
img: { const styles = StyleSheet.create({
flex: 1, container: {
width: 400, flex: 1,
height: 200, justifyContent: 'center',
resizeMode: 'contain', alignItems: 'center',
}, backgroundColor: '#ffffff',
}); },
img: {
flex: 1,
export default WelcomeScreen; width: 400,
height: 200,
resizeMode: 'contain',
},
});
export default WelcomeScreen;
/* eslint-disable no-undef */ /* eslint-disable no-undef */
/** /**
* Created by yaohx_169 on 2017/6/6. * Created by yaohx_169 on 2017/6/6.
*/ */
export const cookie = { export const cookie = {
token: 'token', token: 'token',
userId: 'userId', userId: 'userId',
userName: 'userName', userName: 'userName',
domainPath: 'domainPath', domainPath: 'domainPath',
domainName: 'domainName', domainName: 'domainName',
}; };
export const errors = { export const errors = {
exception: 0x00010000, exception: 0x00010000,
no_such_user: 0x00010001, no_such_user: 0x00010001,
invalid_token: 0x00010003, invalid_token: 0x00010003,
// client error: // client error:
token_missing: 0x00000001, token_missing: 0x00000001,
wrong_password: 0x00000002, wrong_password: 0x00000002,
unsupported_auth_type: 0x00000003, unsupported_auth_type: 0x00000003,
}; };
const defaultDateFormat = 'YYYY-MM-DD'; const defaultDateFormat = 'YYYY-MM-DD';
const defaultTimeFormat = 'HH:mm:ss'; const defaultTimeFormat = 'HH:mm:ss';
const defaultDateTimeFormat = `${defaultDateFormat} ${defaultTimeFormat}`; const defaultDateTimeFormat = `${defaultDateFormat} ${defaultTimeFormat}`;
const config = { const config = {
name: 'Jbpm Demo', name: 'Jbpm Demo',
productId: 'manager-app-sz', productId: 'manager-app-sz',
footerText: '上海铂蓝信息科技有限公司', footerText: '上海铂蓝信息科技有限公司',
contextPath: '', contextPath: '',
updateContextPath: 'http://192.168.1.22:8080/app', updateContextPath: 'http://14.21.68.149:9088/app',
// apiContextPath: 'http://14.21.68.149:9089/test', apiContextPath: 'http://14.21.68.149:9087/sz01',
apiContextPath: 'http://192.168.1.22:8080/sz', // updateContextPath: 'http://192.168.1.22:8080/app',
defaultDateFormat, // apiContextPath: 'http://192.168.1.22:8080/sz',
defaultTimeFormat, defaultDateFormat,
defaultDateTimeFormat, defaultTimeFormat,
pubKey: '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+/Rs6dYmdtETjHCZq4LF3QjLM/DocRAXrqtMULZf+579dAn+CiM8noLplZT/DRwvfK822eq8sypH+a4NqP7942pPVjOudVvKfiJvmm2TOQHvQ7vi3iyZVdlsxX72JNFo1Ocqwj48aIC/OJ4bMf/VyCKrmKrU2iXND+I4BN8cfhwIDAQAB-----END PUBLIC KEY-----', defaultDateTimeFormat,
}; pubKey: '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+/Rs6dYmdtETjHCZq4LF3QjLM/DocRAXrqtMULZf+579dAn+CiM8noLplZT/DRwvfK822eq8sypH+a4NqP7942pPVjOudVvKfiJvmm2TOQHvQ7vi3iyZVdlsxX72JNFo1Ocqwj48aIC/OJ4bMf/VyCKrmKrU2iXND+I4BN8cfhwIDAQAB-----END PUBLIC KEY-----',
};
export default config;
export default config;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论