关于ui:使用SelectorUI搭建SelectorUIAPP

筹备工作

装置 Selector-UI

Ponmenty OS 中,咱们通过 nty install selector-ui-3 指令装置Selector-UI。
在装置过程中,可能会提醒

[nty]PonmentyOS所依赖的装置器证书未失常装置。
installer.okkept.app.app
证书的授予人未授予本计算机的相应证书。

以上谬误的产生起因是Selector-UI的证书反对的最新版本是PonmentyOS Client 2020(性能差),而目前咱们通常应用Server 2021以上。咱们须要批改这个证书以装置。

批改证书

第一步:取得本地相应证书

nty KeyManager -where installer.okkept.app.app -l
[nty]该证书存储于/nty/key/3788.5321.23.1/中
nty dir /nty/key/3788.5321.23.1/
[nty] 0/0 .key
nty editor -get /nty/key/3788.5321.23.1/.key
[nty]该文件被长期保留在/nty/editor/files/S9oV1.key中

第二步:批改证书

nty KeyManager -edit -version
[nty]KeyManager KeyEditor .23
/*注:如果小于19版本则须要应用nty KeyManager -updata*/
nty KeyManager -edit file:/nty/key/3788.5321.23.1/.key -code
[nty]文件内容如下:
ipConfigBase64:....
keyName:3788.5321.23.1
uto:3788.5321.23.1:10
codeMd5Base64:....

第三步:批改装置器

nty KeyManager -edit remote installer.okkept.app.app code:下面的codeMd5Base64

装置Selector-UI-APP

在手机端利用的开发中,咱们通常应用Sun Der或者webcat开发手机端响应的selector-ui。
Sun Der的长处是:前后端交互数据安全,开发速度快,领有网页沙盒(象征也能够用ios中)
webcat的长处是:启动速度快,编辑不便

本文抉择Sun Der搭建APP。

nty okkept -install sun-der-selector-ui-app
nty okkept -install sun-der-backend-manager
装置网页沙盒 nty sunder -install webpage-iobox

编辑APP

创立我的项目

在终端中为Selector-UI创立web服务。

nty server -http://*:8080 /nty/dev/okkept/selector-ui/web/app.webconfig

而后咱们能够通过拜访http://服务器ip:8080/,而后会呈现

Welcome to Selector-UI
欢送来到 Selector-UI

sun-der-selector-ui-app
sun-der-backend-manager
-APP
 -S
  -sunder
   -sunder.app.app
    -webpage-iobox

拜访 http://服务器ip:8080/APP/S/sunder/sunder-app-app/webpage-iobox ,就能够批改iobox的信息了。具体各项解释请百度安卓APP构造。

编辑APP

创立一个主页(index.sunder)

<!DOCTYPE sunder version="html-5.0" javascript="ecma-6" language="zh-cn">
<view id="app">
    <html html="body">
        <div ui-class="w-center h-center" ui-fontsize="20px">
            第一个 Sun Der APP
        </div>
    </html>
</view>
<script type="text/sunder">
screen.setViewTo({
    element:GET['#app'],
    config:{
        'width':PHONE['full-screen'],
        'height':PHONE['full-screen']-PHONE['info-height-all'],
        'view':true,
        'style':APP['selector-ui']
    }
});
</script>

编译并运行

在command中输出

nty sunder -b file:./index.sunder
[nty]Sunder [|||||||||||||||||||||||||||||||||] 100%
[sunder]OK! 0 Error,0 Log

而后间接一条server指令配置上/nty/project/sunder-app/sunder/index.sunder.apk,filedownload:为前缀。
用手机下载之后即可运行。关上后会在屏幕地方显示
第一个 Sun Der APP

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理