From 0d71d530ad6e4e6eddf538f9cde932ddb5576757 Mon Sep 17 00:00:00 2001 From: zhanq Date: Tue, 16 Apr 2019 18:29:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A4=BA=E4=BE=8Bdemo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/App.js | 119 ++++++++++++++++++++++++++++++------------- example/package.json | 4 +- 2 files changed, 85 insertions(+), 38 deletions(-) diff --git a/example/App.js b/example/App.js index c5cedc8..6b89e7e 100644 --- a/example/App.js +++ b/example/App.js @@ -3,15 +3,16 @@ import { StyleSheet, Text, View, TouchableHighlight, ScrollView, TextInput, Aler import JVerification from 'jverification-react-native' var styles = StyleSheet.create({ - parent: { - padding: 35, - - flexDirection: 'column', + container: { + flex: 1, justifyContent: 'center', alignItems: 'center', + backgroundColor: '#F5FCFF', }, setBtnStyle: { - width: 180, + width: 280, + justifyContent: 'center', + alignItems: 'center', marginTop: 10, borderWidth: 1, borderColor: '#3e83d7', @@ -51,7 +52,44 @@ class Button extends React.Component { } } -// type Props = {}; +//一键登录页面自定义配置,需要在调用login之前设置 +var config = { + navColor:-16742704, //导航栏颜色 + navText: "一键登录", //导航栏标题 + navTextColor:-1, //导航栏标题文字颜色 + navReturnImage:"自定义返回按钮图片", //导航栏左侧返回按钮 + + logoHidden:false, //logo是否隐藏 + logoImage:"umcsdk_mobile_logo", //logo(android默认为应用图标;ios默认无) + logoWidth:100, //logo宽 + logoHeight:100, //logo高 + logoOffsetY:75, //logo相对导航栏向下偏移量 + + numberColor:-16742704, //手机号码文字颜色 + numOffsetY:200, //手机号码相对导航栏向下偏移量 + + sloganTextColor:-16742704, //slogan文字颜色 + sloganOffsetY:250, //slogan相对导航栏向下偏移量 + + loginBtnText:"本机号码登录", //登录按钮文字 + loginBtnTextColor:-1, //登录按钮文字颜色 + loginBtnImageStyle:"自定义登录按钮样式", //登录按钮selector选择样式 (仅android) + loginBtnNormalImage:"自定义登录按钮正常图片", //登录按钮正常图片 (仅ios,三个同时设置生效) + loginBtnUnableImage:"自定义登录按钮失效图片", //登录按钮失效图片 (仅ios,三个同时设置生效) + loginBtnPressedImage:"自定义登录按钮按下图片", //登录按钮按下图片 (仅ios,三个同时设置生效) + + loginBtnOffsetY:280, //登录按钮相对导航栏向下偏移量 + + privacyOneName:"自定义隐私条款一", //隐私条款一 + privacyOneUrl:"https://www.jiguang.cn", //隐私条款一链接 + privacyTwoName:"自定义隐私条款二", //隐私条款二 + privacyTwoUrl:"https://www.jiguang.cn", //隐私条款二链接 + privacyBasicColor:-16742704, //隐私条款基础文字颜色 + privacyProtocolColor:-16777216, //隐私条款文字颜色 + privacyCheckImage:"自定义选择图片", //隐私条款复选框选中图片 + privacyUncheckImage:"自定义未选择图片", //隐私条款复选框未选中图片 + privacyOffsetY:20 //隐私条款相对底部向上偏移量 +} export default class App extends React.Component { constructor(props){ @@ -63,18 +101,23 @@ export default class App extends React.Component { return (