帖子
帖子
用户
博客
课程
显示全部楼层
18
帖子
1
勋章
57
Y币

[多端开发] 求一个clSDKShanYanSDKModule demo包

[复制链接]
发表于 2024-4-26 11:46:59
clSDKShanYanSDKModule官方那个示例包不在了,哪个大佬有的求分享
Arly【770104707】
130
帖子
7
勋章
6万+
Y币
最佳答案
130
帖子
7
勋章
6万+
Y币
按照文档对接不行吗?还是什么情况?

https://developer.yonyou.com/doc ... SDKShanYanSDKModule
18
帖子
1
勋章
57
Y币
Arly【770104707】 · 2024-4-26 13:39按照文档对接不行吗?还是什么情况?

https://developer.yonyou.com/docs/Client-API/Open-SDK/clSDKShanYanSDKModule

文档里 少了关于安卓配置授权页样式的方法,原来那个demo里有写好的代码
130
帖子
7
勋章
6万+
Y币
新传 · 2024-4-26 13:53文档里 少了关于安卓配置授权页样式的方法,原来那个demo里有写好的代码
  1. _this.config = {
  2.         bgImg: 'ximafge/bg2.png', // 背景
  3.         navHidde: true, // 是否隐藏导航栏
  4.         navBg: '#ffffff',
  5.         navTxt: '一键登录',
  6.         navColor: '#000000',
  7.         navSize: '16',
  8.         navClear: true, // 导航是否透明

  9.         logoImg: 'ximafge/logo.png',

  10.         phoneColor: '#ffffff',

  11.         loginTxt: '本机号码一键登录',
  12.         loginColor: '#000000',
  13.         loginImg: 'ximafge/btn1.png',
  14.         check: false,

  15.         otherImg: 'ximafge/btn2.png',
  16.     }

  17.     _this.view = {
  18.         uiConfig: {
  19.             setAuthBGImgPath: 'widget://' + _this.config.bgImg, // 背景
  20.             setNavColor: _this.config.navBg,
  21.             setNavText: _this.config.navTxt,
  22.             setNavTextColor: _this.config.navColor,
  23.             setNavTextSize: _this.config.navSize,
  24.             setAuthNavTransparent: _this.config.navClear,
  25.             setAuthNavHidden: _this.config.navHidde,

  26.             setNavReturnBtnWidth: '25',
  27.             setNavReturnImgPath: 'sy_sdk_left',
  28.             setNavReturnBtnOffsetX: '0',
  29.             setNavReturnBtnOffsetY: '-1',
  30.             setNavReturnBtnOffsetRightX: '-1',
  31.             setNavReturnBtnHeight: '25',
  32.             setNavReturnImgHidden: 'false',

  33.             setNumberColor: _this.config.phoneColor,

  34.             setLogBtnText: _this.config.loginTxt,
  35.             setLogBtnTextColor: _this.config.loginColor,
  36.             setLogBtnImgPath: 'widget://' + _this.config.loginImg,


  37.             setLogoImgPath: 'widget://' + _this.config.logoImg,
  38.             setPrivacyState: _this.config.check,

  39.             setPrivacyText: {
  40.                 privacyTextOne: '同意',
  41.                 privacyTextFive: "并授权本APP登录"
  42.             },
  43.         },
  44.         widgets: {
  45.             widget1: {
  46.                 widgetId: "customView_one",
  47.                 type: "TextView",
  48.                 left: "",
  49.                 top: "330",
  50.                 right: "",
  51.                 bottom: "",
  52.                 width: screenWidth_Portrait * 0.75,
  53.                 height: "50",
  54.                 textContent: "其他手机号码登入",
  55.                 textFont: "13",
  56.                 textColor: "#000000",
  57.                 backgroundColor: "",
  58.                 backgroundImgPath: 'widget://' + _this.config.otherImg,
  59.                 isFinish: false
  60.             },
  61.         },
  62.     };


  63.     _this.iosview = {
  64.         clBackgroundImg: _this.config.bgImg,
  65.         shouldAutorotate: false, //支持自动旋转
  66.         supportedInterfaceOrientations: 5,

  67.         clNavigationBackgroundClear: true, //导航栏透明
  68.         clNavigationBackBtnImage: "ximafge/shanyanImg/close-white.png", //返回按钮图片
  69.         clNavBackBtnAlimentRight: false, //返回按钮居右,设置自定义导航栏返回按钮时,以自定义为准

  70.         clLogoImage: _this.config.logoImg, //logo图片
  71.         clLoginBtnText: _this.config.loginTxt, //一键登录按钮文字
  72.         clLoginBtnTextColor: [1, 1, 1, 1.0], //rgba
  73.         clLoginBtnBgColor: [0.825, 0.607, 0.290, 1.0], //rgba
  74.         clLoginBtnTextFont: 16,
  75.         clLoginBtnCornerRadius: 20,
  76.         clLoginBtnBorderWidth: 0.5,

  77.         clPhoneNumberFont: 20.0 * screenScale,
  78.         clPhoneNumberColor: [1, 1, 1, 1.0],
  79.         clSloganTextColor: [1, 1, 1, 1.0],

  80.         clAppPrivacyColor: [
  81.             [0.6, 0.6, 0.6, 1.0],
  82.             [0, 1, 0, 1.0]
  83.         ], //2 item,commomTextColor and appPrivacyTextColor
  84.         clAppPrivacyTextFont: 11 * screenScale,
  85.         clAppPrivacyTextAlignment: 0, //0: center 1: left 2: right

  86.         clCheckBoxVerticalAlignmentToAppPrivacyCenterY: true,
  87.         clCheckBoxSize: [25, 25], //2 item, width and height
  88.         clCheckBoxUncheckedImage: "ximafge/select4.png",
  89.         clCheckBoxCheckedImage: "ximafge/select3.png",

  90.         clLoadingSize: [50, 50], //2 item, width and height
  91.         clLoadingTintColor: [0.2, 0.8, 0.2, 1],
  92.         clLoadingBackgroundColor: [1, 1, 1, 1],
  93.         clLoadingCornerRadius: 5,

  94.         clOrientationLayOutPortrait: {
  95.             clLayoutLogoWidth: clLayoutLogoWidth_Portrait,
  96.             clLayoutLogoHeight: clLayoutLogoHeight_Portrait,
  97.             clLayoutLogoCenterX: clLayoutLogoCenterX_Portrait,
  98.             clLayoutLogoTop: clLayoutLogoTop_Portrait,

  99.             clLayoutPhoneCenterY: clLayoutPhoneCenterY_Portrait,
  100.             clLayoutPhoneHeight: clLayoutPhoneHeight_Portrait,
  101.             clLayoutPhoneLeft: clLayoutPhoneLeft_Portrait,
  102.             clLayoutPhoneRight: clLayoutPhoneRight_Portrait,

  103.             clLayoutLoginBtnCenterY: clLayoutLoginBtnCenterY_Portrait,
  104.             clLayoutLoginBtnHeight: clLayoutLoginBtnHeight_Portrait,
  105.             clLayoutLoginBtnLeft: clLayoutLoginBtnLeft_Portrait,
  106.             clLayoutLoginBtnRight: clLayoutLoginBtnRight_Portrait,

  107.             clLayoutAppPrivacyLeft: clLayoutAppPrivacyLeft_Portrait,
  108.             clLayoutAppPrivacyRight: clLayoutAppPrivacyRight_Portrait,
  109.             clLayoutAppPrivacyBottom: clLayoutAppPrivacyBottom_Portrait,
  110.             clLayoutAppPrivacyHeight: clLayoutAppPrivacyHeight_Portrait,

  111.             clLayoutSloganLeft: clLayoutSloganLeft_Portrait,
  112.             clLayoutSloganRight: clLayoutSloganRight_Portrait,
  113.             clLayoutSloganHeight: clLayoutSloganHeight_Portrait,
  114.             clLayoutSloganBottom: clLayoutSloganBottom_Portrait,
  115.         },
  116.         clOrientationLayOutLandscape: {

  117.             clLayoutLogoWidth: clLayoutLogoWidth_Landscape,
  118.             clLayoutLogoHeight: clLayoutLogoHeight_Landscape,
  119.             clLayoutLogoCenterX: clLayoutLogoCenterX_Landscape,
  120.             clLayoutLogoTop: clLayoutLogoTop_Landscape,

  121.             clLayoutPhoneCenterY: clLayoutPhoneCenterY_Landscape,
  122.             clLayoutPhoneHeight: clLayoutPhoneHeight_Landscape,
  123.             clLayoutPhoneLeft: clLayoutPhoneLeft_Landscape,
  124.             clLayoutPhoneRight: clLayoutPhoneRight_Landscape,

  125.             clLayoutLoginBtnCenterY: clLayoutLoginBtnCenterY_Landscape,
  126.             clLayoutLoginBtnHeight: clLayoutLoginBtnHeight_Landscape,
  127.             clLayoutLoginBtnLeft: clLayoutLoginBtnLeft_Landscape,
  128.             clLayoutLoginBtnRight: clLayoutLoginBtnRight_Landscape,

  129.             clLayoutAppPrivacyLeft: clLayoutAppPrivacyLeft_Landscape,
  130.             clLayoutAppPrivacyRight: clLayoutAppPrivacyRight_Landscape,
  131.             clLayoutAppPrivacyBottom: clLayoutAppPrivacyBottom_Landscape,
  132.             clLayoutAppPrivacyHeight: clLayoutAppPrivacyHeight_Landscape,

  133.             clLayoutSloganLeft: clLayoutSloganLeft_Landscape,
  134.             clLayoutSloganRight: clLayoutSloganRight_Landscape,
  135.             clLayoutSloganHeight: clLayoutSloganHeight_Landscape,
  136.             clLayoutSloganBottom: clLayoutSloganBottom_Landscape,
  137.         },
  138.         widgets: {
  139.             widget0: {
  140.                 widgetId: "customView_one", //字符标记
  141.                 type: "Button", // 类型:Button:按钮,ImageView:图片 TextView:文本
  142.                 textContent: "其他手机号码登入", //文字
  143.                 textFont: 14, //字体
  144.                 textColor: [0, 0, 0, 1], //文字颜色[r,g,b,a]
  145.                 backgroundColor: [1, 1, 1, 1], //控件背景色[r,g,b,a]
  146.                 numberOfLines: 0, //行数:默认单行, 0:无限,自动换行,其他:指定行数
  147.                 textAlignment: 1, //0: center 1: left 2: right //仅TextView有效
  148.                 clLayoutLeft: clLayoutLoginBtnLeft_Portrait,
  149.                 clLayoutRight: clLayoutLoginBtnRight_Portrait,
  150.                 clLayoutBottom: -320,
  151.                 clLayoutWidth: screenWidth_Portrait * 0.8,

  152.                 clLayoutHeight: clLayoutLoginBtnHeight_Portrait,
  153.                 cornerRadius: 20,
  154.                 masksToBounds: true
  155.             },
  156.         }
  157.     };
复制代码
您需要登录后才可以回帖 登录

本版积分规则